{
  "version": 3,
  "sources": ["../../../../node_modules/react/cjs/react.development.js", "../../../../node_modules/react/index.js", "../../../../node_modules/scheduler/cjs/scheduler.development.js", "../../../../node_modules/scheduler/index.js", "../../../../node_modules/react-dom/cjs/react-dom.development.js", "../../../../node_modules/react-dom/index.js", "../../../../node_modules/react-dom/client.js", "../../../../node_modules/sweetalert2/dist/sweetalert2.all.js", "../../../../node_modules/react/cjs/react-jsx-runtime.development.js", "../../../../node_modules/react/jsx-runtime.js", "../../../javascript/welcome/app.jsx", "../../../javascript/welcome/index.jsx", "../../../javascript/bundles/constants.es6.jsx", "../../../javascript/components/search_menu.es6.jsx", "../../../javascript/components/paginate.es6.jsx", "../../../javascript/components/order_status.es6.jsx", "../../../javascript/bundles/model.js", "../../../../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs", "../../../../node_modules/framer-motion/src/utils/use-constant.ts", "../../../../node_modules/framer-motion/src/utils/is-browser.ts", "../../../../node_modules/framer-motion/src/utils/use-isomorphic-effect.ts", "../../../../node_modules/framer-motion/src/context/PresenceContext.ts", "../../../../node_modules/motion-utils/src/array.ts", "../../../../node_modules/motion-utils/src/clamp.ts", "../../../../node_modules/motion-utils/src/format-error-message.ts", "../../../../node_modules/motion-utils/src/errors.ts", "../../../../node_modules/motion-utils/src/global-config.ts", "../../../../node_modules/motion-utils/src/is-numerical-string.ts", "../../../../node_modules/motion-utils/src/is-object.ts", "../../../../node_modules/motion-utils/src/is-zero-value-string.ts", "../../../../node_modules/motion-utils/src/memo.ts", "../../../../node_modules/motion-utils/src/noop.ts", "../../../../node_modules/motion-utils/src/pipe.ts", "../../../../node_modules/motion-utils/src/progress.ts", "../../../../node_modules/motion-utils/src/subscription-manager.ts", "../../../../node_modules/motion-utils/src/time-conversion.ts", "../../../../node_modules/motion-utils/src/velocity-per-second.ts", "../../../../node_modules/motion-utils/src/warn-once.ts", "../../../../node_modules/motion-utils/src/easing/cubic-bezier.ts", "../../../../node_modules/motion-utils/src/easing/modifiers/mirror.ts", "../../../../node_modules/motion-utils/src/easing/modifiers/reverse.ts", "../../../../node_modules/motion-utils/src/easing/back.ts", "../../../../node_modules/motion-utils/src/easing/anticipate.ts", "../../../../node_modules/motion-utils/src/easing/circ.ts", "../../../../node_modules/motion-utils/src/easing/ease.ts", "../../../../node_modules/motion-utils/src/easing/utils/is-easing-array.ts", "../../../../node_modules/motion-utils/src/easing/utils/is-bezier-definition.ts", "../../../../node_modules/motion-utils/src/easing/utils/map.ts", "../../../../node_modules/motion-dom/src/frameloop/order.ts", "../../../../node_modules/motion-dom/src/stats/buffer.ts", "../../../../node_modules/motion-dom/src/frameloop/render-step.ts", "../../../../node_modules/motion-dom/src/frameloop/batcher.ts", "../../../../node_modules/motion-dom/src/frameloop/frame.ts", "../../../../node_modules/motion-dom/src/frameloop/sync-time.ts", "../../../../node_modules/motion-dom/src/stats/animation-count.ts", "../../../../node_modules/motion-dom/src/animation/utils/is-css-variable.ts", "../../../../node_modules/motion-dom/src/value/types/numbers/index.ts", "../../../../node_modules/motion-dom/src/value/types/utils/sanitize.ts", "../../../../node_modules/motion-dom/src/value/types/utils/float-regex.ts", "../../../../node_modules/motion-dom/src/value/types/utils/is-nullish.ts", "../../../../node_modules/motion-dom/src/value/types/utils/single-color-regex.ts", "../../../../node_modules/motion-dom/src/value/types/color/utils.ts", "../../../../node_modules/motion-dom/src/value/types/color/rgba.ts", "../../../../node_modules/motion-dom/src/value/types/color/hex.ts", "../../../../node_modules/motion-dom/src/value/types/numbers/units.ts", "../../../../node_modules/motion-dom/src/value/types/color/hsla.ts", "../../../../node_modules/motion-dom/src/value/types/color/index.ts", "../../../../node_modules/motion-dom/src/value/types/utils/color-regex.ts", "../../../../node_modules/motion-dom/src/value/types/complex/index.ts", "../../../../node_modules/motion-dom/src/value/types/color/hsla-to-rgba.ts", "../../../../node_modules/motion-dom/src/utils/mix/immediate.ts", "../../../../node_modules/motion-dom/src/utils/mix/number.ts", "../../../../node_modules/motion-dom/src/utils/mix/color.ts", "../../../../node_modules/motion-dom/src/utils/mix/visibility.ts", "../../../../node_modules/motion-dom/src/utils/mix/complex.ts", "../../../../node_modules/motion-dom/src/utils/mix/index.ts", "../../../../node_modules/motion-dom/src/animation/drivers/frame.ts", "../../../../node_modules/motion-dom/src/animation/waapi/utils/linear.ts", "../../../../node_modules/motion-dom/src/animation/generators/utils/calc-duration.ts", "../../../../node_modules/motion-dom/src/animation/generators/utils/create-generator-easing.ts", "../../../../node_modules/motion-dom/src/animation/generators/utils/velocity.ts", "../../../../node_modules/motion-dom/src/animation/generators/spring/defaults.ts", "../../../../node_modules/motion-dom/src/animation/generators/spring/find.ts", "../../../../node_modules/motion-dom/src/animation/generators/spring/index.ts", "../../../../node_modules/motion-dom/src/animation/generators/inertia.ts", "../../../../node_modules/motion-dom/src/utils/interpolate.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/offsets/fill.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/offsets/default.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/offsets/time.ts", "../../../../node_modules/motion-dom/src/animation/generators/keyframes.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/get-final.ts", "../../../../node_modules/motion-dom/src/animation/utils/replace-transition-type.ts", "../../../../node_modules/motion-dom/src/animation/utils/WithPromise.ts", "../../../../node_modules/motion-dom/src/animation/JSAnimation.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/utils/fill-wildcards.ts", "../../../../node_modules/motion-dom/src/render/dom/parse-transform.ts", "../../../../node_modules/motion-dom/src/render/utils/keys-transform.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/utils/unit-conversion.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/KeyframesResolver.ts", "../../../../node_modules/motion-dom/src/render/dom/is-css-var.ts", "../../../../node_modules/motion-dom/src/render/dom/style-set.ts", "../../../../node_modules/motion-dom/src/utils/supports/flags.ts", "../../../../node_modules/motion-dom/src/utils/supports/memo.ts", "../../../../node_modules/motion-dom/src/utils/supports/scroll-timeline.ts", "../../../../node_modules/motion-dom/src/utils/supports/linear-easing.ts", "../../../../node_modules/motion-dom/src/animation/waapi/easing/cubic-bezier.ts", "../../../../node_modules/motion-dom/src/animation/waapi/easing/supported.ts", "../../../../node_modules/motion-dom/src/animation/waapi/easing/map-easing.ts", "../../../../node_modules/motion-dom/src/animation/waapi/start-waapi-animation.ts", "../../../../node_modules/motion-dom/src/animation/generators/utils/is-generator.ts", "../../../../node_modules/motion-dom/src/animation/waapi/utils/apply-generator.ts", "../../../../node_modules/motion-dom/src/animation/NativeAnimation.ts", "../../../../node_modules/motion-dom/src/animation/waapi/utils/unsupported-easing.ts", "../../../../node_modules/motion-dom/src/animation/NativeAnimationExtended.ts", "../../../../node_modules/motion-dom/src/animation/utils/is-animatable.ts", "../../../../node_modules/motion-dom/src/animation/utils/can-animate.ts", "../../../../node_modules/motion-dom/src/animation/utils/make-animation-instant.ts", "../../../../node_modules/motion-dom/src/animation/waapi/supports/waapi.ts", "../../../../node_modules/motion-dom/src/animation/AsyncMotionValueAnimation.ts", "../../../../node_modules/motion-dom/src/animation/utils/calc-child-stagger.ts", "../../../../node_modules/motion-dom/src/animation/utils/css-variables-conversion.ts", "../../../../node_modules/motion-dom/src/animation/utils/default-transitions.ts", "../../../../node_modules/motion-dom/src/animation/utils/get-final-keyframe.ts", "../../../../node_modules/motion-dom/src/animation/utils/resolve-transition.ts", "../../../../node_modules/motion-dom/src/animation/utils/get-value-transition.ts", "../../../../node_modules/motion-dom/src/animation/utils/is-transition-defined.ts", "../../../../node_modules/motion-dom/src/animation/interfaces/motion-value.ts", "../../../../node_modules/motion-dom/src/render/utils/resolve-variants.ts", "../../../../node_modules/motion-dom/src/render/utils/resolve-dynamic-variants.ts", "../../../../node_modules/motion-dom/src/render/utils/keys-position.ts", "../../../../node_modules/motion-dom/src/value/index.ts", "../../../../node_modules/motion-dom/src/render/utils/is-keyframes-target.ts", "../../../../node_modules/motion-dom/src/render/utils/setters.ts", "../../../../node_modules/motion-dom/src/value/utils/is-motion-value.ts", "../../../../node_modules/motion-dom/src/value/will-change/is.ts", "../../../../node_modules/motion-dom/src/value/will-change/add-will-change.ts", "../../../../node_modules/motion-dom/src/render/dom/utils/camel-to-dash.ts", "../../../../node_modules/motion-dom/src/animation/optimized-appear/data-id.ts", "../../../../node_modules/motion-dom/src/animation/optimized-appear/get-appear-id.ts", "../../../../node_modules/motion-dom/src/animation/interfaces/visual-element-target.ts", "../../../../node_modules/motion-dom/src/animation/interfaces/visual-element-variant.ts", "../../../../node_modules/motion-dom/src/animation/interfaces/visual-element.ts", "../../../../node_modules/motion-dom/src/value/types/auto.ts", "../../../../node_modules/motion-dom/src/value/types/test.ts", "../../../../node_modules/motion-dom/src/value/types/dimensions.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/utils/is-none.ts", "../../../../node_modules/motion-dom/src/value/types/complex/filter.ts", "../../../../node_modules/motion-dom/src/value/types/complex/mask.ts", "../../../../node_modules/motion-dom/src/value/types/int.ts", "../../../../node_modules/motion-dom/src/value/types/maps/transform.ts", "../../../../node_modules/motion-dom/src/value/types/maps/number.ts", "../../../../node_modules/motion-dom/src/value/types/maps/defaults.ts", "../../../../node_modules/motion-dom/src/value/types/utils/animatable-none.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/utils/make-none-animatable.ts", "../../../../node_modules/motion-dom/src/animation/keyframes/DOMKeyframesResolver.ts", "../../../../node_modules/motion-dom/src/animation/waapi/utils/accelerated-values.ts", "../../../../node_modules/motion-dom/src/utils/resolve-elements.ts", "../../../../node_modules/motion-dom/src/value/types/utils/get-as-type.ts", "../../../../node_modules/motion-dom/src/utils/is-html-element.ts", "../../../../node_modules/motion-dom/src/frameloop/microtask.ts", "../../../../node_modules/motion-dom/src/gestures/drag/state/is-active.ts", "../../../../node_modules/motion-dom/src/gestures/drag/state/set-active.ts", "../../../../node_modules/motion-dom/src/gestures/utils/setup.ts", "../../../../node_modules/motion-dom/src/gestures/hover.ts", "../../../../node_modules/motion-dom/src/gestures/utils/is-node-or-child.ts", "../../../../node_modules/motion-dom/src/gestures/utils/is-primary-pointer.ts", "../../../../node_modules/motion-dom/src/gestures/press/utils/is-keyboard-accessible.ts", "../../../../node_modules/motion-dom/src/gestures/press/utils/state.ts", "../../../../node_modules/motion-dom/src/gestures/press/utils/keyboard.ts", "../../../../node_modules/motion-dom/src/gestures/press/index.ts", "../../../../node_modules/motion-dom/src/utils/is-svg-element.ts", "../../../../node_modules/motion-dom/src/resize/handle-element.ts", "../../../../node_modules/motion-dom/src/resize/handle-window.ts", "../../../../node_modules/motion-dom/src/resize/index.ts", "../../../../node_modules/motion-dom/src/utils/is-svg-svg-element.ts", "../../../../node_modules/motion-dom/src/value/types/utils/find.ts", "../../../../node_modules/motion-dom/src/projection/geometry/models.ts", "../../../../node_modules/motion-dom/src/render/store.ts", "../../../../node_modules/motion-dom/src/render/utils/is-animation-controls.ts", "../../../../node_modules/motion-dom/src/render/utils/is-variant-label.ts", "../../../../node_modules/motion-dom/src/render/utils/variant-props.ts", "../../../../node_modules/motion-dom/src/render/utils/is-controlling-variants.ts", "../../../../node_modules/motion-dom/src/render/utils/motion-values.ts", "../../../../node_modules/motion-dom/src/render/utils/reduced-motion/state.ts", "../../../../node_modules/motion-dom/src/render/utils/reduced-motion/index.ts", "../../../../node_modules/motion-dom/src/render/VisualElement.ts", "../../../../node_modules/motion-dom/src/render/dom/DOMVisualElement.ts", "../../../../node_modules/motion-dom/src/render/Feature.ts", "../../../../node_modules/motion-dom/src/projection/geometry/conversion.ts", "../../../../node_modules/motion-dom/src/projection/utils/has-transform.ts", "../../../../node_modules/motion-dom/src/projection/geometry/delta-apply.ts", "../../../../node_modules/motion-dom/src/projection/utils/measure.ts", "../../../../node_modules/motion-dom/src/render/html/utils/build-transform.ts", "../../../../node_modules/motion-dom/src/render/html/utils/build-styles.ts", "../../../../node_modules/motion-dom/src/render/html/utils/render.ts", "../../../../node_modules/motion-dom/src/projection/styles/scale-border-radius.ts", "../../../../node_modules/motion-dom/src/projection/styles/scale-box-shadow.ts", "../../../../node_modules/motion-dom/src/projection/styles/scale-correction.ts", "../../../../node_modules/motion-dom/src/render/utils/is-forced-motion-value.ts", "../../../../node_modules/motion-dom/src/render/html/utils/scrape-motion-values.ts", "../../../../node_modules/motion-dom/src/render/html/HTMLVisualElement.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/path.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/build-attrs.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/camel-case-attrs.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/is-svg-tag.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/render.ts", "../../../../node_modules/motion-dom/src/render/svg/utils/scrape-motion-values.ts", "../../../../node_modules/motion-dom/src/render/svg/SVGVisualElement.ts", "../../../../node_modules/motion-dom/src/render/utils/get-variant-context.ts", "../../../../node_modules/motion-dom/src/render/utils/shallow-compare.ts", "../../../../node_modules/motion-dom/src/render/utils/animation-state.ts", "../../../../node_modules/motion-dom/src/projection/geometry/copy.ts", "../../../../node_modules/motion-dom/src/projection/geometry/delta-calc.ts", "../../../../node_modules/motion-dom/src/projection/geometry/delta-remove.ts", "../../../../node_modules/motion-dom/src/projection/geometry/utils.ts", "../../../../node_modules/motion-dom/src/projection/utils/each-axis.ts", "../../../../node_modules/motion-dom/src/projection/styles/transform.ts", "../../../../node_modules/motion-dom/src/projection/animation/mix-values.ts", "../../../../node_modules/motion-dom/src/animation/animate/single-value.ts", "../../../../node_modules/motion-dom/src/events/add-dom-event.ts", "../../../../node_modules/motion-dom/src/projection/utils/compare-by-depth.ts", "../../../../node_modules/motion-dom/src/projection/utils/flat-tree.ts", "../../../../node_modules/motion-dom/src/utils/delay.ts", "../../../../node_modules/motion-dom/src/value/utils/resolve-motion-value.ts", "../../../../node_modules/motion-dom/src/projection/shared/stack.ts", "../../../../node_modules/motion-dom/src/projection/node/state.ts", "../../../../node_modules/motion-dom/src/projection/node/create-projection-node.ts", "../../../../node_modules/motion-dom/src/projection/node/DocumentProjectionNode.ts", "../../../../node_modules/motion-dom/src/projection/node/HTMLProjectionNode.ts", "../../../../node_modules/framer-motion/src/context/MotionConfigContext.tsx", "../../../../node_modules/framer-motion/src/components/AnimatePresence/use-presence.ts", "../../../../node_modules/framer-motion/src/context/LazyContext.ts", "../../../../node_modules/framer-motion/src/motion/features/definitions.ts", "../../../../node_modules/framer-motion/src/motion/features/load-features.ts", "../../../../node_modules/framer-motion/src/motion/utils/valid-prop.ts", "../../../../node_modules/framer-motion/src/render/dom/utils/filter-props.ts", "../../../../node_modules/framer-motion/src/context/MotionContext/index.ts", "../../../../node_modules/framer-motion/src/context/MotionContext/utils.ts", "../../../../node_modules/framer-motion/src/context/MotionContext/create.ts", "../../../../node_modules/framer-motion/src/render/html/utils/create-render-state.ts", "../../../../node_modules/framer-motion/src/render/html/use-props.ts", "../../../../node_modules/framer-motion/src/render/svg/utils/create-render-state.ts", "../../../../node_modules/framer-motion/src/render/svg/use-props.ts", "../../../../node_modules/framer-motion/src/render/svg/lowercase-elements.ts", "../../../../node_modules/framer-motion/src/render/dom/utils/is-svg-component.ts", "../../../../node_modules/framer-motion/src/render/dom/use-render.ts", "../../../../node_modules/framer-motion/src/motion/utils/use-visual-state.ts", "../../../../node_modules/framer-motion/src/render/html/use-html-visual-state.ts", "../../../../node_modules/framer-motion/src/render/svg/use-svg-visual-state.ts", "../../../../node_modules/framer-motion/src/motion/utils/symbol.ts", "../../../../node_modules/framer-motion/src/motion/utils/use-motion-ref.ts", "../../../../node_modules/framer-motion/src/utils/is-ref-object.ts", "../../../../node_modules/framer-motion/src/motion/utils/use-visual-element.ts", "../../../../node_modules/framer-motion/src/motion/index.tsx", "../../../../node_modules/framer-motion/src/render/components/create-proxy.ts", "../../../../node_modules/framer-motion/src/render/dom/create-visual-element.ts", "../../../../node_modules/framer-motion/src/motion/features/animation/index.ts", "../../../../node_modules/framer-motion/src/motion/features/animation/exit.ts", "../../../../node_modules/framer-motion/src/motion/features/animations.ts", "../../../../node_modules/framer-motion/src/events/event-info.ts", "../../../../node_modules/framer-motion/src/events/add-pointer-event.ts", "../../../../node_modules/framer-motion/src/utils/get-context-window.ts", "../../../../node_modules/framer-motion/src/utils/distance.ts", "../../../../node_modules/framer-motion/src/gestures/pan/PanSession.ts", "../../../../node_modules/framer-motion/src/gestures/drag/utils/constraints.ts", "../../../../node_modules/framer-motion/src/gestures/drag/VisualElementDragControls.ts", "../../../../node_modules/framer-motion/src/gestures/drag/index.ts", "../../../../node_modules/framer-motion/src/gestures/pan/index.ts", "../../../../node_modules/framer-motion/src/motion/features/layout/MeasureLayout.tsx", "../../../../node_modules/framer-motion/src/motion/features/drag.ts", "../../../../node_modules/framer-motion/src/gestures/hover.ts", "../../../../node_modules/framer-motion/src/gestures/focus.ts", "../../../../node_modules/framer-motion/src/gestures/press.ts", "../../../../node_modules/framer-motion/src/motion/features/viewport/observers.ts", "../../../../node_modules/framer-motion/src/motion/features/viewport/index.ts", "../../../../node_modules/framer-motion/src/motion/features/gestures.ts", "../../../../node_modules/framer-motion/src/motion/features/layout.ts", "../../../../node_modules/framer-motion/src/render/components/motion/feature-bundle.ts", "../../../../node_modules/framer-motion/src/render/components/motion/proxy.ts"],
  "sourcesContent": ["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var ReactVersion = '18.1.0';\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE =  Symbol.for('react.element');\nvar REACT_PORTAL_TYPE =  Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE =  Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE =  Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE =  Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE =  Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE =  Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE =  Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE =  Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE =  Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE =  Symbol.for('react.memo');\nvar REACT_LAZY_TYPE =  Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE =  Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL =  Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n  /**\n   * @internal\n   * @type {ReactComponent}\n   */\n  current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n  transition: null\n};\n\nvar ReactCurrentActQueue = {\n  current: null,\n  // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n  isBatchingLegacy: false,\n  didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n  /**\n   * @internal\n   * @type {ReactComponent}\n   */\n  current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n  {\n    currentExtraStackFrame = stack;\n  }\n}\n\n{\n  ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n    {\n      currentExtraStackFrame = stack;\n    }\n  }; // Stack implementation injected by the current renderer.\n\n\n  ReactDebugCurrentFrame.getCurrentStack = null;\n\n  ReactDebugCurrentFrame.getStackAddendum = function () {\n    var stack = ''; // Add an extra top frame while an element is being validated\n\n    if (currentExtraStackFrame) {\n      stack += currentExtraStackFrame;\n    } // Delegate to the injected renderer-specific implementation\n\n\n    var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n    if (impl) {\n      stack += impl() || '';\n    }\n\n    return stack;\n  };\n}\n\nvar ReactSharedInternals = {\n  ReactCurrentDispatcher: ReactCurrentDispatcher,\n  ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n  ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n  ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n  ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n  {\n    {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      printWarning('warn', format, args);\n    }\n  }\n}\nfunction error(format) {\n  {\n    {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n  {\n    var _constructor = publicInstance.constructor;\n    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n    var warningKey = componentName + \".\" + callerName;\n\n    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n      return;\n    }\n\n    error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n    didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n  }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n  /**\n   * Checks whether or not this composite component is mounted.\n   * @param {ReactClass} publicInstance The instance we want to test.\n   * @return {boolean} True if mounted, false otherwise.\n   * @protected\n   * @final\n   */\n  isMounted: function (publicInstance) {\n    return false;\n  },\n\n  /**\n   * Forces an update. This should only be invoked when it is known with\n   * certainty that we are **not** in a DOM transaction.\n   *\n   * You may want to call this when you know that some deeper aspect of the\n   * component's state has changed but `setState` was not called.\n   *\n   * This will not invoke `shouldComponentUpdate`, but it will invoke\n   * `componentWillUpdate` and `componentDidUpdate`.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} callerName name of the calling function in the public API.\n   * @internal\n   */\n  enqueueForceUpdate: function (publicInstance, callback, callerName) {\n    warnNoop(publicInstance, 'forceUpdate');\n  },\n\n  /**\n   * Replaces all of the state. Always use this or `setState` to mutate state.\n   * You should treat `this.state` as immutable.\n   *\n   * There is no guarantee that `this.state` will be immediately updated, so\n   * accessing `this.state` after calling this method may return the old value.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {object} completeState Next state.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} callerName name of the calling function in the public API.\n   * @internal\n   */\n  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n    warnNoop(publicInstance, 'replaceState');\n  },\n\n  /**\n   * Sets a subset of the state. This only exists because _pendingState is\n   * internal. This provides a merging strategy that is not available to deep\n   * properties which is confusing. TODO: Expose pendingState or don't use it\n   * during the merge.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {object} partialState Next partial state to be merged with state.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} Name of the calling function in the public API.\n   * @internal\n   */\n  enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n    warnNoop(publicInstance, 'setState');\n  }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n  Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n  this.props = props;\n  this.context = context; // If a component has string refs, we will assign a different object later.\n\n  this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n  // renderer.\n\n  this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together.  You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n *        produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n  if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n    throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n  }\n\n  this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n  var deprecatedAPIs = {\n    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n  };\n\n  var defineDeprecationWarning = function (methodName, info) {\n    Object.defineProperty(Component.prototype, methodName, {\n      get: function () {\n        warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n        return undefined;\n      }\n    });\n  };\n\n  for (var fnName in deprecatedAPIs) {\n    if (deprecatedAPIs.hasOwnProperty(fnName)) {\n      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n    }\n  }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n  this.props = props;\n  this.context = context; // If a component has string refs, we will assign a different object later.\n\n  this.refs = emptyObject;\n  this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n  var refObject = {\n    current: null\n  };\n\n  {\n    Object.seal(refObject);\n  }\n\n  return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n  key: true,\n  ref: true,\n  __self: true,\n  __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n  didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n  {\n    if (hasOwnProperty.call(config, 'ref')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n  {\n    if (hasOwnProperty.call(config, 'key')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n  var warnAboutAccessingKey = function () {\n    {\n      if (!specialPropKeyWarningShown) {\n        specialPropKeyWarningShown = true;\n\n        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    }\n  };\n\n  warnAboutAccessingKey.isReactWarning = true;\n  Object.defineProperty(props, 'key', {\n    get: warnAboutAccessingKey,\n    configurable: true\n  });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n  var warnAboutAccessingRef = function () {\n    {\n      if (!specialPropRefWarningShown) {\n        specialPropRefWarningShown = true;\n\n        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    }\n  };\n\n  warnAboutAccessingRef.isReactWarning = true;\n  Object.defineProperty(props, 'ref', {\n    get: warnAboutAccessingRef,\n    configurable: true\n  });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n  {\n    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n      var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n      if (!didWarnAboutStringRefs[componentName]) {\n        error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n        didWarnAboutStringRefs[componentName] = true;\n      }\n    }\n  }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n  var element = {\n    // This tag allows us to uniquely identify this as a React Element\n    $$typeof: REACT_ELEMENT_TYPE,\n    // Built-in properties that belong on the element\n    type: type,\n    key: key,\n    ref: ref,\n    props: props,\n    // Record the component responsible for creating this element.\n    _owner: owner\n  };\n\n  {\n    // The validation flag is currently mutative. We put it on\n    // an external backing store so that we can freeze the whole object.\n    // This can be replaced with a WeakMap once they are implemented in\n    // commonly used development environments.\n    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n    // the validation flag non-enumerable (where possible, which should\n    // include every environment we run tests in), so the test framework\n    // ignores it.\n\n    Object.defineProperty(element._store, 'validated', {\n      configurable: false,\n      enumerable: false,\n      writable: true,\n      value: false\n    }); // self and source are DEV only properties.\n\n    Object.defineProperty(element, '_self', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: self\n    }); // Two elements created in two different places should be considered\n    // equal for testing purposes and therefore we hide it from enumeration.\n\n    Object.defineProperty(element, '_source', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: source\n    });\n\n    if (Object.freeze) {\n      Object.freeze(element.props);\n      Object.freeze(element);\n    }\n  }\n\n  return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n  var propName; // Reserved names are extracted\n\n  var props = {};\n  var key = null;\n  var ref = null;\n  var self = null;\n  var source = null;\n\n  if (config != null) {\n    if (hasValidRef(config)) {\n      ref = config.ref;\n\n      {\n        warnIfStringRefCannotBeAutoConverted(config);\n      }\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    }\n\n    self = config.__self === undefined ? null : config.__self;\n    source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        props[propName] = config[propName];\n      }\n    }\n  } // Children can be more than one argument, and those are transferred onto\n  // the newly allocated props object.\n\n\n  var childrenLength = arguments.length - 2;\n\n  if (childrenLength === 1) {\n    props.children = children;\n  } else if (childrenLength > 1) {\n    var childArray = Array(childrenLength);\n\n    for (var i = 0; i < childrenLength; i++) {\n      childArray[i] = arguments[i + 2];\n    }\n\n    {\n      if (Object.freeze) {\n        Object.freeze(childArray);\n      }\n    }\n\n    props.children = childArray;\n  } // Resolve default props\n\n\n  if (type && type.defaultProps) {\n    var defaultProps = type.defaultProps;\n\n    for (propName in defaultProps) {\n      if (props[propName] === undefined) {\n        props[propName] = defaultProps[propName];\n      }\n    }\n  }\n\n  {\n    if (key || ref) {\n      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n      if (key) {\n        defineKeyPropWarningGetter(props, displayName);\n      }\n\n      if (ref) {\n        defineRefPropWarningGetter(props, displayName);\n      }\n    }\n  }\n\n  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n  return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n  if (element === null || element === undefined) {\n    throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n  }\n\n  var propName; // Original props are copied\n\n  var props = assign({}, element.props); // Reserved names are extracted\n\n  var key = element.key;\n  var ref = element.ref; // Self is preserved since the owner is preserved.\n\n  var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n  // transpiler, and the original source is probably a better indicator of the\n  // true owner.\n\n  var source = element._source; // Owner will be preserved, unless ref is overridden\n\n  var owner = element._owner;\n\n  if (config != null) {\n    if (hasValidRef(config)) {\n      // Silently steal the ref from the parent.\n      ref = config.ref;\n      owner = ReactCurrentOwner.current;\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    } // Remaining properties override existing props\n\n\n    var defaultProps;\n\n    if (element.type && element.type.defaultProps) {\n      defaultProps = element.type.defaultProps;\n    }\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        if (config[propName] === undefined && defaultProps !== undefined) {\n          // Resolve default props\n          props[propName] = defaultProps[propName];\n        } else {\n          props[propName] = config[propName];\n        }\n      }\n    }\n  } // Children can be more than one argument, and those are transferred onto\n  // the newly allocated props object.\n\n\n  var childrenLength = arguments.length - 2;\n\n  if (childrenLength === 1) {\n    props.children = children;\n  } else if (childrenLength > 1) {\n    var childArray = Array(childrenLength);\n\n    for (var i = 0; i < childrenLength; i++) {\n      childArray[i] = arguments[i + 2];\n    }\n\n    props.children = childArray;\n  }\n\n  return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n  var escapeRegex = /[=:]/g;\n  var escaperLookup = {\n    '=': '=0',\n    ':': '=2'\n  };\n  var escapedString = key.replace(escapeRegex, function (match) {\n    return escaperLookup[match];\n  });\n  return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n  return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n  // Do some typechecking here since we call this blindly. We want to ensure\n  // that we don't block potential future ES APIs.\n  if (typeof element === 'object' && element !== null && element.key != null) {\n    // Explicit key\n    {\n      checkKeyStringCoercion(element.key);\n    }\n\n    return escape('' + element.key);\n  } // Implicit key determined by the index in the set\n\n\n  return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n  var type = typeof children;\n\n  if (type === 'undefined' || type === 'boolean') {\n    // All of the above are perceived as null.\n    children = null;\n  }\n\n  var invokeCallback = false;\n\n  if (children === null) {\n    invokeCallback = true;\n  } else {\n    switch (type) {\n      case 'string':\n      case 'number':\n        invokeCallback = true;\n        break;\n\n      case 'object':\n        switch (children.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n          case REACT_PORTAL_TYPE:\n            invokeCallback = true;\n        }\n\n    }\n  }\n\n  if (invokeCallback) {\n    var _child = children;\n    var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n    // so that it's consistent if the number of children grows:\n\n    var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n    if (isArray(mappedChild)) {\n      var escapedChildKey = '';\n\n      if (childKey != null) {\n        escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n      }\n\n      mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n        return c;\n      });\n    } else if (mappedChild != null) {\n      if (isValidElement(mappedChild)) {\n        {\n          // The `if` statement here prevents auto-disabling of the safe\n          // coercion ESLint rule, so we must manually disable it below.\n          // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n          if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n            checkKeyStringCoercion(mappedChild.key);\n          }\n        }\n\n        mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n        // traverseAllChildren used to do for objects as children\n        escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n        mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n        // eslint-disable-next-line react-internal/safe-string-coercion\n        escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n      }\n\n      array.push(mappedChild);\n    }\n\n    return 1;\n  }\n\n  var child;\n  var nextName;\n  var subtreeCount = 0; // Count of children found in the current subtree.\n\n  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n  if (isArray(children)) {\n    for (var i = 0; i < children.length; i++) {\n      child = children[i];\n      nextName = nextNamePrefix + getElementKey(child, i);\n      subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n    }\n  } else {\n    var iteratorFn = getIteratorFn(children);\n\n    if (typeof iteratorFn === 'function') {\n      var iterableChildren = children;\n\n      {\n        // Warn about using Maps as children\n        if (iteratorFn === iterableChildren.entries) {\n          if (!didWarnAboutMaps) {\n            warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n          }\n\n          didWarnAboutMaps = true;\n        }\n      }\n\n      var iterator = iteratorFn.call(iterableChildren);\n      var step;\n      var ii = 0;\n\n      while (!(step = iterator.next()).done) {\n        child = step.value;\n        nextName = nextNamePrefix + getElementKey(child, ii++);\n        subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n      }\n    } else if (type === 'object') {\n      // eslint-disable-next-line react-internal/safe-string-coercion\n      var childrenString = String(children);\n      throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n    }\n  }\n\n  return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n  if (children == null) {\n    return children;\n  }\n\n  var result = [];\n  var count = 0;\n  mapIntoArray(children, result, '', '', function (child) {\n    return func.call(context, child, count++);\n  });\n  return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n  var n = 0;\n  mapChildren(children, function () {\n    n++; // Don't return anything\n  });\n  return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n  mapChildren(children, function () {\n    forEachFunc.apply(this, arguments); // Don't return anything.\n  }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n  return mapChildren(children, function (child) {\n    return child;\n  }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n  if (!isValidElement(children)) {\n    throw new Error('React.Children.only expected to receive a single React element child.');\n  }\n\n  return children;\n}\n\nfunction createContext(defaultValue) {\n  // TODO: Second argument used to be an optional `calculateChangedBits`\n  // function. Warn to reserve for future use?\n  var context = {\n    $$typeof: REACT_CONTEXT_TYPE,\n    // As a workaround to support multiple concurrent renderers, we categorize\n    // some renderers as primary and others as secondary. We only expect\n    // there to be two concurrent renderers at most: React Native (primary) and\n    // Fabric (secondary); React DOM (primary) and React ART (secondary).\n    // Secondary renderers store their context values on separate fields.\n    _currentValue: defaultValue,\n    _currentValue2: defaultValue,\n    // Used to track how many concurrent renderers this context currently\n    // supports within in a single renderer. Such as parallel server rendering.\n    _threadCount: 0,\n    // These are circular\n    Provider: null,\n    Consumer: null,\n    // Add these to use same hidden class in VM as ServerContext\n    _defaultValue: null,\n    _globalName: null\n  };\n  context.Provider = {\n    $$typeof: REACT_PROVIDER_TYPE,\n    _context: context\n  };\n  var hasWarnedAboutUsingNestedContextConsumers = false;\n  var hasWarnedAboutUsingConsumerProvider = false;\n  var hasWarnedAboutDisplayNameOnConsumer = false;\n\n  {\n    // A separate object, but proxies back to the original context object for\n    // backwards compatibility. It has a different $$typeof, so we can properly\n    // warn for the incorrect usage of Context as a Consumer.\n    var Consumer = {\n      $$typeof: REACT_CONTEXT_TYPE,\n      _context: context\n    }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n    Object.defineProperties(Consumer, {\n      Provider: {\n        get: function () {\n          if (!hasWarnedAboutUsingConsumerProvider) {\n            hasWarnedAboutUsingConsumerProvider = true;\n\n            error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n          }\n\n          return context.Provider;\n        },\n        set: function (_Provider) {\n          context.Provider = _Provider;\n        }\n      },\n      _currentValue: {\n        get: function () {\n          return context._currentValue;\n        },\n        set: function (_currentValue) {\n          context._currentValue = _currentValue;\n        }\n      },\n      _currentValue2: {\n        get: function () {\n          return context._currentValue2;\n        },\n        set: function (_currentValue2) {\n          context._currentValue2 = _currentValue2;\n        }\n      },\n      _threadCount: {\n        get: function () {\n          return context._threadCount;\n        },\n        set: function (_threadCount) {\n          context._threadCount = _threadCount;\n        }\n      },\n      Consumer: {\n        get: function () {\n          if (!hasWarnedAboutUsingNestedContextConsumers) {\n            hasWarnedAboutUsingNestedContextConsumers = true;\n\n            error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n          }\n\n          return context.Consumer;\n        }\n      },\n      displayName: {\n        get: function () {\n          return context.displayName;\n        },\n        set: function (displayName) {\n          if (!hasWarnedAboutDisplayNameOnConsumer) {\n            warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n            hasWarnedAboutDisplayNameOnConsumer = true;\n          }\n        }\n      }\n    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n    context.Consumer = Consumer;\n  }\n\n  {\n    context._currentRenderer = null;\n    context._currentRenderer2 = null;\n  }\n\n  return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n  if (payload._status === Uninitialized) {\n    var ctor = payload._result;\n    var thenable = ctor(); // Transition to the next state.\n    // This might throw either because it's missing or throws. If so, we treat it\n    // as still uninitialized and try again next time. Which is the same as what\n    // happens if the ctor or any wrappers processing the ctor throws. This might\n    // end up fixing it if the resolution was a concurrency bug.\n\n    thenable.then(function (moduleObject) {\n      if (payload._status === Pending || payload._status === Uninitialized) {\n        // Transition to the next state.\n        var resolved = payload;\n        resolved._status = Resolved;\n        resolved._result = moduleObject;\n      }\n    }, function (error) {\n      if (payload._status === Pending || payload._status === Uninitialized) {\n        // Transition to the next state.\n        var rejected = payload;\n        rejected._status = Rejected;\n        rejected._result = error;\n      }\n    });\n\n    if (payload._status === Uninitialized) {\n      // In case, we're still uninitialized, then we're waiting for the thenable\n      // to resolve. Set it as pending in the meantime.\n      var pending = payload;\n      pending._status = Pending;\n      pending._result = thenable;\n    }\n  }\n\n  if (payload._status === Resolved) {\n    var moduleObject = payload._result;\n\n    {\n      if (moduleObject === undefined) {\n        error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n  ' + // Break up imports to avoid accidentally parsing them as dependencies.\n        'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n      }\n    }\n\n    {\n      if (!('default' in moduleObject)) {\n        error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n  ' + // Break up imports to avoid accidentally parsing them as dependencies.\n        'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n      }\n    }\n\n    return moduleObject.default;\n  } else {\n    throw payload._result;\n  }\n}\n\nfunction lazy(ctor) {\n  var payload = {\n    // We use these fields to store the result.\n    _status: Uninitialized,\n    _result: ctor\n  };\n  var lazyType = {\n    $$typeof: REACT_LAZY_TYPE,\n    _payload: payload,\n    _init: lazyInitializer\n  };\n\n  {\n    // In production, this would just set it on the object.\n    var defaultProps;\n    var propTypes; // $FlowFixMe\n\n    Object.defineProperties(lazyType, {\n      defaultProps: {\n        configurable: true,\n        get: function () {\n          return defaultProps;\n        },\n        set: function (newDefaultProps) {\n          error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n          defaultProps = newDefaultProps; // Match production behavior more closely:\n          // $FlowFixMe\n\n          Object.defineProperty(lazyType, 'defaultProps', {\n            enumerable: true\n          });\n        }\n      },\n      propTypes: {\n        configurable: true,\n        get: function () {\n          return propTypes;\n        },\n        set: function (newPropTypes) {\n          error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n          propTypes = newPropTypes; // Match production behavior more closely:\n          // $FlowFixMe\n\n          Object.defineProperty(lazyType, 'propTypes', {\n            enumerable: true\n          });\n        }\n      }\n    });\n  }\n\n  return lazyType;\n}\n\nfunction forwardRef(render) {\n  {\n    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n    } else if (typeof render !== 'function') {\n      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n    } else {\n      if (render.length !== 0 && render.length !== 2) {\n        error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n      }\n    }\n\n    if (render != null) {\n      if (render.defaultProps != null || render.propTypes != null) {\n        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n      }\n    }\n  }\n\n  var elementType = {\n    $$typeof: REACT_FORWARD_REF_TYPE,\n    render: render\n  };\n\n  {\n    var ownName;\n    Object.defineProperty(elementType, 'displayName', {\n      enumerable: false,\n      configurable: true,\n      get: function () {\n        return ownName;\n      },\n      set: function (name) {\n        ownName = name; // The inner component shouldn't inherit this display name in most cases,\n        // because the component may be used elsewhere.\n        // But it's nice for anonymous functions to inherit the name,\n        // so that our component-stack generation logic will display their frames.\n        // An anonymous function generally suggests a pattern like:\n        //   React.forwardRef((props, ref) => {...});\n        // This kind of inner function is not used elsewhere so the side effect is okay.\n\n        if (!render.name && !render.displayName) {\n          render.displayName = name;\n        }\n      }\n    });\n  }\n\n  return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction memo(type, compare) {\n  {\n    if (!isValidElementType(type)) {\n      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n    }\n  }\n\n  var elementType = {\n    $$typeof: REACT_MEMO_TYPE,\n    type: type,\n    compare: compare === undefined ? null : compare\n  };\n\n  {\n    var ownName;\n    Object.defineProperty(elementType, 'displayName', {\n      enumerable: false,\n      configurable: true,\n      get: function () {\n        return ownName;\n      },\n      set: function (name) {\n        ownName = name; // The inner component shouldn't inherit this display name in most cases,\n        // because the component may be used elsewhere.\n        // But it's nice for anonymous functions to inherit the name,\n        // so that our component-stack generation logic will display their frames.\n        // An anonymous function generally suggests a pattern like:\n        //   React.memo((props) => {...});\n        // This kind of inner function is not used elsewhere so the side effect is okay.\n\n        if (!type.name && !type.displayName) {\n          type.displayName = name;\n        }\n      }\n    });\n  }\n\n  return elementType;\n}\n\nfunction resolveDispatcher() {\n  var dispatcher = ReactCurrentDispatcher.current;\n\n  {\n    if (dispatcher === null) {\n      error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n    }\n  } // Will result in a null access error if accessed outside render phase. We\n  // intentionally don't throw our own error because this is in a hot path.\n  // Also helps ensure this is inlined.\n\n\n  return dispatcher;\n}\nfunction useContext(Context) {\n  var dispatcher = resolveDispatcher();\n\n  {\n    // TODO: add a more generic warning for invalid values.\n    if (Context._context !== undefined) {\n      var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n      // and nobody should be using this in existing code.\n\n      if (realContext.Consumer === Context) {\n        error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n      } else if (realContext.Provider === Context) {\n        error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n      }\n    }\n  }\n\n  return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n  {\n    var dispatcher = resolveDispatcher();\n    return dispatcher.useDebugValue(value, formatterFn);\n  }\n}\nfunction useTransition() {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher$1.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher$1.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      setExtraStackFrame(stack);\n    } else {\n      setExtraStackFrame(null);\n    }\n  }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n  propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n  if (ReactCurrentOwner.current) {\n    var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n    if (name) {\n      return '\\n\\nCheck the render method of `' + name + '`.';\n    }\n  }\n\n  return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n  if (source !== undefined) {\n    var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n    var lineNumber = source.lineNumber;\n    return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n  }\n\n  return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n  if (elementProps !== null && elementProps !== undefined) {\n    return getSourceInfoErrorAddendum(elementProps.__source);\n  }\n\n  return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  var info = getDeclarationErrorAddendum();\n\n  if (!info) {\n    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n    if (parentName) {\n      info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n    }\n  }\n\n  return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n  if (!element._store || element._store.validated || element.key != null) {\n    return;\n  }\n\n  element._store.validated = true;\n  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n    return;\n  }\n\n  ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n  // property, it may be the creator of the child that's responsible for\n  // assigning it a key.\n\n  var childOwner = '';\n\n  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n    // Give the component that originally created this child.\n    childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n  }\n\n  {\n    setCurrentlyValidatingElement$1(element);\n\n    error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n    setCurrentlyValidatingElement$1(null);\n  }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n  if (typeof node !== 'object') {\n    return;\n  }\n\n  if (isArray(node)) {\n    for (var i = 0; i < node.length; i++) {\n      var child = node[i];\n\n      if (isValidElement(child)) {\n        validateExplicitKey(child, parentType);\n      }\n    }\n  } else if (isValidElement(node)) {\n    // This element was passed in a valid location.\n    if (node._store) {\n      node._store.validated = true;\n    }\n  } else if (node) {\n    var iteratorFn = getIteratorFn(node);\n\n    if (typeof iteratorFn === 'function') {\n      // Entry iterators used to provide implicit keys,\n      // but now we print a separate warning for them later.\n      if (iteratorFn !== node.entries) {\n        var iterator = iteratorFn.call(node);\n        var step;\n\n        while (!(step = iterator.next()).done) {\n          if (isValidElement(step.value)) {\n            validateExplicitKey(step.value, parentType);\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n  {\n    var type = element.type;\n\n    if (type === null || type === undefined || typeof type === 'string') {\n      return;\n    }\n\n    var propTypes;\n\n    if (typeof type === 'function') {\n      propTypes = type.propTypes;\n    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n    // Inner props are checked in the reconciler.\n    type.$$typeof === REACT_MEMO_TYPE)) {\n      propTypes = type.propTypes;\n    } else {\n      return;\n    }\n\n    if (propTypes) {\n      // Intentionally inside to avoid triggering lazy initializers:\n      var name = getComponentNameFromType(type);\n      checkPropTypes(propTypes, element.props, 'prop', name, element);\n    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n      var _name = getComponentNameFromType(type);\n\n      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n    }\n\n    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n    }\n  }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n  {\n    var keys = Object.keys(fragment.props);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key !== 'children' && key !== 'key') {\n        setCurrentlyValidatingElement$1(fragment);\n\n        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n        setCurrentlyValidatingElement$1(null);\n        break;\n      }\n    }\n\n    if (fragment.ref !== null) {\n      setCurrentlyValidatingElement$1(fragment);\n\n      error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n      setCurrentlyValidatingElement$1(null);\n    }\n  }\n}\nfunction createElementWithValidation(type, props, children) {\n  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n  // succeed and there will likely be errors in render.\n\n  if (!validType) {\n    var info = '';\n\n    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n      info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n    }\n\n    var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n    if (sourceInfo) {\n      info += sourceInfo;\n    } else {\n      info += getDeclarationErrorAddendum();\n    }\n\n    var typeString;\n\n    if (type === null) {\n      typeString = 'null';\n    } else if (isArray(type)) {\n      typeString = 'array';\n    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n      typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n      info = ' Did you accidentally export a JSX literal instead of a component?';\n    } else {\n      typeString = typeof type;\n    }\n\n    {\n      error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n    }\n  }\n\n  var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n  // TODO: Drop this when these are no longer allowed as the type argument.\n\n  if (element == null) {\n    return element;\n  } // Skip key warning if the type isn't valid since our key validation logic\n  // doesn't expect a non-string/function type and can throw confusing errors.\n  // We don't want exception behavior to differ between dev and prod.\n  // (Rendering will throw with a helpful message and as soon as the type is\n  // fixed, the key warnings will appear.)\n\n\n  if (validType) {\n    for (var i = 2; i < arguments.length; i++) {\n      validateChildKeys(arguments[i], type);\n    }\n  }\n\n  if (type === REACT_FRAGMENT_TYPE) {\n    validateFragmentProps(element);\n  } else {\n    validatePropTypes(element);\n  }\n\n  return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n  var validatedFactory = createElementWithValidation.bind(null, type);\n  validatedFactory.type = type;\n\n  {\n    if (!didWarnAboutDeprecatedCreateFactory) {\n      didWarnAboutDeprecatedCreateFactory = true;\n\n      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n    } // Legacy hook: remove it\n\n\n    Object.defineProperty(validatedFactory, 'type', {\n      enumerable: false,\n      get: function () {\n        warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n        Object.defineProperty(this, 'type', {\n          value: type\n        });\n        return type;\n      }\n    });\n  }\n\n  return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n  var newElement = cloneElement.apply(this, arguments);\n\n  for (var i = 2; i < arguments.length; i++) {\n    validateChildKeys(arguments[i], newElement.type);\n  }\n\n  validatePropTypes(newElement);\n  return newElement;\n}\n\nfunction startTransition(scope, options) {\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = {};\n  var currentTransition = ReactCurrentBatchConfig.transition;\n\n  {\n    ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n  }\n\n  try {\n    scope();\n  } finally {\n    ReactCurrentBatchConfig.transition = prevTransition;\n\n    {\n      if (prevTransition === null && currentTransition._updatedFibers) {\n        var updatedFibersCount = currentTransition._updatedFibers.size;\n\n        if (updatedFibersCount > 10) {\n          warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n        }\n\n        currentTransition._updatedFibers.clear();\n      }\n    }\n  }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n  if (enqueueTaskImpl === null) {\n    try {\n      // read require off the module object to get around the bundlers.\n      // we don't want them to detect a require and bundle a Node polyfill.\n      var requireString = ('require' + Math.random()).slice(0, 7);\n      var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n      // version of setImmediate, bypassing fake timers if any.\n\n      enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n    } catch (_err) {\n      // we're in a browser\n      // we can't use regular timers because they may still be faked\n      // so we try MessageChannel+postMessage instead\n      enqueueTaskImpl = function (callback) {\n        {\n          if (didWarnAboutMessageChannel === false) {\n            didWarnAboutMessageChannel = true;\n\n            if (typeof MessageChannel === 'undefined') {\n              error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n            }\n          }\n        }\n\n        var channel = new MessageChannel();\n        channel.port1.onmessage = callback;\n        channel.port2.postMessage(undefined);\n      };\n    }\n  }\n\n  return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n  {\n    // `act` calls can be nested, so we track the depth. This represents the\n    // number of `act` scopes on the stack.\n    var prevActScopeDepth = actScopeDepth;\n    actScopeDepth++;\n\n    if (ReactCurrentActQueue.current === null) {\n      // This is the outermost `act` scope. Initialize the queue. The reconciler\n      // will detect the queue and use it instead of Scheduler.\n      ReactCurrentActQueue.current = [];\n    }\n\n    var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n    var result;\n\n    try {\n      // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n      // set to `true` while the given callback is executed, not for updates\n      // triggered during an async event, because this is how the legacy\n      // implementation of `act` behaved.\n      ReactCurrentActQueue.isBatchingLegacy = true;\n      result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n      // which flushed updates immediately after the scope function exits, even\n      // if it's an async function.\n\n      if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n        var queue = ReactCurrentActQueue.current;\n\n        if (queue !== null) {\n          ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n          flushActQueue(queue);\n        }\n      }\n    } catch (error) {\n      popActScope(prevActScopeDepth);\n      throw error;\n    } finally {\n      ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n    }\n\n    if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n      var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n      // for it to resolve before exiting the current scope.\n\n      var wasAwaited = false;\n      var thenable = {\n        then: function (resolve, reject) {\n          wasAwaited = true;\n          thenableResult.then(function (returnValue) {\n            popActScope(prevActScopeDepth);\n\n            if (actScopeDepth === 0) {\n              // We've exited the outermost act scope. Recursively flush the\n              // queue until there's no remaining work.\n              recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            } else {\n              resolve(returnValue);\n            }\n          }, function (error) {\n            // The callback threw an error.\n            popActScope(prevActScopeDepth);\n            reject(error);\n          });\n        }\n      };\n\n      {\n        if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n          // eslint-disable-next-line no-undef\n          Promise.resolve().then(function () {}).then(function () {\n            if (!wasAwaited) {\n              didWarnNoAwaitAct = true;\n\n              error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n            }\n          });\n        }\n      }\n\n      return thenable;\n    } else {\n      var returnValue = result; // The callback is not an async function. Exit the current scope\n      // immediately, without awaiting.\n\n      popActScope(prevActScopeDepth);\n\n      if (actScopeDepth === 0) {\n        // Exiting the outermost act scope. Flush the queue.\n        var _queue = ReactCurrentActQueue.current;\n\n        if (_queue !== null) {\n          flushActQueue(_queue);\n          ReactCurrentActQueue.current = null;\n        } // Return a thenable. If the user awaits it, we'll flush again in\n        // case additional work was scheduled by a microtask.\n\n\n        var _thenable = {\n          then: function (resolve, reject) {\n            // Confirm we haven't re-entered another `act` scope, in case\n            // the user does something weird like await the thenable\n            // multiple times.\n            if (ReactCurrentActQueue.current === null) {\n              // Recursively flush the queue until there's no remaining work.\n              ReactCurrentActQueue.current = [];\n              recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            } else {\n              resolve(returnValue);\n            }\n          }\n        };\n        return _thenable;\n      } else {\n        // Since we're inside a nested `act` scope, the returned thenable\n        // immediately resolves. The outer scope will flush the queue.\n        var _thenable2 = {\n          then: function (resolve, reject) {\n            resolve(returnValue);\n          }\n        };\n        return _thenable2;\n      }\n    }\n  }\n}\n\nfunction popActScope(prevActScopeDepth) {\n  {\n    if (prevActScopeDepth !== actScopeDepth - 1) {\n      error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n    }\n\n    actScopeDepth = prevActScopeDepth;\n  }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n  {\n    var queue = ReactCurrentActQueue.current;\n\n    if (queue !== null) {\n      try {\n        flushActQueue(queue);\n        enqueueTask(function () {\n          if (queue.length === 0) {\n            // No additional work was scheduled. Finish.\n            ReactCurrentActQueue.current = null;\n            resolve(returnValue);\n          } else {\n            // Keep flushing work until there's none left.\n            recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n          }\n        });\n      } catch (error) {\n        reject(error);\n      }\n    } else {\n      resolve(returnValue);\n    }\n  }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n  {\n    if (!isFlushing) {\n      // Prevent re-entrance.\n      isFlushing = true;\n      var i = 0;\n\n      try {\n        for (; i < queue.length; i++) {\n          var callback = queue[i];\n\n          do {\n            callback = callback(true);\n          } while (callback !== null);\n        }\n\n        queue.length = 0;\n      } catch (error) {\n        // If something throws, leave the remaining callbacks on the queue.\n        queue = queue.slice(i + 1);\n        throw error;\n      } finally {\n        isFlushing = false;\n      }\n    }\n  }\n}\n\nvar createElement$1 =  createElementWithValidation ;\nvar cloneElement$1 =  cloneElementWithValidation ;\nvar createFactory =  createFactoryWithValidation ;\nvar Children = {\n  map: mapChildren,\n  forEach: forEachChildren,\n  count: countChildren,\n  toArray: toArray,\n  only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.min.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n", "/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var enableSchedulerDebugging = false;\nvar enableProfiling = false;\nvar frameYieldMs = 5;\n\nfunction push(heap, node) {\n  var index = heap.length;\n  heap.push(node);\n  siftUp(heap, node, index);\n}\nfunction peek(heap) {\n  return heap.length === 0 ? null : heap[0];\n}\nfunction pop(heap) {\n  if (heap.length === 0) {\n    return null;\n  }\n\n  var first = heap[0];\n  var last = heap.pop();\n\n  if (last !== first) {\n    heap[0] = last;\n    siftDown(heap, last, 0);\n  }\n\n  return first;\n}\n\nfunction siftUp(heap, node, i) {\n  var index = i;\n\n  while (index > 0) {\n    var parentIndex = index - 1 >>> 1;\n    var parent = heap[parentIndex];\n\n    if (compare(parent, node) > 0) {\n      // The parent is larger. Swap positions.\n      heap[parentIndex] = node;\n      heap[index] = parent;\n      index = parentIndex;\n    } else {\n      // The parent is smaller. Exit.\n      return;\n    }\n  }\n}\n\nfunction siftDown(heap, node, i) {\n  var index = i;\n  var length = heap.length;\n  var halfLength = length >>> 1;\n\n  while (index < halfLength) {\n    var leftIndex = (index + 1) * 2 - 1;\n    var left = heap[leftIndex];\n    var rightIndex = leftIndex + 1;\n    var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n    if (compare(left, node) < 0) {\n      if (rightIndex < length && compare(right, left) < 0) {\n        heap[index] = right;\n        heap[rightIndex] = node;\n        index = rightIndex;\n      } else {\n        heap[index] = left;\n        heap[leftIndex] = node;\n        index = leftIndex;\n      }\n    } else if (rightIndex < length && compare(right, node) < 0) {\n      heap[index] = right;\n      heap[rightIndex] = node;\n      index = rightIndex;\n    } else {\n      // Neither child is smaller. Exit.\n      return;\n    }\n  }\n}\n\nfunction compare(a, b) {\n  // Compare sort index first, then task id.\n  var diff = a.sortIndex - b.sortIndex;\n  return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\n\nvar hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n  var localPerformance = performance;\n\n  exports.unstable_now = function () {\n    return localPerformance.now();\n  };\n} else {\n  var localDate = Date;\n  var initialTime = localDate.now();\n\n  exports.unstable_now = function () {\n    return localDate.now() - initialTime;\n  };\n} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\n\nvar maxSigned31BitInt = 1073741823; // Times out immediately\n\nvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\nvar USER_BLOCKING_PRIORITY_TIMEOUT = 250;\nvar NORMAL_PRIORITY_TIMEOUT = 5000;\nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\nvar IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.\n\nvar localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;\nvar localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;\nvar localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom\n\nvar isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;\n\nfunction advanceTimers(currentTime) {\n  // Check for tasks that are no longer delayed and add them to the queue.\n  var timer = peek(timerQueue);\n\n  while (timer !== null) {\n    if (timer.callback === null) {\n      // Timer was cancelled.\n      pop(timerQueue);\n    } else if (timer.startTime <= currentTime) {\n      // Timer fired. Transfer to the task queue.\n      pop(timerQueue);\n      timer.sortIndex = timer.expirationTime;\n      push(taskQueue, timer);\n    } else {\n      // Remaining timers are pending.\n      return;\n    }\n\n    timer = peek(timerQueue);\n  }\n}\n\nfunction handleTimeout(currentTime) {\n  isHostTimeoutScheduled = false;\n  advanceTimers(currentTime);\n\n  if (!isHostCallbackScheduled) {\n    if (peek(taskQueue) !== null) {\n      isHostCallbackScheduled = true;\n      requestHostCallback(flushWork);\n    } else {\n      var firstTimer = peek(timerQueue);\n\n      if (firstTimer !== null) {\n        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n      }\n    }\n  }\n}\n\nfunction flushWork(hasTimeRemaining, initialTime) {\n\n\n  isHostCallbackScheduled = false;\n\n  if (isHostTimeoutScheduled) {\n    // We scheduled a timeout but it's no longer needed. Cancel it.\n    isHostTimeoutScheduled = false;\n    cancelHostTimeout();\n  }\n\n  isPerformingWork = true;\n  var previousPriorityLevel = currentPriorityLevel;\n\n  try {\n    if (enableProfiling) {\n      try {\n        return workLoop(hasTimeRemaining, initialTime);\n      } catch (error) {\n        if (currentTask !== null) {\n          var currentTime = exports.unstable_now();\n          markTaskErrored(currentTask, currentTime);\n          currentTask.isQueued = false;\n        }\n\n        throw error;\n      }\n    } else {\n      // No catch in prod code path.\n      return workLoop(hasTimeRemaining, initialTime);\n    }\n  } finally {\n    currentTask = null;\n    currentPriorityLevel = previousPriorityLevel;\n    isPerformingWork = false;\n  }\n}\n\nfunction workLoop(hasTimeRemaining, initialTime) {\n  var currentTime = initialTime;\n  advanceTimers(currentTime);\n  currentTask = peek(taskQueue);\n\n  while (currentTask !== null && !(enableSchedulerDebugging )) {\n    if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n      // This currentTask hasn't expired, and we've reached the deadline.\n      break;\n    }\n\n    var callback = currentTask.callback;\n\n    if (typeof callback === 'function') {\n      currentTask.callback = null;\n      currentPriorityLevel = currentTask.priorityLevel;\n      var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n      var continuationCallback = callback(didUserCallbackTimeout);\n      currentTime = exports.unstable_now();\n\n      if (typeof continuationCallback === 'function') {\n        currentTask.callback = continuationCallback;\n      } else {\n\n        if (currentTask === peek(taskQueue)) {\n          pop(taskQueue);\n        }\n      }\n\n      advanceTimers(currentTime);\n    } else {\n      pop(taskQueue);\n    }\n\n    currentTask = peek(taskQueue);\n  } // Return whether there's additional work\n\n\n  if (currentTask !== null) {\n    return true;\n  } else {\n    var firstTimer = peek(timerQueue);\n\n    if (firstTimer !== null) {\n      requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n    }\n\n    return false;\n  }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n  switch (priorityLevel) {\n    case ImmediatePriority:\n    case UserBlockingPriority:\n    case NormalPriority:\n    case LowPriority:\n    case IdlePriority:\n      break;\n\n    default:\n      priorityLevel = NormalPriority;\n  }\n\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n}\n\nfunction unstable_next(eventHandler) {\n  var priorityLevel;\n\n  switch (currentPriorityLevel) {\n    case ImmediatePriority:\n    case UserBlockingPriority:\n    case NormalPriority:\n      // Shift down to normal priority\n      priorityLevel = NormalPriority;\n      break;\n\n    default:\n      // Anything lower than normal priority should remain at the current level.\n      priorityLevel = currentPriorityLevel;\n      break;\n  }\n\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n}\n\nfunction unstable_wrapCallback(callback) {\n  var parentPriorityLevel = currentPriorityLevel;\n  return function () {\n    // This is a fork of runWithPriority, inlined for performance.\n    var previousPriorityLevel = currentPriorityLevel;\n    currentPriorityLevel = parentPriorityLevel;\n\n    try {\n      return callback.apply(this, arguments);\n    } finally {\n      currentPriorityLevel = previousPriorityLevel;\n    }\n  };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n  var currentTime = exports.unstable_now();\n  var startTime;\n\n  if (typeof options === 'object' && options !== null) {\n    var delay = options.delay;\n\n    if (typeof delay === 'number' && delay > 0) {\n      startTime = currentTime + delay;\n    } else {\n      startTime = currentTime;\n    }\n  } else {\n    startTime = currentTime;\n  }\n\n  var timeout;\n\n  switch (priorityLevel) {\n    case ImmediatePriority:\n      timeout = IMMEDIATE_PRIORITY_TIMEOUT;\n      break;\n\n    case UserBlockingPriority:\n      timeout = USER_BLOCKING_PRIORITY_TIMEOUT;\n      break;\n\n    case IdlePriority:\n      timeout = IDLE_PRIORITY_TIMEOUT;\n      break;\n\n    case LowPriority:\n      timeout = LOW_PRIORITY_TIMEOUT;\n      break;\n\n    case NormalPriority:\n    default:\n      timeout = NORMAL_PRIORITY_TIMEOUT;\n      break;\n  }\n\n  var expirationTime = startTime + timeout;\n  var newTask = {\n    id: taskIdCounter++,\n    callback: callback,\n    priorityLevel: priorityLevel,\n    startTime: startTime,\n    expirationTime: expirationTime,\n    sortIndex: -1\n  };\n\n  if (startTime > currentTime) {\n    // This is a delayed task.\n    newTask.sortIndex = startTime;\n    push(timerQueue, newTask);\n\n    if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n      // All tasks are delayed, and this is the task with the earliest delay.\n      if (isHostTimeoutScheduled) {\n        // Cancel an existing timeout.\n        cancelHostTimeout();\n      } else {\n        isHostTimeoutScheduled = true;\n      } // Schedule a timeout.\n\n\n      requestHostTimeout(handleTimeout, startTime - currentTime);\n    }\n  } else {\n    newTask.sortIndex = expirationTime;\n    push(taskQueue, newTask);\n    // wait until the next time we yield.\n\n\n    if (!isHostCallbackScheduled && !isPerformingWork) {\n      isHostCallbackScheduled = true;\n      requestHostCallback(flushWork);\n    }\n  }\n\n  return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n  if (!isHostCallbackScheduled && !isPerformingWork) {\n    isHostCallbackScheduled = true;\n    requestHostCallback(flushWork);\n  }\n}\n\nfunction unstable_getFirstCallbackNode() {\n  return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n  // remove from the queue because you can't remove arbitrary nodes from an\n  // array based heap, only the first one.)\n\n\n  task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n  return currentPriorityLevel;\n}\n\nvar isMessageLoopRunning = false;\nvar scheduledHostCallback = null;\nvar taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n// thread, like user events. By default, it yields multiple times per frame.\n// It does not attempt to align with frame boundaries, since most tasks don't\n// need to be frame aligned; for those that do, use requestAnimationFrame.\n\nvar frameInterval = frameYieldMs;\nvar startTime = -1;\n\nfunction shouldYieldToHost() {\n  var timeElapsed = exports.unstable_now() - startTime;\n\n  if (timeElapsed < frameInterval) {\n    // The main thread has only been blocked for a really short amount of time;\n    // smaller than a single frame. Don't yield yet.\n    return false;\n  } // The main thread has been blocked for a non-negligible amount of time. We\n\n\n  return true;\n}\n\nfunction requestPaint() {\n\n}\n\nfunction forceFrameRate(fps) {\n  if (fps < 0 || fps > 125) {\n    // Using console['error'] to evade Babel and ESLint\n    console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n    return;\n  }\n\n  if (fps > 0) {\n    frameInterval = Math.floor(1000 / fps);\n  } else {\n    // reset the framerate\n    frameInterval = frameYieldMs;\n  }\n}\n\nvar performWorkUntilDeadline = function () {\n  if (scheduledHostCallback !== null) {\n    var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread\n    // has been blocked.\n\n    startTime = currentTime;\n    var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the\n    // error can be observed.\n    //\n    // Intentionally not using a try-catch, since that makes some debugging\n    // techniques harder. Instead, if `scheduledHostCallback` errors, then\n    // `hasMoreWork` will remain true, and we'll continue the work loop.\n\n    var hasMoreWork = true;\n\n    try {\n      hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n    } finally {\n      if (hasMoreWork) {\n        // If there's more work, schedule the next message event at the end\n        // of the preceding one.\n        schedulePerformWorkUntilDeadline();\n      } else {\n        isMessageLoopRunning = false;\n        scheduledHostCallback = null;\n      }\n    }\n  } else {\n    isMessageLoopRunning = false;\n  } // Yielding to the browser will give it a chance to paint, so we can\n};\n\nvar schedulePerformWorkUntilDeadline;\n\nif (typeof localSetImmediate === 'function') {\n  // Node.js and old IE.\n  // There's a few reasons for why we prefer setImmediate.\n  //\n  // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.\n  // (Even though this is a DOM fork of the Scheduler, you could get here\n  // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)\n  // https://github.com/facebook/react/issues/20756\n  //\n  // But also, it runs earlier which is the semantic we want.\n  // If other browsers ever implement it, it's better to use it.\n  // Although both of these would be inferior to native scheduling.\n  schedulePerformWorkUntilDeadline = function () {\n    localSetImmediate(performWorkUntilDeadline);\n  };\n} else if (typeof MessageChannel !== 'undefined') {\n  // DOM and Worker environments.\n  // We prefer MessageChannel because of the 4ms setTimeout clamping.\n  var channel = new MessageChannel();\n  var port = channel.port2;\n  channel.port1.onmessage = performWorkUntilDeadline;\n\n  schedulePerformWorkUntilDeadline = function () {\n    port.postMessage(null);\n  };\n} else {\n  // We should only fallback here in non-browser environments.\n  schedulePerformWorkUntilDeadline = function () {\n    localSetTimeout(performWorkUntilDeadline, 0);\n  };\n}\n\nfunction requestHostCallback(callback) {\n  scheduledHostCallback = callback;\n\n  if (!isMessageLoopRunning) {\n    isMessageLoopRunning = true;\n    schedulePerformWorkUntilDeadline();\n  }\n}\n\nfunction requestHostTimeout(callback, ms) {\n  taskTimeoutID = localSetTimeout(function () {\n    callback(exports.unstable_now());\n  }, ms);\n}\n\nfunction cancelHostTimeout() {\n  localClearTimeout(taskTimeoutID);\n  taskTimeoutID = -1;\n}\n\nvar unstable_requestPaint = requestPaint;\nvar unstable_Profiling =  null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_forceFrameRate = forceFrameRate;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = unstable_requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n  module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var React = require('react');\nvar Scheduler = require('scheduler');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n  {\n    suppressWarning = newSuppressWarning;\n  }\n} // In DEV, calls to console.warn and console.error get replaced\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n  {\n    if (!suppressWarning) {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      printWarning('warn', format, args);\n    }\n  }\n}\nfunction error(format) {\n  {\n    if (!suppressWarning) {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\n\n// -----------------------------------------------------------------------------\n\nvar enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing\n// the react-reconciler package.\n\nvar enableNewReconciler = false; // Support legacy Primer support on internal FB www\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\nvar enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n// and client rendering, mostly to allow JSX attributes to apply to the custom\n// element's object properties instead of only HTML attributes.\n// https://github.com/facebook/react/issues/11347\n\nvar enableCustomElementPropertySupport = false; // Disables children for <textarea> elements\nvar warnAboutStringRefs = false; // -----------------------------------------------------------------------------\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames =  {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n  registerDirectEvent(registrationName, dependencies);\n  registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n  {\n    if (registrationNameDependencies[registrationName]) {\n      error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n    }\n  }\n\n  registrationNameDependencies[registrationName] = dependencies;\n\n  {\n    var lowerCasedName = registrationName.toLowerCase();\n    possibleRegistrationNames[lowerCasedName] = registrationName;\n\n    if (registrationName === 'onDoubleClick') {\n      possibleRegistrationNames.ondblclick = registrationName;\n    }\n  }\n\n  for (var i = 0; i < dependencies.length; i++) {\n    allNativeEvents.add(dependencies[i]);\n  }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkPropStringCoercion(value, propName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkHtmlStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n    return true;\n  }\n\n  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n    return false;\n  }\n\n  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n    validatedAttributeNameCache[attributeName] = true;\n    return true;\n  }\n\n  illegalAttributeNameCache[attributeName] = true;\n\n  {\n    error('Invalid attribute name: `%s`', attributeName);\n  }\n\n  return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n  if (propertyInfo !== null) {\n    return propertyInfo.type === RESERVED;\n  }\n\n  if (isCustomComponentTag) {\n    return false;\n  }\n\n  if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n    return true;\n  }\n\n  return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n  if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n    return false;\n  }\n\n  switch (typeof value) {\n    case 'function': // $FlowIssue symbol is perfectly valid here\n\n    case 'symbol':\n      // eslint-disable-line\n      return true;\n\n    case 'boolean':\n      {\n        if (isCustomComponentTag) {\n          return false;\n        }\n\n        if (propertyInfo !== null) {\n          return !propertyInfo.acceptsBooleans;\n        } else {\n          var prefix = name.toLowerCase().slice(0, 5);\n          return prefix !== 'data-' && prefix !== 'aria-';\n        }\n      }\n\n    default:\n      return false;\n  }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n  if (value === null || typeof value === 'undefined') {\n    return true;\n  }\n\n  if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n    return true;\n  }\n\n  if (isCustomComponentTag) {\n    return false;\n  }\n\n  if (propertyInfo !== null) {\n\n    switch (propertyInfo.type) {\n      case BOOLEAN:\n        return !value;\n\n      case OVERLOADED_BOOLEAN:\n        return value === false;\n\n      case NUMERIC:\n        return isNaN(value);\n\n      case POSITIVE_NUMERIC:\n        return isNaN(value) || value < 1;\n    }\n  }\n\n  return false;\n}\nfunction getPropertyInfo(name) {\n  return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n  this.attributeName = attributeName;\n  this.attributeNamespace = attributeNamespace;\n  this.mustUseProperty = mustUseProperty;\n  this.propertyName = name;\n  this.type = type;\n  this.sanitizeURL = sanitizeURL;\n  this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n  var name = _ref[0],\n      attributeName = _ref[1];\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n  return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n  false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n  false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n  attributeName.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n  attributeName.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  true, // sanitizeURL\n  true);\n});\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n  {\n    if (!didWarn && isJavaScriptProtocol.test(url)) {\n      didWarn = true;\n\n      error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n    }\n  }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n  {\n    if (propertyInfo.mustUseProperty) {\n      var propertyName = propertyInfo.propertyName;\n      return node[propertyName];\n    } else {\n      // This check protects multiple uses of `expected`, which is why the\n      // react-internal/safe-string-coercion rule is disabled in several spots\n      // below.\n      {\n        checkAttributeStringCoercion(expected, name);\n      }\n\n      if ( propertyInfo.sanitizeURL) {\n        // If we haven't fully disabled javascript: URLs, and if\n        // the hydration is successful of a javascript: URL, we\n        // still want to warn on the client.\n        // eslint-disable-next-line react-internal/safe-string-coercion\n        sanitizeURL('' + expected);\n      }\n\n      var attributeName = propertyInfo.attributeName;\n      var stringValue = null;\n\n      if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n        if (node.hasAttribute(attributeName)) {\n          var value = node.getAttribute(attributeName);\n\n          if (value === '') {\n            return true;\n          }\n\n          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n            return value;\n          } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n          if (value === '' + expected) {\n            return expected;\n          }\n\n          return value;\n        }\n      } else if (node.hasAttribute(attributeName)) {\n        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n          // We had an attribute but shouldn't have had one, so read it\n          // for the error message.\n          return node.getAttribute(attributeName);\n        }\n\n        if (propertyInfo.type === BOOLEAN) {\n          // If this was a boolean, it doesn't matter what the value is\n          // the fact that we have it is the same as the expected.\n          return expected;\n        } // Even if this property uses a namespace we use getAttribute\n        // because we assume its namespaced name is the same as our config.\n        // To use getAttributeNS we need the local name which we don't have\n        // in our config atm.\n\n\n        stringValue = node.getAttribute(attributeName);\n      }\n\n      if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n        return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion\n      } else if (stringValue === '' + expected) {\n        return expected;\n      } else {\n        return stringValue;\n      }\n    }\n  }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n  {\n    if (!isAttributeNameSafe(name)) {\n      return;\n    }\n\n    if (!node.hasAttribute(name)) {\n      return expected === undefined ? undefined : null;\n    }\n\n    var value = node.getAttribute(name);\n\n    {\n      checkAttributeStringCoercion(expected, name);\n    }\n\n    if (value === '' + expected) {\n      return expected;\n    }\n\n    return value;\n  }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n  var propertyInfo = getPropertyInfo(name);\n\n  if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n    return;\n  }\n\n  if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n    value = null;\n  } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n  if (isCustomComponentTag || propertyInfo === null) {\n    if (isAttributeNameSafe(name)) {\n      var _attributeName = name;\n\n      if (value === null) {\n        node.removeAttribute(_attributeName);\n      } else {\n        {\n          checkAttributeStringCoercion(value, name);\n        }\n\n        node.setAttribute(_attributeName,  '' + value);\n      }\n    }\n\n    return;\n  }\n\n  var mustUseProperty = propertyInfo.mustUseProperty;\n\n  if (mustUseProperty) {\n    var propertyName = propertyInfo.propertyName;\n\n    if (value === null) {\n      var type = propertyInfo.type;\n      node[propertyName] = type === BOOLEAN ? false : '';\n    } else {\n      // Contrary to `setAttribute`, object properties are properly\n      // `toString`ed by IE8/9.\n      node[propertyName] = value;\n    }\n\n    return;\n  } // The rest are treated as attributes with special cases.\n\n\n  var attributeName = propertyInfo.attributeName,\n      attributeNamespace = propertyInfo.attributeNamespace;\n\n  if (value === null) {\n    node.removeAttribute(attributeName);\n  } else {\n    var _type = propertyInfo.type;\n    var attributeValue;\n\n    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n      // If attribute type is boolean, we know for sure it won't be an execution sink\n      // and we won't require Trusted Type here.\n      attributeValue = '';\n    } else {\n      // `setAttribute` with objects becomes only `[object]` in IE8/9,\n      // ('' + value) makes it output the correct toString()-value.\n      {\n        {\n          checkAttributeStringCoercion(value, attributeName);\n        }\n\n        attributeValue = '' + value;\n      }\n\n      if (propertyInfo.sanitizeURL) {\n        sanitizeURL(attributeValue.toString());\n      }\n    }\n\n    if (attributeNamespace) {\n      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n    } else {\n      node.setAttribute(attributeName, attributeValue);\n    }\n  }\n}\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE =  Symbol.for('react.element');\nvar REACT_PORTAL_TYPE =  Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE =  Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE =  Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE =  Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE =  Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE =  Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE =  Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE =  Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE =  Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE =  Symbol.for('react.memo');\nvar REACT_LAZY_TYPE =  Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE =  Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE =  Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE =  Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE =  Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE =  Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE =  Symbol.for('react.tracing_marker');\nvar MAYBE_ITERATOR_SYMBOL =  Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(ctor, true);\n  }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nfunction describeFiber(fiber) {\n  var owner =  fiber._debugOwner ? fiber._debugOwner.type : null ;\n  var source =  fiber._debugSource ;\n\n  switch (fiber.tag) {\n    case HostComponent:\n      return describeBuiltInComponentFrame(fiber.type);\n\n    case LazyComponent:\n      return describeBuiltInComponentFrame('Lazy');\n\n    case SuspenseComponent:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case SuspenseListComponent:\n      return describeBuiltInComponentFrame('SuspenseList');\n\n    case FunctionComponent:\n    case IndeterminateComponent:\n    case SimpleMemoComponent:\n      return describeFunctionComponentFrame(fiber.type);\n\n    case ForwardRef:\n      return describeFunctionComponentFrame(fiber.type.render);\n\n    case ClassComponent:\n      return describeClassComponentFrame(fiber.type);\n\n    default:\n      return '';\n  }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n  try {\n    var info = '';\n    var node = workInProgress;\n\n    do {\n      info += describeFiber(node);\n      node = node.return;\n    } while (node);\n\n    return info;\n  } catch (x) {\n    return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n  }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n  var functionName = innerType.displayName || innerType.name || '';\n  return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName$1(type) {\n  return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n  var tag = fiber.tag,\n      type = fiber.type;\n\n  switch (tag) {\n    case CacheComponent:\n      return 'Cache';\n\n    case ContextConsumer:\n      var context = type;\n      return getContextName$1(context) + '.Consumer';\n\n    case ContextProvider:\n      var provider = type;\n      return getContextName$1(provider._context) + '.Provider';\n\n    case DehydratedFragment:\n      return 'DehydratedFragment';\n\n    case ForwardRef:\n      return getWrappedName$1(type, type.render, 'ForwardRef');\n\n    case Fragment:\n      return 'Fragment';\n\n    case HostComponent:\n      // Host component type is the display name (e.g. \"div\", \"View\")\n      return type;\n\n    case HostPortal:\n      return 'Portal';\n\n    case HostRoot:\n      return 'Root';\n\n    case HostText:\n      return 'Text';\n\n    case LazyComponent:\n      // Name comes from the type in this case; we don't have a tag.\n      return getComponentNameFromType(type);\n\n    case Mode:\n      if (type === REACT_STRICT_MODE_TYPE) {\n        // Don't be less specific than shared/getComponentNameFromType\n        return 'StrictMode';\n      }\n\n      return 'Mode';\n\n    case OffscreenComponent:\n      return 'Offscreen';\n\n    case Profiler:\n      return 'Profiler';\n\n    case ScopeComponent:\n      return 'Scope';\n\n    case SuspenseComponent:\n      return 'Suspense';\n\n    case SuspenseListComponent:\n      return 'SuspenseList';\n\n    case TracingMarkerComponent:\n      return 'TracingMarker';\n    // The display name for this tags come from the user-provided type:\n\n    case ClassComponent:\n    case FunctionComponent:\n    case IncompleteClassComponent:\n    case IndeterminateComponent:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      if (typeof type === 'function') {\n        return type.displayName || type.name || null;\n      }\n\n      if (typeof type === 'string') {\n        return type;\n      }\n\n      break;\n\n  }\n\n  return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n  {\n    if (current === null) {\n      return null;\n    }\n\n    var owner = current._debugOwner;\n\n    if (owner !== null && typeof owner !== 'undefined') {\n      return getComponentNameFromFiber(owner);\n    }\n  }\n\n  return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n  {\n    if (current === null) {\n      return '';\n    } // Safe because if current fiber exists, we are reconciling,\n    // and it is guaranteed to be the work-in-progress version.\n\n\n    return getStackByFiberInDevAndProd(current);\n  }\n}\n\nfunction resetCurrentFiber() {\n  {\n    ReactDebugCurrentFrame.getCurrentStack = null;\n    current = null;\n    isRendering = false;\n  }\n}\nfunction setCurrentFiber(fiber) {\n  {\n    ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n    current = fiber;\n    isRendering = false;\n  }\n}\nfunction getCurrentFiber() {\n  {\n    return current;\n  }\n}\nfunction setIsRendering(rendering) {\n  {\n    isRendering = rendering;\n  }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n  // The coercion safety check is performed in getToStringValue().\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction getToStringValue(value) {\n  switch (typeof value) {\n    case 'boolean':\n    case 'number':\n    case 'string':\n    case 'undefined':\n      return value;\n\n    case 'object':\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      return value;\n\n    default:\n      // function, symbol are assigned as empty strings\n      return '';\n  }\n}\n\nvar hasReadOnlyValue = {\n  button: true,\n  checkbox: true,\n  image: true,\n  hidden: true,\n  radio: true,\n  reset: true,\n  submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n  {\n    if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n      error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n    }\n\n    if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n      error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n    }\n  }\n}\n\nfunction isCheckable(elem) {\n  var type = elem.type;\n  var nodeName = elem.nodeName;\n  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n  return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n  node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n  var value = '';\n\n  if (!node) {\n    return value;\n  }\n\n  if (isCheckable(node)) {\n    value = node.checked ? 'true' : 'false';\n  } else {\n    value = node.value;\n  }\n\n  return value;\n}\n\nfunction trackValueOnNode(node) {\n  var valueField = isCheckable(node) ? 'checked' : 'value';\n  var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n  {\n    checkFormFieldValueStringCoercion(node[valueField]);\n  }\n\n  var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n  // and don't track value will cause over reporting of changes,\n  // but it's better then a hard failure\n  // (needed for certain tests that spyOn input values and Safari)\n\n  if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n    return;\n  }\n\n  var get = descriptor.get,\n      set = descriptor.set;\n  Object.defineProperty(node, valueField, {\n    configurable: true,\n    get: function () {\n      return get.call(this);\n    },\n    set: function (value) {\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      currentValue = '' + value;\n      set.call(this, value);\n    }\n  }); // We could've passed this the first time\n  // but it triggers a bug in IE11 and Edge 14/15.\n  // Calling defineProperty() again should be equivalent.\n  // https://github.com/facebook/react/issues/11768\n\n  Object.defineProperty(node, valueField, {\n    enumerable: descriptor.enumerable\n  });\n  var tracker = {\n    getValue: function () {\n      return currentValue;\n    },\n    setValue: function (value) {\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      currentValue = '' + value;\n    },\n    stopTracking: function () {\n      detachTracker(node);\n      delete node[valueField];\n    }\n  };\n  return tracker;\n}\n\nfunction track(node) {\n  if (getTracker(node)) {\n    return;\n  } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n  node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n  if (!node) {\n    return false;\n  }\n\n  var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n  // that trying again will succeed\n\n  if (!tracker) {\n    return true;\n  }\n\n  var lastValue = tracker.getValue();\n  var nextValue = getValueFromNode(node);\n\n  if (nextValue !== lastValue) {\n    tracker.setValue(nextValue);\n    return true;\n  }\n\n  return false;\n}\n\nfunction getActiveElement(doc) {\n  doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n  if (typeof doc === 'undefined') {\n    return null;\n  }\n\n  try {\n    return doc.activeElement || doc.body;\n  } catch (e) {\n    return doc.body;\n  }\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n  var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n  return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n  var node = element;\n  var checked = props.checked;\n  var hostProps = assign({}, props, {\n    defaultChecked: undefined,\n    defaultValue: undefined,\n    value: undefined,\n    checked: checked != null ? checked : node._wrapperState.initialChecked\n  });\n  return hostProps;\n}\nfunction initWrapperState(element, props) {\n  {\n    checkControlledValueProps('input', props);\n\n    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n      error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n      didWarnCheckedDefaultChecked = true;\n    }\n\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n      error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n      didWarnValueDefaultValue = true;\n    }\n  }\n\n  var node = element;\n  var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n  node._wrapperState = {\n    initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n    initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n    controlled: isControlled(props)\n  };\n}\nfunction updateChecked(element, props) {\n  var node = element;\n  var checked = props.checked;\n\n  if (checked != null) {\n    setValueForProperty(node, 'checked', checked, false);\n  }\n}\nfunction updateWrapper(element, props) {\n  var node = element;\n\n  {\n    var controlled = isControlled(props);\n\n    if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n      error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n      didWarnUncontrolledToControlled = true;\n    }\n\n    if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n      error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n      didWarnControlledToUncontrolled = true;\n    }\n  }\n\n  updateChecked(element, props);\n  var value = getToStringValue(props.value);\n  var type = props.type;\n\n  if (value != null) {\n    if (type === 'number') {\n      if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n      // eslint-disable-next-line\n      node.value != value) {\n        node.value = toString(value);\n      }\n    } else if (node.value !== toString(value)) {\n      node.value = toString(value);\n    }\n  } else if (type === 'submit' || type === 'reset') {\n    // Submit/reset inputs need the attribute removed completely to avoid\n    // blank-text buttons.\n    node.removeAttribute('value');\n    return;\n  }\n\n  {\n    // When syncing the value attribute, the value comes from a cascade of\n    // properties:\n    //  1. The value React property\n    //  2. The defaultValue React property\n    //  3. Otherwise there should be no change\n    if (props.hasOwnProperty('value')) {\n      setDefaultValue(node, props.type, value);\n    } else if (props.hasOwnProperty('defaultValue')) {\n      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n    }\n  }\n\n  {\n    // When syncing the checked attribute, it only changes when it needs\n    // to be removed, such as transitioning from a checkbox into a text input\n    if (props.checked == null && props.defaultChecked != null) {\n      node.defaultChecked = !!props.defaultChecked;\n    }\n  }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n  var node = element; // Do not assign value if it is already set. This prevents user text input\n  // from being lost during SSR hydration.\n\n  if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n    var type = props.type;\n    var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n    // default value provided by the browser. See: #12872\n\n    if (isButton && (props.value === undefined || props.value === null)) {\n      return;\n    }\n\n    var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n    // from being lost during SSR hydration.\n\n    if (!isHydrating) {\n      {\n        // When syncing the value attribute, the value property should use\n        // the wrapperState._initialValue property. This uses:\n        //\n        //   1. The value React property when present\n        //   2. The defaultValue React property when present\n        //   3. An empty string\n        if (initialValue !== node.value) {\n          node.value = initialValue;\n        }\n      }\n    }\n\n    {\n      // Otherwise, the value attribute is synchronized to the property,\n      // so we assign defaultValue to the same thing as the value property\n      // assignment step above.\n      node.defaultValue = initialValue;\n    }\n  } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n  // this is needed to work around a chrome bug where setting defaultChecked\n  // will sometimes influence the value of checked (even after detachment).\n  // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n  // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n  var name = node.name;\n\n  if (name !== '') {\n    node.name = '';\n  }\n\n  {\n    // When syncing the checked attribute, both the checked property and\n    // attribute are assigned at the same time using defaultChecked. This uses:\n    //\n    //   1. The checked React property when present\n    //   2. The defaultChecked React property when present\n    //   3. Otherwise, false\n    node.defaultChecked = !node.defaultChecked;\n    node.defaultChecked = !!node._wrapperState.initialChecked;\n  }\n\n  if (name !== '') {\n    node.name = name;\n  }\n}\nfunction restoreControlledState(element, props) {\n  var node = element;\n  updateWrapper(node, props);\n  updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n  var name = props.name;\n\n  if (props.type === 'radio' && name != null) {\n    var queryRoot = rootNode;\n\n    while (queryRoot.parentNode) {\n      queryRoot = queryRoot.parentNode;\n    } // If `rootNode.form` was non-null, then we could try `form.elements`,\n    // but that sometimes behaves strangely in IE8. We could also try using\n    // `form.getElementsByName`, but that will only return direct children\n    // and won't include inputs that use the HTML5 `form=` attribute. Since\n    // the input might not even be in a form. It might not even be in the\n    // document. Let's just use the local `querySelectorAll` to ensure we don't\n    // miss anything.\n\n\n    {\n      checkAttributeStringCoercion(name, 'name');\n    }\n\n    var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n    for (var i = 0; i < group.length; i++) {\n      var otherNode = group[i];\n\n      if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n        continue;\n      } // This will throw if radio buttons rendered by different copies of React\n      // and the same name are rendered into the same form (same as #1939).\n      // That's probably okay; we don't support it just as we don't support\n      // mixing React radio buttons with non-React ones.\n\n\n      var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n      if (!otherProps) {\n        throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\n      } // We need update the tracked value on the named cousin since the value\n      // was changed but the input saw no event or value set\n\n\n      updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n      // was previously checked to update will cause it to be come re-checked\n      // as appropriate.\n\n      updateWrapper(otherNode, otherProps);\n    }\n  }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n  if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n  type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n    if (value == null) {\n      node.defaultValue = toString(node._wrapperState.initialValue);\n    } else if (node.defaultValue !== toString(value)) {\n      node.defaultValue = toString(value);\n    }\n  }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateProps(element, props) {\n  {\n    // If a value is not provided, then the children must be simple.\n    if (props.value == null) {\n      if (typeof props.children === 'object' && props.children !== null) {\n        React.Children.forEach(props.children, function (child) {\n          if (child == null) {\n            return;\n          }\n\n          if (typeof child === 'string' || typeof child === 'number') {\n            return;\n          }\n\n          if (!didWarnInvalidChild) {\n            didWarnInvalidChild = true;\n\n            error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n          }\n        });\n      } else if (props.dangerouslySetInnerHTML != null) {\n        if (!didWarnInvalidInnerHTML) {\n          didWarnInvalidInnerHTML = true;\n\n          error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n        }\n      }\n    } // TODO: Remove support for `selected` in <option>.\n\n\n    if (props.selected != null && !didWarnSelectedSetOnOption) {\n      error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n      didWarnSelectedSetOnOption = true;\n    }\n  }\n}\nfunction postMountWrapper$1(element, props) {\n  // value=\"\" should make a value attribute (#6219)\n  if (props.value != null) {\n    element.setAttribute('value', toString(getToStringValue(props.value)));\n  }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n  didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n  var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n  if (ownerName) {\n    return '\\n\\nCheck the render method of `' + ownerName + '`.';\n  }\n\n  return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n  {\n    checkControlledValueProps('select', props);\n\n    for (var i = 0; i < valuePropNames.length; i++) {\n      var propName = valuePropNames[i];\n\n      if (props[propName] == null) {\n        continue;\n      }\n\n      var propNameIsArray = isArray(props[propName]);\n\n      if (props.multiple && !propNameIsArray) {\n        error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n      } else if (!props.multiple && propNameIsArray) {\n        error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n      }\n    }\n  }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n  var options = node.options;\n\n  if (multiple) {\n    var selectedValues = propValue;\n    var selectedValue = {};\n\n    for (var i = 0; i < selectedValues.length; i++) {\n      // Prefix to avoid chaos with special keys.\n      selectedValue['$' + selectedValues[i]] = true;\n    }\n\n    for (var _i = 0; _i < options.length; _i++) {\n      var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n      if (options[_i].selected !== selected) {\n        options[_i].selected = selected;\n      }\n\n      if (selected && setDefaultSelected) {\n        options[_i].defaultSelected = true;\n      }\n    }\n  } else {\n    // Do not set `select.value` as exact behavior isn't consistent across all\n    // browsers for all cases.\n    var _selectedValue = toString(getToStringValue(propValue));\n\n    var defaultSelected = null;\n\n    for (var _i2 = 0; _i2 < options.length; _i2++) {\n      if (options[_i2].value === _selectedValue) {\n        options[_i2].selected = true;\n\n        if (setDefaultSelected) {\n          options[_i2].defaultSelected = true;\n        }\n\n        return;\n      }\n\n      if (defaultSelected === null && !options[_i2].disabled) {\n        defaultSelected = options[_i2];\n      }\n    }\n\n    if (defaultSelected !== null) {\n      defaultSelected.selected = true;\n    }\n  }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$1(element, props) {\n  return assign({}, props, {\n    value: undefined\n  });\n}\nfunction initWrapperState$1(element, props) {\n  var node = element;\n\n  {\n    checkSelectPropTypes(props);\n  }\n\n  node._wrapperState = {\n    wasMultiple: !!props.multiple\n  };\n\n  {\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n      error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n      didWarnValueDefaultValue$1 = true;\n    }\n  }\n}\nfunction postMountWrapper$2(element, props) {\n  var node = element;\n  node.multiple = !!props.multiple;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  } else if (props.defaultValue != null) {\n    updateOptions(node, !!props.multiple, props.defaultValue, true);\n  }\n}\nfunction postUpdateWrapper(element, props) {\n  var node = element;\n  var wasMultiple = node._wrapperState.wasMultiple;\n  node._wrapperState.wasMultiple = !!props.multiple;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  } else if (wasMultiple !== !!props.multiple) {\n    // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n    if (props.defaultValue != null) {\n      updateOptions(node, !!props.multiple, props.defaultValue, true);\n    } else {\n      // Revert the select back to its default unselected state.\n      updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n    }\n  }\n}\nfunction restoreControlledState$1(element, props) {\n  var node = element;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$2(element, props) {\n  var node = element;\n\n  if (props.dangerouslySetInnerHTML != null) {\n    throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n  } // Always set children to the same thing. In IE9, the selection range will\n  // get reset if `textContent` is mutated.  We could add a check in setTextContent\n  // to only set the value if/when the value differs from the node value (which would\n  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n  // solution. The value can be a boolean or object so that's why it's forced\n  // to be a string.\n\n\n  var hostProps = assign({}, props, {\n    value: undefined,\n    defaultValue: undefined,\n    children: toString(node._wrapperState.initialValue)\n  });\n\n  return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n  var node = element;\n\n  {\n    checkControlledValueProps('textarea', props);\n\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n      error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n      didWarnValDefaultVal = true;\n    }\n  }\n\n  var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n  if (initialValue == null) {\n    var children = props.children,\n        defaultValue = props.defaultValue;\n\n    if (children != null) {\n      {\n        error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n      }\n\n      {\n        if (defaultValue != null) {\n          throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n        }\n\n        if (isArray(children)) {\n          if (children.length > 1) {\n            throw new Error('<textarea> can only have at most one child.');\n          }\n\n          children = children[0];\n        }\n\n        defaultValue = children;\n      }\n    }\n\n    if (defaultValue == null) {\n      defaultValue = '';\n    }\n\n    initialValue = defaultValue;\n  }\n\n  node._wrapperState = {\n    initialValue: getToStringValue(initialValue)\n  };\n}\nfunction updateWrapper$1(element, props) {\n  var node = element;\n  var value = getToStringValue(props.value);\n  var defaultValue = getToStringValue(props.defaultValue);\n\n  if (value != null) {\n    // Cast `value` to a string to ensure the value is set correctly. While\n    // browsers typically do this as necessary, jsdom doesn't.\n    var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n    if (newValue !== node.value) {\n      node.value = newValue;\n    }\n\n    if (props.defaultValue == null && node.defaultValue !== newValue) {\n      node.defaultValue = newValue;\n    }\n  }\n\n  if (defaultValue != null) {\n    node.defaultValue = toString(defaultValue);\n  }\n}\nfunction postMountWrapper$3(element, props) {\n  var node = element; // This is in postMount because we need access to the DOM node, which is not\n  // available until after the component has mounted.\n\n  var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n  // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n  // will populate textContent as well.\n  // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n  if (textContent === node._wrapperState.initialValue) {\n    if (textContent !== '' && textContent !== null) {\n      node.value = textContent;\n    }\n  }\n}\nfunction restoreControlledState$2(element, props) {\n  // DOM component is still mounted; update\n  updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n  switch (type) {\n    case 'svg':\n      return SVG_NAMESPACE;\n\n    case 'math':\n      return MATH_NAMESPACE;\n\n    default:\n      return HTML_NAMESPACE;\n  }\n}\nfunction getChildNamespace(parentNamespace, type) {\n  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n    // No (or default) parent namespace: potential entry point.\n    return getIntrinsicNamespace(type);\n  }\n\n  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n    // We're leaving SVG.\n    return HTML_NAMESPACE;\n  } // By default, pass namespace below.\n\n\n  return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n    return function (arg0, arg1, arg2, arg3) {\n      MSApp.execUnsafeLocalFunction(function () {\n        return func(arg0, arg1, arg2, arg3);\n      });\n    };\n  } else {\n    return func;\n  }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n  if (node.namespaceURI === SVG_NAMESPACE) {\n\n    if (!('innerHTML' in node)) {\n      // IE does not have innerHTML for SVG nodes, so instead we inject the\n      // new markup in a temp node and then move the child nodes across into\n      // the target node\n      reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n      var svgNode = reusableSVGContainer.firstChild;\n\n      while (node.firstChild) {\n        node.removeChild(node.firstChild);\n      }\n\n      while (svgNode.firstChild) {\n        node.appendChild(svgNode.firstChild);\n      }\n\n      return;\n    }\n  }\n\n  node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n  if (text) {\n    var firstChild = node.firstChild;\n\n    if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n      firstChild.nodeValue = text;\n      return;\n    }\n  }\n\n  node.textContent = text;\n};\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n  animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n  background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n  backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n  border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n  borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n  borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n  borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n  borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n  borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n  borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n  borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n  borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n  borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n  borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n  borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n  borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n  borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n  columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n  columns: ['columnCount', 'columnWidth'],\n  flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n  flexFlow: ['flexDirection', 'flexWrap'],\n  font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n  fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n  gap: ['columnGap', 'rowGap'],\n  grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n  gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n  gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n  gridColumnGap: ['columnGap'],\n  gridGap: ['columnGap', 'rowGap'],\n  gridRow: ['gridRowEnd', 'gridRowStart'],\n  gridRowGap: ['rowGap'],\n  gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n  listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n  margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n  marker: ['markerEnd', 'markerMid', 'markerStart'],\n  mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n  maskPosition: ['maskPositionX', 'maskPositionY'],\n  outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n  overflow: ['overflowX', 'overflowY'],\n  padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n  placeContent: ['alignContent', 'justifyContent'],\n  placeItems: ['alignItems', 'justifyItems'],\n  placeSelf: ['alignSelf', 'justifySelf'],\n  textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n  textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n  transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n  wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n  animationIterationCount: true,\n  aspectRatio: true,\n  borderImageOutset: true,\n  borderImageSlice: true,\n  borderImageWidth: true,\n  boxFlex: true,\n  boxFlexGroup: true,\n  boxOrdinalGroup: true,\n  columnCount: true,\n  columns: true,\n  flex: true,\n  flexGrow: true,\n  flexPositive: true,\n  flexShrink: true,\n  flexNegative: true,\n  flexOrder: true,\n  gridArea: true,\n  gridRow: true,\n  gridRowEnd: true,\n  gridRowSpan: true,\n  gridRowStart: true,\n  gridColumn: true,\n  gridColumnEnd: true,\n  gridColumnSpan: true,\n  gridColumnStart: true,\n  fontWeight: true,\n  lineClamp: true,\n  lineHeight: true,\n  opacity: true,\n  order: true,\n  orphans: true,\n  tabSize: true,\n  widows: true,\n  zIndex: true,\n  zoom: true,\n  // SVG-related properties\n  fillOpacity: true,\n  floodOpacity: true,\n  stopOpacity: true,\n  strokeDasharray: true,\n  strokeDashoffset: true,\n  strokeMiterlimit: true,\n  strokeOpacity: true,\n  strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n  return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n  prefixes.forEach(function (prefix) {\n    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n  });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n  // Note that we've removed escapeTextForBrowser() calls here since the\n  // whole string will be escaped when the attribute is injected into\n  // the markup. If you provide unsafe user data here they can inject\n  // arbitrary CSS which may be problematic (I couldn't repro this):\n  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n  // This is not an XSS hole but instead a potential CSS injection issue\n  // which has lead to a greater discussion about how we're going to\n  // trust URLs moving forward. See #2115901\n  var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n  if (isEmpty) {\n    return '';\n  }\n\n  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n  }\n\n  {\n    checkCSSPropertyStringCoercion(value, name);\n  }\n\n  return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n *   > hyphenateStyleName('backgroundColor')\n *   < \"background-color\"\n *   > hyphenateStyleName('MozTransition')\n *   < \"-moz-transition\"\n *   > hyphenateStyleName('msTransition')\n *   < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n  return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n  // 'msTransform' is correct, but the other prefixes should be capitalized\n  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n  var msPattern$1 = /^-ms-/;\n  var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n  var badStyleValueWithSemicolonPattern = /;\\s*$/;\n  var warnedStyleNames = {};\n  var warnedStyleValues = {};\n  var warnedForNaNValue = false;\n  var warnedForInfinityValue = false;\n\n  var camelize = function (string) {\n    return string.replace(hyphenPattern, function (_, character) {\n      return character.toUpperCase();\n    });\n  };\n\n  var warnHyphenatedStyleName = function (name) {\n    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n      return;\n    }\n\n    warnedStyleNames[name] = true;\n\n    error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n    // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n    // is converted to lowercase `ms`.\n    camelize(name.replace(msPattern$1, 'ms-')));\n  };\n\n  var warnBadVendoredStyleName = function (name) {\n    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n      return;\n    }\n\n    warnedStyleNames[name] = true;\n\n    error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n  };\n\n  var warnStyleValueWithSemicolon = function (name, value) {\n    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n      return;\n    }\n\n    warnedStyleValues[value] = true;\n\n    error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n  };\n\n  var warnStyleValueIsNaN = function (name, value) {\n    if (warnedForNaNValue) {\n      return;\n    }\n\n    warnedForNaNValue = true;\n\n    error('`NaN` is an invalid value for the `%s` css style property.', name);\n  };\n\n  var warnStyleValueIsInfinity = function (name, value) {\n    if (warnedForInfinityValue) {\n      return;\n    }\n\n    warnedForInfinityValue = true;\n\n    error('`Infinity` is an invalid value for the `%s` css style property.', name);\n  };\n\n  warnValidStyle = function (name, value) {\n    if (name.indexOf('-') > -1) {\n      warnHyphenatedStyleName(name);\n    } else if (badVendoredStyleNamePattern.test(name)) {\n      warnBadVendoredStyleName(name);\n    } else if (badStyleValueWithSemicolonPattern.test(value)) {\n      warnStyleValueWithSemicolon(name, value);\n    }\n\n    if (typeof value === 'number') {\n      if (isNaN(value)) {\n        warnStyleValueIsNaN(name, value);\n      } else if (!isFinite(value)) {\n        warnStyleValueIsInfinity(name, value);\n      }\n    }\n  };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n  {\n    var serialized = '';\n    var delimiter = '';\n\n    for (var styleName in styles) {\n      if (!styles.hasOwnProperty(styleName)) {\n        continue;\n      }\n\n      var styleValue = styles[styleName];\n\n      if (styleValue != null) {\n        var isCustomProperty = styleName.indexOf('--') === 0;\n        serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n        serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n        delimiter = ';';\n      }\n    }\n\n    return serialized || null;\n  }\n}\n/**\n * Sets the value for multiple styles on a node.  If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n  var style = node.style;\n\n  for (var styleName in styles) {\n    if (!styles.hasOwnProperty(styleName)) {\n      continue;\n    }\n\n    var isCustomProperty = styleName.indexOf('--') === 0;\n\n    {\n      if (!isCustomProperty) {\n        warnValidStyle$1(styleName, styles[styleName]);\n      }\n    }\n\n    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n    if (styleName === 'float') {\n      styleName = 'cssFloat';\n    }\n\n    if (isCustomProperty) {\n      style.setProperty(styleName, styleValue);\n    } else {\n      style[styleName] = styleValue;\n    }\n  }\n}\n\nfunction isValueEmpty(value) {\n  return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n *   color: 'color',\n *   overflowX: 'overflow',\n *   overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n  var expanded = {};\n\n  for (var key in styles) {\n    var longhands = shorthandToLonghand[key] || [key];\n\n    for (var i = 0; i < longhands.length; i++) {\n      expanded[longhands[i]] = key;\n    }\n  }\n\n  return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n *   becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n *   becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n *   becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n  {\n    if (!nextStyles) {\n      return;\n    }\n\n    var expandedUpdates = expandShorthandMap(styleUpdates);\n    var expandedStyles = expandShorthandMap(nextStyles);\n    var warnedAbout = {};\n\n    for (var key in expandedUpdates) {\n      var originalKey = expandedUpdates[key];\n      var correctOriginalKey = expandedStyles[key];\n\n      if (correctOriginalKey && originalKey !== correctOriginalKey) {\n        var warningKey = originalKey + ',' + correctOriginalKey;\n\n        if (warnedAbout[warningKey]) {\n          continue;\n        }\n\n        warnedAbout[warningKey] = true;\n\n        error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n      }\n    }\n  }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a list for\n// those special-case tags.\nvar omittedCloseTags = {\n  area: true,\n  base: true,\n  br: true,\n  col: true,\n  embed: true,\n  hr: true,\n  img: true,\n  input: true,\n  keygen: true,\n  link: true,\n  meta: true,\n  param: true,\n  source: true,\n  track: true,\n  wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = assign({\n  menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\n\nfunction assertValidProps(tag, props) {\n  if (!props) {\n    return;\n  } // Note the use of `==` which checks for null or undefined.\n\n\n  if (voidElementTags[tag]) {\n    if (props.children != null || props.dangerouslySetInnerHTML != null) {\n      throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n    }\n  }\n\n  if (props.dangerouslySetInnerHTML != null) {\n    if (props.children != null) {\n      throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n    }\n\n    if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {\n      throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n    }\n  }\n\n  {\n    if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n      error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n    }\n  }\n\n  if (props.style != null && typeof props.style !== 'object') {\n    throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n  }\n}\n\nfunction isCustomComponent(tagName, props) {\n  if (tagName.indexOf('-') === -1) {\n    return typeof props.is === 'string';\n  }\n\n  switch (tagName) {\n    // These are reserved SVG and MathML elements.\n    // We don't mind this list too much because we expect it to never grow.\n    // The alternative is to track the namespace in a few places which is convoluted.\n    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n    case 'annotation-xml':\n    case 'color-profile':\n    case 'font-face':\n    case 'font-face-src':\n    case 'font-face-uri':\n    case 'font-face-format':\n    case 'font-face-name':\n    case 'missing-glyph':\n      return false;\n\n    default:\n      return true;\n  }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n  // HTML\n  accept: 'accept',\n  acceptcharset: 'acceptCharset',\n  'accept-charset': 'acceptCharset',\n  accesskey: 'accessKey',\n  action: 'action',\n  allowfullscreen: 'allowFullScreen',\n  alt: 'alt',\n  as: 'as',\n  async: 'async',\n  autocapitalize: 'autoCapitalize',\n  autocomplete: 'autoComplete',\n  autocorrect: 'autoCorrect',\n  autofocus: 'autoFocus',\n  autoplay: 'autoPlay',\n  autosave: 'autoSave',\n  capture: 'capture',\n  cellpadding: 'cellPadding',\n  cellspacing: 'cellSpacing',\n  challenge: 'challenge',\n  charset: 'charSet',\n  checked: 'checked',\n  children: 'children',\n  cite: 'cite',\n  class: 'className',\n  classid: 'classID',\n  classname: 'className',\n  cols: 'cols',\n  colspan: 'colSpan',\n  content: 'content',\n  contenteditable: 'contentEditable',\n  contextmenu: 'contextMenu',\n  controls: 'controls',\n  controlslist: 'controlsList',\n  coords: 'coords',\n  crossorigin: 'crossOrigin',\n  dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n  data: 'data',\n  datetime: 'dateTime',\n  default: 'default',\n  defaultchecked: 'defaultChecked',\n  defaultvalue: 'defaultValue',\n  defer: 'defer',\n  dir: 'dir',\n  disabled: 'disabled',\n  disablepictureinpicture: 'disablePictureInPicture',\n  disableremoteplayback: 'disableRemotePlayback',\n  download: 'download',\n  draggable: 'draggable',\n  enctype: 'encType',\n  enterkeyhint: 'enterKeyHint',\n  for: 'htmlFor',\n  form: 'form',\n  formmethod: 'formMethod',\n  formaction: 'formAction',\n  formenctype: 'formEncType',\n  formnovalidate: 'formNoValidate',\n  formtarget: 'formTarget',\n  frameborder: 'frameBorder',\n  headers: 'headers',\n  height: 'height',\n  hidden: 'hidden',\n  high: 'high',\n  href: 'href',\n  hreflang: 'hrefLang',\n  htmlfor: 'htmlFor',\n  httpequiv: 'httpEquiv',\n  'http-equiv': 'httpEquiv',\n  icon: 'icon',\n  id: 'id',\n  imagesizes: 'imageSizes',\n  imagesrcset: 'imageSrcSet',\n  innerhtml: 'innerHTML',\n  inputmode: 'inputMode',\n  integrity: 'integrity',\n  is: 'is',\n  itemid: 'itemID',\n  itemprop: 'itemProp',\n  itemref: 'itemRef',\n  itemscope: 'itemScope',\n  itemtype: 'itemType',\n  keyparams: 'keyParams',\n  keytype: 'keyType',\n  kind: 'kind',\n  label: 'label',\n  lang: 'lang',\n  list: 'list',\n  loop: 'loop',\n  low: 'low',\n  manifest: 'manifest',\n  marginwidth: 'marginWidth',\n  marginheight: 'marginHeight',\n  max: 'max',\n  maxlength: 'maxLength',\n  media: 'media',\n  mediagroup: 'mediaGroup',\n  method: 'method',\n  min: 'min',\n  minlength: 'minLength',\n  multiple: 'multiple',\n  muted: 'muted',\n  name: 'name',\n  nomodule: 'noModule',\n  nonce: 'nonce',\n  novalidate: 'noValidate',\n  open: 'open',\n  optimum: 'optimum',\n  pattern: 'pattern',\n  placeholder: 'placeholder',\n  playsinline: 'playsInline',\n  poster: 'poster',\n  preload: 'preload',\n  profile: 'profile',\n  radiogroup: 'radioGroup',\n  readonly: 'readOnly',\n  referrerpolicy: 'referrerPolicy',\n  rel: 'rel',\n  required: 'required',\n  reversed: 'reversed',\n  role: 'role',\n  rows: 'rows',\n  rowspan: 'rowSpan',\n  sandbox: 'sandbox',\n  scope: 'scope',\n  scoped: 'scoped',\n  scrolling: 'scrolling',\n  seamless: 'seamless',\n  selected: 'selected',\n  shape: 'shape',\n  size: 'size',\n  sizes: 'sizes',\n  span: 'span',\n  spellcheck: 'spellCheck',\n  src: 'src',\n  srcdoc: 'srcDoc',\n  srclang: 'srcLang',\n  srcset: 'srcSet',\n  start: 'start',\n  step: 'step',\n  style: 'style',\n  summary: 'summary',\n  tabindex: 'tabIndex',\n  target: 'target',\n  title: 'title',\n  type: 'type',\n  usemap: 'useMap',\n  value: 'value',\n  width: 'width',\n  wmode: 'wmode',\n  wrap: 'wrap',\n  // SVG\n  about: 'about',\n  accentheight: 'accentHeight',\n  'accent-height': 'accentHeight',\n  accumulate: 'accumulate',\n  additive: 'additive',\n  alignmentbaseline: 'alignmentBaseline',\n  'alignment-baseline': 'alignmentBaseline',\n  allowreorder: 'allowReorder',\n  alphabetic: 'alphabetic',\n  amplitude: 'amplitude',\n  arabicform: 'arabicForm',\n  'arabic-form': 'arabicForm',\n  ascent: 'ascent',\n  attributename: 'attributeName',\n  attributetype: 'attributeType',\n  autoreverse: 'autoReverse',\n  azimuth: 'azimuth',\n  basefrequency: 'baseFrequency',\n  baselineshift: 'baselineShift',\n  'baseline-shift': 'baselineShift',\n  baseprofile: 'baseProfile',\n  bbox: 'bbox',\n  begin: 'begin',\n  bias: 'bias',\n  by: 'by',\n  calcmode: 'calcMode',\n  capheight: 'capHeight',\n  'cap-height': 'capHeight',\n  clip: 'clip',\n  clippath: 'clipPath',\n  'clip-path': 'clipPath',\n  clippathunits: 'clipPathUnits',\n  cliprule: 'clipRule',\n  'clip-rule': 'clipRule',\n  color: 'color',\n  colorinterpolation: 'colorInterpolation',\n  'color-interpolation': 'colorInterpolation',\n  colorinterpolationfilters: 'colorInterpolationFilters',\n  'color-interpolation-filters': 'colorInterpolationFilters',\n  colorprofile: 'colorProfile',\n  'color-profile': 'colorProfile',\n  colorrendering: 'colorRendering',\n  'color-rendering': 'colorRendering',\n  contentscripttype: 'contentScriptType',\n  contentstyletype: 'contentStyleType',\n  cursor: 'cursor',\n  cx: 'cx',\n  cy: 'cy',\n  d: 'd',\n  datatype: 'datatype',\n  decelerate: 'decelerate',\n  descent: 'descent',\n  diffuseconstant: 'diffuseConstant',\n  direction: 'direction',\n  display: 'display',\n  divisor: 'divisor',\n  dominantbaseline: 'dominantBaseline',\n  'dominant-baseline': 'dominantBaseline',\n  dur: 'dur',\n  dx: 'dx',\n  dy: 'dy',\n  edgemode: 'edgeMode',\n  elevation: 'elevation',\n  enablebackground: 'enableBackground',\n  'enable-background': 'enableBackground',\n  end: 'end',\n  exponent: 'exponent',\n  externalresourcesrequired: 'externalResourcesRequired',\n  fill: 'fill',\n  fillopacity: 'fillOpacity',\n  'fill-opacity': 'fillOpacity',\n  fillrule: 'fillRule',\n  'fill-rule': 'fillRule',\n  filter: 'filter',\n  filterres: 'filterRes',\n  filterunits: 'filterUnits',\n  floodopacity: 'floodOpacity',\n  'flood-opacity': 'floodOpacity',\n  floodcolor: 'floodColor',\n  'flood-color': 'floodColor',\n  focusable: 'focusable',\n  fontfamily: 'fontFamily',\n  'font-family': 'fontFamily',\n  fontsize: 'fontSize',\n  'font-size': 'fontSize',\n  fontsizeadjust: 'fontSizeAdjust',\n  'font-size-adjust': 'fontSizeAdjust',\n  fontstretch: 'fontStretch',\n  'font-stretch': 'fontStretch',\n  fontstyle: 'fontStyle',\n  'font-style': 'fontStyle',\n  fontvariant: 'fontVariant',\n  'font-variant': 'fontVariant',\n  fontweight: 'fontWeight',\n  'font-weight': 'fontWeight',\n  format: 'format',\n  from: 'from',\n  fx: 'fx',\n  fy: 'fy',\n  g1: 'g1',\n  g2: 'g2',\n  glyphname: 'glyphName',\n  'glyph-name': 'glyphName',\n  glyphorientationhorizontal: 'glyphOrientationHorizontal',\n  'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n  glyphorientationvertical: 'glyphOrientationVertical',\n  'glyph-orientation-vertical': 'glyphOrientationVertical',\n  glyphref: 'glyphRef',\n  gradienttransform: 'gradientTransform',\n  gradientunits: 'gradientUnits',\n  hanging: 'hanging',\n  horizadvx: 'horizAdvX',\n  'horiz-adv-x': 'horizAdvX',\n  horizoriginx: 'horizOriginX',\n  'horiz-origin-x': 'horizOriginX',\n  ideographic: 'ideographic',\n  imagerendering: 'imageRendering',\n  'image-rendering': 'imageRendering',\n  in2: 'in2',\n  in: 'in',\n  inlist: 'inlist',\n  intercept: 'intercept',\n  k1: 'k1',\n  k2: 'k2',\n  k3: 'k3',\n  k4: 'k4',\n  k: 'k',\n  kernelmatrix: 'kernelMatrix',\n  kernelunitlength: 'kernelUnitLength',\n  kerning: 'kerning',\n  keypoints: 'keyPoints',\n  keysplines: 'keySplines',\n  keytimes: 'keyTimes',\n  lengthadjust: 'lengthAdjust',\n  letterspacing: 'letterSpacing',\n  'letter-spacing': 'letterSpacing',\n  lightingcolor: 'lightingColor',\n  'lighting-color': 'lightingColor',\n  limitingconeangle: 'limitingConeAngle',\n  local: 'local',\n  markerend: 'markerEnd',\n  'marker-end': 'markerEnd',\n  markerheight: 'markerHeight',\n  markermid: 'markerMid',\n  'marker-mid': 'markerMid',\n  markerstart: 'markerStart',\n  'marker-start': 'markerStart',\n  markerunits: 'markerUnits',\n  markerwidth: 'markerWidth',\n  mask: 'mask',\n  maskcontentunits: 'maskContentUnits',\n  maskunits: 'maskUnits',\n  mathematical: 'mathematical',\n  mode: 'mode',\n  numoctaves: 'numOctaves',\n  offset: 'offset',\n  opacity: 'opacity',\n  operator: 'operator',\n  order: 'order',\n  orient: 'orient',\n  orientation: 'orientation',\n  origin: 'origin',\n  overflow: 'overflow',\n  overlineposition: 'overlinePosition',\n  'overline-position': 'overlinePosition',\n  overlinethickness: 'overlineThickness',\n  'overline-thickness': 'overlineThickness',\n  paintorder: 'paintOrder',\n  'paint-order': 'paintOrder',\n  panose1: 'panose1',\n  'panose-1': 'panose1',\n  pathlength: 'pathLength',\n  patterncontentunits: 'patternContentUnits',\n  patterntransform: 'patternTransform',\n  patternunits: 'patternUnits',\n  pointerevents: 'pointerEvents',\n  'pointer-events': 'pointerEvents',\n  points: 'points',\n  pointsatx: 'pointsAtX',\n  pointsaty: 'pointsAtY',\n  pointsatz: 'pointsAtZ',\n  prefix: 'prefix',\n  preservealpha: 'preserveAlpha',\n  preserveaspectratio: 'preserveAspectRatio',\n  primitiveunits: 'primitiveUnits',\n  property: 'property',\n  r: 'r',\n  radius: 'radius',\n  refx: 'refX',\n  refy: 'refY',\n  renderingintent: 'renderingIntent',\n  'rendering-intent': 'renderingIntent',\n  repeatcount: 'repeatCount',\n  repeatdur: 'repeatDur',\n  requiredextensions: 'requiredExtensions',\n  requiredfeatures: 'requiredFeatures',\n  resource: 'resource',\n  restart: 'restart',\n  result: 'result',\n  results: 'results',\n  rotate: 'rotate',\n  rx: 'rx',\n  ry: 'ry',\n  scale: 'scale',\n  security: 'security',\n  seed: 'seed',\n  shaperendering: 'shapeRendering',\n  'shape-rendering': 'shapeRendering',\n  slope: 'slope',\n  spacing: 'spacing',\n  specularconstant: 'specularConstant',\n  specularexponent: 'specularExponent',\n  speed: 'speed',\n  spreadmethod: 'spreadMethod',\n  startoffset: 'startOffset',\n  stddeviation: 'stdDeviation',\n  stemh: 'stemh',\n  stemv: 'stemv',\n  stitchtiles: 'stitchTiles',\n  stopcolor: 'stopColor',\n  'stop-color': 'stopColor',\n  stopopacity: 'stopOpacity',\n  'stop-opacity': 'stopOpacity',\n  strikethroughposition: 'strikethroughPosition',\n  'strikethrough-position': 'strikethroughPosition',\n  strikethroughthickness: 'strikethroughThickness',\n  'strikethrough-thickness': 'strikethroughThickness',\n  string: 'string',\n  stroke: 'stroke',\n  strokedasharray: 'strokeDasharray',\n  'stroke-dasharray': 'strokeDasharray',\n  strokedashoffset: 'strokeDashoffset',\n  'stroke-dashoffset': 'strokeDashoffset',\n  strokelinecap: 'strokeLinecap',\n  'stroke-linecap': 'strokeLinecap',\n  strokelinejoin: 'strokeLinejoin',\n  'stroke-linejoin': 'strokeLinejoin',\n  strokemiterlimit: 'strokeMiterlimit',\n  'stroke-miterlimit': 'strokeMiterlimit',\n  strokewidth: 'strokeWidth',\n  'stroke-width': 'strokeWidth',\n  strokeopacity: 'strokeOpacity',\n  'stroke-opacity': 'strokeOpacity',\n  suppresscontenteditablewarning: 'suppressContentEditableWarning',\n  suppresshydrationwarning: 'suppressHydrationWarning',\n  surfacescale: 'surfaceScale',\n  systemlanguage: 'systemLanguage',\n  tablevalues: 'tableValues',\n  targetx: 'targetX',\n  targety: 'targetY',\n  textanchor: 'textAnchor',\n  'text-anchor': 'textAnchor',\n  textdecoration: 'textDecoration',\n  'text-decoration': 'textDecoration',\n  textlength: 'textLength',\n  textrendering: 'textRendering',\n  'text-rendering': 'textRendering',\n  to: 'to',\n  transform: 'transform',\n  typeof: 'typeof',\n  u1: 'u1',\n  u2: 'u2',\n  underlineposition: 'underlinePosition',\n  'underline-position': 'underlinePosition',\n  underlinethickness: 'underlineThickness',\n  'underline-thickness': 'underlineThickness',\n  unicode: 'unicode',\n  unicodebidi: 'unicodeBidi',\n  'unicode-bidi': 'unicodeBidi',\n  unicoderange: 'unicodeRange',\n  'unicode-range': 'unicodeRange',\n  unitsperem: 'unitsPerEm',\n  'units-per-em': 'unitsPerEm',\n  unselectable: 'unselectable',\n  valphabetic: 'vAlphabetic',\n  'v-alphabetic': 'vAlphabetic',\n  values: 'values',\n  vectoreffect: 'vectorEffect',\n  'vector-effect': 'vectorEffect',\n  version: 'version',\n  vertadvy: 'vertAdvY',\n  'vert-adv-y': 'vertAdvY',\n  vertoriginx: 'vertOriginX',\n  'vert-origin-x': 'vertOriginX',\n  vertoriginy: 'vertOriginY',\n  'vert-origin-y': 'vertOriginY',\n  vhanging: 'vHanging',\n  'v-hanging': 'vHanging',\n  videographic: 'vIdeographic',\n  'v-ideographic': 'vIdeographic',\n  viewbox: 'viewBox',\n  viewtarget: 'viewTarget',\n  visibility: 'visibility',\n  vmathematical: 'vMathematical',\n  'v-mathematical': 'vMathematical',\n  vocab: 'vocab',\n  widths: 'widths',\n  wordspacing: 'wordSpacing',\n  'word-spacing': 'wordSpacing',\n  writingmode: 'writingMode',\n  'writing-mode': 'writingMode',\n  x1: 'x1',\n  x2: 'x2',\n  x: 'x',\n  xchannelselector: 'xChannelSelector',\n  xheight: 'xHeight',\n  'x-height': 'xHeight',\n  xlinkactuate: 'xlinkActuate',\n  'xlink:actuate': 'xlinkActuate',\n  xlinkarcrole: 'xlinkArcrole',\n  'xlink:arcrole': 'xlinkArcrole',\n  xlinkhref: 'xlinkHref',\n  'xlink:href': 'xlinkHref',\n  xlinkrole: 'xlinkRole',\n  'xlink:role': 'xlinkRole',\n  xlinkshow: 'xlinkShow',\n  'xlink:show': 'xlinkShow',\n  xlinktitle: 'xlinkTitle',\n  'xlink:title': 'xlinkTitle',\n  xlinktype: 'xlinkType',\n  'xlink:type': 'xlinkType',\n  xmlbase: 'xmlBase',\n  'xml:base': 'xmlBase',\n  xmllang: 'xmlLang',\n  'xml:lang': 'xmlLang',\n  xmlns: 'xmlns',\n  'xml:space': 'xmlSpace',\n  xmlnsxlink: 'xmlnsXlink',\n  'xmlns:xlink': 'xmlnsXlink',\n  xmlspace: 'xmlSpace',\n  y1: 'y1',\n  y2: 'y2',\n  y: 'y',\n  ychannelselector: 'yChannelSelector',\n  z: 'z',\n  zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n  'aria-current': 0,\n  // state\n  'aria-description': 0,\n  'aria-details': 0,\n  'aria-disabled': 0,\n  // state\n  'aria-hidden': 0,\n  // state\n  'aria-invalid': 0,\n  // state\n  'aria-keyshortcuts': 0,\n  'aria-label': 0,\n  'aria-roledescription': 0,\n  // Widget Attributes\n  'aria-autocomplete': 0,\n  'aria-checked': 0,\n  'aria-expanded': 0,\n  'aria-haspopup': 0,\n  'aria-level': 0,\n  'aria-modal': 0,\n  'aria-multiline': 0,\n  'aria-multiselectable': 0,\n  'aria-orientation': 0,\n  'aria-placeholder': 0,\n  'aria-pressed': 0,\n  'aria-readonly': 0,\n  'aria-required': 0,\n  'aria-selected': 0,\n  'aria-sort': 0,\n  'aria-valuemax': 0,\n  'aria-valuemin': 0,\n  'aria-valuenow': 0,\n  'aria-valuetext': 0,\n  // Live Region Attributes\n  'aria-atomic': 0,\n  'aria-busy': 0,\n  'aria-live': 0,\n  'aria-relevant': 0,\n  // Drag-and-Drop Attributes\n  'aria-dropeffect': 0,\n  'aria-grabbed': 0,\n  // Relationship Attributes\n  'aria-activedescendant': 0,\n  'aria-colcount': 0,\n  'aria-colindex': 0,\n  'aria-colspan': 0,\n  'aria-controls': 0,\n  'aria-describedby': 0,\n  'aria-errormessage': 0,\n  'aria-flowto': 0,\n  'aria-labelledby': 0,\n  'aria-owns': 0,\n  'aria-posinset': 0,\n  'aria-rowcount': 0,\n  'aria-rowindex': 0,\n  'aria-rowspan': 0,\n  'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name) {\n  {\n    if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n      return true;\n    }\n\n    if (rARIACamel.test(name)) {\n      var ariaName = 'aria-' + name.slice(4).toLowerCase();\n      var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n      // DOM properties, then it is an invalid aria-* attribute.\n\n      if (correctName == null) {\n        error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n        warnedProperties[name] = true;\n        return true;\n      } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n      if (name !== correctName) {\n        error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n        warnedProperties[name] = true;\n        return true;\n      }\n    }\n\n    if (rARIA.test(name)) {\n      var lowerCasedName = name.toLowerCase();\n      var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n      // DOM properties, then it is an invalid aria-* attribute.\n\n      if (standardName == null) {\n        warnedProperties[name] = true;\n        return false;\n      } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n      if (name !== standardName) {\n        error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n        warnedProperties[name] = true;\n        return true;\n      }\n    }\n  }\n\n  return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n  {\n    var invalidProps = [];\n\n    for (var key in props) {\n      var isValid = validateProperty(type, key);\n\n      if (!isValid) {\n        invalidProps.push(key);\n      }\n    }\n\n    var unknownPropString = invalidProps.map(function (prop) {\n      return '`' + prop + '`';\n    }).join(', ');\n\n    if (invalidProps.length === 1) {\n      error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n    } else if (invalidProps.length > 1) {\n      error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n    }\n  }\n}\n\nfunction validateProperties(type, props) {\n  if (isCustomComponent(type, props)) {\n    return;\n  }\n\n  warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n  {\n    if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n      return;\n    }\n\n    if (props != null && props.value === null && !didWarnValueNull) {\n      didWarnValueNull = true;\n\n      if (type === 'select' && props.multiple) {\n        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n      } else {\n        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n      }\n    }\n  }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n  var warnedProperties$1 = {};\n  var EVENT_NAME_REGEX = /^on./;\n  var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n  validateProperty$1 = function (tagName, name, value, eventRegistry) {\n    if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n      return true;\n    }\n\n    var lowerCasedName = name.toLowerCase();\n\n    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n      error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // We can't rely on the event system being injected on the server.\n\n\n    if (eventRegistry != null) {\n      var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n          possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n      if (registrationNameDependencies.hasOwnProperty(name)) {\n        return true;\n      }\n\n      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n      if (registrationName != null) {\n        error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n\n      if (EVENT_NAME_REGEX.test(name)) {\n        error('Unknown event handler property `%s`. It will be ignored.', name);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n    } else if (EVENT_NAME_REGEX.test(name)) {\n      // If no event plugins have been injected, we are in a server environment.\n      // So we can't tell if the event name is correct for sure, but we can filter\n      // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n      if (INVALID_EVENT_NAME_REGEX.test(name)) {\n        error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n      }\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // Let the ARIA attribute hook validate ARIA attributes\n\n\n    if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n      return true;\n    }\n\n    if (lowerCasedName === 'innerhtml') {\n      error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (lowerCasedName === 'aria') {\n      error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n      error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (typeof value === 'number' && isNaN(value)) {\n      error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    var propertyInfo = getPropertyInfo(name);\n    var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n    if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n      var standardName = possibleStandardNames[lowerCasedName];\n\n      if (standardName !== name) {\n        error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n    } else if (!isReserved && name !== lowerCasedName) {\n      // Unknown attributes should have lowercase casing since that's how they\n      // will be cased anyway with server rendering.\n      error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n      if (value) {\n        error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n      } else {\n        error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n      }\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // Now that we've validated casing, do not validate\n    // data types for reserved props\n\n\n    if (isReserved) {\n      return true;\n    } // Warn when a known attribute is a bad type\n\n\n    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n      warnedProperties$1[name] = true;\n      return false;\n    } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n    if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n      error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    return true;\n  };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n  {\n    var unknownProps = [];\n\n    for (var key in props) {\n      var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n      if (!isValid) {\n        unknownProps.push(key);\n      }\n    }\n\n    var unknownPropString = unknownProps.map(function (prop) {\n      return '`' + prop + '`';\n    }).join(', ');\n\n    if (unknownProps.length === 1) {\n      error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n    } else if (unknownProps.length > 1) {\n      error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n    }\n  }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n  if (isCustomComponent(type, props)) {\n    return;\n  }\n\n  warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n  {\n    if (currentReplayingEvent !== null) {\n      error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n  {\n    if (currentReplayingEvent === null) {\n      error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n  return event === currentReplayingEvent;\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n  // Fallback to nativeEvent.srcElement for IE9\n  // https://github.com/facebook/react/issues/12506\n  var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n  if (target.correspondingUseElement) {\n    target = target.correspondingUseElement;\n  } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n  // @see http://www.quirksmode.org/js/events_properties.html\n\n\n  return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n  // We perform this translation at the end of the event loop so that we\n  // always receive the correct fiber here\n  var internalInstance = getInstanceFromNode(target);\n\n  if (!internalInstance) {\n    // Unmounted\n    return;\n  }\n\n  if (typeof restoreImpl !== 'function') {\n    throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n  if (stateNode) {\n    var _props = getFiberCurrentPropsFromNode(stateNode);\n\n    restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n  }\n}\n\nfunction setRestoreImplementation(impl) {\n  restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n  if (restoreTarget) {\n    if (restoreQueue) {\n      restoreQueue.push(target);\n    } else {\n      restoreQueue = [target];\n    }\n  } else {\n    restoreTarget = target;\n  }\n}\nfunction needsStateRestore() {\n  return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n  if (!restoreTarget) {\n    return;\n  }\n\n  var target = restoreTarget;\n  var queuedTargets = restoreQueue;\n  restoreTarget = null;\n  restoreQueue = null;\n  restoreStateOfTarget(target);\n\n  if (queuedTargets) {\n    for (var i = 0; i < queuedTargets.length; i++) {\n      restoreStateOfTarget(queuedTargets[i]);\n    }\n  }\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n  return fn(bookkeeping);\n};\n\nvar flushSyncImpl = function () {};\n\nvar isInsideEventHandler = false;\n\nfunction finishEventHandler() {\n  // Here we wait until all updates have propagated, which is important\n  // when using controlled components within layers:\n  // https://github.com/facebook/react/issues/1698\n  // Then we restore state of any controlled component.\n  var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n  if (controlledComponentsHavePendingUpdates) {\n    // If a controlled event was fired, we may need to restore the state of\n    // the DOM node back to the controlled value. This is necessary when React\n    // bails out of the update without touching the DOM.\n    // TODO: Restore state in the microtask, after the discrete updates flush,\n    // instead of early flushing them here.\n    flushSyncImpl();\n    restoreStateIfNeeded();\n  }\n}\n\nfunction batchedUpdates(fn, a, b) {\n  if (isInsideEventHandler) {\n    // If we are currently inside another batch, we need to wait until it\n    // fully completes before restoring state.\n    return fn(a, b);\n  }\n\n  isInsideEventHandler = true;\n\n  try {\n    return batchedUpdatesImpl(fn, a, b);\n  } finally {\n    isInsideEventHandler = false;\n    finishEventHandler();\n  }\n} // TODO: Replace with flushSync\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {\n  batchedUpdatesImpl = _batchedUpdatesImpl;\n  flushSyncImpl = _flushSyncImpl;\n}\n\nfunction isInteractive(tag) {\n  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n  switch (name) {\n    case 'onClick':\n    case 'onClickCapture':\n    case 'onDoubleClick':\n    case 'onDoubleClickCapture':\n    case 'onMouseDown':\n    case 'onMouseDownCapture':\n    case 'onMouseMove':\n    case 'onMouseMoveCapture':\n    case 'onMouseUp':\n    case 'onMouseUpCapture':\n    case 'onMouseEnter':\n      return !!(props.disabled && isInteractive(type));\n\n    default:\n      return false;\n  }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n  var stateNode = inst.stateNode;\n\n  if (stateNode === null) {\n    // Work in progress (ex: onload events in incremental mode).\n    return null;\n  }\n\n  var props = getFiberCurrentPropsFromNode(stateNode);\n\n  if (props === null) {\n    // Work in progress.\n    return null;\n  }\n\n  var listener = props[registrationName];\n\n  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n    return null;\n  }\n\n  if (listener && typeof listener !== 'function') {\n    throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n  }\n\n  return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n  try {\n    var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n    Object.defineProperty(options, 'passive', {\n      get: function () {\n        passiveBrowserEventsSupported = true;\n      }\n    });\n    window.addEventListener('test', options, options);\n    window.removeEventListener('test', options, options);\n  } catch (e) {\n    passiveBrowserEventsSupported = false;\n  }\n}\n\nfunction invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n  var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n  try {\n    func.apply(context, funcArgs);\n  } catch (error) {\n    this.onError(error);\n  }\n}\n\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n\n{\n  // In DEV mode, we swap out invokeGuardedCallback for a special version\n  // that plays more nicely with the browser's DevTools. The idea is to preserve\n  // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n  // functions in invokeGuardedCallback, and the production version of\n  // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n  // like caught exceptions, and the DevTools won't pause unless the developer\n  // takes the extra step of enabling pause on caught exceptions. This is\n  // unintuitive, though, because even though React has caught the error, from\n  // the developer's perspective, the error is uncaught.\n  //\n  // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n  // DOM node, and call the user-provided callback from inside an event handler\n  // for that fake event. If the callback throws, the error is \"captured\" using\n  // a global event handler. But because the error happens in a different\n  // event loop context, it does not interrupt the normal program flow.\n  // Effectively, this gives us try-catch behavior without actually using\n  // try-catch. Neat!\n  // Check that the browser supports the APIs we need to implement our special\n  // DEV version of invokeGuardedCallback\n  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n    var fakeNode = document.createElement('react');\n\n    invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n      // If document doesn't exist we know for sure we will crash in this method\n      // when we call document.createEvent(). However this can cause confusing\n      // errors: https://github.com/facebook/create-react-app/issues/3482\n      // So we preemptively throw with a better message instead.\n      if (typeof document === 'undefined' || document === null) {\n        throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');\n      }\n\n      var evt = document.createEvent('Event');\n      var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n      // set this to true at the beginning, then set it to false right after\n      // calling the function. If the function errors, `didError` will never be\n      // set to false. This strategy works even if the browser is flaky and\n      // fails to call our global error handler, because it doesn't rely on\n      // the error event at all.\n\n      var didError = true; // Keeps track of the value of window.event so that we can reset it\n      // during the callback to let user code access window.event in the\n      // browsers that support it.\n\n      var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n      // dispatching: https://github.com/facebook/react/issues/13688\n\n      var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n      function restoreAfterDispatch() {\n        // We immediately remove the callback from event listeners so that\n        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n        // nested call would trigger the fake event handlers of any call higher\n        // in the stack.\n        fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n        // window.event assignment in both IE <= 10 as they throw an error\n        // \"Member not found\" in strict mode, and in Firefox which does not\n        // support window.event.\n\n        if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n          window.event = windowEvent;\n        }\n      } // Create an event handler for our fake event. We will synchronously\n      // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n      // call the user-provided callback.\n\n\n      var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n      function callCallback() {\n        didCall = true;\n        restoreAfterDispatch();\n        func.apply(context, funcArgs);\n        didError = false;\n      } // Create a global error event handler. We use this to capture the value\n      // that was thrown. It's possible that this error handler will fire more\n      // than once; for example, if non-React code also calls `dispatchEvent`\n      // and a handler for that event throws. We should be resilient to most of\n      // those cases. Even if our error event handler fires more than once, the\n      // last error event is always used. If the callback actually does error,\n      // we know that the last error event is the correct one, because it's not\n      // possible for anything else to have happened in between our callback\n      // erroring and the code that follows the `dispatchEvent` call below. If\n      // the callback doesn't error, but the error event was fired, we know to\n      // ignore it because `didError` will be false, as described above.\n\n\n      var error; // Use this to track whether the error event is ever called.\n\n      var didSetError = false;\n      var isCrossOriginError = false;\n\n      function handleWindowError(event) {\n        error = event.error;\n        didSetError = true;\n\n        if (error === null && event.colno === 0 && event.lineno === 0) {\n          isCrossOriginError = true;\n        }\n\n        if (event.defaultPrevented) {\n          // Some other error handler has prevented default.\n          // Browsers silence the error report if this happens.\n          // We'll remember this to later decide whether to log it or not.\n          if (error != null && typeof error === 'object') {\n            try {\n              error._suppressLogging = true;\n            } catch (inner) {// Ignore.\n            }\n          }\n        }\n      } // Create a fake event type.\n\n\n      var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n      window.addEventListener('error', handleWindowError);\n      fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n      // errors, it will trigger our global error handler.\n\n      evt.initEvent(evtType, false, false);\n      fakeNode.dispatchEvent(evt);\n\n      if (windowEventDescriptor) {\n        Object.defineProperty(window, 'event', windowEventDescriptor);\n      }\n\n      if (didCall && didError) {\n        if (!didSetError) {\n          // The callback errored, but the error event never fired.\n          // eslint-disable-next-line react-internal/prod-error-codes\n          error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n        } else if (isCrossOriginError) {\n          // eslint-disable-next-line react-internal/prod-error-codes\n          error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n        }\n\n        this.onError(error);\n      } // Remove our event listeners\n\n\n      window.removeEventListener('error', handleWindowError);\n\n      if (!didCall) {\n        // Something went really wrong, and our event was not dispatched.\n        // https://github.com/facebook/react/issues/16734\n        // https://github.com/facebook/react/issues/16585\n        // Fall back to the production implementation.\n        restoreAfterDispatch();\n        return invokeGuardedCallbackProd.apply(this, arguments);\n      }\n    };\n  }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n  onError: function (error) {\n    hasError = true;\n    caughtError = error;\n  }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n  hasError = false;\n  caughtError = null;\n  invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n  invokeGuardedCallback.apply(this, arguments);\n\n  if (hasError) {\n    var error = clearCaughtError();\n\n    if (!hasRethrowError) {\n      hasRethrowError = true;\n      rethrowError = error;\n    }\n  }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n  if (hasRethrowError) {\n    var error = rethrowError;\n    hasRethrowError = false;\n    rethrowError = null;\n    throw error;\n  }\n}\nfunction hasCaughtError() {\n  return hasError;\n}\nfunction clearCaughtError() {\n  if (hasError) {\n    var error = caughtError;\n    hasError = false;\n    caughtError = null;\n    return error;\n  } else {\n    throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n  }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n  return key._reactInternals;\n}\nfunction has(key) {\n  return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n  key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/*                      */\n0;\nvar PerformedWork =\n/*                */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/*                    */\n2;\nvar Update =\n/*                       */\n4;\nvar ChildDeletion =\n/*                */\n16;\nvar ContentReset =\n/*                 */\n32;\nvar Callback =\n/*                     */\n64;\nvar DidCapture =\n/*                   */\n128;\nvar ForceClientRender =\n/*            */\n256;\nvar Ref =\n/*                          */\n512;\nvar Snapshot =\n/*                     */\n1024;\nvar Passive =\n/*                      */\n2048;\nvar Hydrating =\n/*                    */\n4096;\nvar Visibility =\n/*                   */\n8192;\nvar StoreConsistency =\n/*             */\n16384;\nvar LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/*               */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/*                   */\n32768;\nvar ShouldCapture =\n/*                */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/*                       */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/*                    */\n2097152;\nvar LayoutStatic =\n/*                 */\n4194304;\nvar PassiveStatic =\n/*                */\n8388608; // These flags allow us to traverse to fibers that have effects on mount\n// without traversing the entire tree after every commit for\n// double invoking\n\nvar MountLayoutDev =\n/*               */\n16777216;\nvar MountPassiveDev =\n/*              */\n33554432; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | ( 0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic;\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n  var node = fiber;\n  var nearestMounted = fiber;\n\n  if (!fiber.alternate) {\n    // If there is no alternate, this might be a new tree that isn't inserted\n    // yet. If it is, then it will have a pending insertion effect on it.\n    var nextNode = node;\n\n    do {\n      node = nextNode;\n\n      if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n        // This is an insertion or in-progress hydration. The nearest possible\n        // mounted fiber is the parent but we need to continue to figure out\n        // if that one is still mounted.\n        nearestMounted = node.return;\n      }\n\n      nextNode = node.return;\n    } while (nextNode);\n  } else {\n    while (node.return) {\n      node = node.return;\n    }\n  }\n\n  if (node.tag === HostRoot) {\n    // TODO: Check if this was a nested HostRoot when used with\n    // renderContainerIntoSubtree.\n    return nearestMounted;\n  } // If we didn't hit the root, that means that we're in an disconnected tree\n  // that has been unmounted.\n\n\n  return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n  if (fiber.tag === SuspenseComponent) {\n    var suspenseState = fiber.memoizedState;\n\n    if (suspenseState === null) {\n      var current = fiber.alternate;\n\n      if (current !== null) {\n        suspenseState = current.memoizedState;\n      }\n    }\n\n    if (suspenseState !== null) {\n      return suspenseState.dehydrated;\n    }\n  }\n\n  return null;\n}\nfunction getContainerFromFiber(fiber) {\n  return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n  return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n  {\n    var owner = ReactCurrentOwner.current;\n\n    if (owner !== null && owner.tag === ClassComponent) {\n      var ownerFiber = owner;\n      var instance = ownerFiber.stateNode;\n\n      if (!instance._warnedAboutRefsInRender) {\n        error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');\n      }\n\n      instance._warnedAboutRefsInRender = true;\n    }\n  }\n\n  var fiber = get(component);\n\n  if (!fiber) {\n    return false;\n  }\n\n  return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n  if (getNearestMountedFiber(fiber) !== fiber) {\n    throw new Error('Unable to find node on an unmounted component.');\n  }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n  var alternate = fiber.alternate;\n\n  if (!alternate) {\n    // If there is no alternate, then we only need to check if it is mounted.\n    var nearestMounted = getNearestMountedFiber(fiber);\n\n    if (nearestMounted === null) {\n      throw new Error('Unable to find node on an unmounted component.');\n    }\n\n    if (nearestMounted !== fiber) {\n      return null;\n    }\n\n    return fiber;\n  } // If we have two possible branches, we'll walk backwards up to the root\n  // to see what path the root points to. On the way we may hit one of the\n  // special cases and we'll deal with them.\n\n\n  var a = fiber;\n  var b = alternate;\n\n  while (true) {\n    var parentA = a.return;\n\n    if (parentA === null) {\n      // We're at the root.\n      break;\n    }\n\n    var parentB = parentA.alternate;\n\n    if (parentB === null) {\n      // There is no alternate. This is an unusual case. Currently, it only\n      // happens when a Suspense component is hidden. An extra fragment fiber\n      // is inserted in between the Suspense fiber and its children. Skip\n      // over this extra fragment fiber and proceed to the next parent.\n      var nextParent = parentA.return;\n\n      if (nextParent !== null) {\n        a = b = nextParent;\n        continue;\n      } // If there's no parent, we're at the root.\n\n\n      break;\n    } // If both copies of the parent fiber point to the same child, we can\n    // assume that the child is current. This happens when we bailout on low\n    // priority: the bailed out fiber's child reuses the current child.\n\n\n    if (parentA.child === parentB.child) {\n      var child = parentA.child;\n\n      while (child) {\n        if (child === a) {\n          // We've determined that A is the current branch.\n          assertIsMounted(parentA);\n          return fiber;\n        }\n\n        if (child === b) {\n          // We've determined that B is the current branch.\n          assertIsMounted(parentA);\n          return alternate;\n        }\n\n        child = child.sibling;\n      } // We should never have an alternate for any mounting node. So the only\n      // way this could possibly happen is if this was unmounted, if at all.\n\n\n      throw new Error('Unable to find node on an unmounted component.');\n    }\n\n    if (a.return !== b.return) {\n      // The return pointer of A and the return pointer of B point to different\n      // fibers. We assume that return pointers never criss-cross, so A must\n      // belong to the child set of A.return, and B must belong to the child\n      // set of B.return.\n      a = parentA;\n      b = parentB;\n    } else {\n      // The return pointers point to the same fiber. We'll have to use the\n      // default, slow path: scan the child sets of each parent alternate to see\n      // which child belongs to which set.\n      //\n      // Search parent A's child set\n      var didFindChild = false;\n      var _child = parentA.child;\n\n      while (_child) {\n        if (_child === a) {\n          didFindChild = true;\n          a = parentA;\n          b = parentB;\n          break;\n        }\n\n        if (_child === b) {\n          didFindChild = true;\n          b = parentA;\n          a = parentB;\n          break;\n        }\n\n        _child = _child.sibling;\n      }\n\n      if (!didFindChild) {\n        // Search parent B's child set\n        _child = parentB.child;\n\n        while (_child) {\n          if (_child === a) {\n            didFindChild = true;\n            a = parentB;\n            b = parentA;\n            break;\n          }\n\n          if (_child === b) {\n            didFindChild = true;\n            b = parentB;\n            a = parentA;\n            break;\n          }\n\n          _child = _child.sibling;\n        }\n\n        if (!didFindChild) {\n          throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n        }\n      }\n    }\n\n    if (a.alternate !== b) {\n      throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n  } // If the root is not a host container, we're in a disconnected tree. I.e.\n  // unmounted.\n\n\n  if (a.tag !== HostRoot) {\n    throw new Error('Unable to find node on an unmounted component.');\n  }\n\n  if (a.stateNode.current === a) {\n    // We've determined that A is the current branch.\n    return fiber;\n  } // Otherwise B has to be current branch.\n\n\n  return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n  var currentParent = findCurrentFiberUsingSlowPath(parent);\n  return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n  // Next we'll drill down this component to find the first HostComponent/Text.\n  if (node.tag === HostComponent || node.tag === HostText) {\n    return node;\n  }\n\n  var child = node.child;\n\n  while (child !== null) {\n    var match = findCurrentHostFiberImpl(child);\n\n    if (match !== null) {\n      return match;\n    }\n\n    child = child.sibling;\n  }\n\n  return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n  var currentParent = findCurrentFiberUsingSlowPath(parent);\n  return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n  // Next we'll drill down this component to find the first HostComponent/Text.\n  if (node.tag === HostComponent || node.tag === HostText) {\n    return node;\n  }\n\n  var child = node.child;\n\n  while (child !== null) {\n    if (child.tag !== HostPortal) {\n      var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n      if (match !== null) {\n        return match;\n      }\n    }\n\n    child = child.sibling;\n  }\n\n  return null;\n}\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback = Scheduler.unstable_scheduleCallback;\nvar cancelCallback = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority;\n// this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\nvar unstable_yieldValue = Scheduler.unstable_yieldValue;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n    // No DevTools\n    return false;\n  }\n\n  var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n  if (hook.isDisabled) {\n    // This isn't a real property on the hook, but it can be set to opt out\n    // of DevTools integration and associated warnings and logs.\n    // https://github.com/facebook/react/issues/3877\n    return true;\n  }\n\n  if (!hook.supportsFiber) {\n    {\n      error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');\n    } // DevTools exists, even though it doesn't support Fiber.\n\n\n    return true;\n  }\n\n  try {\n    if (enableSchedulingProfiler) {\n      // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n      // This gives DevTools a way to feature detect that isn't tied to version number\n      // (since profiling and timeline are controlled by different feature flags).\n      internals = assign({}, internals, {\n        getLaneLabelMap: getLaneLabelMap,\n        injectProfilingHooks: injectProfilingHooks\n      });\n    }\n\n    rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n    injectedHook = hook;\n  } catch (err) {\n    // Catch all errors because it is unsafe to throw during initialization.\n    {\n      error('React instrumentation encountered an error: %s.', err);\n    }\n  }\n\n  if (hook.checkDCE) {\n    // This is the real DevTools.\n    return true;\n  } else {\n    // This is likely a hook installed by Fast Refresh runtime.\n    return false;\n  }\n}\nfunction onScheduleRoot(root, children) {\n  {\n    if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n      try {\n        injectedHook.onScheduleFiberRoot(rendererID, root, children);\n      } catch (err) {\n        if ( !hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onCommitRoot(root, eventPriority) {\n  if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n    try {\n      var didError = (root.current.flags & DidCapture) === DidCapture;\n\n      if (enableProfilerTimer) {\n        var schedulerPriority;\n\n        switch (eventPriority) {\n          case DiscreteEventPriority:\n            schedulerPriority = ImmediatePriority;\n            break;\n\n          case ContinuousEventPriority:\n            schedulerPriority = UserBlockingPriority;\n            break;\n\n          case DefaultEventPriority:\n            schedulerPriority = NormalPriority;\n            break;\n\n          case IdleEventPriority:\n            schedulerPriority = IdlePriority;\n            break;\n\n          default:\n            schedulerPriority = NormalPriority;\n            break;\n        }\n\n        injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n      } else {\n        injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n      }\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onPostCommitRoot(root) {\n  if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n    try {\n      injectedHook.onPostCommitFiberRoot(rendererID, root);\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onCommitUnmount(fiber) {\n  if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n    try {\n      injectedHook.onCommitFiberUnmount(rendererID, fiber);\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n  {\n    if (typeof unstable_yieldValue === 'function') {\n      // We're in a test because Scheduler.unstable_yieldValue only exists\n      // in SchedulerMock. To reduce the noise in strict mode tests,\n      // suppress warnings and disable scheduler yielding during the double render\n      unstable_setDisableYieldValue(newIsStrictMode);\n      setSuppressWarning(newIsStrictMode);\n    }\n\n    if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n      try {\n        injectedHook.setStrictMode(rendererID, newIsStrictMode);\n      } catch (err) {\n        {\n          if (!hasLoggedError) {\n            hasLoggedError = true;\n\n            error('React instrumentation encountered an error: %s', err);\n          }\n        }\n      }\n    }\n  }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n  injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n  {\n    var map = new Map();\n    var lane = 1;\n\n    for (var index = 0; index < TotalLanes; index++) {\n      var label = getLabelForLane(lane);\n      map.set(lane, label);\n      lane *= 2;\n    }\n\n    return map;\n  }\n}\n\nfunction markCommitStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n      injectedProfilingHooks.markCommitStarted(lanes);\n    }\n  }\n}\nfunction markCommitStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n      injectedProfilingHooks.markCommitStopped();\n    }\n  }\n}\nfunction markComponentRenderStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n      injectedProfilingHooks.markComponentRenderStarted(fiber);\n    }\n  }\n}\nfunction markComponentRenderStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n      injectedProfilingHooks.markComponentRenderStopped();\n    }\n  }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n    }\n  }\n}\nfunction markComponentPassiveEffectMountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n    }\n  }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n    }\n  }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n    }\n  }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n    }\n  }\n}\nfunction markComponentLayoutEffectMountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n    }\n  }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n    }\n  }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n    }\n  }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n      injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n    }\n  }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n      injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n    }\n  }\n}\nfunction markLayoutEffectsStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n      injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n    }\n  }\n}\nfunction markLayoutEffectsStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n      injectedProfilingHooks.markLayoutEffectsStopped();\n    }\n  }\n}\nfunction markPassiveEffectsStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n      injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n    }\n  }\n}\nfunction markPassiveEffectsStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n      injectedProfilingHooks.markPassiveEffectsStopped();\n    }\n  }\n}\nfunction markRenderStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n      injectedProfilingHooks.markRenderStarted(lanes);\n    }\n  }\n}\nfunction markRenderYielded() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n      injectedProfilingHooks.markRenderYielded();\n    }\n  }\n}\nfunction markRenderStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n      injectedProfilingHooks.markRenderStopped();\n    }\n  }\n}\nfunction markRenderScheduled(lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n      injectedProfilingHooks.markRenderScheduled(lane);\n    }\n  }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n      injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n    }\n  }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n      injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n    }\n  }\n}\n\nvar NoMode =\n/*                         */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/*                 */\n1;\nvar ProfileMode =\n/*                    */\n2;\nvar StrictLegacyMode =\n/*               */\n8;\nvar StrictEffectsMode =\n/*              */\n16;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n  var asUint = x >>> 0;\n\n  if (asUint === 0) {\n    return 32;\n  }\n\n  return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/*                        */\n0;\nvar NoLane =\n/*                          */\n0;\nvar SyncLane =\n/*                        */\n1;\nvar InputContinuousHydrationLane =\n/*    */\n2;\nvar InputContinuousLane =\n/*             */\n4;\nvar DefaultHydrationLane =\n/*            */\n8;\nvar DefaultLane =\n/*                     */\n16;\nvar TransitionHydrationLane =\n/*                */\n32;\nvar TransitionLanes =\n/*                       */\n4194240;\nvar TransitionLane1 =\n/*                        */\n64;\nvar TransitionLane2 =\n/*                        */\n128;\nvar TransitionLane3 =\n/*                        */\n256;\nvar TransitionLane4 =\n/*                        */\n512;\nvar TransitionLane5 =\n/*                        */\n1024;\nvar TransitionLane6 =\n/*                        */\n2048;\nvar TransitionLane7 =\n/*                        */\n4096;\nvar TransitionLane8 =\n/*                        */\n8192;\nvar TransitionLane9 =\n/*                        */\n16384;\nvar TransitionLane10 =\n/*                       */\n32768;\nvar TransitionLane11 =\n/*                       */\n65536;\nvar TransitionLane12 =\n/*                       */\n131072;\nvar TransitionLane13 =\n/*                       */\n262144;\nvar TransitionLane14 =\n/*                       */\n524288;\nvar TransitionLane15 =\n/*                       */\n1048576;\nvar TransitionLane16 =\n/*                       */\n2097152;\nvar RetryLanes =\n/*                            */\n130023424;\nvar RetryLane1 =\n/*                             */\n4194304;\nvar RetryLane2 =\n/*                             */\n8388608;\nvar RetryLane3 =\n/*                             */\n16777216;\nvar RetryLane4 =\n/*                             */\n33554432;\nvar RetryLane5 =\n/*                             */\n67108864;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/*          */\n134217728;\nvar NonIdleLanes =\n/*                          */\n268435455;\nvar IdleHydrationLane =\n/*               */\n268435456;\nvar IdleLane =\n/*                        */\n536870912;\nvar OffscreenLane =\n/*                   */\n1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n  {\n    if (lane & SyncLane) {\n      return 'Sync';\n    }\n\n    if (lane & InputContinuousHydrationLane) {\n      return 'InputContinuousHydration';\n    }\n\n    if (lane & InputContinuousLane) {\n      return 'InputContinuous';\n    }\n\n    if (lane & DefaultHydrationLane) {\n      return 'DefaultHydration';\n    }\n\n    if (lane & DefaultLane) {\n      return 'Default';\n    }\n\n    if (lane & TransitionHydrationLane) {\n      return 'TransitionHydration';\n    }\n\n    if (lane & TransitionLanes) {\n      return 'Transition';\n    }\n\n    if (lane & RetryLanes) {\n      return 'Retry';\n    }\n\n    if (lane & SelectiveHydrationLane) {\n      return 'SelectiveHydration';\n    }\n\n    if (lane & IdleHydrationLane) {\n      return 'IdleHydration';\n    }\n\n    if (lane & IdleLane) {\n      return 'Idle';\n    }\n\n    if (lane & OffscreenLane) {\n      return 'Offscreen';\n    }\n  }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n  switch (getHighestPriorityLane(lanes)) {\n    case SyncLane:\n      return SyncLane;\n\n    case InputContinuousHydrationLane:\n      return InputContinuousHydrationLane;\n\n    case InputContinuousLane:\n      return InputContinuousLane;\n\n    case DefaultHydrationLane:\n      return DefaultHydrationLane;\n\n    case DefaultLane:\n      return DefaultLane;\n\n    case TransitionHydrationLane:\n      return TransitionHydrationLane;\n\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n      return lanes & TransitionLanes;\n\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      return lanes & RetryLanes;\n\n    case SelectiveHydrationLane:\n      return SelectiveHydrationLane;\n\n    case IdleHydrationLane:\n      return IdleHydrationLane;\n\n    case IdleLane:\n      return IdleLane;\n\n    case OffscreenLane:\n      return OffscreenLane;\n\n    default:\n      {\n        error('Should have found matching lanes. This is a bug in React.');\n      } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n      return lanes;\n  }\n}\n\nfunction getNextLanes(root, wipLanes) {\n  // Early bailout if there's no pending work left.\n  var pendingLanes = root.pendingLanes;\n\n  if (pendingLanes === NoLanes) {\n    return NoLanes;\n  }\n\n  var nextLanes = NoLanes;\n  var suspendedLanes = root.suspendedLanes;\n  var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n  // even if the work is suspended.\n\n  var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n  if (nonIdlePendingLanes !== NoLanes) {\n    var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n    if (nonIdleUnblockedLanes !== NoLanes) {\n      nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n    } else {\n      var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n      if (nonIdlePingedLanes !== NoLanes) {\n        nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n      }\n    }\n  } else {\n    // The only remaining work is Idle.\n    var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n    if (unblockedLanes !== NoLanes) {\n      nextLanes = getHighestPriorityLanes(unblockedLanes);\n    } else {\n      if (pingedLanes !== NoLanes) {\n        nextLanes = getHighestPriorityLanes(pingedLanes);\n      }\n    }\n  }\n\n  if (nextLanes === NoLanes) {\n    // This should only be reachable if we're suspended\n    // TODO: Consider warning in this path if a fallback timer is not scheduled.\n    return NoLanes;\n  } // If we're already in the middle of a render, switching lanes will interrupt\n  // it and we'll lose our progress. We should only do this if the new lanes are\n  // higher priority.\n\n\n  if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n  // bother waiting until the root is complete.\n  (wipLanes & suspendedLanes) === NoLanes) {\n    var nextLane = getHighestPriorityLane(nextLanes);\n    var wipLane = getHighestPriorityLane(wipLanes);\n\n    if ( // Tests whether the next lane is equal or lower priority than the wip\n    // one. This works because the bits decrease in priority as you go left.\n    nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n    // only difference between default updates and transition updates is that\n    // default updates do not support refresh transitions.\n    nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n      // Keep working on the existing in-progress tree. Do not interrupt.\n      return wipLanes;\n    }\n  }\n\n  if ((nextLanes & InputContinuousLane) !== NoLanes) {\n    // When updates are sync by default, we entangle continuous priority updates\n    // and default updates, so they render in the same batch. The only reason\n    // they use separate lanes is because continuous updates should interrupt\n    // transitions, but default updates should not.\n    nextLanes |= pendingLanes & DefaultLane;\n  } // Check for entangled lanes and add them to the batch.\n  //\n  // A lane is said to be entangled with another when it's not allowed to render\n  // in a batch that does not also include the other lane. Typically we do this\n  // when multiple updates have the same source, and we only want to respond to\n  // the most recent event from that source.\n  //\n  // Note that we apply entanglements *after* checking for partial work above.\n  // This means that if a lane is entangled during an interleaved event while\n  // it's already rendering, we won't interrupt it. This is intentional, since\n  // entanglement is usually \"best effort\": we'll try our best to render the\n  // lanes in the same batch, but it's not worth throwing out partially\n  // completed work in order to do it.\n  // TODO: Reconsider this. The counter-argument is that the partial work\n  // represents an intermediate state, which we don't want to show to the user.\n  // And by spending extra time finishing it, we're increasing the amount of\n  // time it takes to show the final state, which is what they are actually\n  // waiting for.\n  //\n  // For those exceptions where entanglement is semantically important, like\n  // useMutableSource, we should ensure that there is no partial work at the\n  // time we apply the entanglement.\n\n\n  var entangledLanes = root.entangledLanes;\n\n  if (entangledLanes !== NoLanes) {\n    var entanglements = root.entanglements;\n    var lanes = nextLanes & entangledLanes;\n\n    while (lanes > 0) {\n      var index = pickArbitraryLaneIndex(lanes);\n      var lane = 1 << index;\n      nextLanes |= entanglements[index];\n      lanes &= ~lane;\n    }\n  }\n\n  return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n  var eventTimes = root.eventTimes;\n  var mostRecentEventTime = NoTimestamp;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    var eventTime = eventTimes[index];\n\n    if (eventTime > mostRecentEventTime) {\n      mostRecentEventTime = eventTime;\n    }\n\n    lanes &= ~lane;\n  }\n\n  return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n  switch (lane) {\n    case SyncLane:\n    case InputContinuousHydrationLane:\n    case InputContinuousLane:\n      // User interactions should expire slightly more quickly.\n      //\n      // NOTE: This is set to the corresponding constant as in Scheduler.js.\n      // When we made it larger, a product metric in www regressed, suggesting\n      // there's a user interaction that's being starved by a series of\n      // synchronous updates. If that theory is correct, the proper solution is\n      // to fix the starvation. However, this scenario supports the idea that\n      // expiration times are an important safeguard when starvation\n      // does happen.\n      return currentTime + 250;\n\n    case DefaultHydrationLane:\n    case DefaultLane:\n    case TransitionHydrationLane:\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n      return currentTime + 5000;\n\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      // TODO: Retries should be allowed to expire if they are CPU bound for\n      // too long, but when I made this change it caused a spike in browser\n      // crashes. There must be some other underlying bug; not super urgent but\n      // ideally should figure out why and fix it. Unfortunately we don't have\n      // a repro for the crashes, only detected via production metrics.\n      return NoTimestamp;\n\n    case SelectiveHydrationLane:\n    case IdleHydrationLane:\n    case IdleLane:\n    case OffscreenLane:\n      // Anything idle priority or lower should never expire.\n      return NoTimestamp;\n\n    default:\n      {\n        error('Should have found matching lanes. This is a bug in React.');\n      }\n\n      return NoTimestamp;\n  }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n  // TODO: This gets called every time we yield. We can optimize by storing\n  // the earliest expiration time on the root. Then use that to quickly bail out\n  // of this function.\n  var pendingLanes = root.pendingLanes;\n  var suspendedLanes = root.suspendedLanes;\n  var pingedLanes = root.pingedLanes;\n  var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n  // expiration time. If so, we'll assume the update is being starved and mark\n  // it as expired to force it to finish.\n\n  var lanes = pendingLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    var expirationTime = expirationTimes[index];\n\n    if (expirationTime === NoTimestamp) {\n      // Found a pending lane with no expiration time. If it's not suspended, or\n      // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n      // using the current time.\n      if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n        // Assumes timestamps are monotonically increasing.\n        expirationTimes[index] = computeExpirationTime(lane, currentTime);\n      }\n    } else if (expirationTime <= currentTime) {\n      // This lane expired\n      root.expiredLanes |= lane;\n    }\n\n    lanes &= ~lane;\n  }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n  return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root) {\n  var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n  if (everythingButOffscreen !== NoLanes) {\n    return everythingButOffscreen;\n  }\n\n  if (everythingButOffscreen & OffscreenLane) {\n    return OffscreenLane;\n  }\n\n  return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n  return (lanes & SyncLane) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n  return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n  return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n  var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n  return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n  return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n  var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n  return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n  // This is a separate check from includesBlockingLane because a lane can\n  // expire after a render has already started.\n  return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n  return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n  // Cycle through the lanes, assigning each new transition to the next lane.\n  // In most cases, this means every transition gets its own lane, until we\n  // run out of lanes and cycle back to the beginning.\n  var lane = nextTransitionLane;\n  nextTransitionLane <<= 1;\n\n  if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n    nextTransitionLane = TransitionLane1;\n  }\n\n  return lane;\n}\nfunction claimNextRetryLane() {\n  var lane = nextRetryLane;\n  nextRetryLane <<= 1;\n\n  if ((nextRetryLane & RetryLanes) === NoLanes) {\n    nextRetryLane = RetryLane1;\n  }\n\n  return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n  return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n  // This wrapper function gets inlined. Only exists so to communicate that it\n  // doesn't matter which bit is selected; you can pick any bit without\n  // affecting the algorithms where its used. Here I'm using\n  // getHighestPriorityLane because it requires the fewest operations.\n  return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n  return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n  return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n  return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n  return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n  return a | b;\n}\nfunction removeLanes(set, subset) {\n  return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n  return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n  return lane;\n}\nfunction higherPriorityLane(a, b) {\n  // This works because the bit ranges decrease in priority as you go left.\n  return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n  // Intentionally pushing one by one.\n  // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n  var laneMap = [];\n\n  for (var i = 0; i < TotalLanes; i++) {\n    laneMap.push(initial);\n  }\n\n  return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n  root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n  // could unblock them. Clear the suspended lanes so that we can try rendering\n  // them again.\n  //\n  // TODO: We really only need to unsuspend only lanes that are in the\n  // `subtreeLanes` of the updated fiber, or the update lanes of the return\n  // path. This would exclude suspended updates in an unrelated sibling tree,\n  // since there's no way for this update to unblock it.\n  //\n  // We don't do this if the incoming update is idle, because we never process\n  // idle updates until after all the regular updates have finished; there's no\n  // way it could unblock a transition.\n\n  if (updateLane !== IdleLane) {\n    root.suspendedLanes = NoLanes;\n    root.pingedLanes = NoLanes;\n  }\n\n  var eventTimes = root.eventTimes;\n  var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n  // recent event, and we assume time is monotonically increasing.\n\n  eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n  root.suspendedLanes |= suspendedLanes;\n  root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n  var expirationTimes = root.expirationTimes;\n  var lanes = suspendedLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    expirationTimes[index] = NoTimestamp;\n    lanes &= ~lane;\n  }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n  root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n  var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n  root.pendingLanes = remainingLanes; // Let's try everything again\n\n  root.suspendedLanes = NoLanes;\n  root.pingedLanes = NoLanes;\n  root.expiredLanes &= remainingLanes;\n  root.mutableReadLanes &= remainingLanes;\n  root.entangledLanes &= remainingLanes;\n  var entanglements = root.entanglements;\n  var eventTimes = root.eventTimes;\n  var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n  var lanes = noLongerPendingLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    entanglements[index] = NoLanes;\n    eventTimes[index] = NoTimestamp;\n    expirationTimes[index] = NoTimestamp;\n    lanes &= ~lane;\n  }\n}\nfunction markRootEntangled(root, entangledLanes) {\n  // In addition to entangling each of the given lanes with each other, we also\n  // have to consider _transitive_ entanglements. For each lane that is already\n  // entangled with *any* of the given lanes, that lane is now transitively\n  // entangled with *all* the given lanes.\n  //\n  // Translated: If C is entangled with A, then entangling A with B also\n  // entangles C with B.\n  //\n  // If this is hard to grasp, it might help to intentionally break this\n  // function and look at the tests that fail in ReactTransition-test.js. Try\n  // commenting out one of the conditions below.\n  var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n  var entanglements = root.entanglements;\n  var lanes = rootEntangledLanes;\n\n  while (lanes) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n\n    if ( // Is this one of the newly entangled lanes?\n    lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n    entanglements[index] & entangledLanes) {\n      entanglements[index] |= entangledLanes;\n    }\n\n    lanes &= ~lane;\n  }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n  var renderLane = getHighestPriorityLane(renderLanes);\n  var lane;\n\n  switch (renderLane) {\n    case InputContinuousLane:\n      lane = InputContinuousHydrationLane;\n      break;\n\n    case DefaultLane:\n      lane = DefaultHydrationLane;\n      break;\n\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      lane = TransitionHydrationLane;\n      break;\n\n    case IdleLane:\n      lane = IdleHydrationLane;\n      break;\n\n    default:\n      // Everything else is already either a hydration lane, or shouldn't\n      // be retried at a hydration lane.\n      lane = NoLane;\n      break;\n  } // Check if the lane we chose is suspended. If so, that indicates that we\n  // already attempted and failed to hydrate at that level. Also check if we're\n  // already rendering that lane, which is rare but could happen.\n\n\n  if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n    // Give up trying to hydrate and fall back to client render.\n    return NoLane;\n  }\n\n  return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n  if (!isDevToolsPresent) {\n    return;\n  }\n\n  var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n  while (lanes > 0) {\n    var index = laneToIndex(lanes);\n    var lane = 1 << index;\n    var updaters = pendingUpdatersLaneMap[index];\n    updaters.add(fiber);\n    lanes &= ~lane;\n  }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n  if (!isDevToolsPresent) {\n    return;\n  }\n\n  var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n  var memoizedUpdaters = root.memoizedUpdaters;\n\n  while (lanes > 0) {\n    var index = laneToIndex(lanes);\n    var lane = 1 << index;\n    var updaters = pendingUpdatersLaneMap[index];\n\n    if (updaters.size > 0) {\n      updaters.forEach(function (fiber) {\n        var alternate = fiber.alternate;\n\n        if (alternate === null || !memoizedUpdaters.has(alternate)) {\n          memoizedUpdaters.add(fiber);\n        }\n      });\n      updaters.clear();\n    }\n\n    lanes &= ~lane;\n  }\n}\nfunction getTransitionsForLanes(root, lanes) {\n  {\n    return null;\n  }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n  return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n  currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n  var previousPriority = currentUpdatePriority;\n\n  try {\n    currentUpdatePriority = priority;\n    return fn();\n  } finally {\n    currentUpdatePriority = previousPriority;\n  }\n}\nfunction higherEventPriority(a, b) {\n  return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n  return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n  return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n  var lane = getHighestPriorityLane(lanes);\n\n  if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n    return DiscreteEventPriority;\n  }\n\n  if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n    return ContinuousEventPriority;\n  }\n\n  if (includesNonIdleWork(lane)) {\n    return DefaultEventPriority;\n  }\n\n  return IdleEventPriority;\n}\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n  var currentState = root.current.memoizedState;\n  return currentState.isDehydrated;\n}\n\nvar _attemptSynchronousHydration;\n\nfunction setAttemptSynchronousHydration(fn) {\n  _attemptSynchronousHydration = fn;\n}\nfunction attemptSynchronousHydration(fiber) {\n  _attemptSynchronousHydration(fiber);\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n  attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n  attemptHydrationAtCurrentPriority = fn;\n}\nvar getCurrentUpdatePriority$1;\nfunction setGetCurrentUpdatePriority(fn) {\n  getCurrentUpdatePriority$1 = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n  attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\n// has this definition built-in.\n\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n  return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  return {\n    blockedOn: blockedOn,\n    domEventName: domEventName,\n    eventSystemFlags: eventSystemFlags,\n    nativeEvent: nativeEvent,\n    targetContainers: [targetContainer]\n  };\n}\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'focusin':\n    case 'focusout':\n      queuedFocus = null;\n      break;\n\n    case 'dragenter':\n    case 'dragleave':\n      queuedDrag = null;\n      break;\n\n    case 'mouseover':\n    case 'mouseout':\n      queuedMouse = null;\n      break;\n\n    case 'pointerover':\n    case 'pointerout':\n      {\n        var pointerId = nativeEvent.pointerId;\n        queuedPointers.delete(pointerId);\n        break;\n      }\n\n    case 'gotpointercapture':\n    case 'lostpointercapture':\n      {\n        var _pointerId = nativeEvent.pointerId;\n        queuedPointerCaptures.delete(_pointerId);\n        break;\n      }\n  }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n    var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n    if (blockedOn !== null) {\n      var _fiber2 = getInstanceFromNode(blockedOn);\n\n      if (_fiber2 !== null) {\n        // Attempt to increase the priority of this target.\n        attemptContinuousHydration(_fiber2);\n      }\n    }\n\n    return queuedEvent;\n  } // If we have already queued this exact event, then it's because\n  // the different event systems have different DOM event listeners.\n  // We can accumulate the flags, and the targetContainers, and\n  // store a single event to be replayed.\n\n\n  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n  var targetContainers = existingQueuedEvent.targetContainers;\n\n  if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n    targetContainers.push(targetContainer);\n  }\n\n  return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  // These set relatedTarget to null because the replayed event will be treated as if we\n  // moved from outside the window (no target) onto the target once it hydrates.\n  // Instead of mutating we could clone the event.\n  switch (domEventName) {\n    case 'focusin':\n      {\n        var focusEvent = nativeEvent;\n        queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n        return true;\n      }\n\n    case 'dragenter':\n      {\n        var dragEvent = nativeEvent;\n        queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n        return true;\n      }\n\n    case 'mouseover':\n      {\n        var mouseEvent = nativeEvent;\n        queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n        return true;\n      }\n\n    case 'pointerover':\n      {\n        var pointerEvent = nativeEvent;\n        var pointerId = pointerEvent.pointerId;\n        queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n        return true;\n      }\n\n    case 'gotpointercapture':\n      {\n        var _pointerEvent = nativeEvent;\n        var _pointerId2 = _pointerEvent.pointerId;\n        queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n        return true;\n      }\n  }\n\n  return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n  // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\n  // Try to unify them. It's a bit tricky since it would require two return\n  // values.\n  var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n  if (targetInst !== null) {\n    var nearestMounted = getNearestMountedFiber(targetInst);\n\n    if (nearestMounted !== null) {\n      var tag = nearestMounted.tag;\n\n      if (tag === SuspenseComponent) {\n        var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n        if (instance !== null) {\n          // We're blocked on hydrating this boundary.\n          // Increase its priority.\n          queuedTarget.blockedOn = instance;\n          attemptHydrationAtPriority(queuedTarget.priority, function () {\n            attemptHydrationAtCurrentPriority(nearestMounted);\n          });\n          return;\n        }\n      } else if (tag === HostRoot) {\n        var root = nearestMounted.stateNode;\n\n        if (isRootDehydrated(root)) {\n          queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n          // a root other than sync.\n\n          return;\n        }\n      }\n    }\n  }\n\n  queuedTarget.blockedOn = null;\n}\n\nfunction queueExplicitHydrationTarget(target) {\n  // TODO: This will read the priority if it's dispatched by the React\n  // event system but not native events. Should read window.event.type, like\n  // we do for updates (getCurrentEventPriority).\n  var updatePriority = getCurrentUpdatePriority$1();\n  var queuedTarget = {\n    blockedOn: null,\n    target: target,\n    priority: updatePriority\n  };\n  var i = 0;\n\n  for (; i < queuedExplicitHydrationTargets.length; i++) {\n    // Stop once we hit the first target with lower priority than\n    if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n      break;\n    }\n  }\n\n  queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n  if (i === 0) {\n    attemptExplicitHydrationTarget(queuedTarget);\n  }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n  if (queuedEvent.blockedOn !== null) {\n    return false;\n  }\n\n  var targetContainers = queuedEvent.targetContainers;\n\n  while (targetContainers.length > 0) {\n    var targetContainer = targetContainers[0];\n    var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n    if (nextBlockedOn === null) {\n      {\n        var nativeEvent = queuedEvent.nativeEvent;\n        var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n        setReplayingEvent(nativeEventClone);\n        nativeEvent.target.dispatchEvent(nativeEventClone);\n        resetReplayingEvent();\n      }\n    } else {\n      // We're still blocked. Try again later.\n      var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n      if (_fiber3 !== null) {\n        attemptContinuousHydration(_fiber3);\n      }\n\n      queuedEvent.blockedOn = nextBlockedOn;\n      return false;\n    } // This target container was successfully dispatched. Try the next.\n\n\n    targetContainers.shift();\n  }\n\n  return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n  if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n    map.delete(key);\n  }\n}\n\nfunction replayUnblockedEvents() {\n  hasScheduledReplayAttempt = false;\n\n\n  if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n    queuedFocus = null;\n  }\n\n  if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n    queuedDrag = null;\n  }\n\n  if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n    queuedMouse = null;\n  }\n\n  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n  if (queuedEvent.blockedOn === unblocked) {\n    queuedEvent.blockedOn = null;\n\n    if (!hasScheduledReplayAttempt) {\n      hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n      // now unblocked. This first might not actually be unblocked yet.\n      // We could check it early to avoid scheduling an unnecessary callback.\n\n      Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n    }\n  }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n  // Mark anything that was blocked on this as no longer blocked\n  // and eligible for a replay.\n  if (queuedDiscreteEvents.length > 0) {\n    scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n    // worth it because we expect very few discrete events to queue up and once\n    // we are actually fully unblocked it will be fast to replay them.\n\n    for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n      var queuedEvent = queuedDiscreteEvents[i];\n\n      if (queuedEvent.blockedOn === unblocked) {\n        queuedEvent.blockedOn = null;\n      }\n    }\n  }\n\n  if (queuedFocus !== null) {\n    scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n  }\n\n  if (queuedDrag !== null) {\n    scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n  }\n\n  if (queuedMouse !== null) {\n    scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n  }\n\n  var unblock = function (queuedEvent) {\n    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n  };\n\n  queuedPointers.forEach(unblock);\n  queuedPointerCaptures.forEach(unblock);\n\n  for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n    var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n    if (queuedTarget.blockedOn === unblocked) {\n      queuedTarget.blockedOn = null;\n    }\n  }\n\n  while (queuedExplicitHydrationTargets.length > 0) {\n    var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n    if (nextExplicitTarget.blockedOn !== null) {\n      // We're still blocked.\n      break;\n    } else {\n      attemptExplicitHydrationTarget(nextExplicitTarget);\n\n      if (nextExplicitTarget.blockedOn === null) {\n        // We're unblocked.\n        queuedExplicitHydrationTargets.shift();\n      }\n    }\n  }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n  _enabled = !!enabled;\n}\nfunction isEnabled() {\n  return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n  var eventPriority = getEventPriority(domEventName);\n  var listenerWrapper;\n\n  switch (eventPriority) {\n    case DiscreteEventPriority:\n      listenerWrapper = dispatchDiscreteEvent;\n      break;\n\n    case ContinuousEventPriority:\n      listenerWrapper = dispatchContinuousEvent;\n      break;\n\n    case DefaultEventPriority:\n    default:\n      listenerWrapper = dispatchEvent;\n      break;\n  }\n\n  return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = null;\n\n  try {\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig.transition = prevTransition;\n  }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = null;\n\n  try {\n    setCurrentUpdatePriority(ContinuousEventPriority);\n    dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig.transition = prevTransition;\n  }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  if (!_enabled) {\n    return;\n  }\n\n  {\n    dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n  }\n}\n\nfunction dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n  if (blockedOn === null) {\n    dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n    clearIfContinuousEvent(domEventName, nativeEvent);\n    return;\n  }\n\n  if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n    nativeEvent.stopPropagation();\n    return;\n  } // We need to clear only if we didn't queue because\n  // queueing is accumulative.\n\n\n  clearIfContinuousEvent(domEventName, nativeEvent);\n\n  if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n    while (blockedOn !== null) {\n      var fiber = getInstanceFromNode(blockedOn);\n\n      if (fiber !== null) {\n        attemptSynchronousHydration(fiber);\n      }\n\n      var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n      if (nextBlockedOn === null) {\n        dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n      }\n\n      if (nextBlockedOn === blockedOn) {\n        break;\n      }\n\n      blockedOn = nextBlockedOn;\n    }\n\n    if (blockedOn !== null) {\n      nativeEvent.stopPropagation();\n    }\n\n    return;\n  } // This is not replayable so we'll invoke it but without a target,\n  // in case the event system needs to trace it.\n\n\n  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\n\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  // TODO: Warn if _enabled is false.\n  return_targetInst = null;\n  var nativeEventTarget = getEventTarget(nativeEvent);\n  var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n  if (targetInst !== null) {\n    var nearestMounted = getNearestMountedFiber(targetInst);\n\n    if (nearestMounted === null) {\n      // This tree has been unmounted already. Dispatch without a target.\n      targetInst = null;\n    } else {\n      var tag = nearestMounted.tag;\n\n      if (tag === SuspenseComponent) {\n        var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n        if (instance !== null) {\n          // Queue the event to be replayed later. Abort dispatching since we\n          // don't want this event dispatched twice through the event system.\n          // TODO: If this is the first discrete event in the queue. Schedule an increased\n          // priority for this boundary.\n          return instance;\n        } // This shouldn't happen, something went wrong but to avoid blocking\n        // the whole system, dispatch the event without a target.\n        // TODO: Warn.\n\n\n        targetInst = null;\n      } else if (tag === HostRoot) {\n        var root = nearestMounted.stateNode;\n\n        if (isRootDehydrated(root)) {\n          // If this happens during a replay something went wrong and it might block\n          // the whole system.\n          return getContainerFromFiber(nearestMounted);\n        }\n\n        targetInst = null;\n      } else if (nearestMounted !== targetInst) {\n        // If we get an event (ex: img onload) before committing that\n        // component's mount, ignore it for now (that is, treat it as if it was an\n        // event on a non-React tree). We might also consider queueing events and\n        // dispatching them after the mount.\n        targetInst = null;\n      }\n    }\n  }\n\n  return_targetInst = targetInst; // We're not blocked on anything.\n\n  return null;\n}\nfunction getEventPriority(domEventName) {\n  switch (domEventName) {\n    // Used by SimpleEventPlugin:\n    case 'cancel':\n    case 'click':\n    case 'close':\n    case 'contextmenu':\n    case 'copy':\n    case 'cut':\n    case 'auxclick':\n    case 'dblclick':\n    case 'dragend':\n    case 'dragstart':\n    case 'drop':\n    case 'focusin':\n    case 'focusout':\n    case 'input':\n    case 'invalid':\n    case 'keydown':\n    case 'keypress':\n    case 'keyup':\n    case 'mousedown':\n    case 'mouseup':\n    case 'paste':\n    case 'pause':\n    case 'play':\n    case 'pointercancel':\n    case 'pointerdown':\n    case 'pointerup':\n    case 'ratechange':\n    case 'reset':\n    case 'resize':\n    case 'seeked':\n    case 'submit':\n    case 'touchcancel':\n    case 'touchend':\n    case 'touchstart':\n    case 'volumechange': // Used by polyfills:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'change':\n    case 'selectionchange':\n    case 'textInput':\n    case 'compositionstart':\n    case 'compositionend':\n    case 'compositionupdate': // Only enableCreateEventHandleAPI:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'beforeblur':\n    case 'afterblur': // Not used by React but could be by user code:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'beforeinput':\n    case 'blur':\n    case 'fullscreenchange':\n    case 'focus':\n    case 'hashchange':\n    case 'popstate':\n    case 'select':\n    case 'selectstart':\n      return DiscreteEventPriority;\n\n    case 'drag':\n    case 'dragenter':\n    case 'dragexit':\n    case 'dragleave':\n    case 'dragover':\n    case 'mousemove':\n    case 'mouseout':\n    case 'mouseover':\n    case 'pointermove':\n    case 'pointerout':\n    case 'pointerover':\n    case 'scroll':\n    case 'toggle':\n    case 'touchmove':\n    case 'wheel': // Not used by React but could be by user code:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'mouseenter':\n    case 'mouseleave':\n    case 'pointerenter':\n    case 'pointerleave':\n      return ContinuousEventPriority;\n\n    case 'message':\n      {\n        // We might be in the Scheduler callback.\n        // Eventually this mechanism will be replaced by a check\n        // of the current priority on the native scheduler.\n        var schedulerPriority = getCurrentPriorityLevel();\n\n        switch (schedulerPriority) {\n          case ImmediatePriority:\n            return DiscreteEventPriority;\n\n          case UserBlockingPriority:\n            return ContinuousEventPriority;\n\n          case NormalPriority:\n          case LowPriority:\n            // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n            return DefaultEventPriority;\n\n          case IdlePriority:\n            return IdleEventPriority;\n\n          default:\n            return DefaultEventPriority;\n        }\n      }\n\n    default:\n      return DefaultEventPriority;\n  }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n  target.addEventListener(eventType, listener, false);\n  return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n  target.addEventListener(eventType, listener, true);\n  return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n  target.addEventListener(eventType, listener, {\n    capture: true,\n    passive: passive\n  });\n  return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n  target.addEventListener(eventType, listener, {\n    passive: passive\n  });\n  return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n  root = nativeEventTarget;\n  startText = getText();\n  return true;\n}\nfunction reset() {\n  root = null;\n  startText = null;\n  fallbackText = null;\n}\nfunction getData() {\n  if (fallbackText) {\n    return fallbackText;\n  }\n\n  var start;\n  var startValue = startText;\n  var startLength = startValue.length;\n  var end;\n  var endValue = getText();\n  var endLength = endValue.length;\n\n  for (start = 0; start < startLength; start++) {\n    if (startValue[start] !== endValue[start]) {\n      break;\n    }\n  }\n\n  var minEnd = startLength - start;\n\n  for (end = 1; end <= minEnd; end++) {\n    if (startValue[startLength - end] !== endValue[endLength - end]) {\n      break;\n    }\n  }\n\n  var sliceTail = end > 1 ? 1 - end : undefined;\n  fallbackText = endValue.slice(start, sliceTail);\n  return fallbackText;\n}\nfunction getText() {\n  if ('value' in root) {\n    return root.value;\n  }\n\n  return root.textContent;\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n  var charCode;\n  var keyCode = nativeEvent.keyCode;\n\n  if ('charCode' in nativeEvent) {\n    charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n    if (charCode === 0 && keyCode === 13) {\n      charCode = 13;\n    }\n  } else {\n    // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n    charCode = keyCode;\n  } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n  // report Enter as charCode 10 when ctrl is pressed.\n\n\n  if (charCode === 10) {\n    charCode = 13;\n  } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n  // Must not discard the (non-)printable Enter-key.\n\n\n  if (charCode >= 32 || charCode === 13) {\n    return charCode;\n  }\n\n  return 0;\n}\n\nfunction functionThatReturnsTrue() {\n  return true;\n}\n\nfunction functionThatReturnsFalse() {\n  return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n  /**\n   * Synthetic events are dispatched by event plugins, typically in response to a\n   * top-level event delegation handler.\n   *\n   * These systems should generally use pooling to reduce the frequency of garbage\n   * collection. The system should check `isPersistent` to determine whether the\n   * event should be released into the pool after being dispatched. Users that\n   * need a persisted event should invoke `persist`.\n   *\n   * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n   * normalizing browser quirks. Subclasses do not necessarily have to implement a\n   * DOM interface; custom application-specific events can also subclass this.\n   */\n  function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n    this._reactName = reactName;\n    this._targetInst = targetInst;\n    this.type = reactEventType;\n    this.nativeEvent = nativeEvent;\n    this.target = nativeEventTarget;\n    this.currentTarget = null;\n\n    for (var _propName in Interface) {\n      if (!Interface.hasOwnProperty(_propName)) {\n        continue;\n      }\n\n      var normalize = Interface[_propName];\n\n      if (normalize) {\n        this[_propName] = normalize(nativeEvent);\n      } else {\n        this[_propName] = nativeEvent[_propName];\n      }\n    }\n\n    var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n    if (defaultPrevented) {\n      this.isDefaultPrevented = functionThatReturnsTrue;\n    } else {\n      this.isDefaultPrevented = functionThatReturnsFalse;\n    }\n\n    this.isPropagationStopped = functionThatReturnsFalse;\n    return this;\n  }\n\n  assign(SyntheticBaseEvent.prototype, {\n    preventDefault: function () {\n      this.defaultPrevented = true;\n      var event = this.nativeEvent;\n\n      if (!event) {\n        return;\n      }\n\n      if (event.preventDefault) {\n        event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n      } else if (typeof event.returnValue !== 'unknown') {\n        event.returnValue = false;\n      }\n\n      this.isDefaultPrevented = functionThatReturnsTrue;\n    },\n    stopPropagation: function () {\n      var event = this.nativeEvent;\n\n      if (!event) {\n        return;\n      }\n\n      if (event.stopPropagation) {\n        event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n      } else if (typeof event.cancelBubble !== 'unknown') {\n        // The ChangeEventPlugin registers a \"propertychange\" event for\n        // IE. This event does not support bubbling or cancelling, and\n        // any references to cancelBubble throw \"Member not found\".  A\n        // typeof check of \"unknown\" circumvents this issue (and is also\n        // IE specific).\n        event.cancelBubble = true;\n      }\n\n      this.isPropagationStopped = functionThatReturnsTrue;\n    },\n\n    /**\n     * We release all dispatched `SyntheticEvent`s after each event loop, adding\n     * them back into the pool. This allows a way to hold onto a reference that\n     * won't be added back into the pool.\n     */\n    persist: function () {// Modern event system doesn't use pooling.\n    },\n\n    /**\n     * Checks if this event should be released back into the pool.\n     *\n     * @return {boolean} True if this should not be released, false otherwise.\n     */\n    isPersistent: functionThatReturnsTrue\n  });\n  return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n  eventPhase: 0,\n  bubbles: 0,\n  cancelable: 0,\n  timeStamp: function (event) {\n    return event.timeStamp || Date.now();\n  },\n  defaultPrevented: 0,\n  isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n  view: 0,\n  detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n  if (event !== lastMouseEvent) {\n    if (lastMouseEvent && event.type === 'mousemove') {\n      lastMovementX = event.screenX - lastMouseEvent.screenX;\n      lastMovementY = event.screenY - lastMouseEvent.screenY;\n    } else {\n      lastMovementX = 0;\n      lastMovementY = 0;\n    }\n\n    lastMouseEvent = event;\n  }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n  screenX: 0,\n  screenY: 0,\n  clientX: 0,\n  clientY: 0,\n  pageX: 0,\n  pageY: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  altKey: 0,\n  metaKey: 0,\n  getModifierState: getEventModifierState,\n  button: 0,\n  buttons: 0,\n  relatedTarget: function (event) {\n    if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n    return event.relatedTarget;\n  },\n  movementX: function (event) {\n    if ('movementX' in event) {\n      return event.movementX;\n    }\n\n    updateMouseMovementPolyfillState(event);\n    return lastMovementX;\n  },\n  movementY: function (event) {\n    if ('movementY' in event) {\n      return event.movementY;\n    } // Don't need to call updateMouseMovementPolyfillState() here\n    // because it's guaranteed to have already run when movementX\n    // was copied.\n\n\n    return lastMovementY;\n  }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n  dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n  relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = assign({}, EventInterface, {\n  animationName: 0,\n  elapsedTime: 0,\n  pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n  clipboardData: function (event) {\n    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n  }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n  data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n *      /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n  Esc: 'Escape',\n  Spacebar: ' ',\n  Left: 'ArrowLeft',\n  Up: 'ArrowUp',\n  Right: 'ArrowRight',\n  Down: 'ArrowDown',\n  Del: 'Delete',\n  Win: 'OS',\n  Menu: 'ContextMenu',\n  Apps: 'ContextMenu',\n  Scroll: 'ScrollLock',\n  MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n  '8': 'Backspace',\n  '9': 'Tab',\n  '12': 'Clear',\n  '13': 'Enter',\n  '16': 'Shift',\n  '17': 'Control',\n  '18': 'Alt',\n  '19': 'Pause',\n  '20': 'CapsLock',\n  '27': 'Escape',\n  '32': ' ',\n  '33': 'PageUp',\n  '34': 'PageDown',\n  '35': 'End',\n  '36': 'Home',\n  '37': 'ArrowLeft',\n  '38': 'ArrowUp',\n  '39': 'ArrowRight',\n  '40': 'ArrowDown',\n  '45': 'Insert',\n  '46': 'Delete',\n  '112': 'F1',\n  '113': 'F2',\n  '114': 'F3',\n  '115': 'F4',\n  '116': 'F5',\n  '117': 'F6',\n  '118': 'F7',\n  '119': 'F8',\n  '120': 'F9',\n  '121': 'F10',\n  '122': 'F11',\n  '123': 'F12',\n  '144': 'NumLock',\n  '145': 'ScrollLock',\n  '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n  if (nativeEvent.key) {\n    // Normalize inconsistent values reported by browsers due to\n    // implementations of a working draft specification.\n    // FireFox implements `key` but returns `MozPrintableKey` for all\n    // printable characters (normalized to `Unidentified`), ignore it.\n    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n    if (key !== 'Unidentified') {\n      return key;\n    }\n  } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n  if (nativeEvent.type === 'keypress') {\n    var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n    // thus be captured by `keypress`, no other non-printable key should.\n\n    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n  }\n\n  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n    // While user keyboard layout determines the actual meaning of each\n    // `keyCode` value, almost all function keys have a universal value.\n    return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n  }\n\n  return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n  Alt: 'altKey',\n  Control: 'ctrlKey',\n  Meta: 'metaKey',\n  Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n  var syntheticEvent = this;\n  var nativeEvent = syntheticEvent.nativeEvent;\n\n  if (nativeEvent.getModifierState) {\n    return nativeEvent.getModifierState(keyArg);\n  }\n\n  var keyProp = modifierKeyToProp[keyArg];\n  return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n  return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n  key: getEventKey,\n  code: 0,\n  location: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  altKey: 0,\n  metaKey: 0,\n  repeat: 0,\n  locale: 0,\n  getModifierState: getEventModifierState,\n  // Legacy Interface\n  charCode: function (event) {\n    // `charCode` is the result of a KeyPress event and represents the value of\n    // the actual printable character.\n    // KeyPress is deprecated, but its replacement is not yet final and not\n    // implemented in any major browser. Only KeyPress has charCode.\n    if (event.type === 'keypress') {\n      return getEventCharCode(event);\n    }\n\n    return 0;\n  },\n  keyCode: function (event) {\n    // `keyCode` is the result of a KeyDown/Up event and represents the value of\n    // physical keyboard key.\n    // The actual meaning of the value depends on the users' keyboard layout\n    // which cannot be detected. Assuming that it is a US keyboard layout\n    // provides a surprisingly accurate mapping for US and European users.\n    // Due to this, it is left to the user to implement at this time.\n    if (event.type === 'keydown' || event.type === 'keyup') {\n      return event.keyCode;\n    }\n\n    return 0;\n  },\n  which: function (event) {\n    // `which` is an alias for either `keyCode` or `charCode` depending on the\n    // type of the event.\n    if (event.type === 'keypress') {\n      return getEventCharCode(event);\n    }\n\n    if (event.type === 'keydown' || event.type === 'keyup') {\n      return event.keyCode;\n    }\n\n    return 0;\n  }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n  pointerId: 0,\n  width: 0,\n  height: 0,\n  pressure: 0,\n  tangentialPressure: 0,\n  tiltX: 0,\n  tiltY: 0,\n  twist: 0,\n  pointerType: 0,\n  isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n  touches: 0,\n  targetTouches: 0,\n  changedTouches: 0,\n  altKey: 0,\n  metaKey: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = assign({}, EventInterface, {\n  propertyName: 0,\n  elapsedTime: 0,\n  pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\n  deltaX: function (event) {\n    return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n    'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n  },\n  deltaY: function (event) {\n    return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n    'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n    'wheelDelta' in event ? -event.wheelDelta : 0;\n  },\n  deltaZ: 0,\n  // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n  // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n  deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n  documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents() {\n  registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n  registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n  registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n  registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n  return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n  !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n  switch (domEventName) {\n    case 'compositionstart':\n      return 'onCompositionStart';\n\n    case 'compositionend':\n      return 'onCompositionEnd';\n\n    case 'compositionupdate':\n      return 'onCompositionUpdate';\n  }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n  return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'keyup':\n      // Command keys insert or clear IME input.\n      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n    case 'keydown':\n      // Expect IME keyCode on each keydown. If we get any other\n      // code we must have exited earlier.\n      return nativeEvent.keyCode !== START_KEYCODE;\n\n    case 'keypress':\n    case 'mousedown':\n    case 'focusout':\n      // Events are not possible without cancelling IME.\n      return true;\n\n    default:\n      return false;\n  }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n  var detail = nativeEvent.detail;\n\n  if (typeof detail === 'object' && 'data' in detail) {\n    return detail.data;\n  }\n\n  return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n  return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n  var eventType;\n  var fallbackData;\n\n  if (canUseCompositionEvent) {\n    eventType = getCompositionEventType(domEventName);\n  } else if (!isComposing) {\n    if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n      eventType = 'onCompositionStart';\n    }\n  } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n    eventType = 'onCompositionEnd';\n  }\n\n  if (!eventType) {\n    return null;\n  }\n\n  if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n    // The current composition is stored statically and must not be\n    // overwritten while composition continues.\n    if (!isComposing && eventType === 'onCompositionStart') {\n      isComposing = initialize(nativeEventTarget);\n    } else if (eventType === 'onCompositionEnd') {\n      if (isComposing) {\n        fallbackData = getData();\n      }\n    }\n  }\n\n  var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n  if (listeners.length > 0) {\n    var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n\n    if (fallbackData) {\n      // Inject data generated from fallback path into the synthetic event.\n      // This matches the property of native CompositionEventInterface.\n      event.data = fallbackData;\n    } else {\n      var customData = getDataFromCustomEvent(nativeEvent);\n\n      if (customData !== null) {\n        event.data = customData;\n      }\n    }\n  }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'compositionend':\n      return getDataFromCustomEvent(nativeEvent);\n\n    case 'keypress':\n      /**\n       * If native `textInput` events are available, our goal is to make\n       * use of them. However, there is a special case: the spacebar key.\n       * In Webkit, preventing default on a spacebar `textInput` event\n       * cancels character insertion, but it *also* causes the browser\n       * to fall back to its default spacebar behavior of scrolling the\n       * page.\n       *\n       * Tracking at:\n       * https://code.google.com/p/chromium/issues/detail?id=355103\n       *\n       * To avoid this issue, use the keypress event as if no `textInput`\n       * event is available.\n       */\n      var which = nativeEvent.which;\n\n      if (which !== SPACEBAR_CODE) {\n        return null;\n      }\n\n      hasSpaceKeypress = true;\n      return SPACEBAR_CHAR;\n\n    case 'textInput':\n      // Record the characters to be added to the DOM.\n      var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n      // it at the keypress level and bail immediately. Android Chrome\n      // doesn't give us keycodes, so we need to ignore it.\n\n      if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n        return null;\n      }\n\n      return chars;\n\n    default:\n      // For other native event types, do nothing.\n      return null;\n  }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n  // If we are currently composing (IME) and using a fallback to do so,\n  // try to extract the composed characters from the fallback object.\n  // If composition event is available, we extract a string only at\n  // compositionevent, otherwise extract it at fallback events.\n  if (isComposing) {\n    if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n      var chars = getData();\n      reset();\n      isComposing = false;\n      return chars;\n    }\n\n    return null;\n  }\n\n  switch (domEventName) {\n    case 'paste':\n      // If a paste event occurs after a keypress, throw out the input\n      // chars. Paste events should not lead to BeforeInput events.\n      return null;\n\n    case 'keypress':\n      /**\n       * As of v27, Firefox may fire keypress events even when no character\n       * will be inserted. A few possibilities:\n       *\n       * - `which` is `0`. Arrow keys, Esc key, etc.\n       *\n       * - `which` is the pressed key code, but no char is available.\n       *   Ex: 'AltGr + d` in Polish. There is no modified character for\n       *   this key combination and no character is inserted into the\n       *   document, but FF fires the keypress for char code `100` anyway.\n       *   No `input` event will occur.\n       *\n       * - `which` is the pressed key code, but a command combination is\n       *   being used. Ex: `Cmd+C`. No character is inserted, and no\n       *   `input` event will occur.\n       */\n      if (!isKeypressCommand(nativeEvent)) {\n        // IE fires the `keypress` event when a user types an emoji via\n        // Touch keyboard of Windows.  In such a case, the `char` property\n        // holds an emoji character like `\\uD83D\\uDE0A`.  Because its length\n        // is 2, the property `which` does not represent an emoji correctly.\n        // In such a case, we directly return the `char` property instead of\n        // using `which`.\n        if (nativeEvent.char && nativeEvent.char.length > 1) {\n          return nativeEvent.char;\n        } else if (nativeEvent.which) {\n          return String.fromCharCode(nativeEvent.which);\n        }\n      }\n\n      return null;\n\n    case 'compositionend':\n      return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n    default:\n      return null;\n  }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n  var chars;\n\n  if (canUseTextInputEvent) {\n    chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n  } else {\n    chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n  } // If no characters are being inserted, no BeforeInput event should\n  // be fired.\n\n\n  if (!chars) {\n    return null;\n  }\n\n  var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n  if (listeners.length > 0) {\n    var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n    event.data = chars;\n  }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n  extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n  color: true,\n  date: true,\n  datetime: true,\n  'datetime-local': true,\n  email: true,\n  month: true,\n  number: true,\n  password: true,\n  range: true,\n  search: true,\n  tel: true,\n  text: true,\n  time: true,\n  url: true,\n  week: true\n};\n\nfunction isTextInputElement(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n  if (nodeName === 'input') {\n    return !!supportedInputTypes[elem.type];\n  }\n\n  if (nodeName === 'textarea') {\n    return true;\n  }\n\n  return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n  if (!canUseDOM) {\n    return false;\n  }\n\n  var eventName = 'on' + eventNameSuffix;\n  var isSupported = (eventName in document);\n\n  if (!isSupported) {\n    var element = document.createElement('div');\n    element.setAttribute(eventName, 'return;');\n    isSupported = typeof element[eventName] === 'function';\n  }\n\n  return isSupported;\n}\n\nfunction registerEvents$1() {\n  registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n  // Flag this event loop as needing state restore.\n  enqueueStateRestore(target);\n  var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n  if (listeners.length > 0) {\n    var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n  }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n  var dispatchQueue = [];\n  createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n  // other events and have it go through ReactBrowserEventEmitter. Since it\n  // doesn't, we manually listen for the events and so we have to enqueue and\n  // process the abstract event manually.\n  //\n  // Batching is necessary here in order to ensure that all event handlers run\n  // before the next rerender (including event handlers attached to ancestor\n  // elements instead of directly on the input). Without this, controlled\n  // components don't work properly in conjunction with event bubbling because\n  // the component is rerendered and the value reverted before all the event\n  // handlers can run. See https://github.com/facebook/react/issues/708.\n\n  batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n  processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n  var targetNode = getNodeFromInstance(targetInst);\n\n  if (updateValueIfChanged(targetNode)) {\n    return targetInst;\n  }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n  if (domEventName === 'change') {\n    return targetInst;\n  }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n  // IE9 claims to support the input event but fails to trigger it when\n  // deleting text, so we ignore its input events.\n  isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n  activeElement = target;\n  activeElementInst = targetInst;\n  activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n  if (!activeElement) {\n    return;\n  }\n\n  activeElement.detachEvent('onpropertychange', handlePropertyChange);\n  activeElement = null;\n  activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n  if (nativeEvent.propertyName !== 'value') {\n    return;\n  }\n\n  if (getInstIfValueChanged(activeElementInst)) {\n    manualDispatchChangeEvent(nativeEvent);\n  }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n  if (domEventName === 'focusin') {\n    // In IE9, propertychange fires for most input events but is buggy and\n    // doesn't fire when text is deleted, but conveniently, selectionchange\n    // appears to fire in all of the remaining cases so we catch those and\n    // forward the event if the value has changed\n    // In either case, we don't want to call the event handler if the value\n    // is changed from JS so we redefine a setter for `.value` that updates\n    // our activeElementValue variable, allowing us to ignore those changes\n    //\n    // stopWatching() should be a noop here but we call it just in case we\n    // missed a blur event somehow.\n    stopWatchingForValueChange();\n    startWatchingForValueChange(target, targetInst);\n  } else if (domEventName === 'focusout') {\n    stopWatchingForValueChange();\n  }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n  if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n    // On the selectionchange event, the target is just document which isn't\n    // helpful for us so just check activeElement instead.\n    //\n    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n    // propertychange on the first input event after setting `value` from a\n    // script and fires only keydown, keypress, keyup. Catching keyup usually\n    // gets it and catching keydown lets us fire an event for the first\n    // keystroke if user does a key repeat (it'll be a little delayed: right\n    // before the second keystroke). Other input methods (e.g., paste) seem to\n    // fire selectionchange normally.\n    return getInstIfValueChanged(activeElementInst);\n  }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n  // Use the `click` event to detect changes to checkbox and radio inputs.\n  // This approach works across all browsers, whereas `change` does not fire\n  // until `blur` in IE8.\n  var nodeName = elem.nodeName;\n  return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n  if (domEventName === 'click') {\n    return getInstIfValueChanged(targetInst);\n  }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n  if (domEventName === 'input' || domEventName === 'change') {\n    return getInstIfValueChanged(targetInst);\n  }\n}\n\nfunction handleControlledInputBlur(node) {\n  var state = node._wrapperState;\n\n  if (!state || !state.controlled || node.type !== 'number') {\n    return;\n  }\n\n  {\n    // If controlled, assign the value attribute to the current value on blur\n    setDefaultValue(node, 'number', node.value);\n  }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n  var getTargetInstFunc, handleEventFunc;\n\n  if (shouldUseChangeEvent(targetNode)) {\n    getTargetInstFunc = getTargetInstForChangeEvent;\n  } else if (isTextInputElement(targetNode)) {\n    if (isInputEventSupported) {\n      getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n    } else {\n      getTargetInstFunc = getTargetInstForInputEventPolyfill;\n      handleEventFunc = handleEventsForInputEventPolyfill;\n    }\n  } else if (shouldUseClickEvent(targetNode)) {\n    getTargetInstFunc = getTargetInstForClickEvent;\n  }\n\n  if (getTargetInstFunc) {\n    var inst = getTargetInstFunc(domEventName, targetInst);\n\n    if (inst) {\n      createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n      return;\n    }\n  }\n\n  if (handleEventFunc) {\n    handleEventFunc(domEventName, targetNode, targetInst);\n  } // When blurring, set the value attribute for number inputs\n\n\n  if (domEventName === 'focusout') {\n    handleControlledInputBlur(targetNode);\n  }\n}\n\nfunction registerEvents$2() {\n  registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n  registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n  registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n  registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n  var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n  if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n    // If this is an over event with a target, we might have already dispatched\n    // the event in the out event of the other target. If this is replayed,\n    // then it's because we couldn't dispatch against this target previously\n    // so we have to do it now instead.\n    var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n    if (related) {\n      // If the related node is managed by React, we can assume that we have\n      // already dispatched the corresponding events during its mouseout.\n      if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n        return;\n      }\n    }\n  }\n\n  if (!isOutEvent && !isOverEvent) {\n    // Must not be a mouse or pointer in or out - ignoring.\n    return;\n  }\n\n  var win; // TODO: why is this nullable in the types but we read from it?\n\n  if (nativeEventTarget.window === nativeEventTarget) {\n    // `nativeEventTarget` is probably a window object.\n    win = nativeEventTarget;\n  } else {\n    // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n    var doc = nativeEventTarget.ownerDocument;\n\n    if (doc) {\n      win = doc.defaultView || doc.parentWindow;\n    } else {\n      win = window;\n    }\n  }\n\n  var from;\n  var to;\n\n  if (isOutEvent) {\n    var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n    from = targetInst;\n    to = _related ? getClosestInstanceFromNode(_related) : null;\n\n    if (to !== null) {\n      var nearestMounted = getNearestMountedFiber(to);\n\n      if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n        to = null;\n      }\n    }\n  } else {\n    // Moving to a node from outside the window.\n    from = null;\n    to = targetInst;\n  }\n\n  if (from === to) {\n    // Nothing pertains to our managed components.\n    return;\n  }\n\n  var SyntheticEventCtor = SyntheticMouseEvent;\n  var leaveEventType = 'onMouseLeave';\n  var enterEventType = 'onMouseEnter';\n  var eventTypePrefix = 'mouse';\n\n  if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n    SyntheticEventCtor = SyntheticPointerEvent;\n    leaveEventType = 'onPointerLeave';\n    enterEventType = 'onPointerEnter';\n    eventTypePrefix = 'pointer';\n  }\n\n  var fromNode = from == null ? win : getNodeFromInstance(from);\n  var toNode = to == null ? win : getNodeFromInstance(to);\n  var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n  leave.target = fromNode;\n  leave.relatedTarget = toNode;\n  var enter = null; // We should only process this nativeEvent if we are processing\n  // the first ancestor. Next time, we will ignore the event.\n\n  var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n  if (nativeTargetInst === targetInst) {\n    var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n    enterEvent.target = toNode;\n    enterEvent.relatedTarget = fromNode;\n    enter = enterEvent;\n  }\n\n  accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n  ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n  if (objectIs(objA, objB)) {\n    return true;\n  }\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) {\n    return false;\n  } // Test for A's keys different from B.\n\n\n  for (var i = 0; i < keysA.length; i++) {\n    var currentKey = keysA[i];\n\n    if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n  while (node && node.firstChild) {\n    node = node.firstChild;\n  }\n\n  return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n  while (node) {\n    if (node.nextSibling) {\n      return node.nextSibling;\n    }\n\n    node = node.parentNode;\n  }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n  var node = getLeafNode(root);\n  var nodeStart = 0;\n  var nodeEnd = 0;\n\n  while (node) {\n    if (node.nodeType === TEXT_NODE) {\n      nodeEnd = nodeStart + node.textContent.length;\n\n      if (nodeStart <= offset && nodeEnd >= offset) {\n        return {\n          node: node,\n          offset: offset - nodeStart\n        };\n      }\n\n      nodeStart = nodeEnd;\n    }\n\n    node = getLeafNode(getSiblingNode(node));\n  }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n  var ownerDocument = outerNode.ownerDocument;\n  var win = ownerDocument && ownerDocument.defaultView || window;\n  var selection = win.getSelection && win.getSelection();\n\n  if (!selection || selection.rangeCount === 0) {\n    return null;\n  }\n\n  var anchorNode = selection.anchorNode,\n      anchorOffset = selection.anchorOffset,\n      focusNode = selection.focusNode,\n      focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n  // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n  // expose properties, triggering a \"Permission denied error\" if any of its\n  // properties are accessed. The only seemingly possible way to avoid erroring\n  // is to access a property that typically works for non-anonymous divs and\n  // catch any error that may otherwise arise. See\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n  try {\n    /* eslint-disable no-unused-expressions */\n    anchorNode.nodeType;\n    focusNode.nodeType;\n    /* eslint-enable no-unused-expressions */\n  } catch (e) {\n    return null;\n  }\n\n  return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n  var length = 0;\n  var start = -1;\n  var end = -1;\n  var indexWithinAnchor = 0;\n  var indexWithinFocus = 0;\n  var node = outerNode;\n  var parentNode = null;\n\n  outer: while (true) {\n    var next = null;\n\n    while (true) {\n      if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n        start = length + anchorOffset;\n      }\n\n      if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n        end = length + focusOffset;\n      }\n\n      if (node.nodeType === TEXT_NODE) {\n        length += node.nodeValue.length;\n      }\n\n      if ((next = node.firstChild) === null) {\n        break;\n      } // Moving from `node` to its first child `next`.\n\n\n      parentNode = node;\n      node = next;\n    }\n\n    while (true) {\n      if (node === outerNode) {\n        // If `outerNode` has children, this is always the second time visiting\n        // it. If it has no children, this is still the first loop, and the only\n        // valid selection is anchorNode and focusNode both equal to this node\n        // and both offsets 0, in which case we will have handled above.\n        break outer;\n      }\n\n      if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n        start = length;\n      }\n\n      if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n        end = length;\n      }\n\n      if ((next = node.nextSibling) !== null) {\n        break;\n      }\n\n      node = parentNode;\n      parentNode = node.parentNode;\n    } // Moving from `node` to its next sibling `next`.\n\n\n    node = next;\n  }\n\n  if (start === -1 || end === -1) {\n    // This should never happen. (Would happen if the anchor/focus nodes aren't\n    // actually inside the passed-in node.)\n    return null;\n  }\n\n  return {\n    start: start,\n    end: end\n  };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n  var doc = node.ownerDocument || document;\n  var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n  // fails when pasting 100+ items)\n\n  if (!win.getSelection) {\n    return;\n  }\n\n  var selection = win.getSelection();\n  var length = node.textContent.length;\n  var start = Math.min(offsets.start, length);\n  var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n  // Flip backward selections, so we can set with a single range.\n\n  if (!selection.extend && start > end) {\n    var temp = end;\n    end = start;\n    start = temp;\n  }\n\n  var startMarker = getNodeForCharacterOffset(node, start);\n  var endMarker = getNodeForCharacterOffset(node, end);\n\n  if (startMarker && endMarker) {\n    if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n      return;\n    }\n\n    var range = doc.createRange();\n    range.setStart(startMarker.node, startMarker.offset);\n    selection.removeAllRanges();\n\n    if (start > end) {\n      selection.addRange(range);\n      selection.extend(endMarker.node, endMarker.offset);\n    } else {\n      range.setEnd(endMarker.node, endMarker.offset);\n      selection.addRange(range);\n    }\n  }\n}\n\nfunction isTextNode(node) {\n  return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n  if (!outerNode || !innerNode) {\n    return false;\n  } else if (outerNode === innerNode) {\n    return true;\n  } else if (isTextNode(outerNode)) {\n    return false;\n  } else if (isTextNode(innerNode)) {\n    return containsNode(outerNode, innerNode.parentNode);\n  } else if ('contains' in outerNode) {\n    return outerNode.contains(innerNode);\n  } else if (outerNode.compareDocumentPosition) {\n    return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n  } else {\n    return false;\n  }\n}\n\nfunction isInDocument(node) {\n  return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n  try {\n    // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n    // to throw, e.g. if it has a cross-origin src attribute.\n    // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n    // iframe.contentDocument.defaultView;\n    // A safety way is to access one of the cross origin properties: Window or Location\n    // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n    // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n    return typeof iframe.contentWindow.location.href === 'string';\n  } catch (err) {\n    return false;\n  }\n}\n\nfunction getActiveElementDeep() {\n  var win = window;\n  var element = getActiveElement();\n\n  while (element instanceof win.HTMLIFrameElement) {\n    if (isSameOriginFrame(element)) {\n      win = element.contentWindow;\n    } else {\n      return element;\n    }\n\n    element = getActiveElement(win.document);\n  }\n\n  return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n  return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n  var focusedElem = getActiveElementDeep();\n  return {\n    focusedElem: focusedElem,\n    selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n  };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n  var curFocusedElem = getActiveElementDeep();\n  var priorFocusedElem = priorSelectionInformation.focusedElem;\n  var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n    if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n      setSelection(priorFocusedElem, priorSelectionRange);\n    } // Focusing a node can change the scroll position, which is undesirable\n\n\n    var ancestors = [];\n    var ancestor = priorFocusedElem;\n\n    while (ancestor = ancestor.parentNode) {\n      if (ancestor.nodeType === ELEMENT_NODE) {\n        ancestors.push({\n          element: ancestor,\n          left: ancestor.scrollLeft,\n          top: ancestor.scrollTop\n        });\n      }\n    }\n\n    if (typeof priorFocusedElem.focus === 'function') {\n      priorFocusedElem.focus();\n    }\n\n    for (var i = 0; i < ancestors.length; i++) {\n      var info = ancestors[i];\n      info.element.scrollLeft = info.left;\n      info.element.scrollTop = info.top;\n    }\n  }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n  var selection;\n\n  if ('selectionStart' in input) {\n    // Modern browser with input or textarea.\n    selection = {\n      start: input.selectionStart,\n      end: input.selectionEnd\n    };\n  } else {\n    // Content editable or old IE textarea.\n    selection = getOffsets(input);\n  }\n\n  return selection || {\n    start: 0,\n    end: 0\n  };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input     Set selection bounds of this input or textarea\n * -@offsets   Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n  var start = offsets.start;\n  var end = offsets.end;\n\n  if (end === undefined) {\n    end = start;\n  }\n\n  if ('selectionStart' in input) {\n    input.selectionStart = start;\n    input.selectionEnd = Math.min(end, input.value.length);\n  } else {\n    setOffsets(input, offsets);\n  }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n  registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection$1(node) {\n  if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n    return {\n      start: node.selectionStart,\n      end: node.selectionEnd\n    };\n  } else {\n    var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n    var selection = win.getSelection();\n    return {\n      anchorNode: selection.anchorNode,\n      anchorOffset: selection.anchorOffset,\n      focusNode: selection.focusNode,\n      focusOffset: selection.focusOffset\n    };\n  }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n  return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n  // Ensure we have the right element, and that the user is not dragging a\n  // selection (this matches native `select` event behavior). In HTML5, select\n  // fires only on input and textarea thus if there's no focused element we\n  // won't dispatch.\n  var doc = getEventTargetDocument(nativeEventTarget);\n\n  if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n    return;\n  } // Only fire when selection has actually changed.\n\n\n  var currentSelection = getSelection$1(activeElement$1);\n\n  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n    lastSelection = currentSelection;\n    var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n    if (listeners.length > 0) {\n      var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n      dispatchQueue.push({\n        event: event,\n        listeners: listeners\n      });\n      event.target = activeElement$1;\n    }\n  }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n  switch (domEventName) {\n    // Track the input node that has focus.\n    case 'focusin':\n      if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n        activeElement$1 = targetNode;\n        activeElementInst$1 = targetInst;\n        lastSelection = null;\n      }\n\n      break;\n\n    case 'focusout':\n      activeElement$1 = null;\n      activeElementInst$1 = null;\n      lastSelection = null;\n      break;\n    // Don't fire the event while the user is dragging. This matches the\n    // semantics of the native select event.\n\n    case 'mousedown':\n      mouseDown = true;\n      break;\n\n    case 'contextmenu':\n    case 'mouseup':\n    case 'dragend':\n      mouseDown = false;\n      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n      break;\n    // Chrome and IE fire non-standard event when selection is changed (and\n    // sometimes when it hasn't). IE's event fires out of order with respect\n    // to key and input events on deletion, so we discard it.\n    //\n    // Firefox doesn't support selectionchange, so check selection status\n    // after each key entry. The selection changes after keydown and before\n    // keyup, but we check on keydown as well in the case of holding down a\n    // key, when multiple keydown events are fired but only one keyup is.\n    // This is also our approach for IE handling, for the reason above.\n\n    case 'selectionchange':\n      if (skipSelectionChangeEvent) {\n        break;\n      }\n\n    // falls through\n\n    case 'keydown':\n    case 'keyup':\n      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n  }\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n  var prefixes = {};\n  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n  prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n  prefixes['Moz' + styleProp] = 'moz' + eventName;\n  return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n  animationend: makePrefixMap('Animation', 'AnimationEnd'),\n  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n  animationstart: makePrefixMap('Animation', 'AnimationStart'),\n  transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n  style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n  // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n  // style object but the events that fire will still be prefixed, so we need\n  // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n  if (!('AnimationEvent' in window)) {\n    delete vendorPrefixes.animationend.animation;\n    delete vendorPrefixes.animationiteration.animation;\n    delete vendorPrefixes.animationstart.animation;\n  } // Same as above\n\n\n  if (!('TransitionEvent' in window)) {\n    delete vendorPrefixes.transitionend.transition;\n  }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n  if (prefixedEventNames[eventName]) {\n    return prefixedEventNames[eventName];\n  } else if (!vendorPrefixes[eventName]) {\n    return eventName;\n  }\n\n  var prefixMap = vendorPrefixes[eventName];\n\n  for (var styleProp in prefixMap) {\n    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n      return prefixedEventNames[eventName] = prefixMap[styleProp];\n    }\n  }\n\n  return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n  topLevelEventsToReactNames.set(domEventName, reactName);\n  registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n  for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n    var eventName = simpleEventPluginEvents[i];\n    var domEventName = eventName.toLowerCase();\n    var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n    registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n  } // Special cases where event names don't match.\n\n\n  registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n  registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n  registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n  registerSimpleEvent('dblclick', 'onDoubleClick');\n  registerSimpleEvent('focusin', 'onFocus');\n  registerSimpleEvent('focusout', 'onBlur');\n  registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var reactName = topLevelEventsToReactNames.get(domEventName);\n\n  if (reactName === undefined) {\n    return;\n  }\n\n  var SyntheticEventCtor = SyntheticEvent;\n  var reactEventType = domEventName;\n\n  switch (domEventName) {\n    case 'keypress':\n      // Firefox creates a keypress event for function keys too. This removes\n      // the unwanted keypress events. Enter is however both printable and\n      // non-printable. One would expect Tab to be as well (but it isn't).\n      if (getEventCharCode(nativeEvent) === 0) {\n        return;\n      }\n\n    /* falls through */\n\n    case 'keydown':\n    case 'keyup':\n      SyntheticEventCtor = SyntheticKeyboardEvent;\n      break;\n\n    case 'focusin':\n      reactEventType = 'focus';\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'focusout':\n      reactEventType = 'blur';\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'beforeblur':\n    case 'afterblur':\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'click':\n      // Firefox creates a click event on right mouse clicks. This removes the\n      // unwanted click events.\n      if (nativeEvent.button === 2) {\n        return;\n      }\n\n    /* falls through */\n\n    case 'auxclick':\n    case 'dblclick':\n    case 'mousedown':\n    case 'mousemove':\n    case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n    /* falls through */\n\n    case 'mouseout':\n    case 'mouseover':\n    case 'contextmenu':\n      SyntheticEventCtor = SyntheticMouseEvent;\n      break;\n\n    case 'drag':\n    case 'dragend':\n    case 'dragenter':\n    case 'dragexit':\n    case 'dragleave':\n    case 'dragover':\n    case 'dragstart':\n    case 'drop':\n      SyntheticEventCtor = SyntheticDragEvent;\n      break;\n\n    case 'touchcancel':\n    case 'touchend':\n    case 'touchmove':\n    case 'touchstart':\n      SyntheticEventCtor = SyntheticTouchEvent;\n      break;\n\n    case ANIMATION_END:\n    case ANIMATION_ITERATION:\n    case ANIMATION_START:\n      SyntheticEventCtor = SyntheticAnimationEvent;\n      break;\n\n    case TRANSITION_END:\n      SyntheticEventCtor = SyntheticTransitionEvent;\n      break;\n\n    case 'scroll':\n      SyntheticEventCtor = SyntheticUIEvent;\n      break;\n\n    case 'wheel':\n      SyntheticEventCtor = SyntheticWheelEvent;\n      break;\n\n    case 'copy':\n    case 'cut':\n    case 'paste':\n      SyntheticEventCtor = SyntheticClipboardEvent;\n      break;\n\n    case 'gotpointercapture':\n    case 'lostpointercapture':\n    case 'pointercancel':\n    case 'pointerdown':\n    case 'pointermove':\n    case 'pointerout':\n    case 'pointerover':\n    case 'pointerup':\n      SyntheticEventCtor = SyntheticPointerEvent;\n      break;\n  }\n\n  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n  {\n    // Some events don't bubble in the browser.\n    // In the past, React has always bubbled them, but this can be surprising.\n    // We're going to try aligning closer to the browser behavior by not bubbling\n    // them in React either. We'll start by not bubbling onScroll, and then expand.\n    var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n    // nonDelegatedEvents list in DOMPluginEventSystem.\n    // Then we can remove this special list.\n    // This is a breaking change that can wait until React 18.\n    domEventName === 'scroll';\n\n    var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n    if (_listeners.length > 0) {\n      // Intentionally create event lazily.\n      var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n      dispatchQueue.push({\n        event: _event,\n        listeners: _listeners\n      });\n    }\n  }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n  // This is the basic functionality of the event system. All\n  // the other plugins are essentially polyfills. So the plugin\n  // should probably be inlined somewhere and have its logic\n  // be core the to event system. This would potentially allow\n  // us to ship builds of React without the polyfilled plugins below.\n  extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n  var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n  // event's native \"bubble\" phase, which means that we're\n  // not in the capture phase. That's because we emulate\n  // the capture phase here still. This is a trade-off,\n  // because in an ideal world we would not emulate and use\n  // the phases properly, like we do with the SimpleEvent\n  // plugin. However, the plugins below either expect\n  // emulation (EnterLeave) or use state localized to that\n  // plugin (BeforeInput, Change, Select). The state in\n  // these modules complicates things, as you'll essentially\n  // get the case where the capture phase event might change\n  // state, only for the following bubble event to come in\n  // later and not trigger anything as the state now\n  // invalidates the heuristics of the event plugin. We\n  // could alter all these plugins to work in such ways, but\n  // that might cause other unknown side-effects that we\n  // can't foresee right now.\n\n  if (shouldProcessPolyfillPlugins) {\n    extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n  }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n  var type = event.type || 'unknown-event';\n  event.currentTarget = currentTarget;\n  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n  event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n  var previousInstance;\n\n  if (inCapturePhase) {\n    for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n      var _dispatchListeners$i = dispatchListeners[i],\n          instance = _dispatchListeners$i.instance,\n          currentTarget = _dispatchListeners$i.currentTarget,\n          listener = _dispatchListeners$i.listener;\n\n      if (instance !== previousInstance && event.isPropagationStopped()) {\n        return;\n      }\n\n      executeDispatch(event, listener, currentTarget);\n      previousInstance = instance;\n    }\n  } else {\n    for (var _i = 0; _i < dispatchListeners.length; _i++) {\n      var _dispatchListeners$_i = dispatchListeners[_i],\n          _instance = _dispatchListeners$_i.instance,\n          _currentTarget = _dispatchListeners$_i.currentTarget,\n          _listener = _dispatchListeners$_i.listener;\n\n      if (_instance !== previousInstance && event.isPropagationStopped()) {\n        return;\n      }\n\n      executeDispatch(event, _listener, _currentTarget);\n      previousInstance = _instance;\n    }\n  }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n  for (var i = 0; i < dispatchQueue.length; i++) {\n    var _dispatchQueue$i = dispatchQueue[i],\n        event = _dispatchQueue$i.event,\n        listeners = _dispatchQueue$i.listeners;\n    processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); //  event system doesn't use pooling.\n  } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n  rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n  var nativeEventTarget = getEventTarget(nativeEvent);\n  var dispatchQueue = [];\n  extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n  processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n  {\n    if (!nonDelegatedEvents.has(domEventName)) {\n      error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n    }\n  }\n\n  var isCapturePhaseListener = false;\n  var listenerSet = getEventListenerSet(targetElement);\n  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n  if (!listenerSet.has(listenerSetKey)) {\n    addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n    listenerSet.add(listenerSetKey);\n  }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n  {\n    if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n      error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n    }\n  }\n\n  var eventSystemFlags = 0;\n\n  if (isCapturePhaseListener) {\n    eventSystemFlags |= IS_CAPTURE_PHASE;\n  }\n\n  addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n  if (!rootContainerElement[listeningMarker]) {\n    rootContainerElement[listeningMarker] = true;\n    allNativeEvents.forEach(function (domEventName) {\n      // We handle selectionchange separately because it\n      // doesn't bubble and needs to be on the document.\n      if (domEventName !== 'selectionchange') {\n        if (!nonDelegatedEvents.has(domEventName)) {\n          listenToNativeEvent(domEventName, false, rootContainerElement);\n        }\n\n        listenToNativeEvent(domEventName, true, rootContainerElement);\n      }\n    });\n    var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n    if (ownerDocument !== null) {\n      // The selectionchange event also needs deduplication\n      // but it is attached to the document.\n      if (!ownerDocument[listeningMarker]) {\n        ownerDocument[listeningMarker] = true;\n        listenToNativeEvent('selectionchange', false, ownerDocument);\n      }\n    }\n  }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n  var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n  // active and not passive.\n\n  var isPassiveListener = undefined;\n\n  if (passiveBrowserEventsSupported) {\n    // Browsers introduced an intervention, making these events\n    // passive by default on document. React doesn't bind them\n    // to document anymore, but changing this now would undo\n    // the performance wins from the change. So we emulate\n    // the existing behavior manually on the roots now.\n    // https://github.com/facebook/react/issues/19651\n    if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n      isPassiveListener = true;\n    }\n  }\n\n  targetContainer =  targetContainer;\n  var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n  if (isCapturePhaseListener) {\n    if (isPassiveListener !== undefined) {\n      unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n    } else {\n      unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n    }\n  } else {\n    if (isPassiveListener !== undefined) {\n      unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n    } else {\n      unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n    }\n  }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n  return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n  var ancestorInst = targetInst;\n\n  if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n    var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n    if (targetInst !== null) {\n      // The below logic attempts to work out if we need to change\n      // the target fiber to a different ancestor. We had similar logic\n      // in the legacy event system, except the big difference between\n      // systems is that the modern event system now has an event listener\n      // attached to each React Root and React Portal Root. Together,\n      // the DOM nodes representing these roots are the \"rootContainer\".\n      // To figure out which ancestor instance we should use, we traverse\n      // up the fiber tree from the target instance and attempt to find\n      // root boundaries that match that of our current \"rootContainer\".\n      // If we find that \"rootContainer\", we find the parent fiber\n      // sub-tree for that root and make that our ancestor instance.\n      var node = targetInst;\n\n      mainLoop: while (true) {\n        if (node === null) {\n          return;\n        }\n\n        var nodeTag = node.tag;\n\n        if (nodeTag === HostRoot || nodeTag === HostPortal) {\n          var container = node.stateNode.containerInfo;\n\n          if (isMatchingRootContainer(container, targetContainerNode)) {\n            break;\n          }\n\n          if (nodeTag === HostPortal) {\n            // The target is a portal, but it's not the rootContainer we're looking for.\n            // Normally portals handle their own events all the way down to the root.\n            // So we should be able to stop now. However, we don't know if this portal\n            // was part of *our* root.\n            var grandNode = node.return;\n\n            while (grandNode !== null) {\n              var grandTag = grandNode.tag;\n\n              if (grandTag === HostRoot || grandTag === HostPortal) {\n                var grandContainer = grandNode.stateNode.containerInfo;\n\n                if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n                  // This is the rootContainer we're looking for and we found it as\n                  // a parent of the Portal. That means we can ignore it because the\n                  // Portal will bubble through to us.\n                  return;\n                }\n              }\n\n              grandNode = grandNode.return;\n            }\n          } // Now we need to find it's corresponding host fiber in the other\n          // tree. To do this we can use getClosestInstanceFromNode, but we\n          // need to validate that the fiber is a host instance, otherwise\n          // we need to traverse up through the DOM till we find the correct\n          // node that is from the other tree.\n\n\n          while (container !== null) {\n            var parentNode = getClosestInstanceFromNode(container);\n\n            if (parentNode === null) {\n              return;\n            }\n\n            var parentTag = parentNode.tag;\n\n            if (parentTag === HostComponent || parentTag === HostText) {\n              node = ancestorInst = parentNode;\n              continue mainLoop;\n            }\n\n            container = container.parentNode;\n          }\n        }\n\n        node = node.return;\n      }\n    }\n  }\n\n  batchedUpdates(function () {\n    return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n  });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n  return {\n    instance: instance,\n    listener: listener,\n    currentTarget: currentTarget\n  };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n  var captureName = reactName !== null ? reactName + 'Capture' : null;\n  var reactEventName = inCapturePhase ? captureName : reactName;\n  var listeners = [];\n  var instance = targetFiber;\n  var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n  while (instance !== null) {\n    var _instance2 = instance,\n        stateNode = _instance2.stateNode,\n        tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n    if (tag === HostComponent && stateNode !== null) {\n      lastHostComponent = stateNode; // createEventHandle listeners\n\n\n      if (reactEventName !== null) {\n        var listener = getListener(instance, reactEventName);\n\n        if (listener != null) {\n          listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n        }\n      }\n    } // If we are only accumulating events for the target, then we don't\n    // continue to propagate through the React fiber tree to find other\n    // listeners.\n\n\n    if (accumulateTargetOnly) {\n      break;\n    } // If we are processing the onBeforeBlur event, then we need to take\n\n    instance = instance.return;\n  }\n\n  return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n  var captureName = reactName + 'Capture';\n  var listeners = [];\n  var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n  while (instance !== null) {\n    var _instance3 = instance,\n        stateNode = _instance3.stateNode,\n        tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n    if (tag === HostComponent && stateNode !== null) {\n      var currentTarget = stateNode;\n      var captureListener = getListener(instance, captureName);\n\n      if (captureListener != null) {\n        listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n      }\n\n      var bubbleListener = getListener(instance, reactName);\n\n      if (bubbleListener != null) {\n        listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n      }\n    }\n\n    instance = instance.return;\n  }\n\n  return listeners;\n}\n\nfunction getParent(inst) {\n  if (inst === null) {\n    return null;\n  }\n\n  do {\n    inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n    // That is depending on if we want nested subtrees (layers) to bubble\n    // events to their parent. We could also go through parentNode on the\n    // host node but that wouldn't work for React Native and doesn't let us\n    // do the portal feature.\n  } while (inst && inst.tag !== HostComponent);\n\n  if (inst) {\n    return inst;\n  }\n\n  return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n  var nodeA = instA;\n  var nodeB = instB;\n  var depthA = 0;\n\n  for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n    depthA++;\n  }\n\n  var depthB = 0;\n\n  for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n    depthB++;\n  } // If A is deeper, crawl up.\n\n\n  while (depthA - depthB > 0) {\n    nodeA = getParent(nodeA);\n    depthA--;\n  } // If B is deeper, crawl up.\n\n\n  while (depthB - depthA > 0) {\n    nodeB = getParent(nodeB);\n    depthB--;\n  } // Walk in lockstep until we find a match.\n\n\n  var depth = depthA;\n\n  while (depth--) {\n    if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n      return nodeA;\n    }\n\n    nodeA = getParent(nodeA);\n    nodeB = getParent(nodeB);\n  }\n\n  return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n  var registrationName = event._reactName;\n  var listeners = [];\n  var instance = target;\n\n  while (instance !== null) {\n    if (instance === common) {\n      break;\n    }\n\n    var _instance4 = instance,\n        alternate = _instance4.alternate,\n        stateNode = _instance4.stateNode,\n        tag = _instance4.tag;\n\n    if (alternate !== null && alternate === common) {\n      break;\n    }\n\n    if (tag === HostComponent && stateNode !== null) {\n      var currentTarget = stateNode;\n\n      if (inCapturePhase) {\n        var captureListener = getListener(instance, registrationName);\n\n        if (captureListener != null) {\n          listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n        }\n      } else if (!inCapturePhase) {\n        var bubbleListener = getListener(instance, registrationName);\n\n        if (bubbleListener != null) {\n          listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n        }\n      }\n    }\n\n    instance = instance.return;\n  }\n\n  if (listeners.length !== 0) {\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n  }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n  var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n  if (from !== null) {\n    accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n  }\n\n  if (to !== null && enterEvent !== null) {\n    accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n  }\n}\nfunction getListenerSetKey(domEventName, capture) {\n  return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar warnedUnknownTags;\nvar validatePropertiesInDevelopment;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeHTML;\n\n{\n  warnedUnknownTags = {\n    // There are working polyfills for <dialog>. Let people use it.\n    dialog: true,\n    // Electron ships a custom <webview> tag to display external web content in\n    // an isolated frame and process.\n    // This tag is not present in non Electron environments such as JSDom which\n    // is often used for testing purposes.\n    // @see https://electronjs.org/docs/api/webview-tag\n    webview: true\n  };\n\n  validatePropertiesInDevelopment = function (type, props) {\n    validateProperties(type, props);\n    validateProperties$1(type, props);\n    validateProperties$2(type, props, {\n      registrationNameDependencies: registrationNameDependencies,\n      possibleRegistrationNames: possibleRegistrationNames\n    });\n  }; // IE 11 parses & normalizes the style attribute as opposed to other\n  // browsers. It adds spaces and sorts the properties in some\n  // non-alphabetical order. Handling that would require sorting CSS\n  // properties in the client & server versions or applying\n  // `expectedStyle` to a temporary DOM node to read its `style` attribute\n  // normalized. Since it only affects IE, we're skipping style warnings\n  // in that browser completely in favor of doing all that work.\n  // See https://github.com/facebook/react/issues/11807\n\n\n  canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n\n  warnForPropDifference = function (propName, serverValue, clientValue) {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n    var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n    if (normalizedServerValue === normalizedClientValue) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n  };\n\n  warnForExtraAttributes = function (attributeNames) {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n    var names = [];\n    attributeNames.forEach(function (name) {\n      names.push(name);\n    });\n\n    error('Extra attributes from the server: %s', names);\n  };\n\n  warnForInvalidEventListener = function (registrationName, listener) {\n    if (listener === false) {\n      error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n    } else {\n      error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n    }\n  }; // Parse the HTML and read it back to normalize the HTML string so that it\n  // can be used for comparison.\n\n\n  normalizeHTML = function (parent, html) {\n    // We could have created a separate document here to avoid\n    // re-initializing custom elements if they exist. But this breaks\n    // how <noscript> is being handled. So we use the same document.\n    // See the discussion in https://github.com/facebook/react/pull/11157.\n    var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n    testElement.innerHTML = html;\n    return testElement.innerHTML;\n  };\n} // HTML parsing normalizes CR and CRLF to LF.\n// It also can turn \\u0000 into \\uFFFD inside attributes.\n// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n// If we have a mismatch, it might be caused by that.\n// We will still patch up in this case but not fire the warning.\n\n\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n  {\n    checkHtmlStringCoercion(markup);\n  }\n\n  var markupString = typeof markup === 'string' ? markup : '' + markup;\n  return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n  var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n  var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n  if (normalizedServerText === normalizedClientText) {\n    return;\n  }\n\n  if (shouldWarnDev) {\n    {\n      if (!didWarnInvalidHydration) {\n        didWarnInvalidHydration = true;\n\n        error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n      }\n    }\n  }\n\n  if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n    // In concurrent roots, we throw when there's a text mismatch and revert to\n    // client rendering, up to the nearest Suspense boundary.\n    throw new Error('Text content does not match server-rendered HTML.');\n  }\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n  return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n  // Mobile Safari does not fire properly bubble click events on\n  // non-interactive elements, which means delegated click listeners do not\n  // fire. The workaround for this bug involves attaching an empty click\n  // listener on the target node.\n  // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n  // Just set it using the onclick property so that we don't have to manage any\n  // bookkeeping for it. Not sure if we need to clear it when the listener is\n  // removed.\n  // TODO: Only do this for the relevant Safaris maybe?\n  node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n  for (var propKey in nextProps) {\n    if (!nextProps.hasOwnProperty(propKey)) {\n      continue;\n    }\n\n    var nextProp = nextProps[propKey];\n\n    if (propKey === STYLE) {\n      {\n        if (nextProp) {\n          // Freeze the next style object so that we can assume it won't be\n          // mutated. We have already warned for this in the past.\n          Object.freeze(nextProp);\n        }\n      } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n      setValueForStyles(domElement, nextProp);\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n      if (nextHtml != null) {\n        setInnerHTML(domElement, nextHtml);\n      }\n    } else if (propKey === CHILDREN) {\n      if (typeof nextProp === 'string') {\n        // Avoid setting initial textContent when the text is empty. In IE11 setting\n        // textContent on a <textarea> will cause the placeholder to not\n        // show within the <textarea> until it has been focused and blurred again.\n        // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n        var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n        if (canSetTextContent) {\n          setTextContent(domElement, nextProp);\n        }\n      } else if (typeof nextProp === 'number') {\n        setTextContent(domElement, '' + nextProp);\n      }\n    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n    } else if (nextProp != null) {\n      setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n    }\n  }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n  // TODO: Handle wasCustomComponentTag\n  for (var i = 0; i < updatePayload.length; i += 2) {\n    var propKey = updatePayload[i];\n    var propValue = updatePayload[i + 1];\n\n    if (propKey === STYLE) {\n      setValueForStyles(domElement, propValue);\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      setInnerHTML(domElement, propValue);\n    } else if (propKey === CHILDREN) {\n      setTextContent(domElement, propValue);\n    } else {\n      setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n    }\n  }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n  var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n  // tags get no namespace.\n\n  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n  var domElement;\n  var namespaceURI = parentNamespace;\n\n  if (namespaceURI === HTML_NAMESPACE) {\n    namespaceURI = getIntrinsicNamespace(type);\n  }\n\n  if (namespaceURI === HTML_NAMESPACE) {\n    {\n      isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n      // allow <SVG> or <mATH>.\n\n      if (!isCustomComponentTag && type !== type.toLowerCase()) {\n        error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n      }\n    }\n\n    if (type === 'script') {\n      // Create the script via .innerHTML so its \"parser-inserted\" flag is\n      // set to true and it does not execute\n      var div = ownerDocument.createElement('div');\n\n      div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n      // This is guaranteed to yield a script element.\n\n      var firstChild = div.firstChild;\n      domElement = div.removeChild(firstChild);\n    } else if (typeof props.is === 'string') {\n      // $FlowIssue `createElement` should be updated for Web Components\n      domElement = ownerDocument.createElement(type, {\n        is: props.is\n      });\n    } else {\n      // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n      // See discussion in https://github.com/facebook/react/pull/6896\n      // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n      domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n      // attributes on `select`s needs to be added before `option`s are inserted.\n      // This prevents:\n      // - a bug where the `select` does not scroll to the correct option because singular\n      //  `select` elements automatically pick the first item #13222\n      // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n      // See https://github.com/facebook/react/issues/13222\n      // and https://github.com/facebook/react/issues/14239\n\n      if (type === 'select') {\n        var node = domElement;\n\n        if (props.multiple) {\n          node.multiple = true;\n        } else if (props.size) {\n          // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n          // it is possible that no option is selected.\n          //\n          // This is only necessary when a select in \"single selection mode\".\n          node.size = props.size;\n        }\n      }\n    }\n  } else {\n    domElement = ownerDocument.createElementNS(namespaceURI, type);\n  }\n\n  {\n    if (namespaceURI === HTML_NAMESPACE) {\n      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {\n        warnedUnknownTags[type] = true;\n\n        error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n      }\n    }\n  }\n\n  return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n  return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n  var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n  {\n    validatePropertiesInDevelopment(tag, rawProps);\n  } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n  var props;\n\n  switch (tag) {\n    case 'dialog':\n      listenToNonDelegatedEvent('cancel', domElement);\n      listenToNonDelegatedEvent('close', domElement);\n      props = rawProps;\n      break;\n\n    case 'iframe':\n    case 'object':\n    case 'embed':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the load event.\n      listenToNonDelegatedEvent('load', domElement);\n      props = rawProps;\n      break;\n\n    case 'video':\n    case 'audio':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for all the media events.\n      for (var i = 0; i < mediaEventTypes.length; i++) {\n        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n      }\n\n      props = rawProps;\n      break;\n\n    case 'source':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the error event.\n      listenToNonDelegatedEvent('error', domElement);\n      props = rawProps;\n      break;\n\n    case 'img':\n    case 'image':\n    case 'link':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for error and load events.\n      listenToNonDelegatedEvent('error', domElement);\n      listenToNonDelegatedEvent('load', domElement);\n      props = rawProps;\n      break;\n\n    case 'details':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the toggle event.\n      listenToNonDelegatedEvent('toggle', domElement);\n      props = rawProps;\n      break;\n\n    case 'input':\n      initWrapperState(domElement, rawProps);\n      props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'option':\n      validateProps(domElement, rawProps);\n      props = rawProps;\n      break;\n\n    case 'select':\n      initWrapperState$1(domElement, rawProps);\n      props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'textarea':\n      initWrapperState$2(domElement, rawProps);\n      props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    default:\n      props = rawProps;\n  }\n\n  assertValidProps(tag, props);\n  setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n  switch (tag) {\n    case 'input':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper(domElement, rawProps, false);\n      break;\n\n    case 'textarea':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper$3(domElement);\n      break;\n\n    case 'option':\n      postMountWrapper$1(domElement, rawProps);\n      break;\n\n    case 'select':\n      postMountWrapper$2(domElement, rawProps);\n      break;\n\n    default:\n      if (typeof props.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n  {\n    validatePropertiesInDevelopment(tag, nextRawProps);\n  }\n\n  var updatePayload = null;\n  var lastProps;\n  var nextProps;\n\n  switch (tag) {\n    case 'input':\n      lastProps = getHostProps(domElement, lastRawProps);\n      nextProps = getHostProps(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    case 'select':\n      lastProps = getHostProps$1(domElement, lastRawProps);\n      nextProps = getHostProps$1(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    case 'textarea':\n      lastProps = getHostProps$2(domElement, lastRawProps);\n      nextProps = getHostProps$2(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    default:\n      lastProps = lastRawProps;\n      nextProps = nextRawProps;\n\n      if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n\n  assertValidProps(tag, nextProps);\n  var propKey;\n  var styleName;\n  var styleUpdates = null;\n\n  for (propKey in lastProps) {\n    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n      continue;\n    }\n\n    if (propKey === STYLE) {\n      var lastStyle = lastProps[propKey];\n\n      for (styleName in lastStyle) {\n        if (lastStyle.hasOwnProperty(styleName)) {\n          if (!styleUpdates) {\n            styleUpdates = {};\n          }\n\n          styleUpdates[styleName] = '';\n        }\n      }\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      // This is a special case. If any listener updates we need to ensure\n      // that the \"current\" fiber pointer gets updated so we need a commit\n      // to update this element.\n      if (!updatePayload) {\n        updatePayload = [];\n      }\n    } else {\n      // For all other deleted properties we add it to the queue. We use\n      // the allowed property list in the commit phase instead.\n      (updatePayload = updatePayload || []).push(propKey, null);\n    }\n  }\n\n  for (propKey in nextProps) {\n    var nextProp = nextProps[propKey];\n    var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n    if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n      continue;\n    }\n\n    if (propKey === STYLE) {\n      {\n        if (nextProp) {\n          // Freeze the next style object so that we can assume it won't be\n          // mutated. We have already warned for this in the past.\n          Object.freeze(nextProp);\n        }\n      }\n\n      if (lastProp) {\n        // Unset styles on `lastProp` but not on `nextProp`.\n        for (styleName in lastProp) {\n          if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n            if (!styleUpdates) {\n              styleUpdates = {};\n            }\n\n            styleUpdates[styleName] = '';\n          }\n        } // Update styles that changed since `lastProp`.\n\n\n        for (styleName in nextProp) {\n          if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n            if (!styleUpdates) {\n              styleUpdates = {};\n            }\n\n            styleUpdates[styleName] = nextProp[styleName];\n          }\n        }\n      } else {\n        // Relies on `updateStylesByID` not mutating `styleUpdates`.\n        if (!styleUpdates) {\n          if (!updatePayload) {\n            updatePayload = [];\n          }\n\n          updatePayload.push(propKey, styleUpdates);\n        }\n\n        styleUpdates = nextProp;\n      }\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n      var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n      if (nextHtml != null) {\n        if (lastHtml !== nextHtml) {\n          (updatePayload = updatePayload || []).push(propKey, nextHtml);\n        }\n      }\n    } else if (propKey === CHILDREN) {\n      if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n      }\n    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        // We eagerly listen to this even though we haven't committed yet.\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n\n      if (!updatePayload && lastProp !== nextProp) {\n        // This is a special case. If any listener updates we need to ensure\n        // that the \"current\" props pointer gets updated so we need a commit\n        // to update this element.\n        updatePayload = [];\n      }\n    } else {\n      // For any other property we always add it to the queue and then we\n      // filter it out using the allowed property list during the commit.\n      (updatePayload = updatePayload || []).push(propKey, nextProp);\n    }\n  }\n\n  if (styleUpdates) {\n    {\n      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n    }\n\n    (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n  }\n\n  return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n  // Update checked *before* name.\n  // In the middle of an update, it is possible to have multiple checked.\n  // When a checked radio tries to change name, browser makes another radio's checked false.\n  if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n    updateChecked(domElement, nextRawProps);\n  }\n\n  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n  var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n  updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n  // changed.\n\n  switch (tag) {\n    case 'input':\n      // Update the wrapper around inputs *after* updating props. This has to\n      // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n      // raise warnings and prevent the new value from being assigned.\n      updateWrapper(domElement, nextRawProps);\n      break;\n\n    case 'textarea':\n      updateWrapper$1(domElement, nextRawProps);\n      break;\n\n    case 'select':\n      // <select> value update needs to occur after <option> children\n      // reconciliation\n      postUpdateWrapper(domElement, nextRawProps);\n      break;\n  }\n}\n\nfunction getPossibleStandardName(propName) {\n  {\n    var lowerCasedName = propName.toLowerCase();\n\n    if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n      return null;\n    }\n\n    return possibleStandardNames[lowerCasedName] || null;\n  }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {\n  var isCustomComponentTag;\n  var extraAttributeNames;\n\n  {\n    isCustomComponentTag = isCustomComponent(tag, rawProps);\n    validatePropertiesInDevelopment(tag, rawProps);\n  } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n  switch (tag) {\n    case 'dialog':\n      listenToNonDelegatedEvent('cancel', domElement);\n      listenToNonDelegatedEvent('close', domElement);\n      break;\n\n    case 'iframe':\n    case 'object':\n    case 'embed':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the load event.\n      listenToNonDelegatedEvent('load', domElement);\n      break;\n\n    case 'video':\n    case 'audio':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for all the media events.\n      for (var i = 0; i < mediaEventTypes.length; i++) {\n        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n      }\n\n      break;\n\n    case 'source':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the error event.\n      listenToNonDelegatedEvent('error', domElement);\n      break;\n\n    case 'img':\n    case 'image':\n    case 'link':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for error and load events.\n      listenToNonDelegatedEvent('error', domElement);\n      listenToNonDelegatedEvent('load', domElement);\n      break;\n\n    case 'details':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the toggle event.\n      listenToNonDelegatedEvent('toggle', domElement);\n      break;\n\n    case 'input':\n      initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'option':\n      validateProps(domElement, rawProps);\n      break;\n\n    case 'select':\n      initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'textarea':\n      initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n  }\n\n  assertValidProps(tag, rawProps);\n\n  {\n    extraAttributeNames = new Set();\n    var attributes = domElement.attributes;\n\n    for (var _i = 0; _i < attributes.length; _i++) {\n      var name = attributes[_i].name.toLowerCase();\n\n      switch (name) {\n        // Controlled attributes are not validated\n        // TODO: Only ignore them on controlled tags.\n        case 'value':\n          break;\n\n        case 'checked':\n          break;\n\n        case 'selected':\n          break;\n\n        default:\n          // Intentionally use the original name.\n          // See discussion in https://github.com/facebook/react/pull/10676.\n          extraAttributeNames.add(attributes[_i].name);\n      }\n    }\n  }\n\n  var updatePayload = null;\n\n  for (var propKey in rawProps) {\n    if (!rawProps.hasOwnProperty(propKey)) {\n      continue;\n    }\n\n    var nextProp = rawProps[propKey];\n\n    if (propKey === CHILDREN) {\n      // For text content children we compare against textContent. This\n      // might match additional HTML that is hidden when we read it using\n      // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n      // satisfies our requirement. Our requirement is not to produce perfect\n      // HTML and attributes. Ideally we should preserve structure but it's\n      // ok not to if the visible content is still enough to indicate what\n      // even listeners these nodes might be wired up to.\n      // TODO: Warn if there is more than a single textNode as a child.\n      // TODO: Should we use domElement.firstChild.nodeValue to compare?\n      if (typeof nextProp === 'string') {\n        if (domElement.textContent !== nextProp) {\n          if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n            checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n          }\n\n          updatePayload = [CHILDREN, nextProp];\n        }\n      } else if (typeof nextProp === 'number') {\n        if (domElement.textContent !== '' + nextProp) {\n          if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n            checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n          }\n\n          updatePayload = [CHILDREN, '' + nextProp];\n        }\n      }\n    } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n    } else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)\n    typeof isCustomComponentTag === 'boolean') {\n      // Validate that the properties correspond to their expected values.\n      var serverValue = void 0;\n      var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);\n\n      if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n      // TODO: Only ignore them on controlled tags.\n      propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n        var serverHTML = domElement.innerHTML;\n        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n        if (nextHtml != null) {\n          var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n          if (expectedHTML !== serverHTML) {\n            warnForPropDifference(propKey, serverHTML, expectedHTML);\n          }\n        }\n      } else if (propKey === STYLE) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        extraAttributeNames.delete(propKey);\n\n        if (canDiffStyleForHydrationWarning) {\n          var expectedStyle = createDangerousStringForStyles(nextProp);\n          serverValue = domElement.getAttribute('style');\n\n          if (expectedStyle !== serverValue) {\n            warnForPropDifference(propKey, serverValue, expectedStyle);\n          }\n        }\n      } else if (isCustomComponentTag && !enableCustomElementPropertySupport) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        extraAttributeNames.delete(propKey.toLowerCase());\n        serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n        if (nextProp !== serverValue) {\n          warnForPropDifference(propKey, serverValue, nextProp);\n        }\n      } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n        var isMismatchDueToBadCasing = false;\n\n        if (propertyInfo !== null) {\n          // $FlowFixMe - Should be inferred as not undefined.\n          extraAttributeNames.delete(propertyInfo.attributeName);\n          serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n        } else {\n          var ownNamespace = parentNamespace;\n\n          if (ownNamespace === HTML_NAMESPACE) {\n            ownNamespace = getIntrinsicNamespace(tag);\n          }\n\n          if (ownNamespace === HTML_NAMESPACE) {\n            // $FlowFixMe - Should be inferred as not undefined.\n            extraAttributeNames.delete(propKey.toLowerCase());\n          } else {\n            var standardName = getPossibleStandardName(propKey);\n\n            if (standardName !== null && standardName !== propKey) {\n              // If an SVG prop is supplied with bad casing, it will\n              // be successfully parsed from HTML, but will produce a mismatch\n              // (and would be incorrectly rendered on the client).\n              // However, we already warn about bad casing elsewhere.\n              // So we'll skip the misleading extra mismatch warning in this case.\n              isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n              extraAttributeNames.delete(standardName);\n            } // $FlowFixMe - Should be inferred as not undefined.\n\n\n            extraAttributeNames.delete(propKey);\n          }\n\n          serverValue = getValueForAttribute(domElement, propKey, nextProp);\n        }\n\n        var dontWarnCustomElement = enableCustomElementPropertySupport  ;\n\n        if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {\n          warnForPropDifference(propKey, serverValue, nextProp);\n        }\n      }\n    }\n  }\n\n  {\n    if (shouldWarnDev) {\n      if ( // $FlowFixMe - Should be inferred as not undefined.\n      extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        warnForExtraAttributes(extraAttributeNames);\n      }\n    }\n  }\n\n  switch (tag) {\n    case 'input':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper(domElement, rawProps, true);\n      break;\n\n    case 'textarea':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper$3(domElement);\n      break;\n\n    case 'select':\n    case 'option':\n      // For input and textarea we current always set the value property at\n      // post mount to force it to diverge from attributes. However, for\n      // option and select we don't quite do the same thing and select\n      // is not resilient to the DOM state changing so we don't do that here.\n      // TODO: Consider not doing this for input and textarea.\n      break;\n\n    default:\n      if (typeof rawProps.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n\n  return updatePayload;\n}\nfunction diffHydratedText(textNode, text, isConcurrentMode) {\n  var isDifferent = textNode.nodeValue !== text;\n  return isDifferent;\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n  {\n    if (text === '') {\n      // We expect to insert empty text nodes since they're not represented in\n      // the HTML.\n      // TODO: Remove this special case if we can just avoid inserting empty\n      // text nodes.\n      return;\n    }\n\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n  switch (tag) {\n    case 'input':\n      restoreControlledState(domElement, props);\n      return;\n\n    case 'textarea':\n      restoreControlledState$2(domElement, props);\n      return;\n\n    case 'select':\n      restoreControlledState$1(domElement, props);\n      return;\n  }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n  // This validation code was written based on the HTML5 parsing spec:\n  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n  //\n  // Note: this does not catch all invalid nesting, nor does it try to (as it's\n  // not clear what practical benefit doing so provides); instead, we warn only\n  // for cases where the parser will give a parse tree differing from what React\n  // intended. For example, <b><div></div></b> is invalid but we don't warn\n  // because it still parses correctly; we do warn for other cases like nested\n  // <p> tags where the beginning of the second element implicitly closes the\n  // first, causing a confusing mess.\n  // https://html.spec.whatwg.org/multipage/syntax.html#special\n  var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n  var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n  // TODO: Distinguish by namespace here -- for <title>, including it here\n  // errs on the side of fewer warnings\n  'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n  var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n  var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n  var emptyAncestorInfo = {\n    current: null,\n    formTag: null,\n    aTagInScope: null,\n    buttonTagInScope: null,\n    nobrTagInScope: null,\n    pTagInButtonScope: null,\n    listItemTagAutoclosing: null,\n    dlItemTagAutoclosing: null\n  };\n\n  updatedAncestorInfo = function (oldInfo, tag) {\n    var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);\n\n    var info = {\n      tag: tag\n    };\n\n    if (inScopeTags.indexOf(tag) !== -1) {\n      ancestorInfo.aTagInScope = null;\n      ancestorInfo.buttonTagInScope = null;\n      ancestorInfo.nobrTagInScope = null;\n    }\n\n    if (buttonScopeTags.indexOf(tag) !== -1) {\n      ancestorInfo.pTagInButtonScope = null;\n    } // See rules for 'li', 'dd', 'dt' start tags in\n    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n    if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n      ancestorInfo.listItemTagAutoclosing = null;\n      ancestorInfo.dlItemTagAutoclosing = null;\n    }\n\n    ancestorInfo.current = info;\n\n    if (tag === 'form') {\n      ancestorInfo.formTag = info;\n    }\n\n    if (tag === 'a') {\n      ancestorInfo.aTagInScope = info;\n    }\n\n    if (tag === 'button') {\n      ancestorInfo.buttonTagInScope = info;\n    }\n\n    if (tag === 'nobr') {\n      ancestorInfo.nobrTagInScope = info;\n    }\n\n    if (tag === 'p') {\n      ancestorInfo.pTagInButtonScope = info;\n    }\n\n    if (tag === 'li') {\n      ancestorInfo.listItemTagAutoclosing = info;\n    }\n\n    if (tag === 'dd' || tag === 'dt') {\n      ancestorInfo.dlItemTagAutoclosing = info;\n    }\n\n    return ancestorInfo;\n  };\n  /**\n   * Returns whether\n   */\n\n\n  var isTagValidWithParent = function (tag, parentTag) {\n    // First, let's check if we're in an unusual parsing mode...\n    switch (parentTag) {\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n      case 'select':\n        return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n      case 'optgroup':\n        return tag === 'option' || tag === '#text';\n      // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n      // but\n\n      case 'option':\n        return tag === '#text';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n      // No special behavior since these rules fall back to \"in body\" mode for\n      // all except special table nodes which cause bad parsing behavior anyway.\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n      case 'tr':\n        return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n      case 'tbody':\n      case 'thead':\n      case 'tfoot':\n        return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n      case 'colgroup':\n        return tag === 'col' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n      case 'table':\n        return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n      case 'head':\n        return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n      case 'html':\n        return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n      case 'frameset':\n        return tag === 'frame';\n\n      case '#document':\n        return tag === 'html';\n    } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n    // where the parsing rules cause implicit opens or closes to be added.\n    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n    switch (tag) {\n      case 'h1':\n      case 'h2':\n      case 'h3':\n      case 'h4':\n      case 'h5':\n      case 'h6':\n        return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n      case 'rp':\n      case 'rt':\n        return impliedEndTags.indexOf(parentTag) === -1;\n\n      case 'body':\n      case 'caption':\n      case 'col':\n      case 'colgroup':\n      case 'frameset':\n      case 'frame':\n      case 'head':\n      case 'html':\n      case 'tbody':\n      case 'td':\n      case 'tfoot':\n      case 'th':\n      case 'thead':\n      case 'tr':\n        // These tags are only valid with a few parents that have special child\n        // parsing rules -- if we're down here, then none of those matched and\n        // so we allow it only if we don't know what the parent is, as all other\n        // cases are invalid.\n        return parentTag == null;\n    }\n\n    return true;\n  };\n  /**\n   * Returns whether\n   */\n\n\n  var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n    switch (tag) {\n      case 'address':\n      case 'article':\n      case 'aside':\n      case 'blockquote':\n      case 'center':\n      case 'details':\n      case 'dialog':\n      case 'dir':\n      case 'div':\n      case 'dl':\n      case 'fieldset':\n      case 'figcaption':\n      case 'figure':\n      case 'footer':\n      case 'header':\n      case 'hgroup':\n      case 'main':\n      case 'menu':\n      case 'nav':\n      case 'ol':\n      case 'p':\n      case 'section':\n      case 'summary':\n      case 'ul':\n      case 'pre':\n      case 'listing':\n      case 'table':\n      case 'hr':\n      case 'xmp':\n      case 'h1':\n      case 'h2':\n      case 'h3':\n      case 'h4':\n      case 'h5':\n      case 'h6':\n        return ancestorInfo.pTagInButtonScope;\n\n      case 'form':\n        return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n      case 'li':\n        return ancestorInfo.listItemTagAutoclosing;\n\n      case 'dd':\n      case 'dt':\n        return ancestorInfo.dlItemTagAutoclosing;\n\n      case 'button':\n        return ancestorInfo.buttonTagInScope;\n\n      case 'a':\n        // Spec says something about storing a list of markers, but it sounds\n        // equivalent to this check.\n        return ancestorInfo.aTagInScope;\n\n      case 'nobr':\n        return ancestorInfo.nobrTagInScope;\n    }\n\n    return null;\n  };\n\n  var didWarn$1 = {};\n\n  validateDOMNesting = function (childTag, childText, ancestorInfo) {\n    ancestorInfo = ancestorInfo || emptyAncestorInfo;\n    var parentInfo = ancestorInfo.current;\n    var parentTag = parentInfo && parentInfo.tag;\n\n    if (childText != null) {\n      if (childTag != null) {\n        error('validateDOMNesting: when childText is passed, childTag should be null');\n      }\n\n      childTag = '#text';\n    }\n\n    var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n    var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n    var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n    if (!invalidParentOrAncestor) {\n      return;\n    }\n\n    var ancestorTag = invalidParentOrAncestor.tag;\n    var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n    if (didWarn$1[warnKey]) {\n      return;\n    }\n\n    didWarn$1[warnKey] = true;\n    var tagDisplayName = childTag;\n    var whitespaceInfo = '';\n\n    if (childTag === '#text') {\n      if (/\\S/.test(childText)) {\n        tagDisplayName = 'Text nodes';\n      } else {\n        tagDisplayName = 'Whitespace text nodes';\n        whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n      }\n    } else {\n      tagDisplayName = '<' + childTag + '>';\n    }\n\n    if (invalidParent) {\n      var info = '';\n\n      if (ancestorTag === 'table' && childTag === 'tr') {\n        info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n      }\n\n      error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n    } else {\n      error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n    }\n  };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\nfunction getRootHostContext(rootContainerInstance) {\n  var type;\n  var namespace;\n  var nodeType = rootContainerInstance.nodeType;\n\n  switch (nodeType) {\n    case DOCUMENT_NODE:\n    case DOCUMENT_FRAGMENT_NODE:\n      {\n        type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n        var root = rootContainerInstance.documentElement;\n        namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n        break;\n      }\n\n    default:\n      {\n        var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n        var ownNamespace = container.namespaceURI || null;\n        type = container.tagName;\n        namespace = getChildNamespace(ownNamespace, type);\n        break;\n      }\n  }\n\n  {\n    var validatedTag = type.toLowerCase();\n    var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n    return {\n      namespace: namespace,\n      ancestorInfo: ancestorInfo\n    };\n  }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n  {\n    var parentHostContextDev = parentHostContext;\n    var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n    var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n    return {\n      namespace: namespace,\n      ancestorInfo: ancestorInfo\n    };\n  }\n}\nfunction getPublicInstance(instance) {\n  return instance;\n}\nfunction prepareForCommit(containerInfo) {\n  eventsEnabled = isEnabled();\n  selectionInformation = getSelectionInformation();\n  var activeInstance = null;\n\n  setEnabled(false);\n  return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n  restoreSelection(selectionInformation);\n  setEnabled(eventsEnabled);\n  eventsEnabled = null;\n  selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n  var parentNamespace;\n\n  {\n    // TODO: take namespace into account when validating.\n    var hostContextDev = hostContext;\n    validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n    if (typeof props.children === 'string' || typeof props.children === 'number') {\n      var string = '' + props.children;\n      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n      validateDOMNesting(null, string, ownAncestorInfo);\n    }\n\n    parentNamespace = hostContextDev.namespace;\n  }\n\n  var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n  precacheFiberNode(internalInstanceHandle, domElement);\n  updateFiberProps(domElement, props);\n  return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n  parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n  setInitialProperties(domElement, type, props, rootContainerInstance);\n\n  switch (type) {\n    case 'button':\n    case 'input':\n    case 'select':\n    case 'textarea':\n      return !!props.autoFocus;\n\n    case 'img':\n      return true;\n\n    default:\n      return false;\n  }\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n  {\n    var hostContextDev = hostContext;\n\n    if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n      var string = '' + newProps.children;\n      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n      validateDOMNesting(null, string, ownAncestorInfo);\n    }\n  }\n\n  return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n  return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n  {\n    var hostContextDev = hostContext;\n    validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n  }\n\n  var textNode = createTextNode(text, rootContainerInstance);\n  precacheFiberNode(internalInstanceHandle, textNode);\n  return textNode;\n}\nfunction getCurrentEventPriority() {\n  var currentEvent = window.event;\n\n  if (currentEvent === undefined) {\n    return DefaultEventPriority;\n  }\n\n  return getEventPriority(currentEvent.type);\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n  return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n  setTimeout(function () {\n    throw error;\n  });\n} // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n  // Despite the naming that might imply otherwise, this method only\n  // fires if there is an `Update` effect scheduled during mounting.\n  // This happens if `finalizeInitialChildren` returns `true` (which it\n  // does to implement the `autoFocus` attribute on the client). But\n  // there are also other cases when this might happen (such as patching\n  // up text content during hydration mismatch). So we'll check this again.\n  switch (type) {\n    case 'button':\n    case 'input':\n    case 'select':\n    case 'textarea':\n      if (newProps.autoFocus) {\n        domElement.focus();\n      }\n\n      return;\n\n    case 'img':\n      {\n        if (newProps.src) {\n          domElement.src = newProps.src;\n        }\n\n        return;\n      }\n  }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n  // Apply the diff to the DOM node.\n  updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n  // with current event handlers.\n\n  updateFiberProps(domElement, newProps);\n}\nfunction resetTextContent(domElement) {\n  setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n  textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n  parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n  var parentNode;\n\n  if (container.nodeType === COMMENT_NODE) {\n    parentNode = container.parentNode;\n    parentNode.insertBefore(child, container);\n  } else {\n    parentNode = container;\n    parentNode.appendChild(child);\n  } // This container might be used for a portal.\n  // If something inside a portal is clicked, that click should bubble\n  // through the React tree. However, on Mobile Safari the click would\n  // never bubble through the *DOM* tree unless an ancestor with onclick\n  // event exists. So we wouldn't see it and dispatch it.\n  // This is why we ensure that non React root containers have inline onclick\n  // defined.\n  // https://github.com/facebook/react/issues/11918\n\n\n  var reactRootContainer = container._reactRootContainer;\n\n  if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n    // TODO: This cast may not be sound for SVG, MathML or custom elements.\n    trapClickOnNonInteractiveElement(parentNode);\n  }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n  parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n  if (container.nodeType === COMMENT_NODE) {\n    container.parentNode.insertBefore(child, beforeChild);\n  } else {\n    container.insertBefore(child, beforeChild);\n  }\n}\n\nfunction removeChild(parentInstance, child) {\n  parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n  if (container.nodeType === COMMENT_NODE) {\n    container.parentNode.removeChild(child);\n  } else {\n    container.removeChild(child);\n  }\n}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n  var node = suspenseInstance; // Delete all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  do {\n    var nextNode = node.nextSibling;\n    parentInstance.removeChild(node);\n\n    if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n      var data = nextNode.data;\n\n      if (data === SUSPENSE_END_DATA) {\n        if (depth === 0) {\n          parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n          retryIfBlockedOn(suspenseInstance);\n          return;\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n        depth++;\n      }\n    }\n\n    node = nextNode;\n  } while (node); // TODO: Warn, we didn't find the end comment boundary.\n  // Retry if any event replaying was blocked on this.\n\n\n  retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n  if (container.nodeType === COMMENT_NODE) {\n    clearSuspenseBoundary(container.parentNode, suspenseInstance);\n  } else if (container.nodeType === ELEMENT_NODE) {\n    clearSuspenseBoundary(container, suspenseInstance);\n  } // Retry if any event replaying was blocked on this.\n\n\n  retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n  // TODO: Does this work for all element types? What about MathML? Should we\n  // pass host context to this method?\n  instance = instance;\n  var style = instance.style;\n\n  if (typeof style.setProperty === 'function') {\n    style.setProperty('display', 'none', 'important');\n  } else {\n    style.display = 'none';\n  }\n}\nfunction hideTextInstance(textInstance) {\n  textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n  instance = instance;\n  var styleProp = props[STYLE$1];\n  var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n  instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n  textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n  if (container.nodeType === ELEMENT_NODE) {\n    container.textContent = '';\n  } else if (container.nodeType === DOCUMENT_NODE) {\n    var body = container.body;\n\n    if (body != null) {\n      body.textContent = '';\n    }\n  }\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n  if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n    return null;\n  } // This has now been refined to an element node.\n\n\n  return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n  if (text === '' || instance.nodeType !== TEXT_NODE) {\n    // Empty strings are not parsed by HTML so there won't be a correct match here.\n    return null;\n  } // This has now been refined to a text node.\n\n\n  return instance;\n}\nfunction canHydrateSuspenseInstance(instance) {\n  if (instance.nodeType !== COMMENT_NODE) {\n    // Empty strings are not parsed by HTML so there won't be a correct match here.\n    return null;\n  } // This has now been refined to a suspense node.\n\n\n  return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n  return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n  return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n  instance._reactRetry = callback;\n}\n\nfunction getNextHydratable(node) {\n  // Skip non-hydratable nodes.\n  for (; node != null; node = node.nextSibling) {\n    var nodeType = node.nodeType;\n\n    if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n      break;\n    }\n\n    if (nodeType === COMMENT_NODE) {\n      var nodeData = node.data;\n\n      if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n        break;\n      }\n\n      if (nodeData === SUSPENSE_END_DATA) {\n        return null;\n      }\n    }\n  }\n\n  return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n  return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n  return getNextHydratable(parentInstance.firstChild);\n}\nfunction getFirstHydratableChildWithinContainer(parentContainer) {\n  return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n  return getNextHydratable(parentInstance.nextSibling);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {\n  precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n  // get attached.\n\n  updateFiberProps(instance, props);\n  var parentNamespace;\n\n  {\n    var hostContextDev = hostContext;\n    parentNamespace = hostContextDev.namespace;\n  } // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n  // when the legacy root API is removed.\n\n\n  var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n  return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n  precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n  // when the legacy root API is removed.\n\n  var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n  return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n  precacheFiberNode(internalInstanceHandle, suspenseInstance);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n  var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  while (node) {\n    if (node.nodeType === COMMENT_NODE) {\n      var data = node.data;\n\n      if (data === SUSPENSE_END_DATA) {\n        if (depth === 0) {\n          return getNextHydratableSibling(node);\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n        depth++;\n      }\n    }\n\n    node = node.nextSibling;\n  } // TODO: Warn, we didn't find the end comment boundary.\n\n\n  return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n  var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  while (node) {\n    if (node.nodeType === COMMENT_NODE) {\n      var data = node.data;\n\n      if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n        if (depth === 0) {\n          return node;\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_END_DATA) {\n        depth++;\n      }\n    }\n\n    node = node.previousSibling;\n  }\n\n  return null;\n}\nfunction commitHydratedContainer(container) {\n  // Retry if any event replaying was blocked on this.\n  retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n  // Retry if any event replaying was blocked on this.\n  retryIfBlockedOn(suspenseInstance);\n}\nfunction shouldDeleteUnhydratedTailInstances(parentType) {\n  return parentType !== 'head' && parentType !== 'body';\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {\n  var shouldWarnDev = true;\n  checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {\n  if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n    var shouldWarnDev = true;\n    checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n  }\n}\nfunction didNotHydrateInstanceWithinContainer(parentContainer, instance) {\n  {\n    if (instance.nodeType === ELEMENT_NODE) {\n      warnForDeletedHydratableElement(parentContainer, instance);\n    } else if (instance.nodeType === COMMENT_NODE) ; else {\n      warnForDeletedHydratableText(parentContainer, instance);\n    }\n  }\n}\nfunction didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n\n    if (parentNode !== null) {\n      if (instance.nodeType === ELEMENT_NODE) {\n        warnForDeletedHydratableElement(parentNode, instance);\n      } else if (instance.nodeType === COMMENT_NODE) ; else {\n        warnForDeletedHydratableText(parentNode, instance);\n      }\n    }\n  }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      if (instance.nodeType === ELEMENT_NODE) {\n        warnForDeletedHydratableElement(parentInstance, instance);\n      } else if (instance.nodeType === COMMENT_NODE) ; else {\n        warnForDeletedHydratableText(parentInstance, instance);\n      }\n    }\n  }\n}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n  {\n    warnForInsertedHydratedElement(parentContainer, type);\n  }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n  {\n    warnForInsertedHydratedText(parentContainer, text);\n  }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n    if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n  }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n    if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n  }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      warnForInsertedHydratedElement(parentInstance, type);\n    }\n  }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      warnForInsertedHydratedText(parentInstance, text);\n    }\n  }\n}\nfunction errorHydratingContainer(parentContainer) {\n  {\n    // TODO: This gets logged by onRecoverableError, too, so we should be\n    // able to remove it.\n    error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n  }\n}\nfunction preparePortalMount(portalInstance) {\n  listenToAllSupportedEvents(portalInstance);\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nfunction detachDeletedInstance(node) {\n  // TODO: This function is only called on host components. I don't think all of\n  // these fields are relevant.\n  delete node[internalInstanceKey];\n  delete node[internalPropsKey];\n  delete node[internalEventHandlersKey];\n  delete node[internalEventHandlerListenersKey];\n  delete node[internalEventHandlesSetKey];\n}\nfunction precacheFiberNode(hostInst, node) {\n  node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n  node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n  node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n  return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n  var targetInst = targetNode[internalInstanceKey];\n\n  if (targetInst) {\n    // Don't return HostRoot or SuspenseComponent here.\n    return targetInst;\n  } // If the direct event target isn't a React owned DOM node, we need to look\n  // to see if one of its parents is a React owned DOM node.\n\n\n  var parentNode = targetNode.parentNode;\n\n  while (parentNode) {\n    // We'll check if this is a container root that could include\n    // React nodes in the future. We need to check this first because\n    // if we're a child of a dehydrated container, we need to first\n    // find that inner container before moving on to finding the parent\n    // instance. Note that we don't check this field on  the targetNode\n    // itself because the fibers are conceptually between the container\n    // node and the first child. It isn't surrounding the container node.\n    // If it's not a container, we check if it's an instance.\n    targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n    if (targetInst) {\n      // Since this wasn't the direct target of the event, we might have\n      // stepped past dehydrated DOM nodes to get here. However they could\n      // also have been non-React nodes. We need to answer which one.\n      // If we the instance doesn't have any children, then there can't be\n      // a nested suspense boundary within it. So we can use this as a fast\n      // bailout. Most of the time, when people add non-React children to\n      // the tree, it is using a ref to a child-less DOM node.\n      // Normally we'd only need to check one of the fibers because if it\n      // has ever gone from having children to deleting them or vice versa\n      // it would have deleted the dehydrated boundary nested inside already.\n      // However, since the HostRoot starts out with an alternate it might\n      // have one on the alternate so we need to check in case this was a\n      // root.\n      var alternate = targetInst.alternate;\n\n      if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n        // Next we need to figure out if the node that skipped past is\n        // nested within a dehydrated boundary and if so, which one.\n        var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n        while (suspenseInstance !== null) {\n          // We found a suspense instance. That means that we haven't\n          // hydrated it yet. Even though we leave the comments in the\n          // DOM after hydrating, and there are boundaries in the DOM\n          // that could already be hydrated, we wouldn't have found them\n          // through this pass since if the target is hydrated it would\n          // have had an internalInstanceKey on it.\n          // Let's get the fiber associated with the SuspenseComponent\n          // as the deepest instance.\n          var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n          if (targetSuspenseInst) {\n            return targetSuspenseInst;\n          } // If we don't find a Fiber on the comment, it might be because\n          // we haven't gotten to hydrate it yet. There might still be a\n          // parent boundary that hasn't above this one so we need to find\n          // the outer most that is known.\n\n\n          suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n          // host component also hasn't hydrated yet. We can return it\n          // below since it will bail out on the isMounted check later.\n        }\n      }\n\n      return targetInst;\n    }\n\n    targetNode = parentNode;\n    parentNode = targetNode.parentNode;\n  }\n\n  return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n  var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n  if (inst) {\n    if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n      return inst;\n    } else {\n      return null;\n    }\n  }\n\n  return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n  if (inst.tag === HostComponent || inst.tag === HostText) {\n    // In Fiber this, is just the state node right now. We assume it will be\n    // a host component or host text.\n    return inst.stateNode;\n  } // Without this first invariant, passing a non-DOM-component triggers the next\n  // invariant for a missing parent, which is super confusing.\n\n\n  throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n  return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n  node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n  var elementListenerSet = node[internalEventHandlersKey];\n\n  if (elementListenerSet === undefined) {\n    elementListenerSet = node[internalEventHandlersKey] = new Set();\n  }\n\n  return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n  fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n  return {\n    current: defaultValue\n  };\n}\n\nfunction pop(cursor, fiber) {\n  if (index < 0) {\n    {\n      error('Unexpected pop.');\n    }\n\n    return;\n  }\n\n  {\n    if (fiber !== fiberStack[index]) {\n      error('Unexpected Fiber popped.');\n    }\n  }\n\n  cursor.current = valueStack[index];\n  valueStack[index] = null;\n\n  {\n    fiberStack[index] = null;\n  }\n\n  index--;\n}\n\nfunction push(cursor, value, fiber) {\n  index++;\n  valueStack[index] = cursor.current;\n\n  {\n    fiberStack[index] = fiber;\n  }\n\n  cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n  warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n  Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n  {\n    if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n      // If the fiber is a context provider itself, when we read its context\n      // we may have already pushed its own child context on the stack. A context\n      // provider should not \"see\" its own child context. Therefore we read the\n      // previous (parent) context instead for a context provider.\n      return previousContext;\n    }\n\n    return contextStackCursor.current;\n  }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n  {\n    var instance = workInProgress.stateNode;\n    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n  }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n  {\n    var type = workInProgress.type;\n    var contextTypes = type.contextTypes;\n\n    if (!contextTypes) {\n      return emptyContextObject;\n    } // Avoid recreating masked context unless unmasked context has changed.\n    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n    // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n    var instance = workInProgress.stateNode;\n\n    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n      return instance.__reactInternalMemoizedMaskedChildContext;\n    }\n\n    var context = {};\n\n    for (var key in contextTypes) {\n      context[key] = unmaskedContext[key];\n    }\n\n    {\n      var name = getComponentNameFromFiber(workInProgress) || 'Unknown';\n      checkPropTypes(contextTypes, context, 'context', name);\n    } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n    // Context is created before the class component is instantiated so check for instance.\n\n\n    if (instance) {\n      cacheContext(workInProgress, unmaskedContext, context);\n    }\n\n    return context;\n  }\n}\n\nfunction hasContextChanged() {\n  {\n    return didPerformWorkStackCursor.current;\n  }\n}\n\nfunction isContextProvider(type) {\n  {\n    var childContextTypes = type.childContextTypes;\n    return childContextTypes !== null && childContextTypes !== undefined;\n  }\n}\n\nfunction popContext(fiber) {\n  {\n    pop(didPerformWorkStackCursor, fiber);\n    pop(contextStackCursor, fiber);\n  }\n}\n\nfunction popTopLevelContextObject(fiber) {\n  {\n    pop(didPerformWorkStackCursor, fiber);\n    pop(contextStackCursor, fiber);\n  }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n  {\n    if (contextStackCursor.current !== emptyContextObject) {\n      throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    push(contextStackCursor, context, fiber);\n    push(didPerformWorkStackCursor, didChange, fiber);\n  }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n  {\n    var instance = fiber.stateNode;\n    var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n    // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n    if (typeof instance.getChildContext !== 'function') {\n      {\n        var componentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n        if (!warnedAboutMissingGetChildContext[componentName]) {\n          warnedAboutMissingGetChildContext[componentName] = true;\n\n          error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n        }\n      }\n\n      return parentContext;\n    }\n\n    var childContext = instance.getChildContext();\n\n    for (var contextKey in childContext) {\n      if (!(contextKey in childContextTypes)) {\n        throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n      }\n    }\n\n    {\n      var name = getComponentNameFromFiber(fiber) || 'Unknown';\n      checkPropTypes(childContextTypes, childContext, 'child context', name);\n    }\n\n    return assign({}, parentContext, childContext);\n  }\n}\n\nfunction pushContextProvider(workInProgress) {\n  {\n    var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n    // If the instance does not exist yet, we will push null at first,\n    // and replace it on the stack later when invalidating the context.\n\n    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n    previousContext = contextStackCursor.current;\n    push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n    return true;\n  }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n  {\n    var instance = workInProgress.stateNode;\n\n    if (!instance) {\n      throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    if (didChange) {\n      // Merge parent and own context.\n      // Skip this if we're not updating due to sCU.\n      // This avoids unnecessarily recomputing memoized values.\n      var mergedContext = processChildContext(workInProgress, type, previousContext);\n      instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n      // It is important to unwind the context in the reverse order.\n\n      pop(didPerformWorkStackCursor, workInProgress);\n      pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n      push(contextStackCursor, mergedContext, workInProgress);\n      push(didPerformWorkStackCursor, didChange, workInProgress);\n    } else {\n      pop(didPerformWorkStackCursor, workInProgress);\n      push(didPerformWorkStackCursor, didChange, workInProgress);\n    }\n  }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n  {\n    // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n    // makes sense elsewhere\n    if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {\n      throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    var node = fiber;\n\n    do {\n      switch (node.tag) {\n        case HostRoot:\n          return node.stateNode.context;\n\n        case ClassComponent:\n          {\n            var Component = node.type;\n\n            if (isContextProvider(Component)) {\n              return node.stateNode.__reactInternalMemoizedMergedChildContext;\n            }\n\n            break;\n          }\n      }\n\n      node = node.return;\n    } while (node !== null);\n\n    throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\nvar syncQueue = null;\nvar includesLegacySyncCallbacks = false;\nvar isFlushingSyncQueue = false;\nfunction scheduleSyncCallback(callback) {\n  // Push this callback into an internal queue. We'll flush these either in\n  // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n  if (syncQueue === null) {\n    syncQueue = [callback];\n  } else {\n    // Push onto existing queue. Don't need to schedule a callback because\n    // we already scheduled one when we created the queue.\n    syncQueue.push(callback);\n  }\n}\nfunction scheduleLegacySyncCallback(callback) {\n  includesLegacySyncCallbacks = true;\n  scheduleSyncCallback(callback);\n}\nfunction flushSyncCallbacksOnlyInLegacyMode() {\n  // Only flushes the queue if there's a legacy sync callback scheduled.\n  // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So\n  // it might make more sense for the queue to be a list of roots instead of a\n  // list of generic callbacks. Then we can have two: one for legacy roots, one\n  // for concurrent roots. And this method would only flush the legacy ones.\n  if (includesLegacySyncCallbacks) {\n    flushSyncCallbacks();\n  }\n}\nfunction flushSyncCallbacks() {\n  if (!isFlushingSyncQueue && syncQueue !== null) {\n    // Prevent re-entrance.\n    isFlushingSyncQueue = true;\n    var i = 0;\n    var previousUpdatePriority = getCurrentUpdatePriority();\n\n    try {\n      var isSync = true;\n      var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this\n      // queue is in the render or commit phases.\n\n      setCurrentUpdatePriority(DiscreteEventPriority);\n\n      for (; i < queue.length; i++) {\n        var callback = queue[i];\n\n        do {\n          callback = callback(isSync);\n        } while (callback !== null);\n      }\n\n      syncQueue = null;\n      includesLegacySyncCallbacks = false;\n    } catch (error) {\n      // If something throws, leave the remaining callbacks on the queue.\n      if (syncQueue !== null) {\n        syncQueue = syncQueue.slice(i + 1);\n      } // Resume flushing in the next tick\n\n\n      scheduleCallback(ImmediatePriority, flushSyncCallbacks);\n      throw error;\n    } finally {\n      setCurrentUpdatePriority(previousUpdatePriority);\n      isFlushingSyncQueue = false;\n    }\n  }\n\n  return null;\n}\n\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = null;\nfunction requestCurrentTransition() {\n  return ReactCurrentBatchConfig$1.transition;\n}\n\nvar ReactStrictModeWarnings = {\n  recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n  flushPendingUnsafeLifecycleWarnings: function () {},\n  recordLegacyContextWarning: function (fiber, instance) {},\n  flushLegacyContextWarning: function () {},\n  discardPendingWarnings: function () {}\n};\n\n{\n  var findStrictRoot = function (fiber) {\n    var maybeStrictRoot = null;\n    var node = fiber;\n\n    while (node !== null) {\n      if (node.mode & StrictLegacyMode) {\n        maybeStrictRoot = node;\n      }\n\n      node = node.return;\n    }\n\n    return maybeStrictRoot;\n  };\n\n  var setToSortedString = function (set) {\n    var array = [];\n    set.forEach(function (value) {\n      array.push(value);\n    });\n    return array.sort().join(', ');\n  };\n\n  var pendingComponentWillMountWarnings = [];\n  var pendingUNSAFE_ComponentWillMountWarnings = [];\n  var pendingComponentWillReceivePropsWarnings = [];\n  var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n  var pendingComponentWillUpdateWarnings = [];\n  var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n  var didWarnAboutUnsafeLifecycles = new Set();\n\n  ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n    // Dedupe strategy: Warn once per component.\n    if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n      return;\n    }\n\n    if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n    instance.componentWillMount.__suppressDeprecationWarning !== true) {\n      pendingComponentWillMountWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n      pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n    }\n\n    if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n      pendingComponentWillReceivePropsWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n      pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n    }\n\n    if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n      pendingComponentWillUpdateWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n      pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n    }\n  };\n\n  ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n    // We do an initial pass to gather component names\n    var componentWillMountUniqueNames = new Set();\n\n    if (pendingComponentWillMountWarnings.length > 0) {\n      pendingComponentWillMountWarnings.forEach(function (fiber) {\n        componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillMountWarnings = [];\n    }\n\n    var UNSAFE_componentWillMountUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillMountWarnings = [];\n    }\n\n    var componentWillReceivePropsUniqueNames = new Set();\n\n    if (pendingComponentWillReceivePropsWarnings.length > 0) {\n      pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n        componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillReceivePropsWarnings = [];\n    }\n\n    var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n    }\n\n    var componentWillUpdateUniqueNames = new Set();\n\n    if (pendingComponentWillUpdateWarnings.length > 0) {\n      pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n        componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillUpdateWarnings = [];\n    }\n\n    var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillUpdateWarnings = [];\n    } // Finally, we flush all the warnings\n    // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n    if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n      var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n      error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n    }\n\n    if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n      var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n      error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n    }\n\n    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n      error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n    }\n\n    if (componentWillMountUniqueNames.size > 0) {\n      var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n      warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n    }\n\n    if (componentWillReceivePropsUniqueNames.size > 0) {\n      var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n      warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n    }\n\n    if (componentWillUpdateUniqueNames.size > 0) {\n      var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n      warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n    }\n  };\n\n  var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n  var didWarnAboutLegacyContext = new Set();\n\n  ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n    var strictRoot = findStrictRoot(fiber);\n\n    if (strictRoot === null) {\n      error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n      return;\n    } // Dedup strategy: Warn once per component.\n\n\n    if (didWarnAboutLegacyContext.has(fiber.type)) {\n      return;\n    }\n\n    var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n    if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n      if (warningsForRoot === undefined) {\n        warningsForRoot = [];\n        pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n      }\n\n      warningsForRoot.push(fiber);\n    }\n  };\n\n  ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n    pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n      if (fiberArray.length === 0) {\n        return;\n      }\n\n      var firstFiber = fiberArray[0];\n      var uniqueNames = new Set();\n      fiberArray.forEach(function (fiber) {\n        uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutLegacyContext.add(fiber.type);\n      });\n      var sortedNames = setToSortedString(uniqueNames);\n\n      try {\n        setCurrentFiber(firstFiber);\n\n        error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);\n      } finally {\n        resetCurrentFiber();\n      }\n    });\n  };\n\n  ReactStrictModeWarnings.discardPendingWarnings = function () {\n    pendingComponentWillMountWarnings = [];\n    pendingUNSAFE_ComponentWillMountWarnings = [];\n    pendingComponentWillReceivePropsWarnings = [];\n    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n    pendingComponentWillUpdateWarnings = [];\n    pendingUNSAFE_ComponentWillUpdateWarnings = [];\n    pendingLegacyContextWarning = new Map();\n  };\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n  if (Component && Component.defaultProps) {\n    // Resolve default props. Taken from ReactElement\n    var props = assign({}, baseProps);\n    var defaultProps = Component.defaultProps;\n\n    for (var propName in defaultProps) {\n      if (props[propName] === undefined) {\n        props[propName] = defaultProps[propName];\n      }\n    }\n\n    return props;\n  }\n\n  return baseProps;\n}\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n  // Use this to detect multiple renderers using the same context\n  rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastFullyObservedContext = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n  // This is called right before React yields execution, to ensure `readContext`\n  // cannot be called outside the render phase.\n  currentlyRenderingFiber = null;\n  lastContextDependency = null;\n  lastFullyObservedContext = null;\n\n  {\n    isDisallowedContextReadInDEV = false;\n  }\n}\nfunction enterDisallowedContextReadInDEV() {\n  {\n    isDisallowedContextReadInDEV = true;\n  }\n}\nfunction exitDisallowedContextReadInDEV() {\n  {\n    isDisallowedContextReadInDEV = false;\n  }\n}\nfunction pushProvider(providerFiber, context, nextValue) {\n  {\n    push(valueCursor, context._currentValue, providerFiber);\n    context._currentValue = nextValue;\n\n    {\n      if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n        error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n      }\n\n      context._currentRenderer = rendererSigil;\n    }\n  }\n}\nfunction popProvider(context, providerFiber) {\n  var currentValue = valueCursor.current;\n  pop(valueCursor, providerFiber);\n\n  {\n    {\n      context._currentValue = currentValue;\n    }\n  }\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n  // Update the child lanes of all the ancestors, including the alternates.\n  var node = parent;\n\n  while (node !== null) {\n    var alternate = node.alternate;\n\n    if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n      node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n      if (alternate !== null) {\n        alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n      }\n    } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n      alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n    }\n\n    if (node === propagationRoot) {\n      break;\n    }\n\n    node = node.return;\n  }\n\n  {\n    if (node !== propagationRoot) {\n      error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n  {\n    propagateContextChange_eager(workInProgress, context, renderLanes);\n  }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\n  var fiber = workInProgress.child;\n\n  if (fiber !== null) {\n    // Set the return pointer of the child to the work-in-progress fiber.\n    fiber.return = workInProgress;\n  }\n\n  while (fiber !== null) {\n    var nextFiber = void 0; // Visit this fiber.\n\n    var list = fiber.dependencies;\n\n    if (list !== null) {\n      nextFiber = fiber.child;\n      var dependency = list.firstContext;\n\n      while (dependency !== null) {\n        // Check if the context matches.\n        if (dependency.context === context) {\n          // Match! Schedule an update on this fiber.\n          if (fiber.tag === ClassComponent) {\n            // Schedule a force update on the work-in-progress.\n            var lane = pickArbitraryLane(renderLanes);\n            var update = createUpdate(NoTimestamp, lane);\n            update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n            // update to the current fiber, too, which means it will persist even if\n            // this render is thrown away. Since it's a race condition, not sure it's\n            // worth fixing.\n            // Inlined `enqueueUpdate` to remove interleaved update check\n\n            var updateQueue = fiber.updateQueue;\n\n            if (updateQueue === null) ; else {\n              var sharedQueue = updateQueue.shared;\n              var pending = sharedQueue.pending;\n\n              if (pending === null) {\n                // This is the first update. Create a circular list.\n                update.next = update;\n              } else {\n                update.next = pending.next;\n                pending.next = update;\n              }\n\n              sharedQueue.pending = update;\n            }\n          }\n\n          fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n          var alternate = fiber.alternate;\n\n          if (alternate !== null) {\n            alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n          }\n\n          scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n          list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n          // dependency list.\n\n          break;\n        }\n\n        dependency = dependency.next;\n      }\n    } else if (fiber.tag === ContextProvider) {\n      // Don't scan deeper if this is a matching provider\n      nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n    } else if (fiber.tag === DehydratedFragment) {\n      // If a dehydrated suspense boundary is in this subtree, we don't know\n      // if it will have any context consumers in it. The best we can do is\n      // mark it as having updates.\n      var parentSuspense = fiber.return;\n\n      if (parentSuspense === null) {\n        throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n      }\n\n      parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n      var _alternate = parentSuspense.alternate;\n\n      if (_alternate !== null) {\n        _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n      } // This is intentionally passing this fiber as the parent\n      // because we want to schedule this fiber as having work\n      // on its children. We'll use the childLanes on\n      // this fiber to indicate that a context has changed.\n\n\n      scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n      nextFiber = fiber.sibling;\n    } else {\n      // Traverse down.\n      nextFiber = fiber.child;\n    }\n\n    if (nextFiber !== null) {\n      // Set the return pointer of the child to the work-in-progress fiber.\n      nextFiber.return = fiber;\n    } else {\n      // No child. Traverse to next sibling.\n      nextFiber = fiber;\n\n      while (nextFiber !== null) {\n        if (nextFiber === workInProgress) {\n          // We're back to the root of this subtree. Exit.\n          nextFiber = null;\n          break;\n        }\n\n        var sibling = nextFiber.sibling;\n\n        if (sibling !== null) {\n          // Set the return pointer of the sibling to the work-in-progress fiber.\n          sibling.return = nextFiber.return;\n          nextFiber = sibling;\n          break;\n        } // No more siblings. Traverse up.\n\n\n        nextFiber = nextFiber.return;\n      }\n    }\n\n    fiber = nextFiber;\n  }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n  currentlyRenderingFiber = workInProgress;\n  lastContextDependency = null;\n  lastFullyObservedContext = null;\n  var dependencies = workInProgress.dependencies;\n\n  if (dependencies !== null) {\n    {\n      var firstContext = dependencies.firstContext;\n\n      if (firstContext !== null) {\n        if (includesSomeLane(dependencies.lanes, renderLanes)) {\n          // Context list has a pending update. Mark that this fiber performed work.\n          markWorkInProgressReceivedUpdate();\n        } // Reset the work-in-progress list\n\n\n        dependencies.firstContext = null;\n      }\n    }\n  }\n}\nfunction readContext(context) {\n  {\n    // This warning would fire if you read context inside a Hook like useMemo.\n    // Unlike the class check below, it's not enforced in production for perf.\n    if (isDisallowedContextReadInDEV) {\n      error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n    }\n  }\n\n  var value =  context._currentValue ;\n\n  if (lastFullyObservedContext === context) ; else {\n    var contextItem = {\n      context: context,\n      memoizedValue: value,\n      next: null\n    };\n\n    if (lastContextDependency === null) {\n      if (currentlyRenderingFiber === null) {\n        throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n      } // This is the first dependency for this component. Create a new list.\n\n\n      lastContextDependency = contextItem;\n      currentlyRenderingFiber.dependencies = {\n        lanes: NoLanes,\n        firstContext: contextItem\n      };\n    } else {\n      // Append a new context item.\n      lastContextDependency = lastContextDependency.next = contextItem;\n    }\n  }\n\n  return value;\n}\n\n// An array of all update queues that received updates during the current\n// render. When this render exits, either because it finishes or because it is\n// interrupted, the interleaved updates will be transferred onto the main part\n// of the queue.\nvar interleavedQueues = null;\nfunction pushInterleavedQueue(queue) {\n  if (interleavedQueues === null) {\n    interleavedQueues = [queue];\n  } else {\n    interleavedQueues.push(queue);\n  }\n}\nfunction hasInterleavedUpdates() {\n  return interleavedQueues !== null;\n}\nfunction enqueueInterleavedUpdates() {\n  // Transfer the interleaved updates onto the main queue. Each queue has a\n  // `pending` field and an `interleaved` field. When they are not null, they\n  // point to the last node in a circular linked list. We need to append the\n  // interleaved list to the end of the pending list by joining them into a\n  // single, circular list.\n  if (interleavedQueues !== null) {\n    for (var i = 0; i < interleavedQueues.length; i++) {\n      var queue = interleavedQueues[i];\n      var lastInterleavedUpdate = queue.interleaved;\n\n      if (lastInterleavedUpdate !== null) {\n        queue.interleaved = null;\n        var firstInterleavedUpdate = lastInterleavedUpdate.next;\n        var lastPendingUpdate = queue.pending;\n\n        if (lastPendingUpdate !== null) {\n          var firstPendingUpdate = lastPendingUpdate.next;\n          lastPendingUpdate.next = firstInterleavedUpdate;\n          lastInterleavedUpdate.next = firstPendingUpdate;\n        }\n\n        queue.pending = lastInterleavedUpdate;\n      }\n    }\n\n    interleavedQueues = null;\n  }\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n  didWarnUpdateInsideUpdate = false;\n  currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n  var queue = {\n    baseState: fiber.memoizedState,\n    firstBaseUpdate: null,\n    lastBaseUpdate: null,\n    shared: {\n      pending: null,\n      interleaved: null,\n      lanes: NoLanes\n    },\n    effects: null\n  };\n  fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n  // Clone the update queue from current. Unless it's already a clone.\n  var queue = workInProgress.updateQueue;\n  var currentQueue = current.updateQueue;\n\n  if (queue === currentQueue) {\n    var clone = {\n      baseState: currentQueue.baseState,\n      firstBaseUpdate: currentQueue.firstBaseUpdate,\n      lastBaseUpdate: currentQueue.lastBaseUpdate,\n      shared: currentQueue.shared,\n      effects: currentQueue.effects\n    };\n    workInProgress.updateQueue = clone;\n  }\n}\nfunction createUpdate(eventTime, lane) {\n  var update = {\n    eventTime: eventTime,\n    lane: lane,\n    tag: UpdateState,\n    payload: null,\n    callback: null,\n    next: null\n  };\n  return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n  var updateQueue = fiber.updateQueue;\n\n  if (updateQueue === null) {\n    // Only occurs if the fiber has been unmounted.\n    return;\n  }\n\n  var sharedQueue = updateQueue.shared;\n\n  if (isInterleavedUpdate(fiber)) {\n    var interleaved = sharedQueue.interleaved;\n\n    if (interleaved === null) {\n      // This is the first update. Create a circular list.\n      update.next = update; // At the end of the current render, this queue's interleaved updates will\n      // be transferred to the pending queue.\n\n      pushInterleavedQueue(sharedQueue);\n    } else {\n      update.next = interleaved.next;\n      interleaved.next = update;\n    }\n\n    sharedQueue.interleaved = update;\n  } else {\n    var pending = sharedQueue.pending;\n\n    if (pending === null) {\n      // This is the first update. Create a circular list.\n      update.next = update;\n    } else {\n      update.next = pending.next;\n      pending.next = update;\n    }\n\n    sharedQueue.pending = update;\n  }\n\n  {\n    if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n      error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n      didWarnUpdateInsideUpdate = true;\n    }\n  }\n}\nfunction entangleTransitions(root, fiber, lane) {\n  var updateQueue = fiber.updateQueue;\n\n  if (updateQueue === null) {\n    // Only occurs if the fiber has been unmounted.\n    return;\n  }\n\n  var sharedQueue = updateQueue.shared;\n\n  if (isTransitionLane(lane)) {\n    var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n    // have finished. We can remove them from the shared queue, which represents\n    // a superset of the actually pending lanes. In some cases we may entangle\n    // more than we need to, but that's OK. In fact it's worse if we *don't*\n    // entangle when we should.\n\n    queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n    var newQueueLanes = mergeLanes(queueLanes, lane);\n    sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n    // the lane finished since the last time we entangled it. So we need to\n    // entangle it again, just to be sure.\n\n    markRootEntangled(root, newQueueLanes);\n  }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n  // Captured updates are updates that are thrown by a child during the render\n  // phase. They should be discarded if the render is aborted. Therefore,\n  // we should only put them on the work-in-progress queue, not the current one.\n  var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n  var current = workInProgress.alternate;\n\n  if (current !== null) {\n    var currentQueue = current.updateQueue;\n\n    if (queue === currentQueue) {\n      // The work-in-progress queue is the same as current. This happens when\n      // we bail out on a parent fiber that then captures an error thrown by\n      // a child. Since we want to append the update only to the work-in\n      // -progress queue, we need to clone the updates. We usually clone during\n      // processUpdateQueue, but that didn't happen in this case because we\n      // skipped over the parent when we bailed out.\n      var newFirst = null;\n      var newLast = null;\n      var firstBaseUpdate = queue.firstBaseUpdate;\n\n      if (firstBaseUpdate !== null) {\n        // Loop through the updates and clone them.\n        var update = firstBaseUpdate;\n\n        do {\n          var clone = {\n            eventTime: update.eventTime,\n            lane: update.lane,\n            tag: update.tag,\n            payload: update.payload,\n            callback: update.callback,\n            next: null\n          };\n\n          if (newLast === null) {\n            newFirst = newLast = clone;\n          } else {\n            newLast.next = clone;\n            newLast = clone;\n          }\n\n          update = update.next;\n        } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n        if (newLast === null) {\n          newFirst = newLast = capturedUpdate;\n        } else {\n          newLast.next = capturedUpdate;\n          newLast = capturedUpdate;\n        }\n      } else {\n        // There are no base updates.\n        newFirst = newLast = capturedUpdate;\n      }\n\n      queue = {\n        baseState: currentQueue.baseState,\n        firstBaseUpdate: newFirst,\n        lastBaseUpdate: newLast,\n        shared: currentQueue.shared,\n        effects: currentQueue.effects\n      };\n      workInProgress.updateQueue = queue;\n      return;\n    }\n  } // Append the update to the end of the list.\n\n\n  var lastBaseUpdate = queue.lastBaseUpdate;\n\n  if (lastBaseUpdate === null) {\n    queue.firstBaseUpdate = capturedUpdate;\n  } else {\n    lastBaseUpdate.next = capturedUpdate;\n  }\n\n  queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n  switch (update.tag) {\n    case ReplaceState:\n      {\n        var payload = update.payload;\n\n        if (typeof payload === 'function') {\n          // Updater function\n          {\n            enterDisallowedContextReadInDEV();\n          }\n\n          var nextState = payload.call(instance, prevState, nextProps);\n\n          {\n            if ( workInProgress.mode & StrictLegacyMode) {\n              setIsStrictModeForDevtools(true);\n\n              try {\n                payload.call(instance, prevState, nextProps);\n              } finally {\n                setIsStrictModeForDevtools(false);\n              }\n            }\n\n            exitDisallowedContextReadInDEV();\n          }\n\n          return nextState;\n        } // State object\n\n\n        return payload;\n      }\n\n    case CaptureUpdate:\n      {\n        workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n      }\n    // Intentional fallthrough\n\n    case UpdateState:\n      {\n        var _payload = update.payload;\n        var partialState;\n\n        if (typeof _payload === 'function') {\n          // Updater function\n          {\n            enterDisallowedContextReadInDEV();\n          }\n\n          partialState = _payload.call(instance, prevState, nextProps);\n\n          {\n            if ( workInProgress.mode & StrictLegacyMode) {\n              setIsStrictModeForDevtools(true);\n\n              try {\n                _payload.call(instance, prevState, nextProps);\n              } finally {\n                setIsStrictModeForDevtools(false);\n              }\n            }\n\n            exitDisallowedContextReadInDEV();\n          }\n        } else {\n          // Partial state object\n          partialState = _payload;\n        }\n\n        if (partialState === null || partialState === undefined) {\n          // Null and undefined are treated as no-ops.\n          return prevState;\n        } // Merge the partial state and the previous state.\n\n\n        return assign({}, prevState, partialState);\n      }\n\n    case ForceUpdate:\n      {\n        hasForceUpdate = true;\n        return prevState;\n      }\n  }\n\n  return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n  // This is always non-null on a ClassComponent or HostRoot\n  var queue = workInProgress.updateQueue;\n  hasForceUpdate = false;\n\n  {\n    currentlyProcessingQueue = queue.shared;\n  }\n\n  var firstBaseUpdate = queue.firstBaseUpdate;\n  var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n  var pendingQueue = queue.shared.pending;\n\n  if (pendingQueue !== null) {\n    queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n    // and last so that it's non-circular.\n\n    var lastPendingUpdate = pendingQueue;\n    var firstPendingUpdate = lastPendingUpdate.next;\n    lastPendingUpdate.next = null; // Append pending updates to base queue\n\n    if (lastBaseUpdate === null) {\n      firstBaseUpdate = firstPendingUpdate;\n    } else {\n      lastBaseUpdate.next = firstPendingUpdate;\n    }\n\n    lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n    // we need to transfer the updates to that queue, too. Because the base\n    // queue is a singly-linked list with no cycles, we can append to both\n    // lists and take advantage of structural sharing.\n    // TODO: Pass `current` as argument\n\n    var current = workInProgress.alternate;\n\n    if (current !== null) {\n      // This is always non-null on a ClassComponent or HostRoot\n      var currentQueue = current.updateQueue;\n      var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n      if (currentLastBaseUpdate !== lastBaseUpdate) {\n        if (currentLastBaseUpdate === null) {\n          currentQueue.firstBaseUpdate = firstPendingUpdate;\n        } else {\n          currentLastBaseUpdate.next = firstPendingUpdate;\n        }\n\n        currentQueue.lastBaseUpdate = lastPendingUpdate;\n      }\n    }\n  } // These values may change as we process the queue.\n\n\n  if (firstBaseUpdate !== null) {\n    // Iterate through the list of updates to compute the result.\n    var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n    // from the original lanes.\n\n    var newLanes = NoLanes;\n    var newBaseState = null;\n    var newFirstBaseUpdate = null;\n    var newLastBaseUpdate = null;\n    var update = firstBaseUpdate;\n\n    do {\n      var updateLane = update.lane;\n      var updateEventTime = update.eventTime;\n\n      if (!isSubsetOfLanes(renderLanes, updateLane)) {\n        // Priority is insufficient. Skip this update. If this is the first\n        // skipped update, the previous update/state is the new base\n        // update/state.\n        var clone = {\n          eventTime: updateEventTime,\n          lane: updateLane,\n          tag: update.tag,\n          payload: update.payload,\n          callback: update.callback,\n          next: null\n        };\n\n        if (newLastBaseUpdate === null) {\n          newFirstBaseUpdate = newLastBaseUpdate = clone;\n          newBaseState = newState;\n        } else {\n          newLastBaseUpdate = newLastBaseUpdate.next = clone;\n        } // Update the remaining priority in the queue.\n\n\n        newLanes = mergeLanes(newLanes, updateLane);\n      } else {\n        // This update does have sufficient priority.\n        if (newLastBaseUpdate !== null) {\n          var _clone = {\n            eventTime: updateEventTime,\n            // This update is going to be committed so we never want uncommit\n            // it. Using NoLane works because 0 is a subset of all bitmasks, so\n            // this will never be skipped by the check above.\n            lane: NoLane,\n            tag: update.tag,\n            payload: update.payload,\n            callback: update.callback,\n            next: null\n          };\n          newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n        } // Process this update.\n\n\n        newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n        var callback = update.callback;\n\n        if (callback !== null && // If the update was already committed, we should not queue its\n        // callback again.\n        update.lane !== NoLane) {\n          workInProgress.flags |= Callback;\n          var effects = queue.effects;\n\n          if (effects === null) {\n            queue.effects = [update];\n          } else {\n            effects.push(update);\n          }\n        }\n      }\n\n      update = update.next;\n\n      if (update === null) {\n        pendingQueue = queue.shared.pending;\n\n        if (pendingQueue === null) {\n          break;\n        } else {\n          // An update was scheduled from inside a reducer. Add the new\n          // pending updates to the end of the list and keep processing.\n          var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n          // unravel them when transferring them to the base queue.\n\n          var _firstPendingUpdate = _lastPendingUpdate.next;\n          _lastPendingUpdate.next = null;\n          update = _firstPendingUpdate;\n          queue.lastBaseUpdate = _lastPendingUpdate;\n          queue.shared.pending = null;\n        }\n      }\n    } while (true);\n\n    if (newLastBaseUpdate === null) {\n      newBaseState = newState;\n    }\n\n    queue.baseState = newBaseState;\n    queue.firstBaseUpdate = newFirstBaseUpdate;\n    queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to\n    // process them during this render, but we do need to track which lanes\n    // are remaining.\n\n    var lastInterleaved = queue.shared.interleaved;\n\n    if (lastInterleaved !== null) {\n      var interleaved = lastInterleaved;\n\n      do {\n        newLanes = mergeLanes(newLanes, interleaved.lane);\n        interleaved = interleaved.next;\n      } while (interleaved !== lastInterleaved);\n    } else if (firstBaseUpdate === null) {\n      // `queue.lanes` is used for entangling transitions. We can set it back to\n      // zero once the queue is empty.\n      queue.shared.lanes = NoLanes;\n    } // Set the remaining expiration time to be whatever is remaining in the queue.\n    // This should be fine because the only two other things that contribute to\n    // expiration time are props and context. We're already in the middle of the\n    // begin phase by the time we start processing the queue, so we've already\n    // dealt with the props. Context in components that specify\n    // shouldComponentUpdate is tricky; but we'll have to account for\n    // that regardless.\n\n\n    markSkippedUpdateLanes(newLanes);\n    workInProgress.lanes = newLanes;\n    workInProgress.memoizedState = newState;\n  }\n\n  {\n    currentlyProcessingQueue = null;\n  }\n}\n\nfunction callCallback(callback, context) {\n  if (typeof callback !== 'function') {\n    throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n  }\n\n  callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n  hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n  return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n  // Commit the effects\n  var effects = finishedQueue.effects;\n  finishedQueue.effects = null;\n\n  if (effects !== null) {\n    for (var i = 0; i < effects.length; i++) {\n      var effect = effects[i];\n      var callback = effect.callback;\n\n      if (callback !== null) {\n        effect.callback = null;\n        callCallback(callback, instance);\n      }\n    }\n  }\n}\n\nvar fakeInternalInstance = {}; // React.Component uses a shared frozen object by default.\n// We'll use it to determine whether we need to initialize legacy refs.\n\nvar emptyRefsObject = new React.Component().refs;\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n  didWarnAboutStateAssignmentForComponent = new Set();\n  didWarnAboutUninitializedState = new Set();\n  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n  didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n  didWarnAboutDirectlyAssigningPropsToState = new Set();\n  didWarnAboutUndefinedDerivedState = new Set();\n  didWarnAboutContextTypeAndContextTypes = new Set();\n  didWarnAboutInvalidateContextType = new Set();\n  var didWarnOnInvalidCallback = new Set();\n\n  warnOnInvalidCallback = function (callback, callerName) {\n    if (callback === null || typeof callback === 'function') {\n      return;\n    }\n\n    var key = callerName + '_' + callback;\n\n    if (!didWarnOnInvalidCallback.has(key)) {\n      didWarnOnInvalidCallback.add(key);\n\n      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n    }\n  };\n\n  warnOnUndefinedDerivedState = function (type, partialState) {\n    if (partialState === undefined) {\n      var componentName = getComponentNameFromType(type) || 'Component';\n\n      if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n        didWarnAboutUndefinedDerivedState.add(componentName);\n\n        error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n      }\n    }\n  }; // This is so gross but it's at least non-critical and can be removed if\n  // it causes problems. This is meant to give a nicer error message for\n  // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n  // ...)) which otherwise throws a \"_processChildContext is not a function\"\n  // exception.\n\n\n  Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n    enumerable: false,\n    value: function () {\n      throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + \"unstable_renderSubtreeIntoContainer, which isn't supported. Try \" + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');\n    }\n  });\n  Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n  var prevState = workInProgress.memoizedState;\n  var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n  {\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        // Invoke the function an extra time to help detect side-effects.\n        partialState = getDerivedStateFromProps(nextProps, prevState);\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    warnOnUndefinedDerivedState(ctor, partialState);\n  } // Merge the partial state and the previous state.\n\n\n  var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n  workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n  // base state.\n\n  if (workInProgress.lanes === NoLanes) {\n    // Queue is always non-null for classes\n    var updateQueue = workInProgress.updateQueue;\n    updateQueue.baseState = memoizedState;\n  }\n}\n\nvar classComponentUpdater = {\n  isMounted: isMounted,\n  enqueueSetState: function (inst, payload, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.payload = payload;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'setState');\n      }\n\n      update.callback = callback;\n    }\n\n    enqueueUpdate(fiber, update);\n    var root = scheduleUpdateOnFiber(fiber, lane, eventTime);\n\n    if (root !== null) {\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markStateUpdateScheduled(fiber, lane);\n    }\n  },\n  enqueueReplaceState: function (inst, payload, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.tag = ReplaceState;\n    update.payload = payload;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'replaceState');\n      }\n\n      update.callback = callback;\n    }\n\n    enqueueUpdate(fiber, update);\n    var root = scheduleUpdateOnFiber(fiber, lane, eventTime);\n\n    if (root !== null) {\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markStateUpdateScheduled(fiber, lane);\n    }\n  },\n  enqueueForceUpdate: function (inst, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.tag = ForceUpdate;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'forceUpdate');\n      }\n\n      update.callback = callback;\n    }\n\n    enqueueUpdate(fiber, update);\n    var root = scheduleUpdateOnFiber(fiber, lane, eventTime);\n\n    if (root !== null) {\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markForceUpdateScheduled(fiber, lane);\n    }\n  }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n  var instance = workInProgress.stateNode;\n\n  if (typeof instance.shouldComponentUpdate === 'function') {\n    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n    {\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          // Invoke the function an extra time to help detect side-effects.\n          shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n\n      if (shouldUpdate === undefined) {\n        error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n      }\n    }\n\n    return shouldUpdate;\n  }\n\n  if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n    return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n  }\n\n  return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n  var instance = workInProgress.stateNode;\n\n  {\n    var name = getComponentNameFromType(ctor) || 'Component';\n    var renderPresent = instance.render;\n\n    if (!renderPresent) {\n      if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n        error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n      } else {\n        error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n      }\n    }\n\n    if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n      error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n    }\n\n    if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n    }\n\n    if (instance.propTypes) {\n      error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n    }\n\n    if (instance.contextType) {\n      error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n    }\n\n    {\n      if (instance.contextTypes) {\n        error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n      }\n\n      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n        didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n        error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n      }\n    }\n\n    if (typeof instance.componentShouldUpdate === 'function') {\n      error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n    }\n\n    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n      error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n    }\n\n    if (typeof instance.componentDidUnmount === 'function') {\n      error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n    }\n\n    if (typeof instance.componentDidReceiveProps === 'function') {\n      error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n    }\n\n    if (typeof instance.componentWillRecieveProps === 'function') {\n      error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n    }\n\n    if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n      error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n    }\n\n    var hasMutatedProps = instance.props !== newProps;\n\n    if (instance.props !== undefined && hasMutatedProps) {\n      error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n    }\n\n    if (instance.defaultProps) {\n      error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n      error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n    }\n\n    if (typeof instance.getDerivedStateFromProps === 'function') {\n      error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n    }\n\n    if (typeof instance.getDerivedStateFromError === 'function') {\n      error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n    }\n\n    if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n      error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n    }\n\n    var _state = instance.state;\n\n    if (_state && (typeof _state !== 'object' || isArray(_state))) {\n      error('%s.state: must be set to an object or null', name);\n    }\n\n    if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n      error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n    }\n  }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n  instance.updater = classComponentUpdater;\n  workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n  set(instance, workInProgress);\n\n  {\n    instance._reactInternalInstance = fakeInternalInstance;\n  }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n  var isLegacyContextConsumer = false;\n  var unmaskedContext = emptyContextObject;\n  var context = emptyContextObject;\n  var contextType = ctor.contextType;\n\n  {\n    if ('contextType' in ctor) {\n      var isValid = // Allow null for conditional declaration\n      contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n      if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n        didWarnAboutInvalidateContextType.add(ctor);\n        var addendum = '';\n\n        if (contextType === undefined) {\n          addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n        } else if (typeof contextType !== 'object') {\n          addendum = ' However, it is set to a ' + typeof contextType + '.';\n        } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n          addendum = ' Did you accidentally pass the Context.Provider instead?';\n        } else if (contextType._context !== undefined) {\n          // <Context.Consumer>\n          addendum = ' Did you accidentally pass the Context.Consumer instead?';\n        } else {\n          addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n        }\n\n        error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n      }\n    }\n  }\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    context = readContext(contextType);\n  } else {\n    unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    var contextTypes = ctor.contextTypes;\n    isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n    context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n  }\n\n  var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n  {\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        instance = new ctor(props, context); // eslint-disable-line no-new\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n  }\n\n  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n  adoptClassInstance(workInProgress, instance);\n\n  {\n    if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n      var componentName = getComponentNameFromType(ctor) || 'Component';\n\n      if (!didWarnAboutUninitializedState.has(componentName)) {\n        didWarnAboutUninitializedState.add(componentName);\n\n        error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n      }\n    } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n    // Warn about these lifecycles if they are present.\n    // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n    if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n      var foundWillMountName = null;\n      var foundWillReceivePropsName = null;\n      var foundWillUpdateName = null;\n\n      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n        foundWillMountName = 'componentWillMount';\n      } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n        foundWillMountName = 'UNSAFE_componentWillMount';\n      }\n\n      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n        foundWillReceivePropsName = 'componentWillReceiveProps';\n      } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n        foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n      }\n\n      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n        foundWillUpdateName = 'componentWillUpdate';\n      } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n        foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n      }\n\n      if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n        var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n        var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n        if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n          didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n          error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n  \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n  \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n  \" + foundWillUpdateName : '');\n        }\n      }\n    }\n  } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n  // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n  if (isLegacyContextConsumer) {\n    cacheContext(workInProgress, unmaskedContext, context);\n  }\n\n  return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n  var oldState = instance.state;\n\n  if (typeof instance.componentWillMount === 'function') {\n    instance.componentWillMount();\n  }\n\n  if (typeof instance.UNSAFE_componentWillMount === 'function') {\n    instance.UNSAFE_componentWillMount();\n  }\n\n  if (oldState !== instance.state) {\n    {\n      error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');\n    }\n\n    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n  }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n  var oldState = instance.state;\n\n  if (typeof instance.componentWillReceiveProps === 'function') {\n    instance.componentWillReceiveProps(newProps, nextContext);\n  }\n\n  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n  }\n\n  if (instance.state !== oldState) {\n    {\n      var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\n\n      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n        didWarnAboutStateAssignmentForComponent.add(componentName);\n\n        error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n      }\n    }\n\n    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n  }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n  {\n    checkClassInstance(workInProgress, ctor, newProps);\n  }\n\n  var instance = workInProgress.stateNode;\n  instance.props = newProps;\n  instance.state = workInProgress.memoizedState;\n  instance.refs = emptyRefsObject;\n  initializeUpdateQueue(workInProgress);\n  var contextType = ctor.contextType;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    instance.context = readContext(contextType);\n  } else {\n    var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    instance.context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  {\n    if (instance.state === newProps) {\n      var componentName = getComponentNameFromType(ctor) || 'Component';\n\n      if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n        didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n        error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n      }\n    }\n\n    if (workInProgress.mode & StrictLegacyMode) {\n      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n    }\n\n    {\n      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n    }\n  }\n\n  instance.state = workInProgress.memoizedState;\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    instance.state = workInProgress.memoizedState;\n  } // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n    callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n    // process them now.\n\n    processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n    instance.state = workInProgress.memoizedState;\n  }\n\n  if (typeof instance.componentDidMount === 'function') {\n    var fiberFlags = Update;\n\n    {\n      fiberFlags |= LayoutStatic;\n    }\n\n    if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n      fiberFlags |= MountLayoutDev;\n    }\n\n    workInProgress.flags |= fiberFlags;\n  }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n  var instance = workInProgress.stateNode;\n  var oldProps = workInProgress.memoizedProps;\n  instance.props = oldProps;\n  var oldContext = instance.context;\n  var contextType = ctor.contextType;\n  var nextContext = emptyContextObject;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    nextContext = readContext(contextType);\n  } else {\n    var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n  }\n\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n  // ever the previously attempted to render - not the \"current\". However,\n  // during componentDidUpdate we pass the \"current\" props.\n  // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n    if (oldProps !== newProps || oldContext !== nextContext) {\n      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n    }\n  }\n\n  resetHasForceUpdateBeforeProcessing();\n  var oldState = workInProgress.memoizedState;\n  var newState = instance.state = oldState;\n  processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n  newState = workInProgress.memoizedState;\n\n  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidMount === 'function') {\n      var fiberFlags = Update;\n\n      {\n        fiberFlags |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        fiberFlags |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= fiberFlags;\n    }\n\n    return false;\n  }\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    newState = workInProgress.memoizedState;\n  }\n\n  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n  if (shouldUpdate) {\n    // In order to support react-lifecycles-compat polyfilled components,\n    // Unsafe lifecycles should not be invoked for components using the new APIs.\n    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n      if (typeof instance.componentWillMount === 'function') {\n        instance.componentWillMount();\n      }\n\n      if (typeof instance.UNSAFE_componentWillMount === 'function') {\n        instance.UNSAFE_componentWillMount();\n      }\n    }\n\n    if (typeof instance.componentDidMount === 'function') {\n      var _fiberFlags = Update;\n\n      {\n        _fiberFlags |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        _fiberFlags |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= _fiberFlags;\n    }\n  } else {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidMount === 'function') {\n      var _fiberFlags2 = Update;\n\n      {\n        _fiberFlags2 |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        _fiberFlags2 |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= _fiberFlags2;\n    } // If shouldComponentUpdate returned false, we should still update the\n    // memoized state to indicate that this work can be reused.\n\n\n    workInProgress.memoizedProps = newProps;\n    workInProgress.memoizedState = newState;\n  } // Update the existing instance's state, props, and context pointers even\n  // if shouldComponentUpdate returns false.\n\n\n  instance.props = newProps;\n  instance.state = newState;\n  instance.context = nextContext;\n  return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n  var instance = workInProgress.stateNode;\n  cloneUpdateQueue(current, workInProgress);\n  var unresolvedOldProps = workInProgress.memoizedProps;\n  var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n  instance.props = oldProps;\n  var unresolvedNewProps = workInProgress.pendingProps;\n  var oldContext = instance.context;\n  var contextType = ctor.contextType;\n  var nextContext = emptyContextObject;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    nextContext = readContext(contextType);\n  } else {\n    var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n  }\n\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n  // ever the previously attempted to render - not the \"current\". However,\n  // during componentDidUpdate we pass the \"current\" props.\n  // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n    if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n    }\n  }\n\n  resetHasForceUpdateBeforeProcessing();\n  var oldState = workInProgress.memoizedState;\n  var newState = instance.state = oldState;\n  processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n  newState = workInProgress.memoizedState;\n\n  if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation   )) {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Update;\n      }\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Snapshot;\n      }\n    }\n\n    return false;\n  }\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    newState = workInProgress.memoizedState;\n  }\n\n  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,\n  // both before and after `shouldComponentUpdate` has been called. Not ideal,\n  // but I'm loath to refactor this function. This only happens for memoized\n  // components so it's not that common.\n  enableLazyContextPropagation   ;\n\n  if (shouldUpdate) {\n    // In order to support react-lifecycles-compat polyfilled components,\n    // Unsafe lifecycles should not be invoked for components using the new APIs.\n    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n      if (typeof instance.componentWillUpdate === 'function') {\n        instance.componentWillUpdate(newProps, newState, nextContext);\n      }\n\n      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n      }\n    }\n\n    if (typeof instance.componentDidUpdate === 'function') {\n      workInProgress.flags |= Update;\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      workInProgress.flags |= Snapshot;\n    }\n  } else {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Update;\n      }\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Snapshot;\n      }\n    } // If shouldComponentUpdate returned false, we should still update the\n    // memoized props/state to indicate that this work can be reused.\n\n\n    workInProgress.memoizedProps = newProps;\n    workInProgress.memoizedState = newState;\n  } // Update the existing instance's state, props, and context pointers even\n  // if shouldComponentUpdate returns false.\n\n\n  instance.props = newProps;\n  instance.state = newState;\n  instance.context = nextContext;\n  return shouldUpdate;\n}\n\n// TODO: Use the unified fiber stack module instead of this local one?\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n  warnIfNotHydrating();\n  return (workInProgress.flags & Forked) !== NoFlags;\n}\nfunction getForksAtLevel(workInProgress) {\n  warnIfNotHydrating();\n  return treeForkCount;\n}\nfunction getTreeId() {\n  var overflow = treeContextOverflow;\n  var idWithLeadingBit = treeContextId;\n  var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n  return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n  // This is called right after we reconcile an array (or iterator) of child\n  // fibers, because that's the only place where we know how many children in\n  // the whole set without doing extra work later, or storing addtional\n  // information on the fiber.\n  //\n  // That's why this function is separate from pushTreeId \u2014 it's called during\n  // the render phase of the fork parent, not the child, which is where we push\n  // the other context values.\n  //\n  // In the Fizz implementation this is much simpler because the child is\n  // rendered in the same callstack as the parent.\n  //\n  // It might be better to just add a `forks` field to the Fiber type. It would\n  // make this module simpler.\n  warnIfNotHydrating();\n  forkStack[forkStackIndex++] = treeForkCount;\n  forkStack[forkStackIndex++] = treeForkProvider;\n  treeForkProvider = workInProgress;\n  treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n  warnIfNotHydrating();\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextProvider = workInProgress;\n  var baseIdWithLeadingBit = treeContextId;\n  var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n  // of the id; we use it to account for leading 0s.\n\n  var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n  var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n  var slot = index + 1;\n  var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n  // consideration the leading 1 we use to mark the end of the sequence.\n\n  if (length > 30) {\n    // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n    // This branch assumes the length of the base id is greater than 5; it won't\n    // work for smaller ids, because you need 5 bits per character.\n    //\n    // We encode the id in multiple steps: first the base id, then the\n    // remaining digits.\n    //\n    // Each 5 bit sequence corresponds to a single base 32 character. So for\n    // example, if the current id is 23 bits long, we can convert 20 of those\n    // bits into a string of 4 characters, with 3 bits left over.\n    //\n    // First calculate how many bits in the base id represent a complete\n    // sequence of characters.\n    var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n    var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n    var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n    var restOfBaseId = baseId >> numberOfOverflowBits;\n    var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n    // we made more room, this time it won't overflow.\n\n    var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n    var restOfNewBits = slot << restOfBaseLength;\n    var id = restOfNewBits | restOfBaseId;\n    var overflow = newOverflow + baseOverflow;\n    treeContextId = 1 << restOfLength | id;\n    treeContextOverflow = overflow;\n  } else {\n    // Normal path\n    var newBits = slot << baseLength;\n\n    var _id = newBits | baseId;\n\n    var _overflow = baseOverflow;\n    treeContextId = 1 << length | _id;\n    treeContextOverflow = _overflow;\n  }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n  warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n  // in its children.\n\n  var returnFiber = workInProgress.return;\n\n  if (returnFiber !== null) {\n    var numberOfForks = 1;\n    var slotIndex = 0;\n    pushTreeFork(workInProgress, numberOfForks);\n    pushTreeId(workInProgress, numberOfForks, slotIndex);\n  }\n}\n\nfunction getBitLength(number) {\n  return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n  return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n  // Restore the previous values.\n  // This is a bit more complicated than other context-like modules in Fiber\n  // because the same Fiber may appear on the stack multiple times and for\n  // different reasons. We have to keep popping until the work-in-progress is\n  // no longer at the top of the stack.\n  while (workInProgress === treeForkProvider) {\n    treeForkProvider = forkStack[--forkStackIndex];\n    forkStack[forkStackIndex] = null;\n    treeForkCount = forkStack[--forkStackIndex];\n    forkStack[forkStackIndex] = null;\n  }\n\n  while (workInProgress === treeContextProvider) {\n    treeContextProvider = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n    treeContextOverflow = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n    treeContextId = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n  }\n}\nfunction getSuspendedTreeContext() {\n  warnIfNotHydrating();\n\n  if (treeContextProvider !== null) {\n    return {\n      id: treeContextId,\n      overflow: treeContextOverflow\n    };\n  } else {\n    return null;\n  }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n  warnIfNotHydrating();\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextId = suspendedContext.id;\n  treeContextOverflow = suspendedContext.overflow;\n  treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n  {\n    if (!getIsHydrating()) {\n      error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n    }\n  }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\n\nfunction warnIfHydrating() {\n  {\n    if (isHydrating) {\n      error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n    }\n  }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n  {\n    didSuspendOrErrorDEV = true;\n  }\n}\n\nfunction enterHydrationState(fiber) {\n\n  var parentInstance = fiber.stateNode.containerInfo;\n  nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n  hydrationParentFiber = fiber;\n  isHydrating = true;\n  hydrationErrors = null;\n  didSuspendOrErrorDEV = false;\n  return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n  nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n  hydrationParentFiber = fiber;\n  isHydrating = true;\n  hydrationErrors = null;\n  didSuspendOrErrorDEV = false;\n\n  if (treeContext !== null) {\n    restoreSuspendedTreeContext(fiber, treeContext);\n  }\n\n  return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n  {\n    switch (returnFiber.tag) {\n      case HostRoot:\n        {\n          didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n          break;\n        }\n\n      case HostComponent:\n        {\n          var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n          didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n          isConcurrentMode);\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          var suspenseState = returnFiber.memoizedState;\n          if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n          break;\n        }\n    }\n  }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n  warnUnhydratedInstance(returnFiber, instance);\n  var childToDelete = createFiberFromHostInstanceForDeletion();\n  childToDelete.stateNode = instance;\n  childToDelete.return = returnFiber;\n  var deletions = returnFiber.deletions;\n\n  if (deletions === null) {\n    returnFiber.deletions = [childToDelete];\n    returnFiber.flags |= ChildDeletion;\n  } else {\n    deletions.push(childToDelete);\n  }\n}\n\nfunction warnNonhydratedInstance(returnFiber, fiber) {\n  {\n    if (didSuspendOrErrorDEV) {\n      // Inside a boundary that already suspended. We're currently rendering the\n      // siblings of a suspended node. The mismatch may be due to the missing\n      // data, so it's probably a false positive.\n      return;\n    }\n\n    switch (returnFiber.tag) {\n      case HostRoot:\n        {\n          var parentContainer = returnFiber.stateNode.containerInfo;\n\n          switch (fiber.tag) {\n            case HostComponent:\n              var type = fiber.type;\n              var props = fiber.pendingProps;\n              didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n              break;\n\n            case HostText:\n              var text = fiber.pendingProps;\n              didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n              break;\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          var parentType = returnFiber.type;\n          var parentProps = returnFiber.memoizedProps;\n          var parentInstance = returnFiber.stateNode;\n\n          switch (fiber.tag) {\n            case HostComponent:\n              {\n                var _type = fiber.type;\n                var _props = fiber.pendingProps;\n                var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n                didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n                isConcurrentMode);\n                break;\n              }\n\n            case HostText:\n              {\n                var _text = fiber.pendingProps;\n\n                var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n                didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n                _isConcurrentMode);\n                break;\n              }\n          }\n\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          var suspenseState = returnFiber.memoizedState;\n          var _parentInstance = suspenseState.dehydrated;\n          if (_parentInstance !== null) switch (fiber.tag) {\n            case HostComponent:\n              var _type2 = fiber.type;\n              var _props2 = fiber.pendingProps;\n              didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n              break;\n\n            case HostText:\n              var _text2 = fiber.pendingProps;\n              didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n              break;\n          }\n          break;\n        }\n\n      default:\n        return;\n    }\n  }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n  fiber.flags = fiber.flags & ~Hydrating | Placement;\n  warnNonhydratedInstance(returnFiber, fiber);\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n  switch (fiber.tag) {\n    case HostComponent:\n      {\n        var type = fiber.type;\n        var props = fiber.pendingProps;\n        var instance = canHydrateInstance(nextInstance, type);\n\n        if (instance !== null) {\n          fiber.stateNode = instance;\n          hydrationParentFiber = fiber;\n          nextHydratableInstance = getFirstHydratableChild(instance);\n          return true;\n        }\n\n        return false;\n      }\n\n    case HostText:\n      {\n        var text = fiber.pendingProps;\n        var textInstance = canHydrateTextInstance(nextInstance, text);\n\n        if (textInstance !== null) {\n          fiber.stateNode = textInstance;\n          hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n          nextHydratableInstance = null;\n          return true;\n        }\n\n        return false;\n      }\n\n    case SuspenseComponent:\n      {\n        var suspenseInstance = canHydrateSuspenseInstance(nextInstance);\n\n        if (suspenseInstance !== null) {\n          var suspenseState = {\n            dehydrated: suspenseInstance,\n            treeContext: getSuspendedTreeContext(),\n            retryLane: OffscreenLane\n          };\n          fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n          // This simplifies the code for getHostSibling and deleting nodes,\n          // since it doesn't have to consider all Suspense boundaries and\n          // check if they're dehydrated ones or not.\n\n          var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n          dehydratedFragment.return = fiber;\n          fiber.child = dehydratedFragment;\n          hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n          // it during the first pass. Instead, we'll reenter it later.\n\n          nextHydratableInstance = null;\n          return true;\n        }\n\n        return false;\n      }\n\n    default:\n      return false;\n  }\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n  return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n  throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n  if (!isHydrating) {\n    return;\n  }\n\n  var nextInstance = nextHydratableInstance;\n\n  if (!nextInstance) {\n    if (shouldClientRenderOnMismatch(fiber)) {\n      warnNonhydratedInstance(hydrationParentFiber, fiber);\n      throwOnHydrationMismatch();\n    } // Nothing to hydrate. Make it an insertion.\n\n\n    insertNonHydratedInstance(hydrationParentFiber, fiber);\n    isHydrating = false;\n    hydrationParentFiber = fiber;\n    return;\n  }\n\n  var firstAttemptedInstance = nextInstance;\n\n  if (!tryHydrate(fiber, nextInstance)) {\n    if (shouldClientRenderOnMismatch(fiber)) {\n      warnNonhydratedInstance(hydrationParentFiber, fiber);\n      throwOnHydrationMismatch();\n    } // If we can't hydrate this instance let's try the next one.\n    // We use this as a heuristic. It's based on intuition and not data so it\n    // might be flawed or unnecessary.\n\n\n    nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n    var prevHydrationParentFiber = hydrationParentFiber;\n\n    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n      // Nothing to hydrate. Make it an insertion.\n      insertNonHydratedInstance(hydrationParentFiber, fiber);\n      isHydrating = false;\n      hydrationParentFiber = fiber;\n      return;\n    } // We matched the next one, we'll now assume that the first one was\n    // superfluous and we'll delete it. Since we can't eagerly delete it\n    // we'll have to schedule a deletion. To do that, this node needs a dummy\n    // fiber associated with it.\n\n\n    deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n  }\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n  var instance = fiber.stateNode;\n  var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.\n\n  fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n  // is a new ref we mark this as an update.\n\n  if (updatePayload !== null) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n  var textInstance = fiber.stateNode;\n  var textContent = fiber.memoizedProps;\n  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n  if (shouldUpdate) {\n    // We assume that prepareToHydrateHostTextInstance is called in a context where the\n    // hydration parent is the parent host component of this host text.\n    var returnFiber = hydrationParentFiber;\n\n    if (returnFiber !== null) {\n      switch (returnFiber.tag) {\n        case HostRoot:\n          {\n            var parentContainer = returnFiber.stateNode.containerInfo;\n            var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n            didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n            isConcurrentMode);\n            break;\n          }\n\n        case HostComponent:\n          {\n            var parentType = returnFiber.type;\n            var parentProps = returnFiber.memoizedProps;\n            var parentInstance = returnFiber.stateNode;\n\n            var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n            didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n            _isConcurrentMode2);\n            break;\n          }\n      }\n    }\n  }\n\n  return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n  var suspenseState = fiber.memoizedState;\n  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n  if (!suspenseInstance) {\n    throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n  var suspenseState = fiber.memoizedState;\n  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n  if (!suspenseInstance) {\n    throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n  var parent = fiber.return;\n\n  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n    parent = parent.return;\n  }\n\n  hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n  if (fiber !== hydrationParentFiber) {\n    // We're deeper than the current hydration context, inside an inserted\n    // tree.\n    return false;\n  }\n\n  if (!isHydrating) {\n    // If we're not currently hydrating but we're in a hydration context, then\n    // we were an insertion and now need to pop up reenter hydration of our\n    // siblings.\n    popToNextHostParent(fiber);\n    isHydrating = true;\n    return false;\n  } // If we have any remaining hydratable nodes, we need to delete them now.\n  // We only do this deeper than head and body since they tend to have random\n  // other nodes in them. We also ignore components with pure text content in\n  // side of them. We also don't delete anything inside the root container.\n\n\n  if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {\n    var nextInstance = nextHydratableInstance;\n\n    if (nextInstance) {\n      if (shouldClientRenderOnMismatch(fiber)) {\n        warnIfUnhydratedTailNodes(fiber);\n        throwOnHydrationMismatch();\n      } else {\n        while (nextInstance) {\n          deleteHydratableInstance(fiber, nextInstance);\n          nextInstance = getNextHydratableSibling(nextInstance);\n        }\n      }\n    }\n  }\n\n  popToNextHostParent(fiber);\n\n  if (fiber.tag === SuspenseComponent) {\n    nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n  } else {\n    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n  }\n\n  return true;\n}\n\nfunction hasUnhydratedTailNodes() {\n  return isHydrating && nextHydratableInstance !== null;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n  var nextInstance = nextHydratableInstance;\n\n  while (nextInstance) {\n    warnUnhydratedInstance(fiber, nextInstance);\n    nextInstance = getNextHydratableSibling(nextInstance);\n  }\n}\n\nfunction resetHydrationState() {\n\n  hydrationParentFiber = null;\n  nextHydratableInstance = null;\n  isHydrating = false;\n  didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n  if (hydrationErrors !== null) {\n    // Successfully completed a forced client render. The errors that occurred\n    // during the hydration attempt are now recovered. We will log them in\n    // commit phase, once the entire tree has finished.\n    queueRecoverableErrors(hydrationErrors);\n    hydrationErrors = null;\n  }\n}\n\nfunction getIsHydrating() {\n  return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n  if (hydrationErrors === null) {\n    hydrationErrors = [error];\n  } else {\n    hydrationErrors.push(error);\n  }\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n  didWarnAboutMaps = false;\n  didWarnAboutGenerators = false;\n  didWarnAboutStringRefs = {};\n  /**\n   * Warn if there's no key explicitly set on dynamic arrays of children or\n   * object keys are not valid. This allows us to keep track of children between\n   * updates.\n   */\n\n  ownerHasKeyUseWarning = {};\n  ownerHasFunctionTypeWarning = {};\n\n  warnForMissingKey = function (child, returnFiber) {\n    if (child === null || typeof child !== 'object') {\n      return;\n    }\n\n    if (!child._store || child._store.validated || child.key != null) {\n      return;\n    }\n\n    if (typeof child._store !== 'object') {\n      throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    child._store.validated = true;\n    var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n    if (ownerHasKeyUseWarning[componentName]) {\n      return;\n    }\n\n    ownerHasKeyUseWarning[componentName] = true;\n\n    error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n  };\n}\n\nfunction coerceRef(returnFiber, current, element) {\n  var mixedRef = element.ref;\n\n  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n    {\n      // TODO: Clean this up once we turn on the string ref warning for\n      // everyone, because the strict mode case will no longer be relevant\n      if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n      // because these cannot be automatically converted to an arrow function\n      // using a codemod. Therefore, we don't have to warn about string refs again.\n      !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n        var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n        if (!didWarnAboutStringRefs[componentName]) {\n          {\n            error('A string ref, \"%s\", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);\n          }\n\n          didWarnAboutStringRefs[componentName] = true;\n        }\n      }\n    }\n\n    if (element._owner) {\n      var owner = element._owner;\n      var inst;\n\n      if (owner) {\n        var ownerFiber = owner;\n\n        if (ownerFiber.tag !== ClassComponent) {\n          throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n        }\n\n        inst = ownerFiber.stateNode;\n      }\n\n      if (!inst) {\n        throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n      } // Assigning this to a const so Flow knows it won't change in the closure\n\n\n      var resolvedInst = inst;\n\n      {\n        checkPropStringCoercion(mixedRef, 'ref');\n      }\n\n      var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n      if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n        return current.ref;\n      }\n\n      var ref = function (value) {\n        var refs = resolvedInst.refs;\n\n        if (refs === emptyRefsObject) {\n          // This is a lazy pooled frozen object, so we need to initialize.\n          refs = resolvedInst.refs = {};\n        }\n\n        if (value === null) {\n          delete refs[stringRef];\n        } else {\n          refs[stringRef] = value;\n        }\n      };\n\n      ref._stringRef = stringRef;\n      return ref;\n    } else {\n      if (typeof mixedRef !== 'string') {\n        throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n      }\n\n      if (!element._owner) {\n        throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n      }\n    }\n  }\n\n  return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n  var childString = Object.prototype.toString.call(newChild);\n  throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber) {\n  {\n    var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n    if (ownerHasFunctionTypeWarning[componentName]) {\n      return;\n    }\n\n    ownerHasFunctionTypeWarning[componentName] = true;\n\n    error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n  }\n}\n\nfunction resolveLazy(lazyType) {\n  var payload = lazyType._payload;\n  var init = lazyType._init;\n  return init(payload);\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n  function deleteChild(returnFiber, childToDelete) {\n    if (!shouldTrackSideEffects) {\n      // Noop.\n      return;\n    }\n\n    var deletions = returnFiber.deletions;\n\n    if (deletions === null) {\n      returnFiber.deletions = [childToDelete];\n      returnFiber.flags |= ChildDeletion;\n    } else {\n      deletions.push(childToDelete);\n    }\n  }\n\n  function deleteRemainingChildren(returnFiber, currentFirstChild) {\n    if (!shouldTrackSideEffects) {\n      // Noop.\n      return null;\n    } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n    // assuming that after the first child we've already added everything.\n\n\n    var childToDelete = currentFirstChild;\n\n    while (childToDelete !== null) {\n      deleteChild(returnFiber, childToDelete);\n      childToDelete = childToDelete.sibling;\n    }\n\n    return null;\n  }\n\n  function mapRemainingChildren(returnFiber, currentFirstChild) {\n    // Add the remaining children to a temporary map so that we can find them by\n    // keys quickly. Implicit (null) keys get added to this set with their index\n    // instead.\n    var existingChildren = new Map();\n    var existingChild = currentFirstChild;\n\n    while (existingChild !== null) {\n      if (existingChild.key !== null) {\n        existingChildren.set(existingChild.key, existingChild);\n      } else {\n        existingChildren.set(existingChild.index, existingChild);\n      }\n\n      existingChild = existingChild.sibling;\n    }\n\n    return existingChildren;\n  }\n\n  function useFiber(fiber, pendingProps) {\n    // We currently set sibling to null and index to 0 here because it is easy\n    // to forget to do before returning it. E.g. for the single child case.\n    var clone = createWorkInProgress(fiber, pendingProps);\n    clone.index = 0;\n    clone.sibling = null;\n    return clone;\n  }\n\n  function placeChild(newFiber, lastPlacedIndex, newIndex) {\n    newFiber.index = newIndex;\n\n    if (!shouldTrackSideEffects) {\n      // During hydration, the useId algorithm needs to know which fibers are\n      // part of a list of children (arrays, iterators).\n      newFiber.flags |= Forked;\n      return lastPlacedIndex;\n    }\n\n    var current = newFiber.alternate;\n\n    if (current !== null) {\n      var oldIndex = current.index;\n\n      if (oldIndex < lastPlacedIndex) {\n        // This is a move.\n        newFiber.flags |= Placement;\n        return lastPlacedIndex;\n      } else {\n        // This item can stay in place.\n        return oldIndex;\n      }\n    } else {\n      // This is an insertion.\n      newFiber.flags |= Placement;\n      return lastPlacedIndex;\n    }\n  }\n\n  function placeSingleChild(newFiber) {\n    // This is simpler for the single child case. We only need to do a\n    // placement for inserting new children.\n    if (shouldTrackSideEffects && newFiber.alternate === null) {\n      newFiber.flags |= Placement;\n    }\n\n    return newFiber;\n  }\n\n  function updateTextNode(returnFiber, current, textContent, lanes) {\n    if (current === null || current.tag !== HostText) {\n      // Insert\n      var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, textContent);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function updateElement(returnFiber, current, element, lanes) {\n    var elementType = element.type;\n\n    if (elementType === REACT_FRAGMENT_TYPE) {\n      return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n    }\n\n    if (current !== null) {\n      if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n       isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n      // We need to do this after the Hot Reloading check above,\n      // because hot reloading has different semantics than prod because\n      // it doesn't resuspend. So we can't let the call below suspend.\n      typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\n        // Move based on index\n        var existing = useFiber(current, element.props);\n        existing.ref = coerceRef(returnFiber, current, element);\n        existing.return = returnFiber;\n\n        {\n          existing._debugSource = element._source;\n          existing._debugOwner = element._owner;\n        }\n\n        return existing;\n      }\n    } // Insert\n\n\n    var created = createFiberFromElement(element, returnFiber.mode, lanes);\n    created.ref = coerceRef(returnFiber, current, element);\n    created.return = returnFiber;\n    return created;\n  }\n\n  function updatePortal(returnFiber, current, portal, lanes) {\n    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n      // Insert\n      var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, portal.children || []);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function updateFragment(returnFiber, current, fragment, lanes, key) {\n    if (current === null || current.tag !== Fragment) {\n      // Insert\n      var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, fragment);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function createChild(returnFiber, newChild, lanes) {\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys. If the previous node is implicitly keyed\n      // we can continue to replace it without aborting even if it is not a text\n      // node.\n      var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n            _created.ref = coerceRef(returnFiber, null, newChild);\n            _created.return = returnFiber;\n            return _created;\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n            _created2.return = returnFiber;\n            return _created2;\n          }\n\n        case REACT_LAZY_TYPE:\n          {\n            var payload = newChild._payload;\n            var init = newChild._init;\n            return createChild(returnFiber, init(payload), lanes);\n          }\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n        _created3.return = returnFiber;\n        return _created3;\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n\n  function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n    // Update the fiber if the keys match, otherwise return null.\n    var key = oldFiber !== null ? oldFiber.key : null;\n\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys. If the previous node is implicitly keyed\n      // we can continue to replace it without aborting even if it is not a text\n      // node.\n      if (key !== null) {\n        return null;\n      }\n\n      return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            if (newChild.key === key) {\n              return updateElement(returnFiber, oldFiber, newChild, lanes);\n            } else {\n              return null;\n            }\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            if (newChild.key === key) {\n              return updatePortal(returnFiber, oldFiber, newChild, lanes);\n            } else {\n              return null;\n            }\n          }\n\n        case REACT_LAZY_TYPE:\n          {\n            var payload = newChild._payload;\n            var init = newChild._init;\n            return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n          }\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        if (key !== null) {\n          return null;\n        }\n\n        return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n\n  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys, so we neither have to check the old nor\n      // new node for the key. If both are text nodes, they match.\n      var matchedFiber = existingChildren.get(newIdx) || null;\n      return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n            return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n            return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n          }\n\n        case REACT_LAZY_TYPE:\n          var payload = newChild._payload;\n          var init = newChild._init;\n          return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n        return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n  /**\n   * Warns if there is a duplicate or missing key\n   */\n\n\n  function warnOnInvalidKey(child, knownKeys, returnFiber) {\n    {\n      if (typeof child !== 'object' || child === null) {\n        return knownKeys;\n      }\n\n      switch (child.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n        case REACT_PORTAL_TYPE:\n          warnForMissingKey(child, returnFiber);\n          var key = child.key;\n\n          if (typeof key !== 'string') {\n            break;\n          }\n\n          if (knownKeys === null) {\n            knownKeys = new Set();\n            knownKeys.add(key);\n            break;\n          }\n\n          if (!knownKeys.has(key)) {\n            knownKeys.add(key);\n            break;\n          }\n\n          error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted \u2014 the behavior is unsupported and ' + 'could change in a future version.', key);\n\n          break;\n\n        case REACT_LAZY_TYPE:\n          var payload = child._payload;\n          var init = child._init;\n          warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n          break;\n      }\n    }\n\n    return knownKeys;\n  }\n\n  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n    // This algorithm can't optimize by searching from both ends since we\n    // don't have backpointers on fibers. I'm trying to see how far we can get\n    // with that model. If it ends up not being worth the tradeoffs, we can\n    // add it later.\n    // Even with a two ended optimization, we'd want to optimize for the case\n    // where there are few changes and brute force the comparison instead of\n    // going for the Map. It'd like to explore hitting that path first in\n    // forward-only mode and only go for the Map once we notice that we need\n    // lots of look ahead. This doesn't handle reversal as well as two ended\n    // search but that's unusual. Besides, for the two ended optimization to\n    // work on Iterables, we'd need to copy the whole set.\n    // In this first iteration, we'll just live with hitting the bad case\n    // (adding everything to a Map) in for every insert/move.\n    // If you change this code, also update reconcileChildrenIterator() which\n    // uses the same algorithm.\n    {\n      // First, validate keys.\n      var knownKeys = null;\n\n      for (var i = 0; i < newChildren.length; i++) {\n        var child = newChildren[i];\n        knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n      }\n    }\n\n    var resultingFirstChild = null;\n    var previousNewFiber = null;\n    var oldFiber = currentFirstChild;\n    var lastPlacedIndex = 0;\n    var newIdx = 0;\n    var nextOldFiber = null;\n\n    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n      if (oldFiber.index > newIdx) {\n        nextOldFiber = oldFiber;\n        oldFiber = null;\n      } else {\n        nextOldFiber = oldFiber.sibling;\n      }\n\n      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n      if (newFiber === null) {\n        // TODO: This breaks on empty slots like null children. That's\n        // unfortunate because it triggers the slow path all the time. We need\n        // a better way to communicate whether this was a miss or null,\n        // boolean, undefined, etc.\n        if (oldFiber === null) {\n          oldFiber = nextOldFiber;\n        }\n\n        break;\n      }\n\n      if (shouldTrackSideEffects) {\n        if (oldFiber && newFiber.alternate === null) {\n          // We matched the slot, but we didn't reuse the existing fiber, so we\n          // need to delete the existing child.\n          deleteChild(returnFiber, oldFiber);\n        }\n      }\n\n      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n      if (previousNewFiber === null) {\n        // TODO: Move out of the loop. This only happens for the first run.\n        resultingFirstChild = newFiber;\n      } else {\n        // TODO: Defer siblings if we're not at the right index for this slot.\n        // I.e. if we had null values before, then we want to defer this\n        // for each null value. However, we also don't want to call updateSlot\n        // with the previous one.\n        previousNewFiber.sibling = newFiber;\n      }\n\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n\n    if (newIdx === newChildren.length) {\n      // We've reached the end of the new children. We can delete the rest.\n      deleteRemainingChildren(returnFiber, oldFiber);\n\n      if (getIsHydrating()) {\n        var numberOfForks = newIdx;\n        pushTreeFork(returnFiber, numberOfForks);\n      }\n\n      return resultingFirstChild;\n    }\n\n    if (oldFiber === null) {\n      // If we don't have any more existing children we can choose a fast path\n      // since the rest will all be insertions.\n      for (; newIdx < newChildren.length; newIdx++) {\n        var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n        if (_newFiber === null) {\n          continue;\n        }\n\n        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          // TODO: Move out of the loop. This only happens for the first run.\n          resultingFirstChild = _newFiber;\n        } else {\n          previousNewFiber.sibling = _newFiber;\n        }\n\n        previousNewFiber = _newFiber;\n      }\n\n      if (getIsHydrating()) {\n        var _numberOfForks = newIdx;\n        pushTreeFork(returnFiber, _numberOfForks);\n      }\n\n      return resultingFirstChild;\n    } // Add all children to a key map for quick lookups.\n\n\n    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n    for (; newIdx < newChildren.length; newIdx++) {\n      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n      if (_newFiber2 !== null) {\n        if (shouldTrackSideEffects) {\n          if (_newFiber2.alternate !== null) {\n            // The new fiber is a work in progress, but if there exists a\n            // current, that means that we reused the fiber. We need to delete\n            // it from the child list so that we don't add it to the deletion\n            // list.\n            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n          }\n        }\n\n        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          resultingFirstChild = _newFiber2;\n        } else {\n          previousNewFiber.sibling = _newFiber2;\n        }\n\n        previousNewFiber = _newFiber2;\n      }\n    }\n\n    if (shouldTrackSideEffects) {\n      // Any existing children that weren't consumed above were deleted. We need\n      // to add them to the deletion list.\n      existingChildren.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    }\n\n    if (getIsHydrating()) {\n      var _numberOfForks2 = newIdx;\n      pushTreeFork(returnFiber, _numberOfForks2);\n    }\n\n    return resultingFirstChild;\n  }\n\n  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n    // This is the same implementation as reconcileChildrenArray(),\n    // but using the iterator instead.\n    var iteratorFn = getIteratorFn(newChildrenIterable);\n\n    if (typeof iteratorFn !== 'function') {\n      throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\n    }\n\n    {\n      // We don't support rendering Generators because it's a mutation.\n      // See https://github.com/facebook/react/issues/12995\n      if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n      newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n        if (!didWarnAboutGenerators) {\n          error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n        }\n\n        didWarnAboutGenerators = true;\n      } // Warn about using Maps as children\n\n\n      if (newChildrenIterable.entries === iteratorFn) {\n        if (!didWarnAboutMaps) {\n          error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n        }\n\n        didWarnAboutMaps = true;\n      } // First, validate keys.\n      // We'll get a different iterator later for the main pass.\n\n\n      var _newChildren = iteratorFn.call(newChildrenIterable);\n\n      if (_newChildren) {\n        var knownKeys = null;\n\n        var _step = _newChildren.next();\n\n        for (; !_step.done; _step = _newChildren.next()) {\n          var child = _step.value;\n          knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n        }\n      }\n    }\n\n    var newChildren = iteratorFn.call(newChildrenIterable);\n\n    if (newChildren == null) {\n      throw new Error('An iterable object provided no iterator.');\n    }\n\n    var resultingFirstChild = null;\n    var previousNewFiber = null;\n    var oldFiber = currentFirstChild;\n    var lastPlacedIndex = 0;\n    var newIdx = 0;\n    var nextOldFiber = null;\n    var step = newChildren.next();\n\n    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n      if (oldFiber.index > newIdx) {\n        nextOldFiber = oldFiber;\n        oldFiber = null;\n      } else {\n        nextOldFiber = oldFiber.sibling;\n      }\n\n      var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n      if (newFiber === null) {\n        // TODO: This breaks on empty slots like null children. That's\n        // unfortunate because it triggers the slow path all the time. We need\n        // a better way to communicate whether this was a miss or null,\n        // boolean, undefined, etc.\n        if (oldFiber === null) {\n          oldFiber = nextOldFiber;\n        }\n\n        break;\n      }\n\n      if (shouldTrackSideEffects) {\n        if (oldFiber && newFiber.alternate === null) {\n          // We matched the slot, but we didn't reuse the existing fiber, so we\n          // need to delete the existing child.\n          deleteChild(returnFiber, oldFiber);\n        }\n      }\n\n      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n      if (previousNewFiber === null) {\n        // TODO: Move out of the loop. This only happens for the first run.\n        resultingFirstChild = newFiber;\n      } else {\n        // TODO: Defer siblings if we're not at the right index for this slot.\n        // I.e. if we had null values before, then we want to defer this\n        // for each null value. However, we also don't want to call updateSlot\n        // with the previous one.\n        previousNewFiber.sibling = newFiber;\n      }\n\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n\n    if (step.done) {\n      // We've reached the end of the new children. We can delete the rest.\n      deleteRemainingChildren(returnFiber, oldFiber);\n\n      if (getIsHydrating()) {\n        var numberOfForks = newIdx;\n        pushTreeFork(returnFiber, numberOfForks);\n      }\n\n      return resultingFirstChild;\n    }\n\n    if (oldFiber === null) {\n      // If we don't have any more existing children we can choose a fast path\n      // since the rest will all be insertions.\n      for (; !step.done; newIdx++, step = newChildren.next()) {\n        var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n        if (_newFiber3 === null) {\n          continue;\n        }\n\n        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          // TODO: Move out of the loop. This only happens for the first run.\n          resultingFirstChild = _newFiber3;\n        } else {\n          previousNewFiber.sibling = _newFiber3;\n        }\n\n        previousNewFiber = _newFiber3;\n      }\n\n      if (getIsHydrating()) {\n        var _numberOfForks3 = newIdx;\n        pushTreeFork(returnFiber, _numberOfForks3);\n      }\n\n      return resultingFirstChild;\n    } // Add all children to a key map for quick lookups.\n\n\n    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n    for (; !step.done; newIdx++, step = newChildren.next()) {\n      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n      if (_newFiber4 !== null) {\n        if (shouldTrackSideEffects) {\n          if (_newFiber4.alternate !== null) {\n            // The new fiber is a work in progress, but if there exists a\n            // current, that means that we reused the fiber. We need to delete\n            // it from the child list so that we don't add it to the deletion\n            // list.\n            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n          }\n        }\n\n        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          resultingFirstChild = _newFiber4;\n        } else {\n          previousNewFiber.sibling = _newFiber4;\n        }\n\n        previousNewFiber = _newFiber4;\n      }\n    }\n\n    if (shouldTrackSideEffects) {\n      // Any existing children that weren't consumed above were deleted. We need\n      // to add them to the deletion list.\n      existingChildren.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    }\n\n    if (getIsHydrating()) {\n      var _numberOfForks4 = newIdx;\n      pushTreeFork(returnFiber, _numberOfForks4);\n    }\n\n    return resultingFirstChild;\n  }\n\n  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n    // There's no need to check for keys on text nodes since we don't have a\n    // way to define them.\n    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n      // We already have an existing node so let's just update it and delete\n      // the rest.\n      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n      var existing = useFiber(currentFirstChild, textContent);\n      existing.return = returnFiber;\n      return existing;\n    } // The existing first child is not a text node so we need to create one\n    // and delete the existing ones.\n\n\n    deleteRemainingChildren(returnFiber, currentFirstChild);\n    var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n    created.return = returnFiber;\n    return created;\n  }\n\n  function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n    var key = element.key;\n    var child = currentFirstChild;\n\n    while (child !== null) {\n      // TODO: If key === null and child.key === null, then this only applies to\n      // the first item in the list.\n      if (child.key === key) {\n        var elementType = element.type;\n\n        if (elementType === REACT_FRAGMENT_TYPE) {\n          if (child.tag === Fragment) {\n            deleteRemainingChildren(returnFiber, child.sibling);\n            var existing = useFiber(child, element.props.children);\n            existing.return = returnFiber;\n\n            {\n              existing._debugSource = element._source;\n              existing._debugOwner = element._owner;\n            }\n\n            return existing;\n          }\n        } else {\n          if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n           isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n          // We need to do this after the Hot Reloading check above,\n          // because hot reloading has different semantics than prod because\n          // it doesn't resuspend. So we can't let the call below suspend.\n          typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n            deleteRemainingChildren(returnFiber, child.sibling);\n\n            var _existing = useFiber(child, element.props);\n\n            _existing.ref = coerceRef(returnFiber, child, element);\n            _existing.return = returnFiber;\n\n            {\n              _existing._debugSource = element._source;\n              _existing._debugOwner = element._owner;\n            }\n\n            return _existing;\n          }\n        } // Didn't match.\n\n\n        deleteRemainingChildren(returnFiber, child);\n        break;\n      } else {\n        deleteChild(returnFiber, child);\n      }\n\n      child = child.sibling;\n    }\n\n    if (element.type === REACT_FRAGMENT_TYPE) {\n      var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n      created.return = returnFiber;\n      return created;\n    } else {\n      var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n      _created4.return = returnFiber;\n      return _created4;\n    }\n  }\n\n  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n    var key = portal.key;\n    var child = currentFirstChild;\n\n    while (child !== null) {\n      // TODO: If key === null and child.key === null, then this only applies to\n      // the first item in the list.\n      if (child.key === key) {\n        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n          deleteRemainingChildren(returnFiber, child.sibling);\n          var existing = useFiber(child, portal.children || []);\n          existing.return = returnFiber;\n          return existing;\n        } else {\n          deleteRemainingChildren(returnFiber, child);\n          break;\n        }\n      } else {\n        deleteChild(returnFiber, child);\n      }\n\n      child = child.sibling;\n    }\n\n    var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n    created.return = returnFiber;\n    return created;\n  } // This API will tag the children with the side-effect of the reconciliation\n  // itself. They will be added to the side-effect list as we pass through the\n  // children and the parent.\n\n\n  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n    // This function is not recursive.\n    // If the top level item is an array, we treat it as a set of children,\n    // not as a fragment. Nested arrays on the other hand will be treated as\n    // fragment nodes. Recursion happens at the normal flow.\n    // Handle top level unkeyed fragments as if they were arrays.\n    // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n    // We treat the ambiguous cases above the same.\n    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n    if (isUnkeyedTopLevelFragment) {\n      newChild = newChild.props.children;\n    } // Handle object types\n\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n        case REACT_PORTAL_TYPE:\n          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n        case REACT_LAZY_TYPE:\n          var payload = newChild._payload;\n          var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n          return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n      }\n\n      if (isArray(newChild)) {\n        return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n      }\n\n      if (getIteratorFn(newChild)) {\n        return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    } // Remaining cases are all treated as empty.\n\n\n    return deleteRemainingChildren(returnFiber, currentFirstChild);\n  }\n\n  return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n  if (current !== null && workInProgress.child !== current.child) {\n    throw new Error('Resuming work not yet implemented.');\n  }\n\n  if (workInProgress.child === null) {\n    return;\n  }\n\n  var currentChild = workInProgress.child;\n  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n  workInProgress.child = newChild;\n  newChild.return = workInProgress;\n\n  while (currentChild.sibling !== null) {\n    currentChild = currentChild.sibling;\n    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n    newChild.return = workInProgress;\n  }\n\n  newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n  var child = workInProgress.child;\n\n  while (child !== null) {\n    resetWorkInProgress(child, lanes);\n    child = child.sibling;\n  }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n  if (c === NO_CONTEXT) {\n    throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n  }\n\n  return c;\n}\n\nfunction getRootHostContainer() {\n  var rootInstance = requiredContext(rootInstanceStackCursor.current);\n  return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n  // Push current root instance onto the stack;\n  // This allows us to reset root when portals are popped.\n  push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n  // This enables us to pop only Fibers that provide unique contexts.\n\n  push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n  // However, we can't just call getRootHostContext() and push it because\n  // we'd have a different number of entries on the stack depending on\n  // whether getRootHostContext() throws somewhere in renderer code or not.\n  // So we push an empty value first. This lets us safely unwind on errors.\n\n  push(contextStackCursor$1, NO_CONTEXT, fiber);\n  var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n  pop(contextStackCursor$1, fiber);\n  push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n  pop(contextStackCursor$1, fiber);\n  pop(contextFiberStackCursor, fiber);\n  pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n  var context = requiredContext(contextStackCursor$1.current);\n  return context;\n}\n\nfunction pushHostContext(fiber) {\n  var rootInstance = requiredContext(rootInstanceStackCursor.current);\n  var context = requiredContext(contextStackCursor$1.current);\n  var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n  if (context === nextContext) {\n    return;\n  } // Track the context and the Fiber that provided it.\n  // This enables us to pop only Fibers that provide unique contexts.\n\n\n  push(contextFiberStackCursor, fiber, fiber);\n  push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n  // Do not pop unless this Fiber provided the current context.\n  // pushHostContext() only pushes Fibers that provide unique contexts.\n  if (contextFiberStackCursor.current !== fiber) {\n    return;\n  }\n\n  pop(contextStackCursor$1, fiber);\n  pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n  return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n  return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n  return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n  return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n  push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n  pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n  // If it was the primary children that just suspended, capture and render the\n  // fallback. Otherwise, don't capture and bubble to the next boundary.\n  var nextState = workInProgress.memoizedState;\n\n  if (nextState !== null) {\n    if (nextState.dehydrated !== null) {\n      // A dehydrated boundary always captures.\n      return true;\n    }\n\n    return false;\n  }\n\n  var props = workInProgress.memoizedProps; // Regular boundaries always capture.\n\n  {\n    return true;\n  } // If it's a boundary we should avoid, then we prefer to bubble up to the\n}\nfunction findFirstSuspended(row) {\n  var node = row;\n\n  while (node !== null) {\n    if (node.tag === SuspenseComponent) {\n      var state = node.memoizedState;\n\n      if (state !== null) {\n        var dehydrated = state.dehydrated;\n\n        if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n          return node;\n        }\n      }\n    } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n    // keep track of whether it suspended or not.\n    node.memoizedProps.revealOrder !== undefined) {\n      var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n      if (didSuspend) {\n        return node;\n      }\n    } else if (node.child !== null) {\n      node.child.return = node;\n      node = node.child;\n      continue;\n    }\n\n    if (node === row) {\n      return null;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === row) {\n        return null;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  }\n\n  return null;\n}\n\nvar NoFlags$1 =\n/*   */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/*  */\n2;\nvar Layout =\n/*    */\n4;\nvar Passive$1 =\n/*   */\n8;\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nfunction resetWorkInProgressVersions() {\n  for (var i = 0; i < workInProgressSources.length; i++) {\n    var mutableSource = workInProgressSources[i];\n\n    {\n      mutableSource._workInProgressVersionPrimary = null;\n    }\n  }\n\n  workInProgressSources.length = 0;\n}\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n  var getVersion = mutableSource._getVersion;\n  var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n  // Retaining it forever may interfere with GC.\n\n  if (root.mutableSourceEagerHydrationData == null) {\n    root.mutableSourceEagerHydrationData = [mutableSource, version];\n  } else {\n    root.mutableSourceEagerHydrationData.push(mutableSource, version);\n  }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n    ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\n\n{\n  didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n  {\n    var hookName = currentHookNameInDev;\n\n    if (hookTypesDev === null) {\n      hookTypesDev = [hookName];\n    } else {\n      hookTypesDev.push(hookName);\n    }\n  }\n}\n\nfunction updateHookTypesDev() {\n  {\n    var hookName = currentHookNameInDev;\n\n    if (hookTypesDev !== null) {\n      hookTypesUpdateIndexDev++;\n\n      if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n        warnOnHookMismatchInDev(hookName);\n      }\n    }\n  }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n  {\n    if (deps !== undefined && deps !== null && !isArray(deps)) {\n      // Verify deps, but only on mount to avoid extra checks.\n      // It's unlikely their type would change as usually you define them inline.\n      error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n    }\n  }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n  {\n    var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n    if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n      didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n      if (hookTypesDev !== null) {\n        var table = '';\n        var secondColumnStart = 30;\n\n        for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n          var oldHookName = hookTypesDev[i];\n          var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n          var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n          // lol @ IE not supporting String#repeat\n\n          while (row.length < secondColumnStart) {\n            row += ' ';\n          }\n\n          row += newHookName + '\\n';\n          table += row;\n        }\n\n        error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\\n\\n' + '   Previous render            Next render\\n' + '   ------------------------------------------------------\\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n      }\n    }\n  }\n}\n\nfunction throwInvalidHookError() {\n  throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n  {\n    if (ignorePreviousDependencies) {\n      // Only true when this component is being hot reloaded.\n      return false;\n    }\n  }\n\n  if (prevDeps === null) {\n    {\n      error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n    }\n\n    return false;\n  }\n\n  {\n    // Don't bother comparing lengths in prod because these arrays should be\n    // passed inline.\n    if (nextDeps.length !== prevDeps.length) {\n      error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n    }\n  }\n\n  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n    if (objectIs(nextDeps[i], prevDeps[i])) {\n      continue;\n    }\n\n    return false;\n  }\n\n  return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n  renderLanes = nextRenderLanes;\n  currentlyRenderingFiber$1 = workInProgress;\n\n  {\n    hookTypesDev = current !== null ? current._debugHookTypes : null;\n    hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n  }\n\n  workInProgress.memoizedState = null;\n  workInProgress.updateQueue = null;\n  workInProgress.lanes = NoLanes; // The following should have already been reset\n  // currentHook = null;\n  // workInProgressHook = null;\n  // didScheduleRenderPhaseUpdate = false;\n  // localIdCounter = 0;\n  // TODO Warn if no hooks are used at all during mount, then some are used during update.\n  // Currently we will identify the update render as a mount because memoizedState === null.\n  // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n  // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n  // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n  // so memoizedState would be null during updates and mounts.\n\n  {\n    if (current !== null && current.memoizedState !== null) {\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n    } else if (hookTypesDev !== null) {\n      // This dispatcher handles an edge case where a component is updating,\n      // but no stateful hooks have been used.\n      // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n      // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n      // This dispatcher does that.\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n    } else {\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n    }\n  }\n\n  var children = Component(props, secondArg); // Check if there was a render phase update\n\n  if (didScheduleRenderPhaseUpdateDuringThisPass) {\n    // Keep rendering in a loop for as long as render phase updates continue to\n    // be scheduled. Use a counter to prevent infinite loops.\n    var numberOfReRenders = 0;\n\n    do {\n      didScheduleRenderPhaseUpdateDuringThisPass = false;\n      localIdCounter = 0;\n\n      if (numberOfReRenders >= RE_RENDER_LIMIT) {\n        throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n      }\n\n      numberOfReRenders += 1;\n\n      {\n        // Even when hot reloading, allow dependencies to stabilize\n        // after first render to prevent infinite render phase updates.\n        ignorePreviousDependencies = false;\n      } // Start over from the beginning of the list\n\n\n      currentHook = null;\n      workInProgressHook = null;\n      workInProgress.updateQueue = null;\n\n      {\n        // Also validate hook order for cascading updates.\n        hookTypesUpdateIndexDev = -1;\n      }\n\n      ReactCurrentDispatcher$1.current =  HooksDispatcherOnRerenderInDEV ;\n      children = Component(props, secondArg);\n    } while (didScheduleRenderPhaseUpdateDuringThisPass);\n  } // We can assume the previous dispatcher is always this one, since we set it\n  // at the beginning of the render phase and there's no re-entrance.\n\n\n  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n  {\n    workInProgress._debugHookTypes = hookTypesDev;\n  } // This check uses currentHook so that it works the same in DEV and prod bundles.\n  // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n  var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n  renderLanes = NoLanes;\n  currentlyRenderingFiber$1 = null;\n  currentHook = null;\n  workInProgressHook = null;\n\n  {\n    currentHookNameInDev = null;\n    hookTypesDev = null;\n    hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n    // render. If this fires, it suggests that we incorrectly reset the static\n    // flags in some other part of the codebase. This has happened before, for\n    // example, in the SuspenseList implementation.\n\n    if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n    // and creates false positives. To make this work in legacy mode, we'd\n    // need to mark fibers that commit in an incomplete state, somehow. For\n    // now I'll disable the warning that most of the bugs that would trigger\n    // it are either exclusive to concurrent mode or exist in both.\n    (current.mode & ConcurrentMode) !== NoMode) {\n      error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n    }\n  }\n\n  didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n  // localIdCounter = 0;\n\n  if (didRenderTooFewHooks) {\n    throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n  }\n\n  return children;\n}\nfunction checkDidRenderIdHook() {\n  // This should be called immediately after every renderWithHooks call.\n  // Conceptually, it's part of the return value of renderWithHooks; it's only a\n  // separate function to avoid using an array tuple.\n  var didRenderIdHook = localIdCounter !== 0;\n  localIdCounter = 0;\n  return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n  workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n  // complete phase (bubbleProperties).\n\n  if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n    workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);\n  } else {\n    workInProgress.flags &= ~(Passive | Update);\n  }\n\n  current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n  // We can assume the previous dispatcher is always this one, since we set it\n  // at the beginning of the render phase and there's no re-entrance.\n  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n  if (didScheduleRenderPhaseUpdate) {\n    // There were render phase updates. These are only valid for this render\n    // phase, which we are now aborting. Remove the updates from the queues so\n    // they do not persist to the next render. Do not remove updates from hooks\n    // that weren't processed.\n    //\n    // Only reset the updates from the queue if it has a clone. If it does\n    // not have a clone, that means it wasn't processed, and the updates were\n    // scheduled before we entered the render phase.\n    var hook = currentlyRenderingFiber$1.memoizedState;\n\n    while (hook !== null) {\n      var queue = hook.queue;\n\n      if (queue !== null) {\n        queue.pending = null;\n      }\n\n      hook = hook.next;\n    }\n\n    didScheduleRenderPhaseUpdate = false;\n  }\n\n  renderLanes = NoLanes;\n  currentlyRenderingFiber$1 = null;\n  currentHook = null;\n  workInProgressHook = null;\n\n  {\n    hookTypesDev = null;\n    hookTypesUpdateIndexDev = -1;\n    currentHookNameInDev = null;\n    isUpdatingOpaqueValueInRenderPhase = false;\n  }\n\n  didScheduleRenderPhaseUpdateDuringThisPass = false;\n  localIdCounter = 0;\n}\n\nfunction mountWorkInProgressHook() {\n  var hook = {\n    memoizedState: null,\n    baseState: null,\n    baseQueue: null,\n    queue: null,\n    next: null\n  };\n\n  if (workInProgressHook === null) {\n    // This is the first hook in the list\n    currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n  } else {\n    // Append to the end of the list\n    workInProgressHook = workInProgressHook.next = hook;\n  }\n\n  return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n  // This function is used both for updates and for re-renders triggered by a\n  // render phase update. It assumes there is either a current hook we can\n  // clone, or a work-in-progress hook from a previous render pass that we can\n  // use as a base. When we reach the end of the base list, we must switch to\n  // the dispatcher used for mounts.\n  var nextCurrentHook;\n\n  if (currentHook === null) {\n    var current = currentlyRenderingFiber$1.alternate;\n\n    if (current !== null) {\n      nextCurrentHook = current.memoizedState;\n    } else {\n      nextCurrentHook = null;\n    }\n  } else {\n    nextCurrentHook = currentHook.next;\n  }\n\n  var nextWorkInProgressHook;\n\n  if (workInProgressHook === null) {\n    nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n  } else {\n    nextWorkInProgressHook = workInProgressHook.next;\n  }\n\n  if (nextWorkInProgressHook !== null) {\n    // There's already a work-in-progress. Reuse it.\n    workInProgressHook = nextWorkInProgressHook;\n    nextWorkInProgressHook = workInProgressHook.next;\n    currentHook = nextCurrentHook;\n  } else {\n    // Clone from the current hook.\n    if (nextCurrentHook === null) {\n      throw new Error('Rendered more hooks than during the previous render.');\n    }\n\n    currentHook = nextCurrentHook;\n    var newHook = {\n      memoizedState: currentHook.memoizedState,\n      baseState: currentHook.baseState,\n      baseQueue: currentHook.baseQueue,\n      queue: currentHook.queue,\n      next: null\n    };\n\n    if (workInProgressHook === null) {\n      // This is the first hook in the list.\n      currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n    } else {\n      // Append to the end of the list.\n      workInProgressHook = workInProgressHook.next = newHook;\n    }\n  }\n\n  return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n  return {\n    lastEffect: null,\n    stores: null\n  };\n}\n\nfunction basicStateReducer(state, action) {\n  // $FlowFixMe: Flow doesn't like mixed types\n  return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n  var hook = mountWorkInProgressHook();\n  var initialState;\n\n  if (init !== undefined) {\n    initialState = init(initialArg);\n  } else {\n    initialState = initialArg;\n  }\n\n  hook.memoizedState = hook.baseState = initialState;\n  var queue = {\n    pending: null,\n    interleaved: null,\n    lanes: NoLanes,\n    dispatch: null,\n    lastRenderedReducer: reducer,\n    lastRenderedState: initialState\n  };\n  hook.queue = queue;\n  var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n  return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n  var hook = updateWorkInProgressHook();\n  var queue = hook.queue;\n\n  if (queue === null) {\n    throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n  }\n\n  queue.lastRenderedReducer = reducer;\n  var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n  var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n  var pendingQueue = queue.pending;\n\n  if (pendingQueue !== null) {\n    // We have new updates that haven't been processed yet.\n    // We'll add them to the base queue.\n    if (baseQueue !== null) {\n      // Merge the pending queue and the base queue.\n      var baseFirst = baseQueue.next;\n      var pendingFirst = pendingQueue.next;\n      baseQueue.next = pendingFirst;\n      pendingQueue.next = baseFirst;\n    }\n\n    {\n      if (current.baseQueue !== baseQueue) {\n        // Internal invariant that should never happen, but feasibly could in\n        // the future if we implement resuming, or some form of that.\n        error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n      }\n    }\n\n    current.baseQueue = baseQueue = pendingQueue;\n    queue.pending = null;\n  }\n\n  if (baseQueue !== null) {\n    // We have a queue to process.\n    var first = baseQueue.next;\n    var newState = current.baseState;\n    var newBaseState = null;\n    var newBaseQueueFirst = null;\n    var newBaseQueueLast = null;\n    var update = first;\n\n    do {\n      var updateLane = update.lane;\n\n      if (!isSubsetOfLanes(renderLanes, updateLane)) {\n        // Priority is insufficient. Skip this update. If this is the first\n        // skipped update, the previous update/state is the new base\n        // update/state.\n        var clone = {\n          lane: updateLane,\n          action: update.action,\n          hasEagerState: update.hasEagerState,\n          eagerState: update.eagerState,\n          next: null\n        };\n\n        if (newBaseQueueLast === null) {\n          newBaseQueueFirst = newBaseQueueLast = clone;\n          newBaseState = newState;\n        } else {\n          newBaseQueueLast = newBaseQueueLast.next = clone;\n        } // Update the remaining priority in the queue.\n        // TODO: Don't need to accumulate this. Instead, we can remove\n        // renderLanes from the original lanes.\n\n\n        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n        markSkippedUpdateLanes(updateLane);\n      } else {\n        // This update does have sufficient priority.\n        if (newBaseQueueLast !== null) {\n          var _clone = {\n            // This update is going to be committed so we never want uncommit\n            // it. Using NoLane works because 0 is a subset of all bitmasks, so\n            // this will never be skipped by the check above.\n            lane: NoLane,\n            action: update.action,\n            hasEagerState: update.hasEagerState,\n            eagerState: update.eagerState,\n            next: null\n          };\n          newBaseQueueLast = newBaseQueueLast.next = _clone;\n        } // Process this update.\n\n\n        if (update.hasEagerState) {\n          // If this update is a state update (not a reducer) and was processed eagerly,\n          // we can use the eagerly computed state\n          newState = update.eagerState;\n        } else {\n          var action = update.action;\n          newState = reducer(newState, action);\n        }\n      }\n\n      update = update.next;\n    } while (update !== null && update !== first);\n\n    if (newBaseQueueLast === null) {\n      newBaseState = newState;\n    } else {\n      newBaseQueueLast.next = newBaseQueueFirst;\n    } // Mark that the fiber performed work, but only if the new state is\n    // different from the current state.\n\n\n    if (!objectIs(newState, hook.memoizedState)) {\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = newState;\n    hook.baseState = newBaseState;\n    hook.baseQueue = newBaseQueueLast;\n    queue.lastRenderedState = newState;\n  } // Interleaved updates are stored on a separate queue. We aren't going to\n  // process them during this render, but we do need to track which lanes\n  // are remaining.\n\n\n  var lastInterleaved = queue.interleaved;\n\n  if (lastInterleaved !== null) {\n    var interleaved = lastInterleaved;\n\n    do {\n      var interleavedLane = interleaved.lane;\n      currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);\n      markSkippedUpdateLanes(interleavedLane);\n      interleaved = interleaved.next;\n    } while (interleaved !== lastInterleaved);\n  } else if (baseQueue === null) {\n    // `queue.lanes` is used for entangling transitions. We can set it back to\n    // zero once the queue is empty.\n    queue.lanes = NoLanes;\n  }\n\n  var dispatch = queue.dispatch;\n  return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n  var hook = updateWorkInProgressHook();\n  var queue = hook.queue;\n\n  if (queue === null) {\n    throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n  }\n\n  queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n  // work-in-progress hook.\n\n  var dispatch = queue.dispatch;\n  var lastRenderPhaseUpdate = queue.pending;\n  var newState = hook.memoizedState;\n\n  if (lastRenderPhaseUpdate !== null) {\n    // The queue doesn't persist past this render pass.\n    queue.pending = null;\n    var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n    var update = firstRenderPhaseUpdate;\n\n    do {\n      // Process this render phase update. We don't have to check the\n      // priority because it will always be the same as the current\n      // render's.\n      var action = update.action;\n      newState = reducer(newState, action);\n      update = update.next;\n    } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n    // different from the current state.\n\n\n    if (!objectIs(newState, hook.memoizedState)) {\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n    // the base state unless the queue is empty.\n    // TODO: Not sure if this is the desired semantics, but it's what we\n    // do for gDSFP. I can't remember why.\n\n    if (hook.baseQueue === null) {\n      hook.baseState = newState;\n    }\n\n    queue.lastRenderedState = newState;\n  }\n\n  return [newState, dispatch];\n}\n\nfunction mountMutableSource(source, getSnapshot, subscribe) {\n  {\n    return undefined;\n  }\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n  {\n    return undefined;\n  }\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var fiber = currentlyRenderingFiber$1;\n  var hook = mountWorkInProgressHook();\n  var nextSnapshot;\n  var isHydrating = getIsHydrating();\n\n  if (isHydrating) {\n    if (getServerSnapshot === undefined) {\n      throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n    }\n\n    nextSnapshot = getServerSnapshot();\n\n    {\n      if (!didWarnUncachedGetSnapshot) {\n        if (nextSnapshot !== getServerSnapshot()) {\n          error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n          didWarnUncachedGetSnapshot = true;\n        }\n      }\n    }\n  } else {\n    nextSnapshot = getSnapshot();\n\n    {\n      if (!didWarnUncachedGetSnapshot) {\n        var cachedSnapshot = getSnapshot();\n\n        if (!objectIs(nextSnapshot, cachedSnapshot)) {\n          error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n          didWarnUncachedGetSnapshot = true;\n        }\n      }\n    } // Unless we're rendering a blocking lane, schedule a consistency check.\n    // Right before committing, we will walk the tree and check if any of the\n    // stores were mutated.\n    //\n    // We won't do this if we're hydrating server-rendered content, because if\n    // the content is stale, it's already visible anyway. Instead we'll patch\n    // it up in a passive effect.\n\n\n    var root = getWorkInProgressRoot();\n\n    if (root === null) {\n      throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n    }\n\n    if (!includesBlockingLane(root, renderLanes)) {\n      pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n    }\n  } // Read the current snapshot from the store on every render. This breaks the\n  // normal rules of React, and only works because store updates are\n  // always synchronous.\n\n\n  hook.memoizedState = nextSnapshot;\n  var inst = {\n    value: nextSnapshot,\n    getSnapshot: getSnapshot\n  };\n  hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n  mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n  // this whenever subscribe, getSnapshot, or value changes. Because there's no\n  // clean-up function, and we track the deps correctly, we can call pushEffect\n  // directly, without storing any additional state. For the same reason, we\n  // don't need to set a static flag, either.\n  // TODO: We can move this to the passive phase once we add a pre-commit\n  // consistency check. See the next comment.\n\n  fiber.flags |= Passive;\n  pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);\n  return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var fiber = currentlyRenderingFiber$1;\n  var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n  // normal rules of React, and only works because store updates are\n  // always synchronous.\n\n  var nextSnapshot = getSnapshot();\n\n  {\n    if (!didWarnUncachedGetSnapshot) {\n      var cachedSnapshot = getSnapshot();\n\n      if (!objectIs(nextSnapshot, cachedSnapshot)) {\n        error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n        didWarnUncachedGetSnapshot = true;\n      }\n    }\n  }\n\n  var prevSnapshot = hook.memoizedState;\n  var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n  if (snapshotChanged) {\n    hook.memoizedState = nextSnapshot;\n    markWorkInProgressReceivedUpdate();\n  }\n\n  var inst = hook.queue;\n  updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n  // commit phase if there was an interleaved mutation. In concurrent mode\n  // this can happen all the time, but even in synchronous mode, an earlier\n  // effect may have mutated the store.\n\n  if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by\n  // checking whether we scheduled a subscription effect above.\n  workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n    fiber.flags |= Passive;\n    pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.\n    // Right before committing, we will walk the tree and check if any of the\n    // stores were mutated.\n\n    var root = getWorkInProgressRoot();\n\n    if (root === null) {\n      throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n    }\n\n    if (!includesBlockingLane(root, renderLanes)) {\n      pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n    }\n  }\n\n  return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n  fiber.flags |= StoreConsistency;\n  var check = {\n    getSnapshot: getSnapshot,\n    value: renderedSnapshot\n  };\n  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n  if (componentUpdateQueue === null) {\n    componentUpdateQueue = createFunctionComponentUpdateQueue();\n    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n    componentUpdateQueue.stores = [check];\n  } else {\n    var stores = componentUpdateQueue.stores;\n\n    if (stores === null) {\n      componentUpdateQueue.stores = [check];\n    } else {\n      stores.push(check);\n    }\n  }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n  // These are updated in the passive phase\n  inst.value = nextSnapshot;\n  inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n  // have been in an event that fired before the passive effects, or it could\n  // have been in a layout effect. In that case, we would have used the old\n  // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n  if (checkIfSnapshotChanged(inst)) {\n    // Force a re-render.\n    forceStoreRerender(fiber);\n  }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n  var handleStoreChange = function () {\n    // The store changed. Check if the snapshot changed since the last time we\n    // read from the store.\n    if (checkIfSnapshotChanged(inst)) {\n      // Force a re-render.\n      forceStoreRerender(fiber);\n    }\n  }; // Subscribe to the store and return a clean-up function.\n\n\n  return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n  var latestGetSnapshot = inst.getSnapshot;\n  var prevValue = inst.value;\n\n  try {\n    var nextValue = latestGetSnapshot();\n    return !objectIs(prevValue, nextValue);\n  } catch (error) {\n    return true;\n  }\n}\n\nfunction forceStoreRerender(fiber) {\n  scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n}\n\nfunction mountState(initialState) {\n  var hook = mountWorkInProgressHook();\n\n  if (typeof initialState === 'function') {\n    // $FlowFixMe: Flow doesn't like mixed types\n    initialState = initialState();\n  }\n\n  hook.memoizedState = hook.baseState = initialState;\n  var queue = {\n    pending: null,\n    interleaved: null,\n    lanes: NoLanes,\n    dispatch: null,\n    lastRenderedReducer: basicStateReducer,\n    lastRenderedState: initialState\n  };\n  hook.queue = queue;\n  var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n  return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n  return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n  return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n  var effect = {\n    tag: tag,\n    create: create,\n    destroy: destroy,\n    deps: deps,\n    // Circular\n    next: null\n  };\n  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n  if (componentUpdateQueue === null) {\n    componentUpdateQueue = createFunctionComponentUpdateQueue();\n    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n    componentUpdateQueue.lastEffect = effect.next = effect;\n  } else {\n    var lastEffect = componentUpdateQueue.lastEffect;\n\n    if (lastEffect === null) {\n      componentUpdateQueue.lastEffect = effect.next = effect;\n    } else {\n      var firstEffect = lastEffect.next;\n      lastEffect.next = effect;\n      effect.next = firstEffect;\n      componentUpdateQueue.lastEffect = effect;\n    }\n  }\n\n  return effect;\n}\n\nfunction mountRef(initialValue) {\n  var hook = mountWorkInProgressHook();\n\n  {\n    var _ref2 = {\n      current: initialValue\n    };\n    hook.memoizedState = _ref2;\n    return _ref2;\n  }\n}\n\nfunction updateRef(initialValue) {\n  var hook = updateWorkInProgressHook();\n  return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  currentlyRenderingFiber$1.flags |= fiberFlags;\n  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var destroy = undefined;\n\n  if (currentHook !== null) {\n    var prevEffect = currentHook.memoizedState;\n    destroy = prevEffect.destroy;\n\n    if (nextDeps !== null) {\n      var prevDeps = prevEffect.deps;\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);\n        return;\n      }\n    }\n  }\n\n  currentlyRenderingFiber$1.flags |= fiberFlags;\n  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);\n  } else {\n    return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);\n  }\n}\n\nfunction updateEffect(create, deps) {\n  return updateEffectImpl(Passive, Passive$1, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n  return mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n  return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n  var fiberFlags = Update;\n\n  {\n    fiberFlags |= LayoutStatic;\n  }\n\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    fiberFlags |= MountLayoutDev;\n  }\n\n  return mountEffectImpl(fiberFlags, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n  return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n  if (typeof ref === 'function') {\n    var refCallback = ref;\n\n    var _inst = create();\n\n    refCallback(_inst);\n    return function () {\n      refCallback(null);\n    };\n  } else if (ref !== null && ref !== undefined) {\n    var refObject = ref;\n\n    {\n      if (!refObject.hasOwnProperty('current')) {\n        error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n      }\n    }\n\n    var _inst2 = create();\n\n    refObject.current = _inst2;\n    return function () {\n      refObject.current = null;\n    };\n  }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n  {\n    if (typeof create !== 'function') {\n      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n    }\n  } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n  var fiberFlags = Update;\n\n  {\n    fiberFlags |= LayoutStatic;\n  }\n\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    fiberFlags |= MountLayoutDev;\n  }\n\n  return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n  {\n    if (typeof create !== 'function') {\n      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n    }\n  } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n  return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n  // The react-debug-hooks package injects its own implementation\n  // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  hook.memoizedState = [callback, nextDeps];\n  return callback;\n}\n\nfunction updateCallback(callback, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var prevState = hook.memoizedState;\n\n  if (prevState !== null) {\n    if (nextDeps !== null) {\n      var prevDeps = prevState[1];\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        return prevState[0];\n      }\n    }\n  }\n\n  hook.memoizedState = [callback, nextDeps];\n  return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var nextValue = nextCreate();\n  hook.memoizedState = [nextValue, nextDeps];\n  return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var prevState = hook.memoizedState;\n\n  if (prevState !== null) {\n    // Assume these are defined. If they're not, areHookInputsEqual will warn.\n    if (nextDeps !== null) {\n      var prevDeps = prevState[1];\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        return prevState[0];\n      }\n    }\n  }\n\n  var nextValue = nextCreate();\n  hook.memoizedState = [nextValue, nextDeps];\n  return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n  var hook = mountWorkInProgressHook();\n  hook.memoizedState = value;\n  return value;\n}\n\nfunction updateDeferredValue(value) {\n  var hook = updateWorkInProgressHook();\n  var resolvedCurrentHook = currentHook;\n  var prevValue = resolvedCurrentHook.memoizedState;\n  return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value) {\n  var hook = updateWorkInProgressHook();\n\n  if (currentHook === null) {\n    // This is a rerender during a mount.\n    hook.memoizedState = value;\n    return value;\n  } else {\n    // This is a rerender during an update.\n    var prevValue = currentHook.memoizedState;\n    return updateDeferredValueImpl(hook, prevValue, value);\n  }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value) {\n  var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n\n  if (shouldDeferValue) {\n    // This is an urgent update. If the value has changed, keep using the\n    // previous value and spawn a deferred render to update it later.\n    if (!objectIs(value, prevValue)) {\n      // Schedule a deferred render\n      var deferredLane = claimNextTransitionLane();\n      currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n      markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n      // from the latest value. The name \"baseState\" doesn't really match how we\n      // use it because we're reusing a state hook field instead of creating a\n      // new one.\n\n      hook.baseState = true;\n    } // Reuse the previous value\n\n\n    return prevValue;\n  } else {\n    // This is not an urgent update, so we can use the latest value regardless\n    // of what it is. No need to defer it.\n    // However, if we're currently inside a spawned render, then we need to mark\n    // this as an update to prevent the fiber from bailing out.\n    //\n    // `baseState` is true when the current value is different from the rendered\n    // value. The name doesn't really match how we use it because we're reusing\n    // a state hook field instead of creating a new one.\n    if (hook.baseState) {\n      // Flip this back to false.\n      hook.baseState = false;\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = value;\n    return value;\n  }\n}\n\nfunction startTransition(setPending, callback, options) {\n  var previousPriority = getCurrentUpdatePriority();\n  setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n  setPending(true);\n  var prevTransition = ReactCurrentBatchConfig$2.transition;\n  ReactCurrentBatchConfig$2.transition = {};\n  var currentTransition = ReactCurrentBatchConfig$2.transition;\n\n  {\n    ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();\n  }\n\n  try {\n    setPending(false);\n    callback();\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$2.transition = prevTransition;\n\n    {\n      if (prevTransition === null && currentTransition._updatedFibers) {\n        var updatedFibersCount = currentTransition._updatedFibers.size;\n\n        if (updatedFibersCount > 10) {\n          warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n        }\n\n        currentTransition._updatedFibers.clear();\n      }\n    }\n  }\n}\n\nfunction mountTransition() {\n  var _mountState = mountState(false),\n      isPending = _mountState[0],\n      setPending = _mountState[1]; // The `start` method never changes.\n\n\n  var start = startTransition.bind(null, setPending);\n  var hook = mountWorkInProgressHook();\n  hook.memoizedState = start;\n  return [isPending, start];\n}\n\nfunction updateTransition() {\n  var _updateState = updateState(),\n      isPending = _updateState[0];\n\n  var hook = updateWorkInProgressHook();\n  var start = hook.memoizedState;\n  return [isPending, start];\n}\n\nfunction rerenderTransition() {\n  var _rerenderState = rerenderState(),\n      isPending = _rerenderState[0];\n\n  var hook = updateWorkInProgressHook();\n  var start = hook.memoizedState;\n  return [isPending, start];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n  {\n    return isUpdatingOpaqueValueInRenderPhase;\n  }\n}\n\nfunction mountId() {\n  var hook = mountWorkInProgressHook();\n  var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n  // should do this in Fiber, too? Deferring this decision for now because\n  // there's no other place to store the prefix except for an internal field on\n  // the public createRoot object, which the fiber tree does not currently have\n  // a reference to.\n\n  var identifierPrefix = root.identifierPrefix;\n  var id;\n\n  if (getIsHydrating()) {\n    var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n    id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n    // that represents the position of this useId hook among all the useId\n    // hooks for this fiber.\n\n    var localId = localIdCounter++;\n\n    if (localId > 0) {\n      id += 'H' + localId.toString(32);\n    }\n\n    id += ':';\n  } else {\n    // Use a lowercase r prefix for client-generated ids.\n    var globalClientId = globalClientIdCounter++;\n    id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n  }\n\n  hook.memoizedState = id;\n  return id;\n}\n\nfunction updateId() {\n  var hook = updateWorkInProgressHook();\n  var id = hook.memoizedState;\n  return id;\n}\n\nfunction dispatchReducerAction(fiber, queue, action) {\n  {\n    if (typeof arguments[3] === 'function') {\n      error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n    }\n  }\n\n  var lane = requestUpdateLane(fiber);\n  var update = {\n    lane: lane,\n    action: action,\n    hasEagerState: false,\n    eagerState: null,\n    next: null\n  };\n\n  if (isRenderPhaseUpdate(fiber)) {\n    enqueueRenderPhaseUpdate(queue, update);\n  } else {\n    enqueueUpdate$1(fiber, queue, update);\n    var eventTime = requestEventTime();\n    var root = scheduleUpdateOnFiber(fiber, lane, eventTime);\n\n    if (root !== null) {\n      entangleTransitionUpdate(root, queue, lane);\n    }\n  }\n\n  markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(fiber, queue, action) {\n  {\n    if (typeof arguments[3] === 'function') {\n      error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n    }\n  }\n\n  var lane = requestUpdateLane(fiber);\n  var update = {\n    lane: lane,\n    action: action,\n    hasEagerState: false,\n    eagerState: null,\n    next: null\n  };\n\n  if (isRenderPhaseUpdate(fiber)) {\n    enqueueRenderPhaseUpdate(queue, update);\n  } else {\n    enqueueUpdate$1(fiber, queue, update);\n    var alternate = fiber.alternate;\n\n    if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n      // The queue is currently empty, which means we can eagerly compute the\n      // next state before entering the render phase. If the new state is the\n      // same as the current state, we may be able to bail out entirely.\n      var lastRenderedReducer = queue.lastRenderedReducer;\n\n      if (lastRenderedReducer !== null) {\n        var prevDispatcher;\n\n        {\n          prevDispatcher = ReactCurrentDispatcher$1.current;\n          ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        }\n\n        try {\n          var currentState = queue.lastRenderedState;\n          var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n          // it, on the update object. If the reducer hasn't changed by the\n          // time we enter the render phase, then the eager state can be used\n          // without calling the reducer again.\n\n          update.hasEagerState = true;\n          update.eagerState = eagerState;\n\n          if (objectIs(eagerState, currentState)) {\n            // Fast path. We can bail out without scheduling React to re-render.\n            // It's still possible that we'll need to rebase this update later,\n            // if the component re-renders for a different reason and by that\n            // time the reducer has changed.\n            return;\n          }\n        } catch (error) {// Suppress the error. It will throw again in the render phase.\n        } finally {\n          {\n            ReactCurrentDispatcher$1.current = prevDispatcher;\n          }\n        }\n      }\n    }\n\n    var eventTime = requestEventTime();\n    var root = scheduleUpdateOnFiber(fiber, lane, eventTime);\n\n    if (root !== null) {\n      entangleTransitionUpdate(root, queue, lane);\n    }\n  }\n\n  markUpdateInDevTools(fiber, lane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n  var alternate = fiber.alternate;\n  return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\n  // This is a render phase update. Stash it in a lazily-created map of\n  // queue -> linked list of updates. After this render pass, we'll restart\n  // and apply the stashed updates on top of the work-in-progress hook.\n  didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n  var pending = queue.pending;\n\n  if (pending === null) {\n    // This is the first update. Create a circular list.\n    update.next = update;\n  } else {\n    update.next = pending.next;\n    pending.next = update;\n  }\n\n  queue.pending = update;\n}\n\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n  if (isInterleavedUpdate(fiber)) {\n    var interleaved = queue.interleaved;\n\n    if (interleaved === null) {\n      // This is the first update. Create a circular list.\n      update.next = update; // At the end of the current render, this queue's interleaved updates will\n      // be transferred to the pending queue.\n\n      pushInterleavedQueue(queue);\n    } else {\n      update.next = interleaved.next;\n      interleaved.next = update;\n    }\n\n    queue.interleaved = update;\n  } else {\n    var pending = queue.pending;\n\n    if (pending === null) {\n      // This is the first update. Create a circular list.\n      update.next = update;\n    } else {\n      update.next = pending.next;\n      pending.next = update;\n    }\n\n    queue.pending = update;\n  }\n}\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n  if (isTransitionLane(lane)) {\n    var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n    // must have finished. We can remove them from the shared queue, which\n    // represents a superset of the actually pending lanes. In some cases we\n    // may entangle more than we need to, but that's OK. In fact it's worse if\n    // we *don't* entangle when we should.\n\n    queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n    var newQueueLanes = mergeLanes(queueLanes, lane);\n    queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n    // the lane finished since the last time we entangled it. So we need to\n    // entangle it again, just to be sure.\n\n    markRootEntangled(root, newQueueLanes);\n  }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n  {\n    markStateUpdateScheduled(fiber, lane);\n  }\n}\n\nvar ContextOnlyDispatcher = {\n  readContext: readContext,\n  useCallback: throwInvalidHookError,\n  useContext: throwInvalidHookError,\n  useEffect: throwInvalidHookError,\n  useImperativeHandle: throwInvalidHookError,\n  useInsertionEffect: throwInvalidHookError,\n  useLayoutEffect: throwInvalidHookError,\n  useMemo: throwInvalidHookError,\n  useReducer: throwInvalidHookError,\n  useRef: throwInvalidHookError,\n  useState: throwInvalidHookError,\n  useDebugValue: throwInvalidHookError,\n  useDeferredValue: throwInvalidHookError,\n  useTransition: throwInvalidHookError,\n  useMutableSource: throwInvalidHookError,\n  useSyncExternalStore: throwInvalidHookError,\n  useId: throwInvalidHookError,\n  unstable_isNewReconciler: enableNewReconciler\n};\n\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n  var warnInvalidContextAccess = function () {\n    error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n  };\n\n  var warnInvalidHookAccess = function () {\n    error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n  };\n\n  HooksDispatcherOnMountInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      mountHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      mountHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      mountHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      mountHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      mountHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      mountHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      mountHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      mountHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnMountWithHookTypesInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnUpdateInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return updateDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return updateTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnRerenderInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return rerenderReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return rerenderState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return rerenderDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return rerenderTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnMountInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnUpdateInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnRerenderInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return rerenderReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return rerenderState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return rerenderDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return rerenderTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n *   1. render\n *   2. commit (and call `onRender`, `onCommit`)\n *   3. check for nested updates\n *   4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n  return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n  {\n    nestedUpdateScheduled = true;\n  }\n}\n\nfunction resetNestedUpdateFlag() {\n  {\n    currentUpdateIsNested = false;\n    nestedUpdateScheduled = false;\n  }\n}\n\nfunction syncNestedUpdateFlag() {\n  {\n    currentUpdateIsNested = nestedUpdateScheduled;\n    nestedUpdateScheduled = false;\n  }\n}\n\nfunction getCommitTime() {\n  return commitTime;\n}\n\nfunction recordCommitTime() {\n\n  commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n  profilerStartTime = now$1();\n\n  if (fiber.actualStartTime < 0) {\n    fiber.actualStartTime = now$1();\n  }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n  profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n  if (profilerStartTime >= 0) {\n    var elapsedTime = now$1() - profilerStartTime;\n    fiber.actualDuration += elapsedTime;\n\n    if (overrideBaseTime) {\n      fiber.selfBaseDuration = elapsedTime;\n    }\n\n    profilerStartTime = -1;\n  }\n}\n\nfunction recordLayoutEffectDuration(fiber) {\n\n  if (layoutEffectStartTime >= 0) {\n    var elapsedTime = now$1() - layoutEffectStartTime;\n    layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n    // Or the root (for the DevTools Profiler to read)\n\n    var parentFiber = fiber.return;\n\n    while (parentFiber !== null) {\n      switch (parentFiber.tag) {\n        case HostRoot:\n          var root = parentFiber.stateNode;\n          root.effectDuration += elapsedTime;\n          return;\n\n        case Profiler:\n          var parentStateNode = parentFiber.stateNode;\n          parentStateNode.effectDuration += elapsedTime;\n          return;\n      }\n\n      parentFiber = parentFiber.return;\n    }\n  }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n  if (passiveEffectStartTime >= 0) {\n    var elapsedTime = now$1() - passiveEffectStartTime;\n    passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n    // Or the root (for the DevTools Profiler to read)\n\n    var parentFiber = fiber.return;\n\n    while (parentFiber !== null) {\n      switch (parentFiber.tag) {\n        case HostRoot:\n          var root = parentFiber.stateNode;\n\n          if (root !== null) {\n            root.passiveEffectDuration += elapsedTime;\n          }\n\n          return;\n\n        case Profiler:\n          var parentStateNode = parentFiber.stateNode;\n\n          if (parentStateNode !== null) {\n            // Detached fibers have their state node cleared out.\n            // In this case, the return pointer is also cleared out,\n            // so we won't be able to report the time spent in this Profiler's subtree.\n            parentStateNode.passiveEffectDuration += elapsedTime;\n          }\n\n          return;\n      }\n\n      parentFiber = parentFiber.return;\n    }\n  }\n}\n\nfunction startLayoutEffectTimer() {\n\n  layoutEffectStartTime = now$1();\n}\n\nfunction startPassiveEffectTimer() {\n\n  passiveEffectStartTime = now$1();\n}\n\nfunction transferActualDuration(fiber) {\n  // Transfer time spent rendering these children so we don't lose it\n  // after we rerender. This is used as a helper in special cases\n  // where we should count the work of multiple passes.\n  var child = fiber.child;\n\n  while (child) {\n    fiber.actualDuration += child.actualDuration;\n    child = child.sibling;\n  }\n}\n\nfunction createCapturedValue(value, source) {\n  // If the value is an error, call this function immediately after it is thrown\n  // so the stack is accurate.\n  return {\n    value: value,\n    source: source,\n    stack: getStackByFiberInDevAndProd(source)\n  };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n  return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n  try {\n    var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n    // This enables renderers like ReactNative to better manage redbox behavior.\n\n    if (logError === false) {\n      return;\n    }\n\n    var error = errorInfo.value;\n\n    if (true) {\n      var source = errorInfo.source;\n      var stack = errorInfo.stack;\n      var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n      // `preventDefault()` in window `error` handler.\n      // We record this information as an expando on the error.\n\n      if (error != null && error._suppressLogging) {\n        if (boundary.tag === ClassComponent) {\n          // The error is recoverable and was silenced.\n          // Ignore it and don't print the stack addendum.\n          // This is handy for testing error boundaries without noise.\n          return;\n        } // The error is fatal. Since the silencing might have\n        // been accidental, we'll surface it anyway.\n        // However, the browser would have silenced the original error\n        // so we'll print it first, and then print the stack addendum.\n\n\n        console['error'](error); // Don't transform to our wrapper\n        // For a more detailed description of this block, see:\n        // https://github.com/facebook/react/pull/13384\n      }\n\n      var componentName = source ? getComponentNameFromFiber(source) : null;\n      var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n      var errorBoundaryMessage;\n\n      if (boundary.tag === HostRoot) {\n        errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n      } else {\n        var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n        errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n      }\n\n      var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n      // We don't include the original error message and JS stack because the browser\n      // has already printed it. Even if the application swallows the error, it is still\n      // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n      console['error'](combinedMessage); // Don't transform to our wrapper\n    } else {\n      // In production, we print the error directly.\n      // This will include the message, the JS stack, and anything the browser wants to show.\n      // We pass the error object instead of custom message so that the browser displays the error natively.\n      console['error'](error); // Don't transform to our wrapper\n    }\n  } catch (e) {\n    // This method must not throw, or React internal state will get messed up.\n    // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n    // we want to report this error outside of the normal stack as a last resort.\n    // https://github.com/facebook/react/issues/13188\n    setTimeout(function () {\n      throw e;\n    });\n  }\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n  var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n  update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n  // being called \"element\".\n\n  update.payload = {\n    element: null\n  };\n  var error = errorInfo.value;\n\n  update.callback = function () {\n    onUncaughtError(error);\n    logCapturedError(fiber, errorInfo);\n  };\n\n  return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n  var update = createUpdate(NoTimestamp, lane);\n  update.tag = CaptureUpdate;\n  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n  if (typeof getDerivedStateFromError === 'function') {\n    var error$1 = errorInfo.value;\n\n    update.payload = function () {\n      return getDerivedStateFromError(error$1);\n    };\n\n    update.callback = function () {\n      {\n        markFailedErrorBoundaryForHotReloading(fiber);\n      }\n\n      logCapturedError(fiber, errorInfo);\n    };\n  }\n\n  var inst = fiber.stateNode;\n\n  if (inst !== null && typeof inst.componentDidCatch === 'function') {\n    update.callback = function callback() {\n      {\n        markFailedErrorBoundaryForHotReloading(fiber);\n      }\n\n      logCapturedError(fiber, errorInfo);\n\n      if (typeof getDerivedStateFromError !== 'function') {\n        // To preserve the preexisting retry behavior of error boundaries,\n        // we keep track of which ones already failed during this batch.\n        // This gets reset before we yield back to the browser.\n        // TODO: Warn in strict mode if getDerivedStateFromError is\n        // not defined.\n        markLegacyErrorBoundaryAsFailed(this);\n      }\n\n      var error$1 = errorInfo.value;\n      var stack = errorInfo.stack;\n      this.componentDidCatch(error$1, {\n        componentStack: stack !== null ? stack : ''\n      });\n\n      {\n        if (typeof getDerivedStateFromError !== 'function') {\n          // If componentDidCatch is the only error boundary method defined,\n          // then it needs to call setState to recover from errors.\n          // If no state update is scheduled then the boundary will swallow the error.\n          if (!includesSomeLane(fiber.lanes, SyncLane)) {\n            error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n          }\n        }\n      }\n    };\n  }\n\n  return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n  // Attach a ping listener\n  //\n  // The data might resolve before we have a chance to commit the fallback. Or,\n  // in the case of a refresh, we'll never commit a fallback. So we need to\n  // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n  // try rendering the tree again.\n  //\n  // Only attach a listener if one does not already exist for the lanes\n  // we're currently rendering (which acts like a \"thread ID\" here).\n  //\n  // We only need to do this in concurrent mode. Legacy Suspense always\n  // commits fallbacks synchronously, so there are no pings.\n  var pingCache = root.pingCache;\n  var threadIDs;\n\n  if (pingCache === null) {\n    pingCache = root.pingCache = new PossiblyWeakMap$1();\n    threadIDs = new Set();\n    pingCache.set(wakeable, threadIDs);\n  } else {\n    threadIDs = pingCache.get(wakeable);\n\n    if (threadIDs === undefined) {\n      threadIDs = new Set();\n      pingCache.set(wakeable, threadIDs);\n    }\n  }\n\n  if (!threadIDs.has(lanes)) {\n    // Memoize using the thread ID to prevent redundant listeners.\n    threadIDs.add(lanes);\n    var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n    {\n      if (isDevToolsPresent) {\n        // If we have pending work still, restore the original updaters\n        restorePendingUpdaters(root, lanes);\n      }\n    }\n\n    wakeable.then(ping, ping);\n  }\n}\n\nfunction attachRetryListener(suspenseBoundary, root, wakeable, lanes) {\n  // Retry listener\n  //\n  // If the fallback does commit, we need to attach a different type of\n  // listener. This one schedules an update on the Suspense boundary to turn\n  // the fallback state off.\n  //\n  // Stash the wakeable on the boundary fiber so we can access it in the\n  // commit phase.\n  //\n  // When the wakeable resolves, we'll attempt to render the boundary\n  // again (\"retry\").\n  var wakeables = suspenseBoundary.updateQueue;\n\n  if (wakeables === null) {\n    var updateQueue = new Set();\n    updateQueue.add(wakeable);\n    suspenseBoundary.updateQueue = updateQueue;\n  } else {\n    wakeables.add(wakeable);\n  }\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n  // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n  var tag = sourceFiber.tag;\n\n  if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n    var currentSource = sourceFiber.alternate;\n\n    if (currentSource) {\n      sourceFiber.updateQueue = currentSource.updateQueue;\n      sourceFiber.memoizedState = currentSource.memoizedState;\n      sourceFiber.lanes = currentSource.lanes;\n    } else {\n      sourceFiber.updateQueue = null;\n      sourceFiber.memoizedState = null;\n    }\n  }\n}\n\nfunction getNearestSuspenseBoundaryToCapture(returnFiber) {\n  var node = returnFiber;\n\n  do {\n    if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {\n      return node;\n    } // This boundary already captured during this render. Continue to the next\n    // boundary.\n\n\n    node = node.return;\n  } while (node !== null);\n\n  return null;\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n  // This marks a Suspense boundary so that when we're unwinding the stack,\n  // it captures the suspended \"exception\" and does a second (fallback) pass.\n  if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n    // Legacy Mode Suspense\n    //\n    // If the boundary is in legacy mode, we should *not*\n    // suspend the commit. Pretend as if the suspended component rendered\n    // null and keep rendering. When the Suspense boundary completes,\n    // we'll do a second pass to render the fallback.\n    if (suspenseBoundary === returnFiber) {\n      // Special case where we suspended while reconciling the children of\n      // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n      // when a React.lazy component is a direct child of a\n      // Suspense boundary.\n      //\n      // Suspense boundaries are implemented as multiple fibers, but they\n      // are a single conceptual unit. The legacy mode behavior where we\n      // pretend the suspended fiber committed as `null` won't work,\n      // because in this case the \"suspended\" fiber is the inner\n      // Offscreen wrapper.\n      //\n      // Because the contents of the boundary haven't started rendering\n      // yet (i.e. nothing in the tree has partially rendered) we can\n      // switch to the regular, concurrent mode behavior: mark the\n      // boundary with ShouldCapture and enter the unwind phase.\n      suspenseBoundary.flags |= ShouldCapture;\n    } else {\n      suspenseBoundary.flags |= DidCapture;\n      sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n      // But we shouldn't call any lifecycle methods or callbacks. Remove\n      // all lifecycle effect tags.\n\n      sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n      if (sourceFiber.tag === ClassComponent) {\n        var currentSourceFiber = sourceFiber.alternate;\n\n        if (currentSourceFiber === null) {\n          // This is a new mount. Change the tag so it's not mistaken for a\n          // completed class component. For example, we should not call\n          // componentWillUnmount if it is deleted.\n          sourceFiber.tag = IncompleteClassComponent;\n        } else {\n          // When we try rendering again, we should not reuse the current fiber,\n          // since it's known to be in an inconsistent state. Use a force update to\n          // prevent a bail out.\n          var update = createUpdate(NoTimestamp, SyncLane);\n          update.tag = ForceUpdate;\n          enqueueUpdate(sourceFiber, update);\n        }\n      } // The source fiber did not complete. Mark it with Sync priority to\n      // indicate that it still has pending work.\n\n\n      sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n    }\n\n    return suspenseBoundary;\n  } // Confirmed that the boundary is in a concurrent mode tree. Continue\n  // with the normal suspend path.\n  //\n  // After this we'll use a set of heuristics to determine whether this\n  // render pass will run to completion or restart or \"suspend\" the commit.\n  // The actual logic for this is spread out in different places.\n  //\n  // This first principle is that if we're going to suspend when we complete\n  // a root, then we should also restart if we get an update or ping that\n  // might unsuspend it, and vice versa. The only reason to suspend is\n  // because you think you might want to restart before committing. However,\n  // it doesn't make sense to restart only while in the period we're suspended.\n  //\n  // Restarting too aggressively is also not good because it starves out any\n  // intermediate loading state. So we use heuristics to determine when.\n  // Suspense Heuristics\n  //\n  // If nothing threw a Promise or all the same fallbacks are already showing,\n  // then don't suspend/restart.\n  //\n  // If this is an initial render of a new tree of Suspense boundaries and\n  // those trigger a fallback, then don't suspend/restart. We want to ensure\n  // that we can show the initial loading state as quickly as possible.\n  //\n  // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n  // a fallback, then we should always suspend/restart. Transitions apply\n  // to this case. If none is defined, JND is used instead.\n  //\n  // If we're already showing a fallback and it gets \"retried\", allowing us to show\n  // another level, but there's still an inner boundary that would show a fallback,\n  // then we suspend/restart for 500ms since the last time we showed a fallback\n  // anywhere in the tree. This effectively throttles progressive loading into a\n  // consistent train of commits. This also gives us an opportunity to restart to\n  // get to the completed state slightly earlier.\n  //\n  // If there's ambiguity due to batching it's resolved in preference of:\n  // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n  //\n  // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n  // ensure that new initial loading states can commit as soon as possible.\n\n\n  suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n  // the begin phase to prevent an early bailout.\n\n  suspenseBoundary.lanes = rootRenderLanes;\n  return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n  // The source fiber did not complete.\n  sourceFiber.flags |= Incomplete;\n\n  {\n    if (isDevToolsPresent) {\n      // If we have pending work still, restore the original updaters\n      restorePendingUpdaters(root, rootRenderLanes);\n    }\n  }\n\n  if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n    // This is a wakeable. The component suspended.\n    var wakeable = value;\n    resetSuspendedComponent(sourceFiber);\n\n    {\n      if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n        markDidThrowWhileHydratingDEV();\n      }\n    }\n\n\n    var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);\n\n    if (suspenseBoundary !== null) {\n      suspenseBoundary.flags &= ~ForceClientRender;\n      markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always\n      // commits fallbacks synchronously, so there are no pings.\n\n      if (suspenseBoundary.mode & ConcurrentMode) {\n        attachPingListener(root, wakeable, rootRenderLanes);\n      }\n\n      attachRetryListener(suspenseBoundary, root, wakeable);\n      return;\n    } else {\n      // No boundary was found. Unless this is a sync update, this is OK.\n      // We can suspend and wait for more data to arrive.\n      if (!includesSyncLane(rootRenderLanes)) {\n        // This is not a sync update. Suspend. Since we're not activating a\n        // Suspense boundary, this will unwind all the way to the root without\n        // performing a second pass to render a fallback. (This is arguably how\n        // refresh transitions should work, too, since we're not going to commit\n        // the fallbacks anyway.)\n        //\n        // This case also applies to initial hydration.\n        attachPingListener(root, wakeable, rootRenderLanes);\n        renderDidSuspendDelayIfPossible();\n        return;\n      } // This is a sync/discrete update. We treat this case like an error\n      // because discrete renders are expected to produce a complete tree\n      // synchronously to maintain consistency with external state.\n\n\n      var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.\n      // The error will be caught by the nearest suspense boundary.\n\n      value = uncaughtSuspenseError;\n    }\n  } else {\n    // This is a regular error, not a Suspense wakeable.\n    if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n      markDidThrowWhileHydratingDEV();\n\n      var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by\n      // discarding the dehydrated content and switching to a client render.\n      // Instead of surfacing the error, find the nearest Suspense boundary\n      // and render it again without hydration.\n\n\n      if (_suspenseBoundary !== null) {\n        if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {\n          // Set a flag to indicate that we should try rendering the normal\n          // children again, not the fallback.\n          _suspenseBoundary.flags |= ForceClientRender;\n        }\n\n        markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n        // still log it so it can be fixed.\n\n        queueHydrationError(value);\n        return;\n      }\n    }\n  } // We didn't find a boundary that could handle this type of exception. Start\n  // over and traverse parent path again, this time treating the exception\n  // as an error.\n\n\n  renderDidError(value);\n  value = createCapturedValue(value, sourceFiber);\n  var workInProgress = returnFiber;\n\n  do {\n    switch (workInProgress.tag) {\n      case HostRoot:\n        {\n          var _errorInfo = value;\n          workInProgress.flags |= ShouldCapture;\n          var lane = pickArbitraryLane(rootRenderLanes);\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n          var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n          enqueueCapturedUpdate(workInProgress, update);\n          return;\n        }\n\n      case ClassComponent:\n        // Capture and retry\n        var errorInfo = value;\n        var ctor = workInProgress.type;\n        var instance = workInProgress.stateNode;\n\n        if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n          workInProgress.flags |= ShouldCapture;\n\n          var _lane = pickArbitraryLane(rootRenderLanes);\n\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n          var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n          enqueueCapturedUpdate(workInProgress, _update);\n          return;\n        }\n\n        break;\n    }\n\n    workInProgress = workInProgress.return;\n  } while (workInProgress !== null);\n}\n\nfunction getSuspendedCache() {\n  {\n    return null;\n  } // This function is called when a Suspense boundary suspends. It returns the\n}\n\nfunction markUpdate(workInProgress) {\n  // Tag the fiber with an update effect. This turns a Placement into\n  // a PlacementAndUpdate.\n  workInProgress.flags |= Update;\n}\n\nfunction markRef(workInProgress) {\n  workInProgress.flags |= Ref;\n\n  {\n    workInProgress.flags |= RefStatic;\n  }\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent;\nvar updateHostText;\n\n{\n  // Mutation mode\n  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n    // We only have the top Fiber that was created but we need recurse down its\n    // children to find all the terminal nodes.\n    var node = workInProgress.child;\n\n    while (node !== null) {\n      if (node.tag === HostComponent || node.tag === HostText) {\n        appendInitialChild(parent, node.stateNode);\n      } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === workInProgress) {\n        return;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === workInProgress) {\n          return;\n        }\n\n        node = node.return;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  };\n\n  updateHostContainer = function (current, workInProgress) {// Noop\n  };\n\n  updateHostComponent = function (current, workInProgress, type, newProps, rootContainerInstance) {\n    // If we have an alternate, that means this is an update and we need to\n    // schedule a side-effect to do the updates.\n    var oldProps = current.memoizedProps;\n\n    if (oldProps === newProps) {\n      // In mutation mode, this is sufficient for a bailout because\n      // we won't touch this node even if children changed.\n      return;\n    } // If we get updated because one of our children updated, we don't\n    // have newProps so we'll have to reuse them.\n    // TODO: Split the update API as separate for the props vs. children.\n    // Even better would be if children weren't special cased at all tho.\n\n\n    var instance = workInProgress.stateNode;\n    var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n    // component is hitting the resume path. Figure out why. Possibly\n    // related to `hidden`.\n\n    var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n    workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n    // is a new ref we mark this as an update. All the work is done in commitWork.\n\n    if (updatePayload) {\n      markUpdate(workInProgress);\n    }\n  };\n\n  updateHostText = function (current, workInProgress, oldText, newText) {\n    // If the text differs, mark it as an update. All the work in done in commitWork.\n    if (oldText !== newText) {\n      markUpdate(workInProgress);\n    }\n  };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n  if (getIsHydrating()) {\n    // If we're hydrating, we should consume as many items as we can\n    // so we don't leave any behind.\n    return;\n  }\n\n  switch (renderState.tailMode) {\n    case 'hidden':\n      {\n        // Any insertions at the end of the tail list after this point\n        // should be invisible. If there are already mounted boundaries\n        // anything before them are not considered for collapsing.\n        // Therefore we need to go through the whole tail to find if\n        // there are any.\n        var tailNode = renderState.tail;\n        var lastTailNode = null;\n\n        while (tailNode !== null) {\n          if (tailNode.alternate !== null) {\n            lastTailNode = tailNode;\n          }\n\n          tailNode = tailNode.sibling;\n        } // Next we're simply going to delete all insertions after the\n        // last rendered item.\n\n\n        if (lastTailNode === null) {\n          // All remaining items in the tail are insertions.\n          renderState.tail = null;\n        } else {\n          // Detach the insertion after the last node that was already\n          // inserted.\n          lastTailNode.sibling = null;\n        }\n\n        break;\n      }\n\n    case 'collapsed':\n      {\n        // Any insertions at the end of the tail list after this point\n        // should be invisible. If there are already mounted boundaries\n        // anything before them are not considered for collapsing.\n        // Therefore we need to go through the whole tail to find if\n        // there are any.\n        var _tailNode = renderState.tail;\n        var _lastTailNode = null;\n\n        while (_tailNode !== null) {\n          if (_tailNode.alternate !== null) {\n            _lastTailNode = _tailNode;\n          }\n\n          _tailNode = _tailNode.sibling;\n        } // Next we're simply going to delete all insertions after the\n        // last rendered item.\n\n\n        if (_lastTailNode === null) {\n          // All remaining items in the tail are insertions.\n          if (!hasRenderedATailFallback && renderState.tail !== null) {\n            // We suspended during the head. We want to show at least one\n            // row at the tail. So we'll keep on and cut off the rest.\n            renderState.tail.sibling = null;\n          } else {\n            renderState.tail = null;\n          }\n        } else {\n          // Detach the insertion after the last node that was already\n          // inserted.\n          _lastTailNode.sibling = null;\n        }\n\n        break;\n      }\n  }\n}\n\nfunction bubbleProperties(completedWork) {\n  var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n  var newChildLanes = NoLanes;\n  var subtreeFlags = NoFlags;\n\n  if (!didBailout) {\n    // Bubble up the earliest expiration time.\n    if ( (completedWork.mode & ProfileMode) !== NoMode) {\n      // In profiling mode, resetChildExpirationTime is also used to reset\n      // profiler durations.\n      var actualDuration = completedWork.actualDuration;\n      var treeBaseDuration = completedWork.selfBaseDuration;\n      var child = completedWork.child;\n\n      while (child !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n        subtreeFlags |= child.subtreeFlags;\n        subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n        // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n        // When work is done, it should bubble to the parent's actualDuration. If\n        // the fiber has not been cloned though, (meaning no work was done), then\n        // this value will reflect the amount of time spent working on a previous\n        // render. In that case it should not bubble. We determine whether it was\n        // cloned by comparing the child pointer.\n\n        actualDuration += child.actualDuration;\n        treeBaseDuration += child.treeBaseDuration;\n        child = child.sibling;\n      }\n\n      completedWork.actualDuration = actualDuration;\n      completedWork.treeBaseDuration = treeBaseDuration;\n    } else {\n      var _child = completedWork.child;\n\n      while (_child !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n        subtreeFlags |= _child.subtreeFlags;\n        subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n        // smell because it assumes the commit phase is never concurrent with\n        // the render phase. Will address during refactor to alternate model.\n\n        _child.return = completedWork;\n        _child = _child.sibling;\n      }\n    }\n\n    completedWork.subtreeFlags |= subtreeFlags;\n  } else {\n    // Bubble up the earliest expiration time.\n    if ( (completedWork.mode & ProfileMode) !== NoMode) {\n      // In profiling mode, resetChildExpirationTime is also used to reset\n      // profiler durations.\n      var _treeBaseDuration = completedWork.selfBaseDuration;\n      var _child2 = completedWork.child;\n\n      while (_child2 !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n        // so we should bubble those up even during a bailout. All the other\n        // flags have a lifetime only of a single render + commit, so we should\n        // ignore them.\n\n        subtreeFlags |= _child2.subtreeFlags & StaticMask;\n        subtreeFlags |= _child2.flags & StaticMask;\n        _treeBaseDuration += _child2.treeBaseDuration;\n        _child2 = _child2.sibling;\n      }\n\n      completedWork.treeBaseDuration = _treeBaseDuration;\n    } else {\n      var _child3 = completedWork.child;\n\n      while (_child3 !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n        // so we should bubble those up even during a bailout. All the other\n        // flags have a lifetime only of a single render + commit, so we should\n        // ignore them.\n\n        subtreeFlags |= _child3.subtreeFlags & StaticMask;\n        subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n        // smell because it assumes the commit phase is never concurrent with\n        // the render phase. Will address during refactor to alternate model.\n\n        _child3.return = completedWork;\n        _child3 = _child3.sibling;\n      }\n    }\n\n    completedWork.subtreeFlags |= subtreeFlags;\n  }\n\n  completedWork.childLanes = newChildLanes;\n  return didBailout;\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n  var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n\n  popTreeContext(workInProgress);\n\n  switch (workInProgress.tag) {\n    case IndeterminateComponent:\n    case LazyComponent:\n    case SimpleMemoComponent:\n    case FunctionComponent:\n    case ForwardRef:\n    case Fragment:\n    case Mode:\n    case Profiler:\n    case ContextConsumer:\n    case MemoComponent:\n      bubbleProperties(workInProgress);\n      return null;\n\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          popContext(workInProgress);\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case HostRoot:\n      {\n        var fiberRoot = workInProgress.stateNode;\n        popHostContainer(workInProgress);\n        popTopLevelContextObject(workInProgress);\n        resetWorkInProgressVersions();\n\n        if (fiberRoot.pendingContext) {\n          fiberRoot.context = fiberRoot.pendingContext;\n          fiberRoot.pendingContext = null;\n        }\n\n        if (current === null || current.child === null) {\n          // If we hydrated, pop so that we can delete any remaining children\n          // that weren't hydrated.\n          var wasHydrated = popHydrationState(workInProgress);\n\n          if (wasHydrated) {\n            // If we hydrated, then we'll need to schedule an update for\n            // the commit side-effects on the root.\n            markUpdate(workInProgress);\n          } else {\n            if (current !== null) {\n              var prevState = current.memoizedState;\n\n              if ( // Check if this is a client root\n              !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n              (workInProgress.flags & ForceClientRender) !== NoFlags) {\n                // Schedule an effect to clear this container at the start of the\n                // next commit. This handles the case of React rendering into a\n                // container with previous children. It's also safe to do for\n                // updates too, because current.child would only be null if the\n                // previous render was null (so the container would already\n                // be empty).\n                workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n                // recoverable errors during first hydration attempt. If so, add\n                // them to a queue so we can log them in the commit phase.\n\n                upgradeHydrationErrorsToRecoverable();\n              }\n            }\n          }\n        }\n\n        updateHostContainer(current, workInProgress);\n        bubbleProperties(workInProgress);\n\n        return null;\n      }\n\n    case HostComponent:\n      {\n        popHostContext(workInProgress);\n        var rootContainerInstance = getRootHostContainer();\n        var type = workInProgress.type;\n\n        if (current !== null && workInProgress.stateNode != null) {\n          updateHostComponent(current, workInProgress, type, newProps, rootContainerInstance);\n\n          if (current.ref !== workInProgress.ref) {\n            markRef(workInProgress);\n          }\n        } else {\n          if (!newProps) {\n            if (workInProgress.stateNode === null) {\n              throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            } // This can happen when we abort work.\n\n\n            bubbleProperties(workInProgress);\n            return null;\n          }\n\n          var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n          // \"stack\" as the parent. Then append children as we go in beginWork\n          // or completeWork depending on whether we want to add them top->down or\n          // bottom->up. Top->down is faster in IE11.\n\n          var _wasHydrated = popHydrationState(workInProgress);\n\n          if (_wasHydrated) {\n            // TODO: Move this and createInstance step into the beginPhase\n            // to consolidate.\n            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n              // If changes to the hydrated node need to be applied at the\n              // commit-phase we mark this as such.\n              markUpdate(workInProgress);\n            }\n          } else {\n            var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n            appendAllChildren(instance, workInProgress, false, false);\n            workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n            // (eg DOM renderer supports auto-focus for certain elements).\n            // Make sure such renderers get scheduled for later work.\n\n            if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n              markUpdate(workInProgress);\n            }\n          }\n\n          if (workInProgress.ref !== null) {\n            // If there is a ref on a host node we need to schedule a callback\n            markRef(workInProgress);\n          }\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case HostText:\n      {\n        var newText = newProps;\n\n        if (current && workInProgress.stateNode != null) {\n          var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n          // to schedule a side-effect to do the updates.\n\n          updateHostText(current, workInProgress, oldText, newText);\n        } else {\n          if (typeof newText !== 'string') {\n            if (workInProgress.stateNode === null) {\n              throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            } // This can happen when we abort work.\n\n          }\n\n          var _rootContainerInstance = getRootHostContainer();\n\n          var _currentHostContext = getHostContext();\n\n          var _wasHydrated2 = popHydrationState(workInProgress);\n\n          if (_wasHydrated2) {\n            if (prepareToHydrateHostTextInstance(workInProgress)) {\n              markUpdate(workInProgress);\n            }\n          } else {\n            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n          }\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case SuspenseComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var nextState = workInProgress.memoizedState;\n\n        if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {\n          warnIfUnhydratedTailNodes(workInProgress);\n          resetHydrationState();\n          workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;\n          return workInProgress;\n        }\n\n        if (nextState !== null && nextState.dehydrated !== null) {\n          // We might be inside a hydration state the first time we're picking up this\n          // Suspense boundary, and also after we've reentered it for further hydration.\n          var _wasHydrated3 = popHydrationState(workInProgress);\n\n          if (current === null) {\n            if (!_wasHydrated3) {\n              throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n            }\n\n            prepareToHydrateHostSuspenseInstance(workInProgress);\n            bubbleProperties(workInProgress);\n\n            {\n              if ((workInProgress.mode & ProfileMode) !== NoMode) {\n                var isTimedOutSuspense = nextState !== null;\n\n                if (isTimedOutSuspense) {\n                  // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n                  var primaryChildFragment = workInProgress.child;\n\n                  if (primaryChildFragment !== null) {\n                    // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n                    workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n                  }\n                }\n              }\n            }\n\n            return null;\n          } else {\n            // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n            // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n            resetHydrationState();\n\n            if ((workInProgress.flags & DidCapture) === NoFlags) {\n              // This boundary did not suspend so it's now hydrated and unsuspended.\n              workInProgress.memoizedState = null;\n            } // If nothing suspended, we need to schedule an effect to mark this boundary\n            // as having hydrated so events know that they're free to be invoked.\n            // It's also a signal to replay events and the suspense callback.\n            // If something suspended, schedule an effect to attach retry listeners.\n            // So we might as well always mark this.\n\n\n            workInProgress.flags |= Update;\n            bubbleProperties(workInProgress);\n\n            {\n              if ((workInProgress.mode & ProfileMode) !== NoMode) {\n                var _isTimedOutSuspense = nextState !== null;\n\n                if (_isTimedOutSuspense) {\n                  // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n                  var _primaryChildFragment = workInProgress.child;\n\n                  if (_primaryChildFragment !== null) {\n                    // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n                    workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n                  }\n                }\n              }\n            }\n\n            return null;\n          }\n        } // Successfully completed this tree. If this was a forced client render,\n        // there may have been recoverable errors during first hydration\n        // attempt. If so, add them to a queue so we can log them in the\n        // commit phase.\n\n\n        upgradeHydrationErrorsToRecoverable();\n\n        if ((workInProgress.flags & DidCapture) !== NoFlags) {\n          // Something suspended. Re-render with the fallback children.\n          workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          } // Don't bubble properties in this case.\n\n\n          return workInProgress;\n        }\n\n        var nextDidTimeout = nextState !== null;\n        var prevDidTimeout = false;\n\n        if (current === null) {\n          popHydrationState(workInProgress);\n        } else {\n          var _prevState = current.memoizedState;\n          prevDidTimeout = _prevState !== null;\n        }\n        // a passive effect, which is when we process the transitions\n\n\n        if (nextDidTimeout !== prevDidTimeout) {\n          // an effect to toggle the subtree's visibility. When we switch from\n          // fallback -> primary, the inner Offscreen fiber schedules this effect\n          // as part of its normal complete phase. But when we switch from\n          // primary -> fallback, the inner Offscreen fiber does not have a complete\n          // phase. So we need to schedule its effect here.\n          //\n          // We also use this flag to connect/disconnect the effects, but the same\n          // logic applies: when re-connecting, the Offscreen fiber's complete\n          // phase will handle scheduling the effect. It's only when the fallback\n          // is active that we have to do anything special.\n\n\n          if (nextDidTimeout) {\n            var _offscreenFiber2 = workInProgress.child;\n            _offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything\n            // in the concurrent tree already suspended during this render.\n            // This is a known bug.\n\n            if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n              // TODO: Move this back to throwException because this is too late\n              // if this is a large tree which is common for initial loads. We\n              // don't know if we should restart a render or not until we get\n              // this marker, and this is too late.\n              // If this render already had a ping or lower pri updates,\n              // and this is the first time we know we're going to suspend we\n              // should be able to immediately restart from within throwException.\n              var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);\n\n              if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n                // If this was in an invisible tree or a new render, then showing\n                // this boundary is ok.\n                renderDidSuspend();\n              } else {\n                // Otherwise, we're going to have to hide content so we should\n                // suspend for longer if possible.\n                renderDidSuspendDelayIfPossible();\n              }\n            }\n          }\n        }\n\n        var wakeables = workInProgress.updateQueue;\n\n        if (wakeables !== null) {\n          // Schedule an effect to attach a retry listener to the promise.\n          // TODO: Move to passive phase\n          workInProgress.flags |= Update;\n        }\n\n        bubbleProperties(workInProgress);\n\n        {\n          if ((workInProgress.mode & ProfileMode) !== NoMode) {\n            if (nextDidTimeout) {\n              // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n              var _primaryChildFragment2 = workInProgress.child;\n\n              if (_primaryChildFragment2 !== null) {\n                // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n                workInProgress.treeBaseDuration -= _primaryChildFragment2.treeBaseDuration;\n              }\n            }\n          }\n        }\n\n        return null;\n      }\n\n    case HostPortal:\n      popHostContainer(workInProgress);\n      updateHostContainer(current, workInProgress);\n\n      if (current === null) {\n        preparePortalMount(workInProgress.stateNode.containerInfo);\n      }\n\n      bubbleProperties(workInProgress);\n      return null;\n\n    case ContextProvider:\n      // Pop provider fiber\n      var context = workInProgress.type._context;\n      popProvider(context, workInProgress);\n      bubbleProperties(workInProgress);\n      return null;\n\n    case IncompleteClassComponent:\n      {\n        // Same as class component case. I put it down here so that the tags are\n        // sequential to ensure this switch is compiled to a jump table.\n        var _Component = workInProgress.type;\n\n        if (isContextProvider(_Component)) {\n          popContext(workInProgress);\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case SuspenseListComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var renderState = workInProgress.memoizedState;\n\n        if (renderState === null) {\n          // We're running in the default, \"independent\" mode.\n          // We don't do anything in this mode.\n          bubbleProperties(workInProgress);\n          return null;\n        }\n\n        var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n        var renderedTail = renderState.rendering;\n\n        if (renderedTail === null) {\n          // We just rendered the head.\n          if (!didSuspendAlready) {\n            // This is the first pass. We need to figure out if anything is still\n            // suspended in the rendered set.\n            // If new content unsuspended, but there's still some content that\n            // didn't. Then we need to do a second pass that forces everything\n            // to keep showing their fallbacks.\n            // We might be suspended if something in this render pass suspended, or\n            // something in the previous committed pass suspended. Otherwise,\n            // there's no chance so we can skip the expensive call to\n            // findFirstSuspended.\n            var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n            if (!cannotBeSuspended) {\n              var row = workInProgress.child;\n\n              while (row !== null) {\n                var suspended = findFirstSuspended(row);\n\n                if (suspended !== null) {\n                  didSuspendAlready = true;\n                  workInProgress.flags |= DidCapture;\n                  cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n                  // part of the second pass. In that case nothing will subscribe to\n                  // its thenables. Instead, we'll transfer its thenables to the\n                  // SuspenseList so that it can retry if they resolve.\n                  // There might be multiple of these in the list but since we're\n                  // going to wait for all of them anyway, it doesn't really matter\n                  // which ones gets to ping. In theory we could get clever and keep\n                  // track of how many dependencies remain but it gets tricky because\n                  // in the meantime, we can add/remove/change items and dependencies.\n                  // We might bail out of the loop before finding any but that\n                  // doesn't matter since that means that the other boundaries that\n                  // we did find already has their listeners attached.\n\n                  var newThenables = suspended.updateQueue;\n\n                  if (newThenables !== null) {\n                    workInProgress.updateQueue = newThenables;\n                    workInProgress.flags |= Update;\n                  } // Rerender the whole list, but this time, we'll force fallbacks\n                  // to stay in place.\n                  // Reset the effect flags before doing the second pass since that's now invalid.\n                  // Reset the child fibers to their original state.\n\n\n                  workInProgress.subtreeFlags = NoFlags;\n                  resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n                  // rerender the children.\n\n                  pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n                  return workInProgress.child;\n                }\n\n                row = row.sibling;\n              }\n            }\n\n            if (renderState.tail !== null && now() > getRenderTargetTime()) {\n              // We have already passed our CPU deadline but we still have rows\n              // left in the tail. We'll just give up further attempts to render\n              // the main content and only render fallbacks.\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true;\n              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n              // to get it started back up to attempt the next item. While in terms\n              // of priority this work has the same priority as this current render,\n              // it's not part of the same transition once the transition has\n              // committed. If it's sync, we still want to yield so that it can be\n              // painted. Conceptually, this is really the same as pinging.\n              // We can use any RetryLane even if it's the one currently rendering\n              // since we're leaving it behind on this node.\n\n              workInProgress.lanes = SomeRetryLane;\n            }\n          } else {\n            cutOffTailIfNeeded(renderState, false);\n          } // Next we're going to render the tail.\n\n        } else {\n          // Append the rendered row to the child list.\n          if (!didSuspendAlready) {\n            var _suspended = findFirstSuspended(renderedTail);\n\n            if (_suspended !== null) {\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n              // get lost if this row ends up dropped during a second pass.\n\n              var _newThenables = _suspended.updateQueue;\n\n              if (_newThenables !== null) {\n                workInProgress.updateQueue = _newThenables;\n                workInProgress.flags |= Update;\n              }\n\n              cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n              if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n              ) {\n                  // We're done.\n                  bubbleProperties(workInProgress);\n                  return null;\n                }\n            } else if ( // The time it took to render last row is greater than the remaining\n            // time we have to render. So rendering one more row would likely\n            // exceed it.\n            now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n              // We have now passed our CPU deadline and we'll just give up further\n              // attempts to render the main content and only render fallbacks.\n              // The assumption is that this is usually faster.\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true;\n              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n              // to get it started back up to attempt the next item. While in terms\n              // of priority this work has the same priority as this current render,\n              // it's not part of the same transition once the transition has\n              // committed. If it's sync, we still want to yield so that it can be\n              // painted. Conceptually, this is really the same as pinging.\n              // We can use any RetryLane even if it's the one currently rendering\n              // since we're leaving it behind on this node.\n\n              workInProgress.lanes = SomeRetryLane;\n            }\n          }\n\n          if (renderState.isBackwards) {\n            // The effect list of the backwards tail will have been added\n            // to the end. This breaks the guarantee that life-cycles fire in\n            // sibling order but that isn't a strong guarantee promised by React.\n            // Especially since these might also just pop in during future commits.\n            // Append to the beginning of the list.\n            renderedTail.sibling = workInProgress.child;\n            workInProgress.child = renderedTail;\n          } else {\n            var previousSibling = renderState.last;\n\n            if (previousSibling !== null) {\n              previousSibling.sibling = renderedTail;\n            } else {\n              workInProgress.child = renderedTail;\n            }\n\n            renderState.last = renderedTail;\n          }\n        }\n\n        if (renderState.tail !== null) {\n          // We still have tail rows to render.\n          // Pop a row.\n          var next = renderState.tail;\n          renderState.rendering = next;\n          renderState.tail = next.sibling;\n          renderState.renderingStartTime = now();\n          next.sibling = null; // Restore the context.\n          // TODO: We can probably just avoid popping it instead and only\n          // setting it the first time we go from not suspended to suspended.\n\n          var suspenseContext = suspenseStackCursor.current;\n\n          if (didSuspendAlready) {\n            suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n          } else {\n            suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n          }\n\n          pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n          // Don't bubble properties in this case.\n\n          return next;\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case ScopeComponent:\n      {\n\n        break;\n      }\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      {\n        popRenderLanes(workInProgress);\n        var _nextState = workInProgress.memoizedState;\n        var nextIsHidden = _nextState !== null;\n\n        if (current !== null) {\n          var _prevState2 = current.memoizedState;\n          var prevIsHidden = _prevState2 !== null;\n\n          if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding \u2014 it only pre-renders.\n          !enableLegacyHidden )) {\n            workInProgress.flags |= Visibility;\n          }\n        }\n\n        if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n          bubbleProperties(workInProgress);\n        } else {\n          // Don't bubble properties for hidden children unless we're rendering\n          // at offscreen priority.\n          if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {\n            bubbleProperties(workInProgress);\n\n            {\n              // Check if there was an insertion or update in the hidden subtree.\n              // If so, we need to hide those nodes in the commit phase, so\n              // schedule a visibility effect.\n              if ( workInProgress.subtreeFlags & (Placement | Update)) {\n                workInProgress.flags |= Visibility;\n              }\n            }\n          }\n        }\n        return null;\n      }\n\n    case CacheComponent:\n      {\n\n        return null;\n      }\n\n    case TracingMarkerComponent:\n      {\n\n        return null;\n      }\n  }\n\n  throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\n\n{\n  didWarnAboutBadClass = {};\n  didWarnAboutModulePatternComponent = {};\n  didWarnAboutContextTypeOnFunctionComponent = {};\n  didWarnAboutGetDerivedStateOnFunctionComponent = {};\n  didWarnAboutFunctionRefs = {};\n  didWarnAboutReassigningProps = false;\n  didWarnAboutRevealOrder = {};\n  didWarnAboutTailOptions = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n  if (current === null) {\n    // If this is a fresh new component that hasn't been rendered yet, we\n    // won't update its child set by applying minimal side-effects. Instead,\n    // we will add them all to the child before it gets rendered. That means\n    // we can optimize this reconciliation pass by not tracking side-effects.\n    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n  } else {\n    // If the current child is the same as the work in progress, it means that\n    // we haven't yet started any work on these children. Therefore, we use\n    // the clone algorithm to create a copy of all the current children.\n    // If we had any progressed work already, that is invalid at this point so\n    // let's throw it out.\n    workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n  }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n  // This function is fork of reconcileChildren. It's used in cases where we\n  // want to reconcile without matching against the existing set. This has the\n  // effect of all current children being unmounted; even if the type and key\n  // are the same, the old child is unmounted and a new child is created.\n  //\n  // To do this, we're going to go through the reconcile algorithm twice. In\n  // the first pass, we schedule a deletion for all the current children by\n  // passing null.\n  workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n  // pass null in place of where we usually pass the current child set. This has\n  // the effect of remounting all children regardless of whether their\n  // identities match.\n\n  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n  // TODO: current can be non-null here even if the component\n  // hasn't yet mounted. This happens after the first render suspends.\n  // We'll need to figure out if this is fine or can cause issues.\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  }\n\n  var render = Component.render;\n  var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n  var nextChildren;\n  var hasId;\n  prepareToReadContext(workInProgress, renderLanes);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n    hasId = checkDidRenderIdHook();\n\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n        hasId = checkDidRenderIdHook();\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  }\n\n  if (current !== null && !didReceiveUpdate) {\n    bailoutHooks(current, workInProgress, renderLanes);\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  if (getIsHydrating() && hasId) {\n    pushMaterializedTreeId(workInProgress);\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  if (current === null) {\n    var type = Component.type;\n\n    if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n    Component.defaultProps === undefined) {\n      var resolvedType = type;\n\n      {\n        resolvedType = resolveFunctionForHotReloading(type);\n      } // If this is a plain function component without default props,\n      // and with only the default shallow comparison, we upgrade it\n      // to a SimpleMemoComponent to allow fast path updates.\n\n\n      workInProgress.tag = SimpleMemoComponent;\n      workInProgress.type = resolvedType;\n\n      {\n        validateFunctionComponentInDev(workInProgress, type);\n      }\n\n      return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);\n    }\n\n    {\n      var innerPropTypes = type.propTypes;\n\n      if (innerPropTypes) {\n        // Inner memo component props aren't currently validated in createElement.\n        // We could move it there, but we'd still need this for lazy code path.\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(type));\n      }\n    }\n\n    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n    child.ref = workInProgress.ref;\n    child.return = workInProgress;\n    workInProgress.child = child;\n    return child;\n  }\n\n  {\n    var _type = Component.type;\n    var _innerPropTypes = _type.propTypes;\n\n    if (_innerPropTypes) {\n      // Inner memo component props aren't currently validated in createElement.\n      // We could move it there, but we'd still need this for lazy code path.\n      checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n      'prop', getComponentNameFromType(_type));\n    }\n  }\n\n  var currentChild = current.child; // This is always exactly one child\n\n  var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n  if (!hasScheduledUpdateOrContext) {\n    // This will be the props with resolved defaultProps,\n    // unlike current.memoizedProps which will be the unresolved ones.\n    var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n    var compare = Component.compare;\n    compare = compare !== null ? compare : shallowEqual;\n\n    if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n    }\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  var newChild = createWorkInProgress(currentChild, nextProps);\n  newChild.ref = workInProgress.ref;\n  newChild.return = workInProgress;\n  workInProgress.child = newChild;\n  return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  // TODO: current can be non-null here even if the component\n  // hasn't yet mounted. This happens when the inner render suspends.\n  // We'll need to figure out if this is fine or can cause issues.\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var outerMemoType = workInProgress.elementType;\n\n      if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n        // We warn when you define propTypes on lazy()\n        // so let's just skip over it to find memo() outer wrapper.\n        // Inner props for memo are validated later.\n        var lazyComponent = outerMemoType;\n        var payload = lazyComponent._payload;\n        var init = lazyComponent._init;\n\n        try {\n          outerMemoType = init(payload);\n        } catch (x) {\n          outerMemoType = null;\n        } // Inner propTypes will be validated in the function component path.\n\n\n        var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n        if (outerPropTypes) {\n          checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n          'prop', getComponentNameFromType(outerMemoType));\n        }\n      }\n    }\n  }\n\n  if (current !== null) {\n    var prevProps = current.memoizedProps;\n\n    if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n     workInProgress.type === current.type )) {\n      didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n      // would during a normal fiber bailout.\n      //\n      // We don't have strong guarantees that the props object is referentially\n      // equal during updates where we can't bail out anyway \u2014 like if the props\n      // are shallowly equal, but there's a local state or context update in the\n      // same batch.\n      //\n      // However, as a principle, we should aim to make the behavior consistent\n      // across different ways of memoizing a component. For example, React.memo\n      // has a different internal Fiber layout if you pass a normal function\n      // component (SimpleMemoComponent) versus if you pass a different type\n      // like forwardRef (MemoComponent). But this is an implementation detail.\n      // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n      // affect whether the props object is reused during a bailout.\n\n      workInProgress.pendingProps = nextProps = prevProps;\n\n      if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n        // The pending lanes were cleared at the beginning of beginWork. We're\n        // about to bail out, but there might be other lanes that weren't\n        // included in the current render. Usually, the priority level of the\n        // remaining updates is accumulated during the evaluation of the\n        // component (i.e. when processing the update queue). But since since\n        // we're bailing out early *without* evaluating the component, we need\n        // to account for it here, too. Reset to the value of the current fiber.\n        // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n        // because a MemoComponent fiber does not have hooks or an update queue;\n        // rather, it wraps around an inner component, which may or may not\n        // contains hooks.\n        // TODO: Move the reset at in beginWork out of the common path so that\n        // this is no longer necessary.\n        workInProgress.lanes = current.lanes;\n        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n      } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n        // This is a special case that only exists for legacy mode.\n        // See https://github.com/facebook/react/pull/19216.\n        didReceiveUpdate = true;\n      }\n    }\n  }\n\n  return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps;\n  var nextChildren = nextProps.children;\n  var prevState = current !== null ? current.memoizedState : null;\n\n  if (nextProps.mode === 'hidden' || enableLegacyHidden ) {\n    // Rendering a hidden tree.\n    if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n      // In legacy sync mode, don't defer the subtree. Render it now.\n      // TODO: Consider how Offscreen should work with transitions in the future\n      var nextState = {\n        baseLanes: NoLanes,\n        cachePool: null,\n        transitions: null\n      };\n      workInProgress.memoizedState = nextState;\n\n      pushRenderLanes(workInProgress, renderLanes);\n    } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n      var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out\n      // and resume this tree later.\n\n      var nextBaseLanes;\n\n      if (prevState !== null) {\n        var prevBaseLanes = prevState.baseLanes;\n        nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n      } else {\n        nextBaseLanes = renderLanes;\n      } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n      workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n      var _nextState = {\n        baseLanes: nextBaseLanes,\n        cachePool: spawnedCachePool,\n        transitions: null\n      };\n      workInProgress.memoizedState = _nextState;\n      workInProgress.updateQueue = null;\n      // to avoid a push/pop misalignment.\n\n\n      pushRenderLanes(workInProgress, nextBaseLanes);\n\n      return null;\n    } else {\n      // This is the second render. The surrounding visible content has already\n      // committed. Now we resume rendering the hidden tree.\n      // Rendering at offscreen, so we can clear the base lanes.\n      var _nextState2 = {\n        baseLanes: NoLanes,\n        cachePool: null,\n        transitions: null\n      };\n      workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n      var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n\n      pushRenderLanes(workInProgress, subtreeRenderLanes);\n    }\n  } else {\n    // Rendering a visible tree.\n    var _subtreeRenderLanes;\n\n    if (prevState !== null) {\n      // We're going from hidden -> visible.\n      _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);\n\n      workInProgress.memoizedState = null;\n    } else {\n      // We weren't previously hidden, and we still aren't, so there's nothing\n      // special to do. Need to push to the stack regardless, though, to avoid\n      // a push/pop misalignment.\n      _subtreeRenderLanes = renderLanes;\n    }\n\n    pushRenderLanes(workInProgress, _subtreeRenderLanes);\n  }\n\n  {\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n    return workInProgress.child;\n  }\n}\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n  var nextChildren = workInProgress.pendingProps;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n  var nextChildren = workInProgress.pendingProps.children;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n  {\n    workInProgress.flags |= Update;\n\n    {\n      // Reset effect durations for the next eventual effect phase.\n      // These are reset during render to allow the DevTools commit hook a chance to read them,\n      var stateNode = workInProgress.stateNode;\n      stateNode.effectDuration = 0;\n      stateNode.passiveEffectDuration = 0;\n    }\n  }\n\n  var nextProps = workInProgress.pendingProps;\n  var nextChildren = nextProps.children;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction markRef$1(current, workInProgress) {\n  var ref = workInProgress.ref;\n\n  if (current === null && ref !== null || current !== null && current.ref !== ref) {\n    // Schedule a Ref effect\n    workInProgress.flags |= Ref;\n\n    {\n      workInProgress.flags |= RefStatic;\n    }\n  }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  }\n\n  var context;\n\n  {\n    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n    context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  var nextChildren;\n  var hasId;\n  prepareToReadContext(workInProgress, renderLanes);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n    hasId = checkDidRenderIdHook();\n\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n        hasId = checkDidRenderIdHook();\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  }\n\n  if (current !== null && !didReceiveUpdate) {\n    bailoutHooks(current, workInProgress, renderLanes);\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  if (getIsHydrating() && hasId) {\n    pushMaterializedTreeId(workInProgress);\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  {\n    // This is used by DevTools to force a boundary to error.\n    switch (shouldError(workInProgress)) {\n      case false:\n        {\n          var _instance = workInProgress.stateNode;\n          var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n          // Is there a better way to do this?\n\n          var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n          var state = tempInstance.state;\n\n          _instance.updater.enqueueSetState(_instance, state, null);\n\n          break;\n        }\n\n      case true:\n        {\n          workInProgress.flags |= DidCapture;\n          workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n          var error$1 = new Error('Simulated error coming from DevTools');\n          var lane = pickArbitraryLane(renderLanes);\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n          var update = createClassErrorUpdate(workInProgress, createCapturedValue(error$1, workInProgress), lane);\n          enqueueCapturedUpdate(workInProgress, update);\n          break;\n        }\n    }\n\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  } // Push context providers early to prevent context stack mismatches.\n  // During mounting we don't know the child context yet as the instance doesn't exist.\n  // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n  var hasContext;\n\n  if (isContextProvider(Component)) {\n    hasContext = true;\n    pushContextProvider(workInProgress);\n  } else {\n    hasContext = false;\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var instance = workInProgress.stateNode;\n  var shouldUpdate;\n\n  if (instance === null) {\n    if (current !== null) {\n      // A class component without an instance only mounts if it suspended\n      // inside a non-concurrent tree, in an inconsistent state. We want to\n      // treat it like a new mount, even though an empty version of it already\n      // committed. Disconnect the alternate pointers.\n      current.alternate = null;\n      workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n      workInProgress.flags |= Placement;\n    } // In the initial pass we might need to construct the instance.\n\n\n    constructClassInstance(workInProgress, Component, nextProps);\n    mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n    shouldUpdate = true;\n  } else if (current === null) {\n    // In a resume, we'll already have an instance we can reuse.\n    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n  } else {\n    shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n  }\n\n  var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n  {\n    var inst = workInProgress.stateNode;\n\n    if (shouldUpdate && inst.props !== nextProps) {\n      if (!didWarnAboutReassigningProps) {\n        error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');\n      }\n\n      didWarnAboutReassigningProps = true;\n    }\n  }\n\n  return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n  // Refs should update even if shouldComponentUpdate returns false\n  markRef$1(current, workInProgress);\n  var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n  if (!shouldUpdate && !didCaptureError) {\n    // Context providers should defer to sCU for rendering\n    if (hasContext) {\n      invalidateContextProvider(workInProgress, Component, false);\n    }\n\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  var instance = workInProgress.stateNode; // Rerender\n\n  ReactCurrentOwner$1.current = workInProgress;\n  var nextChildren;\n\n  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n    // If we captured an error, but getDerivedStateFromError is not defined,\n    // unmount all the children. componentDidCatch will schedule an update to\n    // re-render a fallback. This is temporary until we migrate everyone to\n    // the new API.\n    // TODO: Warn in a future release.\n    nextChildren = null;\n\n    {\n      stopProfilerTimerIfRunning();\n    }\n  } else {\n    {\n      markComponentRenderStarted(workInProgress);\n    }\n\n    {\n      setIsRendering(true);\n      nextChildren = instance.render();\n\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          instance.render();\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n\n      setIsRendering(false);\n    }\n\n    {\n      markComponentRenderStopped();\n    }\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n\n  if (current !== null && didCaptureError) {\n    // If we're recovering from an error, reconcile without reusing any of\n    // the existing children. Conceptually, the normal children and the children\n    // that are shown on error are two different sets, so we shouldn't reuse\n    // normal children even if their identities match.\n    forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n  } else {\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  } // Memoize state using the values we just used to render.\n  // TODO: Restructure so we never read values from the instance.\n\n\n  workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n  if (hasContext) {\n    invalidateContextProvider(workInProgress, Component, true);\n  }\n\n  return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n  var root = workInProgress.stateNode;\n\n  if (root.pendingContext) {\n    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n  } else if (root.context) {\n    // Should always be set\n    pushTopLevelContextObject(workInProgress, root.context, false);\n  }\n\n  pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n  pushHostRootContext(workInProgress);\n\n  if (current === null) {\n    throw new Error('Should have a current fiber. This is a bug in React.');\n  }\n\n  var nextProps = workInProgress.pendingProps;\n  var prevState = workInProgress.memoizedState;\n  var prevChildren = prevState.element;\n  cloneUpdateQueue(current, workInProgress);\n  processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n  var nextState = workInProgress.memoizedState;\n  var root = workInProgress.stateNode;\n  // being called \"element\".\n\n\n  var nextChildren = nextState.element;\n\n  if ( prevState.isDehydrated) {\n    // This is a hydration root whose shell has not yet hydrated. We should\n    // attempt to hydrate.\n    // Flip isDehydrated to false to indicate that when this render\n    // finishes, the root will no longer be dehydrated.\n    var overrideState = {\n      element: nextChildren,\n      isDehydrated: false,\n      cache: nextState.cache,\n      pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,\n      transitions: nextState.transitions\n    };\n    var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n    // have reducer functions so it doesn't need rebasing.\n\n    updateQueue.baseState = overrideState;\n    workInProgress.memoizedState = overrideState;\n\n    if (workInProgress.flags & ForceClientRender) {\n      // Something errored during a previous attempt to hydrate the shell, so we\n      // forced a client render.\n      var recoverableError = new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.');\n      return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n    } else if (nextChildren !== prevChildren) {\n      var _recoverableError = new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.');\n\n      return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n    } else {\n      // The outermost shell has not hydrated yet. Start hydrating.\n      enterHydrationState(workInProgress);\n\n      var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n      workInProgress.child = child;\n      var node = child;\n\n      while (node) {\n        // Mark each child as hydrating. This is a fast path to know whether this\n        // tree is part of a hydrating tree. This is used to determine if a child\n        // node has fully mounted yet, and for scheduling event replaying.\n        // Conceptually this is similar to Placement in that a new subtree is\n        // inserted into the React tree here. It just happens to not need DOM\n        // mutations because it already exists.\n        node.flags = node.flags & ~Placement | Hydrating;\n        node = node.sibling;\n      }\n    }\n  } else {\n    // Root is not dehydrated. Either this is a client-only root, or it\n    // already hydrated.\n    resetHydrationState();\n\n    if (nextChildren === prevChildren) {\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n    }\n\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  }\n\n  return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n  // Revert to client rendering.\n  resetHydrationState();\n  queueHydrationError(recoverableError);\n  workInProgress.flags |= ForceClientRender;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateHostComponent$1(current, workInProgress, renderLanes) {\n  pushHostContext(workInProgress);\n\n  if (current === null) {\n    tryToClaimNextHydratableInstance(workInProgress);\n  }\n\n  var type = workInProgress.type;\n  var nextProps = workInProgress.pendingProps;\n  var prevProps = current !== null ? current.memoizedProps : null;\n  var nextChildren = nextProps.children;\n  var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n  if (isDirectTextChild) {\n    // We special case a direct text child of a host node. This is a common\n    // case. We won't handle it as a reified child. We will instead handle\n    // this in the host environment that also has access to this prop. That\n    // avoids allocating another HostText fiber and traversing it.\n    nextChildren = null;\n  } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n    // If we're switching from a direct text child to a normal child, or to\n    // empty, we need to schedule the text content to be reset.\n    workInProgress.flags |= ContentReset;\n  }\n\n  markRef$1(current, workInProgress);\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateHostText$1(current, workInProgress) {\n  if (current === null) {\n    tryToClaimNextHydratableInstance(workInProgress);\n  } // Nothing to do here. This is terminal. We'll do the completion step\n  // immediately after.\n\n\n  return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n  if (_current !== null) {\n    // A lazy component only mounts if it suspended inside a non-\n    // concurrent tree, in an inconsistent state. We want to treat it like\n    // a new mount, even though an empty version of it already committed.\n    // Disconnect the alternate pointers.\n    _current.alternate = null;\n    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n    workInProgress.flags |= Placement;\n  }\n\n  var props = workInProgress.pendingProps;\n  var lazyComponent = elementType;\n  var payload = lazyComponent._payload;\n  var init = lazyComponent._init;\n  var Component = init(payload); // Store the unwrapped component in the type.\n\n  workInProgress.type = Component;\n  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n  var resolvedProps = resolveDefaultProps(Component, props);\n  var child;\n\n  switch (resolvedTag) {\n    case FunctionComponent:\n      {\n        {\n          validateFunctionComponentInDev(workInProgress, Component);\n          workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n        }\n\n        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case ClassComponent:\n      {\n        {\n          workInProgress.type = Component = resolveClassForHotReloading(Component);\n        }\n\n        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case ForwardRef:\n      {\n        {\n          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n        }\n\n        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case MemoComponent:\n      {\n        {\n          if (workInProgress.type !== workInProgress.elementType) {\n            var outerPropTypes = Component.propTypes;\n\n            if (outerPropTypes) {\n              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n              'prop', getComponentNameFromType(Component));\n            }\n          }\n        }\n\n        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n        renderLanes);\n        return child;\n      }\n  }\n\n  var hint = '';\n\n  {\n    if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n      hint = ' Did you wrap a component in React.lazy() more than once?';\n    }\n  } // This message intentionally doesn't mention ForwardRef or MemoComponent\n  // because the fact that it's a separate type of work is an\n  // implementation detail.\n\n\n  throw new Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". \" + (\"Lazy element type must resolve to a class or function.\" + hint));\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n  if (_current !== null) {\n    // An incomplete component only mounts if it suspended inside a non-\n    // concurrent tree, in an inconsistent state. We want to treat it like\n    // a new mount, even though an empty version of it already committed.\n    // Disconnect the alternate pointers.\n    _current.alternate = null;\n    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n    workInProgress.flags |= Placement;\n  } // Promote the fiber to a class and try rendering again.\n\n\n  workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n  // Push context providers early to prevent context stack mismatches.\n  // During mounting we don't know the child context yet as the instance doesn't exist.\n  // We will invalidate the child context in finishClassComponent() right after rendering.\n\n  var hasContext;\n\n  if (isContextProvider(Component)) {\n    hasContext = true;\n    pushContextProvider(workInProgress);\n  } else {\n    hasContext = false;\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  constructClassInstance(workInProgress, Component, nextProps);\n  mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n  if (_current !== null) {\n    // An indeterminate component only mounts if it suspended inside a non-\n    // concurrent tree, in an inconsistent state. We want to treat it like\n    // a new mount, even though an empty version of it already committed.\n    // Disconnect the alternate pointers.\n    _current.alternate = null;\n    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n    workInProgress.flags |= Placement;\n  }\n\n  var props = workInProgress.pendingProps;\n  var context;\n\n  {\n    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n    context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var value;\n  var hasId;\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    if (Component.prototype && typeof Component.prototype.render === 'function') {\n      var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutBadClass[componentName]) {\n        error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n        didWarnAboutBadClass[componentName] = true;\n      }\n    }\n\n    if (workInProgress.mode & StrictLegacyMode) {\n      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n    }\n\n    setIsRendering(true);\n    ReactCurrentOwner$1.current = workInProgress;\n    value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n    hasId = checkDidRenderIdHook();\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n\n  {\n    // Support for module components is deprecated and is removed behind a flag.\n    // Whether or not it would crash later, we want to show a good message in DEV first.\n    if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n      var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutModulePatternComponent[_componentName]) {\n        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n        didWarnAboutModulePatternComponent[_componentName] = true;\n      }\n    }\n  }\n\n  if ( // Run these checks in production only if the flag is off.\n  // Eventually we'll delete this branch altogether.\n   typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n    {\n      var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutModulePatternComponent[_componentName2]) {\n        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n        didWarnAboutModulePatternComponent[_componentName2] = true;\n      }\n    } // Proceed under the assumption that this is a class instance\n\n\n    workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n    workInProgress.memoizedState = null;\n    workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n    // During mounting we don't know the child context yet as the instance doesn't exist.\n    // We will invalidate the child context in finishClassComponent() right after rendering.\n\n    var hasContext = false;\n\n    if (isContextProvider(Component)) {\n      hasContext = true;\n      pushContextProvider(workInProgress);\n    } else {\n      hasContext = false;\n    }\n\n    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n    initializeUpdateQueue(workInProgress);\n    adoptClassInstance(workInProgress, value);\n    mountClassInstance(workInProgress, Component, props, renderLanes);\n    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n  } else {\n    // Proceed under the assumption that this is a function component\n    workInProgress.tag = FunctionComponent;\n\n    {\n\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n          hasId = checkDidRenderIdHook();\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n    }\n\n    if (getIsHydrating() && hasId) {\n      pushMaterializedTreeId(workInProgress);\n    }\n\n    reconcileChildren(null, workInProgress, value, renderLanes);\n\n    {\n      validateFunctionComponentInDev(workInProgress, Component);\n    }\n\n    return workInProgress.child;\n  }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n  {\n    if (Component) {\n      if (Component.childContextTypes) {\n        error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n      }\n    }\n\n    if (workInProgress.ref !== null) {\n      var info = '';\n      var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n      if (ownerName) {\n        info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n      }\n\n      var warningKey = ownerName || '';\n      var debugSource = workInProgress._debugSource;\n\n      if (debugSource) {\n        warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n      }\n\n      if (!didWarnAboutFunctionRefs[warningKey]) {\n        didWarnAboutFunctionRefs[warningKey] = true;\n\n        error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n      }\n    }\n\n    if (typeof Component.getDerivedStateFromProps === 'function') {\n      var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n        error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n        didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n      }\n    }\n\n    if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n      var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n        error('%s: Function components do not support contextType.', _componentName4);\n\n        didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n      }\n    }\n  }\n}\n\nvar SUSPENDED_MARKER = {\n  dehydrated: null,\n  treeContext: null,\n  retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n  return {\n    baseLanes: renderLanes,\n    cachePool: getSuspendedCache(),\n    transitions: null\n  };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n  var cachePool = null;\n\n  return {\n    baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n    cachePool: cachePool,\n    transitions: prevOffscreenState.transitions\n  };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n  // If we're already showing a fallback, there are cases where we need to\n  // remain on that fallback regardless of whether the content has resolved.\n  // For example, SuspenseList coordinates when nested content appears.\n  if (current !== null) {\n    var suspenseState = current.memoizedState;\n\n    if (suspenseState === null) {\n      // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n      // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n      // Note: This is a factoring smell. Can't remain on a fallback if there's\n      // no fallback to remain on.\n      return false;\n    }\n  } // Not currently showing content. Consult the Suspense context.\n\n\n  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n  // TODO: Should not remove render lanes that were pinged during this render\n  return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n  {\n    if (shouldSuspend(workInProgress)) {\n      workInProgress.flags |= DidCapture;\n    }\n  }\n\n  var suspenseContext = suspenseStackCursor.current;\n  var showFallback = false;\n  var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n  if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n    // Something in this boundary's subtree already suspended. Switch to\n    // rendering the fallback children.\n    showFallback = true;\n    workInProgress.flags &= ~DidCapture;\n  } else {\n    // Attempting the main content\n    if (current === null || current.memoizedState !== null) {\n      // This is a new mount or this boundary is already showing a fallback state.\n      // Mark this subtree context as having at least one invisible parent that could\n      // handle the fallback state.\n      // Avoided boundaries are not considered since they cannot handle preferred fallback states.\n      {\n        suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n      }\n    }\n  }\n\n  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n  pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n  // boundary's children. This involves some custom reconciliation logic. Two\n  // main reasons this is so complicated.\n  //\n  // First, Legacy Mode has different semantics for backwards compatibility. The\n  // primary tree will commit in an inconsistent state, so when we do the\n  // second pass to render the fallback, we do some exceedingly, uh, clever\n  // hacks to make that not totally break. Like transferring effects and\n  // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n  // because we bailout on the primary tree completely and leave it in its old\n  // state, no effects. Same as what we do for Offscreen (except that\n  // Offscreen doesn't have the first render pass).\n  //\n  // Second is hydration. During hydration, the Suspense fiber has a slightly\n  // different layout, where the child points to a dehydrated fragment, which\n  // contains the DOM rendered by the server.\n  //\n  // Third, even if you set all that aside, Suspense is like error boundaries in\n  // that we first we try to render one tree, and if that fails, we render again\n  // and switch to a different tree. Like a try/catch block. So we have to track\n  // which branch we're currently rendering. Ideally we would model this using\n  // a stack.\n\n  if (current === null) {\n    // Initial mount\n    // If we're currently hydrating, try to hydrate this boundary.\n    tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n    var suspenseState = workInProgress.memoizedState;\n\n    if (suspenseState !== null) {\n      var dehydrated = suspenseState.dehydrated;\n\n      if (dehydrated !== null) {\n        return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n      }\n    }\n\n    var nextPrimaryChildren = nextProps.children;\n    var nextFallbackChildren = nextProps.fallback;\n\n    if (showFallback) {\n      var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n      var primaryChildFragment = workInProgress.child;\n      primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n      workInProgress.memoizedState = SUSPENDED_MARKER;\n\n      return fallbackFragment;\n    } else {\n      return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n    }\n  } else {\n    // This is an update.\n    // If the current fiber has a SuspenseState, that means it's already showing\n    // a fallback.\n    var prevState = current.memoizedState;\n\n    if (prevState !== null) {\n      // The current tree is already showing a fallback\n      // Special path for hydration\n      var _dehydrated = prevState.dehydrated;\n\n      if (_dehydrated !== null) {\n        if (!didSuspend) {\n          return updateDehydratedSuspenseComponent(current, workInProgress, _dehydrated, prevState, renderLanes);\n        } else if (workInProgress.flags & ForceClientRender) {\n          // Something errored during hydration. Try again without hydrating.\n          workInProgress.flags &= ~ForceClientRender;\n          return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n        } else if (workInProgress.memoizedState !== null) {\n          // Something suspended and we should still be in dehydrated mode.\n          // Leave the existing child in place.\n          workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n          // but the normal suspense pass doesn't.\n\n          workInProgress.flags |= DidCapture;\n          return null;\n        } else {\n          // Suspended but we should no longer be in dehydrated mode.\n          // Therefore we now have to render the fallback.\n          var _nextPrimaryChildren = nextProps.children;\n          var _nextFallbackChildren = nextProps.fallback;\n          var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n          var _primaryChildFragment2 = workInProgress.child;\n          _primaryChildFragment2.memoizedState = mountSuspenseOffscreenState(renderLanes);\n          workInProgress.memoizedState = SUSPENDED_MARKER;\n          return fallbackChildFragment;\n        }\n      }\n\n      if (showFallback) {\n        var _nextFallbackChildren2 = nextProps.fallback;\n        var _nextPrimaryChildren2 = nextProps.children;\n\n        var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);\n\n        var _primaryChildFragment3 = workInProgress.child;\n        var prevOffscreenState = current.child.memoizedState;\n        _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n        _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n        workInProgress.memoizedState = SUSPENDED_MARKER;\n        return _fallbackChildFragment;\n      } else {\n        var _nextPrimaryChildren3 = nextProps.children;\n\n        var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);\n\n        workInProgress.memoizedState = null;\n        return _primaryChildFragment4;\n      }\n    } else {\n      // The current tree is not already showing a fallback.\n      if (showFallback) {\n        // Timed out.\n        var _nextFallbackChildren3 = nextProps.fallback;\n        var _nextPrimaryChildren4 = nextProps.children;\n\n        var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);\n\n        var _primaryChildFragment5 = workInProgress.child;\n        var _prevOffscreenState = current.child.memoizedState;\n        _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);\n        _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n        // fallback children.\n\n\n        workInProgress.memoizedState = SUSPENDED_MARKER;\n        return _fallbackChildFragment2;\n      } else {\n        // Still haven't timed out. Continue rendering the children, like we\n        // normally do.\n        var _nextPrimaryChildren5 = nextProps.children;\n\n        var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);\n\n        workInProgress.memoizedState = null;\n        return _primaryChildFragment6;\n      }\n    }\n  }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var primaryChildProps = {\n    mode: 'visible',\n    children: primaryChildren\n  };\n  var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n  primaryChildFragment.return = workInProgress;\n  workInProgress.child = primaryChildFragment;\n  return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var progressedPrimaryFragment = workInProgress.child;\n  var primaryChildProps = {\n    mode: 'hidden',\n    children: primaryChildren\n  };\n  var primaryChildFragment;\n  var fallbackChildFragment;\n\n  if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n    // In legacy mode, we commit the primary tree as if it successfully\n    // completed, even though it's in an inconsistent state.\n    primaryChildFragment = progressedPrimaryFragment;\n    primaryChildFragment.childLanes = NoLanes;\n    primaryChildFragment.pendingProps = primaryChildProps;\n\n    if ( workInProgress.mode & ProfileMode) {\n      // Reset the durations from the first pass so they aren't included in the\n      // final amounts. This seems counterintuitive, since we're intentionally\n      // not measuring part of the render phase, but this makes it match what we\n      // do in Concurrent Mode.\n      primaryChildFragment.actualDuration = 0;\n      primaryChildFragment.actualStartTime = -1;\n      primaryChildFragment.selfBaseDuration = 0;\n      primaryChildFragment.treeBaseDuration = 0;\n    }\n\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n  } else {\n    primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n  }\n\n  primaryChildFragment.return = workInProgress;\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n  return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n  // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n  // this wrapper function to constrain it.\n  return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n  // The props argument to `createWorkInProgress` is `any` typed, so we use this\n  // wrapper function to constrain it.\n  return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n  var currentPrimaryChildFragment = current.child;\n  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n  var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n    mode: 'visible',\n    children: primaryChildren\n  });\n\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    primaryChildFragment.lanes = renderLanes;\n  }\n\n  primaryChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = null;\n\n  if (currentFallbackChildFragment !== null) {\n    // Delete the fallback child fragment\n    var deletions = workInProgress.deletions;\n\n    if (deletions === null) {\n      workInProgress.deletions = [currentFallbackChildFragment];\n      workInProgress.flags |= ChildDeletion;\n    } else {\n      deletions.push(currentFallbackChildFragment);\n    }\n  }\n\n  workInProgress.child = primaryChildFragment;\n  return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var currentPrimaryChildFragment = current.child;\n  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n  var primaryChildProps = {\n    mode: 'hidden',\n    children: primaryChildren\n  };\n  var primaryChildFragment;\n\n  if ( // In legacy mode, we commit the primary tree as if it successfully\n  // completed, even though it's in an inconsistent state.\n  (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n  // already cloned. In legacy mode, the only case where this isn't true is\n  // when DevTools forces us to display a fallback; we skip the first render\n  // pass entirely and go straight to rendering the fallback. (In Concurrent\n  // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n  // only codepath.)\n  workInProgress.child !== currentPrimaryChildFragment) {\n    var progressedPrimaryFragment = workInProgress.child;\n    primaryChildFragment = progressedPrimaryFragment;\n    primaryChildFragment.childLanes = NoLanes;\n    primaryChildFragment.pendingProps = primaryChildProps;\n\n    if ( workInProgress.mode & ProfileMode) {\n      // Reset the durations from the first pass so they aren't included in the\n      // final amounts. This seems counterintuitive, since we're intentionally\n      // not measuring part of the render phase, but this makes it match what we\n      // do in Concurrent Mode.\n      primaryChildFragment.actualDuration = 0;\n      primaryChildFragment.actualStartTime = -1;\n      primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n      primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n    }\n    // However, since we're going to remain on the fallback, we no longer want\n    // to delete it.\n\n\n    workInProgress.deletions = null;\n  } else {\n    primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);\n    // (We don't do this in legacy mode, because in legacy mode we don't re-use\n    // the current tree; see previous branch.)\n\n\n    primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n  }\n\n  var fallbackChildFragment;\n\n  if (currentFallbackChildFragment !== null) {\n    fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n  } else {\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n    // mounted but this is a new fiber.\n\n    fallbackChildFragment.flags |= Placement;\n  }\n\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n  return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n  // Falling back to client rendering. Because this has performance\n  // implications, it's considered a recoverable error, even though the user\n  // likely won't observe anything wrong with the UI.\n  //\n  // The error is passed in as an argument to enforce that every caller provide\n  // a custom message, or explicitly opt out (currently the only path that opts\n  // out is legacy mode; every concurrent path provides an error).\n  if (recoverableError !== null) {\n    queueHydrationError(recoverableError);\n  } // This will add the old fiber to the deletion list\n\n\n  reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n  var nextProps = workInProgress.pendingProps;\n  var primaryChildren = nextProps.children;\n  var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n  // mounted but this is a new fiber.\n\n  primaryChildFragment.flags |= Placement;\n  workInProgress.memoizedState = null;\n  return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var fiberMode = workInProgress.mode;\n  var primaryChildProps = {\n    mode: 'visible',\n    children: primaryChildren\n  };\n  var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n  var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n  // boundary) already mounted but this is a new fiber.\n\n  fallbackChildFragment.flags |= Placement;\n  primaryChildFragment.return = workInProgress;\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n\n  if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n    // We will have dropped the effect list which contains the\n    // deletion. We need to reconcile to delete the current child.\n    reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n  }\n\n  return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n  // During the first pass, we'll bail out and not drill into the children.\n  // Instead, we'll leave the content in place and try to hydrate it later.\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    {\n      error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n    }\n\n    workInProgress.lanes = laneToLanes(SyncLane);\n  } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n    // This is a client-only boundary. Since we won't get any content from the server\n    // for this, we need to schedule that at a higher priority based on when it would\n    // have timed out. In theory we could render it in this pass but it would have the\n    // wrong priority associated with it and will prevent hydration of parent path.\n    // Instead, we'll leave work left on it to render it in a separate commit.\n    // TODO This time should be the time at which the server rendered response that is\n    // a parent to this boundary was displayed. However, since we currently don't have\n    // a protocol to transfer that time, we'll just estimate it by using the current\n    // time. This will mean that Suspense timeouts are slightly shifted to later than\n    // they should be.\n    // Schedule a normal pri update to render this content.\n    workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n  } else {\n    // We'll continue hydrating the rest at offscreen priority since we'll already\n    // be showing the right content coming from the server, it is no rush.\n    workInProgress.lanes = laneToLanes(OffscreenLane);\n  }\n\n  return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, suspenseInstance, suspenseState, renderLanes) {\n  // We should never be hydrating at this point because it is the first pass,\n  // but after we've already committed once.\n  warnIfHydrating();\n\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument\n    // required \u2014 every concurrent mode path that causes hydration to\n    // de-opt to client rendering should have an error message.\n    null);\n  }\n\n  if (isSuspenseInstanceFallback(suspenseInstance)) {\n    // This boundary is in a permanent fallback state. In this case, we'll never\n    // get an update and we'll never be able to hydrate the final content. Let's just try the\n    // client side render instead.\n    return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: The server should serialize the error message so we can log it\n    // here on the client. Or, in production, a hash/id that corresponds to\n    // the error.\n    new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.'));\n  }\n  // any context has changed, we need to treat is as if the input might have changed.\n\n\n  var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n  if (didReceiveUpdate || hasContextChanged) {\n    // This boundary has changed since the first render. This means that we are now unable to\n    // hydrate it. We might still be able to hydrate it using a higher priority lane.\n    var root = getWorkInProgressRoot();\n\n    if (root !== null) {\n      var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n      if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n        // Intentionally mutating since this render will get interrupted. This\n        // is one of the very rare times where we mutate the current tree\n        // during the render phase.\n        suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render\n\n        var eventTime = NoTimestamp;\n        scheduleUpdateOnFiber(current, attemptHydrationAtLane, eventTime);\n      }\n    } // If we have scheduled higher pri work above, this will probably just abort the render\n    // since we now have higher priority work, but in case it doesn't, we need to prepare to\n    // render something, if we time out. Even if that requires us to delete everything and\n    // skip hydration.\n    // Delay having to do this as long as the suspense timeout allows us.\n\n\n    renderDidSuspendDelayIfPossible();\n    return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));\n  } else if (isSuspenseInstancePending(suspenseInstance)) {\n    // This component is still pending more data from the server, so we can't hydrate its\n    // content. We treat it as if this component suspended itself. It might seem as if\n    // we could just try to render it client-side instead. However, this will perform a\n    // lot of unnecessary work and is unlikely to complete since it often will suspend\n    // on missing data anyway. Additionally, the server might be able to render more\n    // than we can on the client yet. In that case we'd end up with more fallback states\n    // on the client than if we just leave it alone. If the server times out or errors\n    // these should update this boundary to the permanent Fallback state instead.\n    // Mark it as having captured (i.e. suspended).\n    workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n    workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n    var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n    registerSuspenseInstanceRetry(suspenseInstance, retry);\n    return null;\n  } else {\n    // This is the first attempt.\n    reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n    var nextProps = workInProgress.pendingProps;\n    var primaryChildren = nextProps.children;\n    var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this\n    // tree is part of a hydrating tree. This is used to determine if a child\n    // node has fully mounted yet, and for scheduling event replaying.\n    // Conceptually this is similar to Placement in that a new subtree is\n    // inserted into the React tree here. It just happens to not need DOM\n    // mutations because it already exists.\n\n    primaryChildFragment.flags |= Hydrating;\n    return primaryChildFragment;\n  }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n  fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n  }\n\n  scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n  // Mark any Suspense boundaries with fallbacks as having work to do.\n  // If they were previously forced into fallbacks, they may now be able\n  // to unblock.\n  var node = firstChild;\n\n  while (node !== null) {\n    if (node.tag === SuspenseComponent) {\n      var state = node.memoizedState;\n\n      if (state !== null) {\n        scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n      }\n    } else if (node.tag === SuspenseListComponent) {\n      // If the tail is hidden there might not be an Suspense boundaries\n      // to schedule work on. In this case we have to schedule it on the\n      // list itself.\n      // We don't have to traverse to the children of the list since\n      // the list will propagate the change when it rerenders.\n      scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n    } else if (node.child !== null) {\n      node.child.return = node;\n      node = node.child;\n      continue;\n    }\n\n    if (node === workInProgress) {\n      return;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === workInProgress) {\n        return;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  }\n}\n\nfunction findLastContentRow(firstChild) {\n  // This is going to find the last row among these children that is already\n  // showing content on the screen, as opposed to being in fallback state or\n  // new. If a row has multiple Suspense boundaries, any of them being in the\n  // fallback state, counts as the whole row being in a fallback state.\n  // Note that the \"rows\" will be workInProgress, but any nested children\n  // will still be current since we haven't rendered them yet. The mounted\n  // order may not be the same as the new order. We use the new order.\n  var row = firstChild;\n  var lastContentRow = null;\n\n  while (row !== null) {\n    var currentRow = row.alternate; // New rows can't be content rows.\n\n    if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n      lastContentRow = row;\n    }\n\n    row = row.sibling;\n  }\n\n  return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n  {\n    if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n      didWarnAboutRevealOrder[revealOrder] = true;\n\n      if (typeof revealOrder === 'string') {\n        switch (revealOrder.toLowerCase()) {\n          case 'together':\n          case 'forwards':\n          case 'backwards':\n            {\n              error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n              break;\n            }\n\n          case 'forward':\n          case 'backward':\n            {\n              error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n              break;\n            }\n\n          default:\n            error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n            break;\n        }\n      } else {\n        error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n      }\n    }\n  }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n  {\n    if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n      if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n        didWarnAboutTailOptions[tailMode] = true;\n\n        error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n      } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n        didWarnAboutTailOptions[tailMode] = true;\n\n        error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n      }\n    }\n  }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n  {\n    var isAnArray = isArray(childSlot);\n    var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n    if (isAnArray || isIterable) {\n      var type = isAnArray ? 'array' : 'iterable';\n\n      error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n  {\n    if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n      if (isArray(children)) {\n        for (var i = 0; i < children.length; i++) {\n          if (!validateSuspenseListNestedChild(children[i], i)) {\n            return;\n          }\n        }\n      } else {\n        var iteratorFn = getIteratorFn(children);\n\n        if (typeof iteratorFn === 'function') {\n          var childrenIterator = iteratorFn.call(children);\n\n          if (childrenIterator) {\n            var step = childrenIterator.next();\n            var _i = 0;\n\n            for (; !step.done; step = childrenIterator.next()) {\n              if (!validateSuspenseListNestedChild(step.value, _i)) {\n                return;\n              }\n\n              _i++;\n            }\n          }\n        } else {\n          error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n        }\n      }\n    }\n  }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n  var renderState = workInProgress.memoizedState;\n\n  if (renderState === null) {\n    workInProgress.memoizedState = {\n      isBackwards: isBackwards,\n      rendering: null,\n      renderingStartTime: 0,\n      last: lastContentRow,\n      tail: tail,\n      tailMode: tailMode\n    };\n  } else {\n    // We can reuse the existing object from previous renders.\n    renderState.isBackwards = isBackwards;\n    renderState.rendering = null;\n    renderState.renderingStartTime = 0;\n    renderState.last = lastContentRow;\n    renderState.tail = tail;\n    renderState.tailMode = tailMode;\n  }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps;\n  var revealOrder = nextProps.revealOrder;\n  var tailMode = nextProps.tail;\n  var newChildren = nextProps.children;\n  validateRevealOrder(revealOrder);\n  validateTailOptions(tailMode, revealOrder);\n  validateSuspenseListChildren(newChildren, revealOrder);\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  var suspenseContext = suspenseStackCursor.current;\n  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n  if (shouldForceFallback) {\n    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n    workInProgress.flags |= DidCapture;\n  } else {\n    var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n    if (didSuspendBefore) {\n      // If we previously forced a fallback, we need to schedule work\n      // on any nested boundaries to let them know to try to render\n      // again. This is the same as context updating.\n      propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n    }\n\n    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n  }\n\n  pushSuspenseContext(workInProgress, suspenseContext);\n\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    // In legacy mode, SuspenseList doesn't work so we just\n    // use make it a noop by treating it as the default revealOrder.\n    workInProgress.memoizedState = null;\n  } else {\n    switch (revealOrder) {\n      case 'forwards':\n        {\n          var lastContentRow = findLastContentRow(workInProgress.child);\n          var tail;\n\n          if (lastContentRow === null) {\n            // The whole list is part of the tail.\n            // TODO: We could fast path by just rendering the tail now.\n            tail = workInProgress.child;\n            workInProgress.child = null;\n          } else {\n            // Disconnect the tail rows after the content row.\n            // We're going to render them separately later.\n            tail = lastContentRow.sibling;\n            lastContentRow.sibling = null;\n          }\n\n          initSuspenseListRenderState(workInProgress, false, // isBackwards\n          tail, lastContentRow, tailMode);\n          break;\n        }\n\n      case 'backwards':\n        {\n          // We're going to find the first row that has existing content.\n          // At the same time we're going to reverse the list of everything\n          // we pass in the meantime. That's going to be our tail in reverse\n          // order.\n          var _tail = null;\n          var row = workInProgress.child;\n          workInProgress.child = null;\n\n          while (row !== null) {\n            var currentRow = row.alternate; // New rows can't be content rows.\n\n            if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n              // This is the beginning of the main content.\n              workInProgress.child = row;\n              break;\n            }\n\n            var nextRow = row.sibling;\n            row.sibling = _tail;\n            _tail = row;\n            row = nextRow;\n          } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n          initSuspenseListRenderState(workInProgress, true, // isBackwards\n          _tail, null, // last\n          tailMode);\n          break;\n        }\n\n      case 'together':\n        {\n          initSuspenseListRenderState(workInProgress, false, // isBackwards\n          null, // tail\n          null, // last\n          undefined);\n          break;\n        }\n\n      default:\n        {\n          // The default reveal order is the same as not having\n          // a boundary.\n          workInProgress.memoizedState = null;\n        }\n    }\n  }\n\n  return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n  var nextChildren = workInProgress.pendingProps;\n\n  if (current === null) {\n    // Portals are special because we don't append the children during mount\n    // but at commit. Therefore we need to track insertions which the normal\n    // flow doesn't do during mount. This doesn't happen at the root because\n    // the root always starts with a \"current\" with a null child.\n    // TODO: Consider unifying this with how the root works.\n    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n  } else {\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  }\n\n  return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n  var providerType = workInProgress.type;\n  var context = providerType._context;\n  var newProps = workInProgress.pendingProps;\n  var oldProps = workInProgress.memoizedProps;\n  var newValue = newProps.value;\n\n  {\n    if (!('value' in newProps)) {\n      if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n        hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n        error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n      }\n    }\n\n    var providerPropTypes = workInProgress.type.propTypes;\n\n    if (providerPropTypes) {\n      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n    }\n  }\n\n  pushProvider(workInProgress, context, newValue);\n\n  {\n    if (oldProps !== null) {\n      var oldValue = oldProps.value;\n\n      if (objectIs(oldValue, newValue)) {\n        // No change. Bailout early if children are the same.\n        if (oldProps.children === newProps.children && !hasContextChanged()) {\n          return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n        }\n      } else {\n        // The context value changed. Search for matching consumers and schedule\n        // them to update.\n        propagateContextChange(workInProgress, context, renderLanes);\n      }\n    }\n  }\n\n  var newChildren = newProps.children;\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n  var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n  // DEV mode, we create a separate object for Context.Consumer that acts\n  // like a proxy to Context. This proxy object adds unnecessary code in PROD\n  // so we use the old behaviour (Context.Consumer references Context) to\n  // reduce size and overhead. The separate object references context via\n  // a property called \"_context\", which also gives us the ability to check\n  // in DEV mode if this property exists or not and warn if it does not.\n\n  {\n    if (context._context === undefined) {\n      // This may be because it's a Context (rather than a Consumer).\n      // Or it may be because it's older React where they're the same thing.\n      // We only want to warn if we're sure it's a new React.\n      if (context !== context.Consumer) {\n        if (!hasWarnedAboutUsingContextAsConsumer) {\n          hasWarnedAboutUsingContextAsConsumer = true;\n\n          error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n        }\n      }\n    } else {\n      context = context._context;\n    }\n  }\n\n  var newProps = workInProgress.pendingProps;\n  var render = newProps.children;\n\n  {\n    if (typeof render !== 'function') {\n      error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n    }\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var newValue = readContext(context);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  var newChildren;\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    newChildren = render(newValue);\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n  didReceiveUpdate = true;\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n  if (current !== null) {\n    // Reuse previous dependencies\n    workInProgress.dependencies = current.dependencies;\n  }\n\n  {\n    // Don't update \"base\" render times for bailouts.\n    stopProfilerTimerIfRunning();\n  }\n\n  markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n  if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n    // The children don't have any work either. We can skip them.\n    // TODO: Once we add back resuming, we should check if the children are\n    // a work-in-progress set. If so, we need to transfer their effects.\n    {\n      return null;\n    }\n  } // This fiber doesn't have work, but its subtree does. Clone the child\n  // fibers and continue.\n\n\n  cloneChildFibers(current, workInProgress);\n  return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n  {\n    var returnFiber = oldWorkInProgress.return;\n\n    if (returnFiber === null) {\n      // eslint-disable-next-line react-internal/prod-error-codes\n      throw new Error('Cannot swap the root fiber.');\n    } // Disconnect from the old current.\n    // It will get deleted.\n\n\n    current.alternate = null;\n    oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n    newWorkInProgress.index = oldWorkInProgress.index;\n    newWorkInProgress.sibling = oldWorkInProgress.sibling;\n    newWorkInProgress.return = oldWorkInProgress.return;\n    newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n    if (oldWorkInProgress === returnFiber.child) {\n      returnFiber.child = newWorkInProgress;\n    } else {\n      var prevSibling = returnFiber.child;\n\n      if (prevSibling === null) {\n        // eslint-disable-next-line react-internal/prod-error-codes\n        throw new Error('Expected parent to have a child.');\n      }\n\n      while (prevSibling.sibling !== oldWorkInProgress) {\n        prevSibling = prevSibling.sibling;\n\n        if (prevSibling === null) {\n          // eslint-disable-next-line react-internal/prod-error-codes\n          throw new Error('Expected to find the previous sibling.');\n        }\n      }\n\n      prevSibling.sibling = newWorkInProgress;\n    } // Delete the old fiber and place the new one.\n    // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n    var deletions = returnFiber.deletions;\n\n    if (deletions === null) {\n      returnFiber.deletions = [current];\n      returnFiber.flags |= ChildDeletion;\n    } else {\n      deletions.push(current);\n    }\n\n    newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n    return newWorkInProgress;\n  }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n  // Before performing an early bailout, we must check if there are pending\n  // updates or context.\n  var updateLanes = current.lanes;\n\n  if (includesSomeLane(updateLanes, renderLanes)) {\n    return true;\n  } // No pending update, but because context is propagated lazily, we need\n\n  return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n  // This fiber does not have any pending work. Bailout without entering\n  // the begin phase. There's still some bookkeeping we that needs to be done\n  // in this optimized path, mostly pushing stuff onto the stack.\n  switch (workInProgress.tag) {\n    case HostRoot:\n      pushHostRootContext(workInProgress);\n      var root = workInProgress.stateNode;\n\n      resetHydrationState();\n      break;\n\n    case HostComponent:\n      pushHostContext(workInProgress);\n      break;\n\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          pushContextProvider(workInProgress);\n        }\n\n        break;\n      }\n\n    case HostPortal:\n      pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n      break;\n\n    case ContextProvider:\n      {\n        var newValue = workInProgress.memoizedProps.value;\n        var context = workInProgress.type._context;\n        pushProvider(workInProgress, context, newValue);\n        break;\n      }\n\n    case Profiler:\n      {\n        // Profiler should only call onRender when one of its descendants actually rendered.\n        var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n        if (hasChildWork) {\n          workInProgress.flags |= Update;\n        }\n\n        {\n          // Reset effect durations for the next eventual effect phase.\n          // These are reset during render to allow the DevTools commit hook a chance to read them,\n          var stateNode = workInProgress.stateNode;\n          stateNode.effectDuration = 0;\n          stateNode.passiveEffectDuration = 0;\n        }\n      }\n\n      break;\n\n    case SuspenseComponent:\n      {\n        var state = workInProgress.memoizedState;\n\n        if (state !== null) {\n          if (state.dehydrated !== null) {\n            pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has\n            // been unsuspended it has committed as a resolved Suspense component.\n            // If it needs to be retried, it should have work scheduled on it.\n\n            workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n            // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n            return null;\n          } // If this boundary is currently timed out, we need to decide\n          // whether to retry the primary children, or to skip over it and\n          // go straight to the fallback. Check the priority of the primary\n          // child fragment.\n\n\n          var primaryChildFragment = workInProgress.child;\n          var primaryChildLanes = primaryChildFragment.childLanes;\n\n          if (includesSomeLane(renderLanes, primaryChildLanes)) {\n            // The primary children have pending work. Use the normal path\n            // to attempt to render the primary children again.\n            return updateSuspenseComponent(current, workInProgress, renderLanes);\n          } else {\n            // The primary child fragment does not have pending work marked\n            // on it\n            pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n            // priority. Bailout.\n\n            var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n            if (child !== null) {\n              // The fallback children have pending work. Skip over the\n              // primary children and work on the fallback.\n              return child.sibling;\n            } else {\n              // Note: We can return `null` here because we already checked\n              // whether there were nested context consumers, via the call to\n              // `bailoutOnAlreadyFinishedWork` above.\n              return null;\n            }\n          }\n        } else {\n          pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n        }\n\n        break;\n      }\n\n    case SuspenseListComponent:\n      {\n        var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n        var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n        if (didSuspendBefore) {\n          if (_hasChildWork) {\n            // If something was in fallback state last time, and we have all the\n            // same children then we're still in progressive loading state.\n            // Something might get unblocked by state updates or retries in the\n            // tree which will affect the tail. So we need to use the normal\n            // path to compute the correct tail.\n            return updateSuspenseListComponent(current, workInProgress, renderLanes);\n          } // If none of the children had any work, that means that none of\n          // them got retried so they'll still be blocked in the same way\n          // as before. We can fast bail out.\n\n\n          workInProgress.flags |= DidCapture;\n        } // If nothing suspended before and we're rendering the same children,\n        // then the tail doesn't matter. Anything new that suspends will work\n        // in the \"together\" mode, so we can continue from the state we had.\n\n\n        var renderState = workInProgress.memoizedState;\n\n        if (renderState !== null) {\n          // Reset to the \"together\" mode in case we've started a different\n          // update in the past but didn't complete it.\n          renderState.rendering = null;\n          renderState.tail = null;\n          renderState.lastEffect = null;\n        }\n\n        pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n        if (_hasChildWork) {\n          break;\n        } else {\n          // If none of the children had any work, that means that none of\n          // them got retried so they'll still be blocked in the same way\n          // as before. We can fast bail out.\n          return null;\n        }\n      }\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      {\n        // Need to check if the tree still needs to be deferred. This is\n        // almost identical to the logic used in the normal update path,\n        // so we'll just enter that. The only difference is we'll bail out\n        // at the next level instead of this one, because the child props\n        // have not changed. Which is fine.\n        // TODO: Probably should refactor `beginWork` to split the bailout\n        // path from the normal path. I'm tempted to do a labeled break here\n        // but I won't :)\n        workInProgress.lanes = NoLanes;\n        return updateOffscreenComponent(current, workInProgress, renderLanes);\n      }\n  }\n\n  return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n  {\n    if (workInProgress._debugNeedsRemount && current !== null) {\n      // This will restart the begin phase with a new fiber.\n      return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n    }\n  }\n\n  if (current !== null) {\n    var oldProps = current.memoizedProps;\n    var newProps = workInProgress.pendingProps;\n\n    if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n     workInProgress.type !== current.type )) {\n      // If props or context changed, mark the fiber as having performed work.\n      // This may be unset if the props are determined to be equal later (memo).\n      didReceiveUpdate = true;\n    } else {\n      // Neither props nor legacy context changes. Check if there's a pending\n      // update or context change.\n      var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n      if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n      // may not be work scheduled on `current`, so we check for this flag.\n      (workInProgress.flags & DidCapture) === NoFlags) {\n        // No pending updates or context. Bail out now.\n        didReceiveUpdate = false;\n        return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n      }\n\n      if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n        // This is a special case that only exists for legacy mode.\n        // See https://github.com/facebook/react/pull/19216.\n        didReceiveUpdate = true;\n      } else {\n        // An update was scheduled on this fiber, but there are no new props\n        // nor legacy context. Set this to false. If an update queue or context\n        // consumer produces a changed value, it will set this to true. Otherwise,\n        // the component will assume the children have not changed and bail out.\n        didReceiveUpdate = false;\n      }\n    }\n  } else {\n    didReceiveUpdate = false;\n\n    if (getIsHydrating() && isForkedChild(workInProgress)) {\n      // Check if this child belongs to a list of muliple children in\n      // its parent.\n      //\n      // In a true multi-threaded implementation, we would render children on\n      // parallel threads. This would represent the beginning of a new render\n      // thread for this subtree.\n      //\n      // We only use this for id generation during hydration, which is why the\n      // logic is located in this special branch.\n      var slotIndex = workInProgress.index;\n      var numberOfForks = getForksAtLevel();\n      pushTreeId(workInProgress, numberOfForks, slotIndex);\n    }\n  } // Before entering the begin phase, clear pending update priority.\n  // TODO: This assumes that we're about to evaluate the component and process\n  // the update queue. However, there's an exception: SimpleMemoComponent\n  // sometimes bails out later in the begin phase. This indicates that we should\n  // move this assignment out of the common path and into each branch.\n\n\n  workInProgress.lanes = NoLanes;\n\n  switch (workInProgress.tag) {\n    case IndeterminateComponent:\n      {\n        return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n      }\n\n    case LazyComponent:\n      {\n        var elementType = workInProgress.elementType;\n        return mountLazyComponent(current, workInProgress, elementType, renderLanes);\n      }\n\n    case FunctionComponent:\n      {\n        var Component = workInProgress.type;\n        var unresolvedProps = workInProgress.pendingProps;\n        var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n        return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);\n      }\n\n    case ClassComponent:\n      {\n        var _Component = workInProgress.type;\n        var _unresolvedProps = workInProgress.pendingProps;\n\n        var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n        return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n      }\n\n    case HostRoot:\n      return updateHostRoot(current, workInProgress, renderLanes);\n\n    case HostComponent:\n      return updateHostComponent$1(current, workInProgress, renderLanes);\n\n    case HostText:\n      return updateHostText$1(current, workInProgress);\n\n    case SuspenseComponent:\n      return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n    case HostPortal:\n      return updatePortalComponent(current, workInProgress, renderLanes);\n\n    case ForwardRef:\n      {\n        var type = workInProgress.type;\n        var _unresolvedProps2 = workInProgress.pendingProps;\n\n        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n        return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n      }\n\n    case Fragment:\n      return updateFragment(current, workInProgress, renderLanes);\n\n    case Mode:\n      return updateMode(current, workInProgress, renderLanes);\n\n    case Profiler:\n      return updateProfiler(current, workInProgress, renderLanes);\n\n    case ContextProvider:\n      return updateContextProvider(current, workInProgress, renderLanes);\n\n    case ContextConsumer:\n      return updateContextConsumer(current, workInProgress, renderLanes);\n\n    case MemoComponent:\n      {\n        var _type2 = workInProgress.type;\n        var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n        var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n        {\n          if (workInProgress.type !== workInProgress.elementType) {\n            var outerPropTypes = _type2.propTypes;\n\n            if (outerPropTypes) {\n              checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n              'prop', getComponentNameFromType(_type2));\n            }\n          }\n        }\n\n        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n        return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n      }\n\n    case SimpleMemoComponent:\n      {\n        return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n      }\n\n    case IncompleteClassComponent:\n      {\n        var _Component2 = workInProgress.type;\n        var _unresolvedProps4 = workInProgress.pendingProps;\n\n        var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n        return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n      }\n\n    case SuspenseListComponent:\n      {\n        return updateSuspenseListComponent(current, workInProgress, renderLanes);\n      }\n\n    case ScopeComponent:\n      {\n\n        break;\n      }\n\n    case OffscreenComponent:\n      {\n        return updateOffscreenComponent(current, workInProgress, renderLanes);\n      }\n  }\n\n  throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n  // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n  popTreeContext(workInProgress);\n\n  switch (workInProgress.tag) {\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          popContext(workInProgress);\n        }\n\n        var flags = workInProgress.flags;\n\n        if (flags & ShouldCapture) {\n          workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          }\n\n          return workInProgress;\n        }\n\n        return null;\n      }\n\n    case HostRoot:\n      {\n        var root = workInProgress.stateNode;\n        popHostContainer(workInProgress);\n        popTopLevelContextObject(workInProgress);\n        resetWorkInProgressVersions();\n        var _flags = workInProgress.flags;\n\n        if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {\n          // There was an error during render that wasn't captured by a suspense\n          // boundary. Do a second pass on the root to unmount the children.\n          workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n          return workInProgress;\n        } // We unwound to the root without completing it. Exit.\n\n\n        return null;\n      }\n\n    case HostComponent:\n      {\n        // TODO: popHydrationState\n        popHostContext(workInProgress);\n        return null;\n      }\n\n    case SuspenseComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var suspenseState = workInProgress.memoizedState;\n\n        if (suspenseState !== null && suspenseState.dehydrated !== null) {\n          if (workInProgress.alternate === null) {\n            throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n          }\n\n          resetHydrationState();\n        }\n\n        var _flags2 = workInProgress.flags;\n\n        if (_flags2 & ShouldCapture) {\n          workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          }\n\n          return workInProgress;\n        }\n\n        return null;\n      }\n\n    case SuspenseListComponent:\n      {\n        popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n        // caught by a nested boundary. If not, it should bubble through.\n\n        return null;\n      }\n\n    case HostPortal:\n      popHostContainer(workInProgress);\n      return null;\n\n    case ContextProvider:\n      var context = workInProgress.type._context;\n      popProvider(context, workInProgress);\n      return null;\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      popRenderLanes(workInProgress);\n      return null;\n\n    case CacheComponent:\n\n      return null;\n\n    default:\n      return null;\n  }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n  // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n  popTreeContext(interruptedWork);\n\n  switch (interruptedWork.tag) {\n    case ClassComponent:\n      {\n        var childContextTypes = interruptedWork.type.childContextTypes;\n\n        if (childContextTypes !== null && childContextTypes !== undefined) {\n          popContext(interruptedWork);\n        }\n\n        break;\n      }\n\n    case HostRoot:\n      {\n        var root = interruptedWork.stateNode;\n        popHostContainer(interruptedWork);\n        popTopLevelContextObject(interruptedWork);\n        resetWorkInProgressVersions();\n        break;\n      }\n\n    case HostComponent:\n      {\n        popHostContext(interruptedWork);\n        break;\n      }\n\n    case HostPortal:\n      popHostContainer(interruptedWork);\n      break;\n\n    case SuspenseComponent:\n      popSuspenseContext(interruptedWork);\n      break;\n\n    case SuspenseListComponent:\n      popSuspenseContext(interruptedWork);\n      break;\n\n    case ContextProvider:\n      var context = interruptedWork.type._context;\n      popProvider(context, interruptedWork);\n      break;\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      popRenderLanes(interruptedWork);\n      break;\n  }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n// Only used when enableSuspenseLayoutEffectSemantics is enabled.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\nfunction reportUncaughtErrorInDEV(error) {\n  // Wrapping each small part of the commit phase into a guarded\n  // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n  // But we rely on it to surface errors to DEV tools like overlays\n  // (https://github.com/facebook/react/issues/21712).\n  // As a compromise, rethrow only caught errors in a guard.\n  {\n    invokeGuardedCallback(null, function () {\n      throw error;\n    });\n    clearCaughtError();\n  }\n}\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n  instance.props = current.memoizedProps;\n  instance.state = current.memoizedState;\n\n  if ( current.mode & ProfileMode) {\n    try {\n      startLayoutEffectTimer();\n      instance.componentWillUnmount();\n    } finally {\n      recordLayoutEffectDuration(current);\n    }\n  } else {\n    instance.componentWillUnmount();\n  }\n}; // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {\n  try {\n    commitHookEffectListMount(Layout, current);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n  try {\n    callComponentWillUnmountWithTimer(current, instance);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {\n  try {\n    instance.componentDidMount();\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n  try {\n    commitAttachRef(current);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n  var ref = current.ref;\n\n  if (ref !== null) {\n    if (typeof ref === 'function') {\n      var retVal;\n\n      try {\n        if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {\n          try {\n            startLayoutEffectTimer();\n            retVal = ref(null);\n          } finally {\n            recordLayoutEffectDuration(current);\n          }\n        } else {\n          retVal = ref(null);\n        }\n      } catch (error) {\n        captureCommitPhaseError(current, nearestMountedAncestor, error);\n      }\n\n      {\n        if (typeof retVal === 'function') {\n          error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n        }\n      }\n    } else {\n      ref.current = null;\n    }\n  }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n  try {\n    destroy();\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\n\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n  focusedInstanceHandle = prepareForCommit(root.containerInfo);\n  nextEffect = firstChild;\n  commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n  var shouldFire = shouldFireAfterActiveInstanceBlur;\n  shouldFireAfterActiveInstanceBlur = false;\n  focusedInstanceHandle = null;\n  return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n    var child = fiber.child;\n\n    if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitBeforeMutationEffects_complete();\n    }\n  }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    setCurrentFiber(fiber);\n\n    try {\n      commitBeforeMutationEffectsOnFiber(fiber);\n    } catch (error) {\n      captureCommitPhaseError(fiber, fiber.return, error);\n    }\n\n    resetCurrentFiber();\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n  var current = finishedWork.alternate;\n  var flags = finishedWork.flags;\n\n  if ((flags & Snapshot) !== NoFlags) {\n    setCurrentFiber(finishedWork);\n\n    switch (finishedWork.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          break;\n        }\n\n      case ClassComponent:\n        {\n          if (current !== null) {\n            var prevProps = current.memoizedProps;\n            var prevState = current.memoizedState;\n            var instance = finishedWork.stateNode; // We could update instance props and state here,\n            // but instead we rely on them being set during last render.\n            // TODO: revisit this when we implement resuming.\n\n            {\n              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                if (instance.props !== finishedWork.memoizedProps) {\n                  error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n\n                if (instance.state !== finishedWork.memoizedState) {\n                  error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n              }\n            }\n\n            var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n            {\n              var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n              if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n                didWarnSet.add(finishedWork.type);\n\n                error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));\n              }\n            }\n\n            instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n          }\n\n          break;\n        }\n\n      case HostRoot:\n        {\n          {\n            var root = finishedWork.stateNode;\n            clearContainer(root.containerInfo);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n      case HostText:\n      case HostPortal:\n      case IncompleteClassComponent:\n        // Nothing to do for these component types\n        break;\n\n      default:\n        {\n          throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n        }\n    }\n\n    resetCurrentFiber();\n  }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n  var updateQueue = finishedWork.updateQueue;\n  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n  if (lastEffect !== null) {\n    var firstEffect = lastEffect.next;\n    var effect = firstEffect;\n\n    do {\n      if ((effect.tag & flags) === flags) {\n        // Unmount\n        var destroy = effect.destroy;\n        effect.destroy = undefined;\n\n        if (destroy !== undefined) {\n          {\n            if ((flags & Passive$1) !== NoFlags$1) {\n              markComponentPassiveEffectUnmountStarted(finishedWork);\n            } else if ((flags & Layout) !== NoFlags$1) {\n              markComponentLayoutEffectUnmountStarted(finishedWork);\n            }\n          }\n\n          {\n            if ((flags & Insertion) !== NoFlags$1) {\n              setIsRunningInsertionEffect(true);\n            }\n          }\n\n          safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n          {\n            if ((flags & Insertion) !== NoFlags$1) {\n              setIsRunningInsertionEffect(false);\n            }\n          }\n\n          {\n            if ((flags & Passive$1) !== NoFlags$1) {\n              markComponentPassiveEffectUnmountStopped();\n            } else if ((flags & Layout) !== NoFlags$1) {\n              markComponentLayoutEffectUnmountStopped();\n            }\n          }\n        }\n      }\n\n      effect = effect.next;\n    } while (effect !== firstEffect);\n  }\n}\n\nfunction commitHookEffectListMount(flags, finishedWork) {\n  var updateQueue = finishedWork.updateQueue;\n  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n  if (lastEffect !== null) {\n    var firstEffect = lastEffect.next;\n    var effect = firstEffect;\n\n    do {\n      if ((effect.tag & flags) === flags) {\n        {\n          if ((flags & Passive$1) !== NoFlags$1) {\n            markComponentPassiveEffectMountStarted(finishedWork);\n          } else if ((flags & Layout) !== NoFlags$1) {\n            markComponentLayoutEffectMountStarted(finishedWork);\n          }\n        } // Mount\n\n\n        var create = effect.create;\n\n        {\n          if ((flags & Insertion) !== NoFlags$1) {\n            setIsRunningInsertionEffect(true);\n          }\n        }\n\n        effect.destroy = create();\n\n        {\n          if ((flags & Insertion) !== NoFlags$1) {\n            setIsRunningInsertionEffect(false);\n          }\n        }\n\n        {\n          if ((flags & Passive$1) !== NoFlags$1) {\n            markComponentPassiveEffectMountStopped();\n          } else if ((flags & Layout) !== NoFlags$1) {\n            markComponentLayoutEffectMountStopped();\n          }\n        }\n\n        {\n          var destroy = effect.destroy;\n\n          if (destroy !== undefined && typeof destroy !== 'function') {\n            var hookName = void 0;\n\n            if ((effect.tag & Layout) !== NoFlags) {\n              hookName = 'useLayoutEffect';\n            } else if ((effect.tag & Insertion) !== NoFlags) {\n              hookName = 'useInsertionEffect';\n            } else {\n              hookName = 'useEffect';\n            }\n\n            var addendum = void 0;\n\n            if (destroy === null) {\n              addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n            } else if (typeof destroy.then === 'function') {\n              addendum = '\\n\\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\n' + '  async function fetchData() {\\n' + '    // You can await here\\n' + '    const response = await MyAPI.getData(someId);\\n' + '    // ...\\n' + '  }\\n' + '  fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';\n            } else {\n              addendum = ' You returned: ' + destroy;\n            }\n\n            error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n          }\n        }\n      }\n\n      effect = effect.next;\n    } while (effect !== firstEffect);\n  }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n  {\n    // Only Profilers with work in their subtree will have an Update effect scheduled.\n    if ((finishedWork.flags & Update) !== NoFlags) {\n      switch (finishedWork.tag) {\n        case Profiler:\n          {\n            var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n            var _finishedWork$memoize = finishedWork.memoizedProps,\n                id = _finishedWork$memoize.id,\n                onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n            // It does not get reset until the start of the next commit phase.\n\n            var commitTime = getCommitTime();\n            var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n            {\n              if (isCurrentUpdateNested()) {\n                phase = 'nested-update';\n              }\n            }\n\n            if (typeof onPostCommit === 'function') {\n              onPostCommit(id, phase, passiveEffectDuration, commitTime);\n            } // Bubble times to the next nearest ancestor Profiler.\n            // After we process that Profiler, we'll bubble further up.\n\n\n            var parentFiber = finishedWork.return;\n\n            outer: while (parentFiber !== null) {\n              switch (parentFiber.tag) {\n                case HostRoot:\n                  var root = parentFiber.stateNode;\n                  root.passiveEffectDuration += passiveEffectDuration;\n                  break outer;\n\n                case Profiler:\n                  var parentStateNode = parentFiber.stateNode;\n                  parentStateNode.passiveEffectDuration += passiveEffectDuration;\n                  break outer;\n              }\n\n              parentFiber = parentFiber.return;\n            }\n\n            break;\n          }\n      }\n    }\n  }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n  if ((finishedWork.flags & LayoutMask) !== NoFlags) {\n    switch (finishedWork.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          if ( !offscreenSubtreeWasHidden) {\n            // At this point layout effects have already been destroyed (during mutation phase).\n            // This is done to prevent sibling component effects from interfering with each other,\n            // e.g. a destroy function in one component should never override a ref set\n            // by a create function in another component during the same commit.\n            if ( finishedWork.mode & ProfileMode) {\n              try {\n                startLayoutEffectTimer();\n                commitHookEffectListMount(Layout | HasEffect, finishedWork);\n              } finally {\n                recordLayoutEffectDuration(finishedWork);\n              }\n            } else {\n              commitHookEffectListMount(Layout | HasEffect, finishedWork);\n            }\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = finishedWork.stateNode;\n\n          if (finishedWork.flags & Update) {\n            if (!offscreenSubtreeWasHidden) {\n              if (current === null) {\n                // We could update instance props and state here,\n                // but instead we rely on them being set during last render.\n                // TODO: revisit this when we implement resuming.\n                {\n                  if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                    if (instance.props !== finishedWork.memoizedProps) {\n                      error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n\n                    if (instance.state !== finishedWork.memoizedState) {\n                      error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n                  }\n                }\n\n                if ( finishedWork.mode & ProfileMode) {\n                  try {\n                    startLayoutEffectTimer();\n                    instance.componentDidMount();\n                  } finally {\n                    recordLayoutEffectDuration(finishedWork);\n                  }\n                } else {\n                  instance.componentDidMount();\n                }\n              } else {\n                var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n                var prevState = current.memoizedState; // We could update instance props and state here,\n                // but instead we rely on them being set during last render.\n                // TODO: revisit this when we implement resuming.\n\n                {\n                  if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                    if (instance.props !== finishedWork.memoizedProps) {\n                      error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n\n                    if (instance.state !== finishedWork.memoizedState) {\n                      error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n                  }\n                }\n\n                if ( finishedWork.mode & ProfileMode) {\n                  try {\n                    startLayoutEffectTimer();\n                    instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n                  } finally {\n                    recordLayoutEffectDuration(finishedWork);\n                  }\n                } else {\n                  instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n                }\n              }\n            }\n          } // TODO: I think this is now always non-null by the time it reaches the\n          // commit phase. Consider removing the type check.\n\n\n          var updateQueue = finishedWork.updateQueue;\n\n          if (updateQueue !== null) {\n            {\n              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                if (instance.props !== finishedWork.memoizedProps) {\n                  error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n\n                if (instance.state !== finishedWork.memoizedState) {\n                  error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n              }\n            } // We could update instance props and state here,\n            // but instead we rely on them being set during last render.\n            // TODO: revisit this when we implement resuming.\n\n\n            commitUpdateQueue(finishedWork, updateQueue, instance);\n          }\n\n          break;\n        }\n\n      case HostRoot:\n        {\n          // TODO: I think this is now always non-null by the time it reaches the\n          // commit phase. Consider removing the type check.\n          var _updateQueue = finishedWork.updateQueue;\n\n          if (_updateQueue !== null) {\n            var _instance = null;\n\n            if (finishedWork.child !== null) {\n              switch (finishedWork.child.tag) {\n                case HostComponent:\n                  _instance = getPublicInstance(finishedWork.child.stateNode);\n                  break;\n\n                case ClassComponent:\n                  _instance = finishedWork.child.stateNode;\n                  break;\n              }\n            }\n\n            commitUpdateQueue(finishedWork, _updateQueue, _instance);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n          // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n          // These effects should only be committed when components are first mounted,\n          // aka when there is no current/alternate.\n\n          if (current === null && finishedWork.flags & Update) {\n            var type = finishedWork.type;\n            var props = finishedWork.memoizedProps;\n            commitMount(_instance2, type, props);\n          }\n\n          break;\n        }\n\n      case HostText:\n        {\n          // We have no life-cycles associated with text.\n          break;\n        }\n\n      case HostPortal:\n        {\n          // We have no life-cycles associated with portals.\n          break;\n        }\n\n      case Profiler:\n        {\n          {\n            var _finishedWork$memoize2 = finishedWork.memoizedProps,\n                onCommit = _finishedWork$memoize2.onCommit,\n                onRender = _finishedWork$memoize2.onRender;\n            var effectDuration = finishedWork.stateNode.effectDuration;\n            var commitTime = getCommitTime();\n            var phase = current === null ? 'mount' : 'update';\n\n            {\n              if (isCurrentUpdateNested()) {\n                phase = 'nested-update';\n              }\n            }\n\n            if (typeof onRender === 'function') {\n              onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n            }\n\n            {\n              if (typeof onCommit === 'function') {\n                onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n              } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n              // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n              // because the effect is also where times bubble to parent Profilers.\n\n\n              enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n              // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n              var parentFiber = finishedWork.return;\n\n              outer: while (parentFiber !== null) {\n                switch (parentFiber.tag) {\n                  case HostRoot:\n                    var root = parentFiber.stateNode;\n                    root.effectDuration += effectDuration;\n                    break outer;\n\n                  case Profiler:\n                    var parentStateNode = parentFiber.stateNode;\n                    parentStateNode.effectDuration += effectDuration;\n                    break outer;\n                }\n\n                parentFiber = parentFiber.return;\n              }\n            }\n          }\n\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n          break;\n        }\n\n      case SuspenseListComponent:\n      case IncompleteClassComponent:\n      case ScopeComponent:\n      case OffscreenComponent:\n      case LegacyHiddenComponent:\n        {\n          break;\n        }\n\n      default:\n        throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  if ( !offscreenSubtreeWasHidden) {\n    {\n      if (finishedWork.flags & Ref) {\n        commitAttachRef(finishedWork);\n      }\n    }\n  }\n}\n\nfunction reappearLayoutEffectsOnFiber(node) {\n  // Turn on layout effects in a tree that previously disappeared.\n  // TODO (Offscreen) Check: flags & LayoutStatic\n  switch (node.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( node.mode & ProfileMode) {\n          try {\n            startLayoutEffectTimer();\n            safelyCallCommitHookLayoutEffectListMount(node, node.return);\n          } finally {\n            recordLayoutEffectDuration(node);\n          }\n        } else {\n          safelyCallCommitHookLayoutEffectListMount(node, node.return);\n        }\n\n        break;\n      }\n\n    case ClassComponent:\n      {\n        var instance = node.stateNode;\n\n        if (typeof instance.componentDidMount === 'function') {\n          safelyCallComponentDidMount(node, node.return, instance);\n        }\n\n        safelyAttachRef(node, node.return);\n        break;\n      }\n\n    case HostComponent:\n      {\n        safelyAttachRef(node, node.return);\n        break;\n      }\n  }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n  // Only hide or unhide the top-most host nodes.\n  var hostSubtreeRoot = null;\n\n  {\n    // We only have the top Fiber that was inserted but we need to recurse down its\n    // children to find all the terminal nodes.\n    var node = finishedWork;\n\n    while (true) {\n      if (node.tag === HostComponent) {\n        if (hostSubtreeRoot === null) {\n          hostSubtreeRoot = node;\n\n          try {\n            var instance = node.stateNode;\n\n            if (isHidden) {\n              hideInstance(instance);\n            } else {\n              unhideInstance(node.stateNode, node.memoizedProps);\n            }\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      } else if (node.tag === HostText) {\n        if (hostSubtreeRoot === null) {\n          try {\n            var _instance3 = node.stateNode;\n\n            if (isHidden) {\n              hideTextInstance(_instance3);\n            } else {\n              unhideTextInstance(_instance3, node.memoizedProps);\n            }\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === finishedWork) {\n        return;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === finishedWork) {\n          return;\n        }\n\n        if (hostSubtreeRoot === node) {\n          hostSubtreeRoot = null;\n        }\n\n        node = node.return;\n      }\n\n      if (hostSubtreeRoot === node) {\n        hostSubtreeRoot = null;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  }\n}\n\nfunction commitAttachRef(finishedWork) {\n  var ref = finishedWork.ref;\n\n  if (ref !== null) {\n    var instance = finishedWork.stateNode;\n    var instanceToUse;\n\n    switch (finishedWork.tag) {\n      case HostComponent:\n        instanceToUse = getPublicInstance(instance);\n        break;\n\n      default:\n        instanceToUse = instance;\n    } // Moved outside to ensure DCE works with this flag\n\n    if (typeof ref === 'function') {\n      var retVal;\n\n      if ( finishedWork.mode & ProfileMode) {\n        try {\n          startLayoutEffectTimer();\n          retVal = ref(instanceToUse);\n        } finally {\n          recordLayoutEffectDuration(finishedWork);\n        }\n      } else {\n        retVal = ref(instanceToUse);\n      }\n\n      {\n        if (typeof retVal === 'function') {\n          error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));\n        }\n      }\n    } else {\n      {\n        if (!ref.hasOwnProperty('current')) {\n          error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));\n        }\n      }\n\n      ref.current = instanceToUse;\n    }\n  }\n}\n\nfunction detachFiberMutation(fiber) {\n  // Cut off the return pointer to disconnect it from the tree.\n  // This enables us to detect and warn against state updates on an unmounted component.\n  // It also prevents events from bubbling from within disconnected components.\n  //\n  // Ideally, we should also clear the child pointer of the parent alternate to let this\n  // get GC:ed but we don't know which for sure which parent is the current\n  // one so we'll settle for GC:ing the subtree of this child.\n  // This child itself will be GC:ed when the parent updates the next time.\n  //\n  // Note that we can't clear child or sibling pointers yet.\n  // They're needed for passive effects and for findDOMNode.\n  // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n  //\n  // Don't reset the alternate yet, either. We need that so we can detach the\n  // alternate's fields in the passive phase. Clearing the return pointer is\n  // sufficient for findDOMNode semantics.\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    alternate.return = null;\n  }\n\n  fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    fiber.alternate = null;\n    detachFiberAfterEffects(alternate);\n  } // Note: Defensively using negation instead of < in case\n  // `deletedTreeCleanUpLevel` is undefined.\n\n\n  {\n    // Clear cyclical Fiber fields. This level alone is designed to roughly\n    // approximate the planned Fiber refactor. In that world, `setState` will be\n    // bound to a special \"instance\" object instead of a Fiber. The Instance\n    // object will not have any of these fields. It will only be connected to\n    // the fiber tree via a single link at the root. So if this level alone is\n    // sufficient to fix memory issues, that bodes well for our plans.\n    fiber.child = null;\n    fiber.deletions = null;\n    fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n    // tree, which has its own pointers to children, parents, and siblings.\n    // The other host nodes also point back to fibers, so we should detach that\n    // one, too.\n\n    if (fiber.tag === HostComponent) {\n      var hostInstance = fiber.stateNode;\n\n      if (hostInstance !== null) {\n        detachDeletedInstance(hostInstance);\n      }\n    }\n\n    fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We\n    // already disconnect the `return` pointer at the root of the deleted\n    // subtree (in `detachFiberMutation`). Besides, `return` by itself is not\n    // cyclical \u2014 it's only cyclical when combined with `child`, `sibling`, and\n    // `alternate`. But we'll clear it in the next level anyway, just in case.\n\n    {\n      fiber._debugOwner = null;\n    }\n\n    {\n      // Theoretically, nothing in here should be necessary, because we already\n      // disconnected the fiber from the tree. So even if something leaks this\n      // particular fiber, it won't leak anything else\n      //\n      // The purpose of this branch is to be super aggressive so we can measure\n      // if there's any difference in memory impact. If there is, that could\n      // indicate a React leak we don't know about.\n      fiber.return = null;\n      fiber.dependencies = null;\n      fiber.memoizedProps = null;\n      fiber.memoizedState = null;\n      fiber.pendingProps = null;\n      fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n      fiber.updateQueue = null;\n    }\n  }\n}\n\nfunction getHostParentFiber(fiber) {\n  var parent = fiber.return;\n\n  while (parent !== null) {\n    if (isHostParent(parent)) {\n      return parent;\n    }\n\n    parent = parent.return;\n  }\n\n  throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n}\n\nfunction isHostParent(fiber) {\n  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n  // We're going to search forward into the tree until we find a sibling host\n  // node. Unfortunately, if multiple insertions are done in a row we have to\n  // search past them. This leads to exponential search for the next sibling.\n  // TODO: Find a more efficient way to do this.\n  var node = fiber;\n\n  siblings: while (true) {\n    // If we didn't find anything, let's try the next sibling.\n    while (node.sibling === null) {\n      if (node.return === null || isHostParent(node.return)) {\n        // If we pop out of the root or hit the parent the fiber we are the\n        // last sibling.\n        return null;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n\n    while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n      // If it is not host node and, we might have a host node inside it.\n      // Try to search down until we find one.\n      if (node.flags & Placement) {\n        // If we don't have a child, try the siblings instead.\n        continue siblings;\n      } // If we don't have a child, try the siblings instead.\n      // We also skip portals because they are not part of this host tree.\n\n\n      if (node.child === null || node.tag === HostPortal) {\n        continue siblings;\n      } else {\n        node.child.return = node;\n        node = node.child;\n      }\n    } // Check if this host node is stable or about to be placed.\n\n\n    if (!(node.flags & Placement)) {\n      // Found it!\n      return node.stateNode;\n    }\n  }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n  var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n  switch (parentFiber.tag) {\n    case HostComponent:\n      {\n        var parent = parentFiber.stateNode;\n\n        if (parentFiber.flags & ContentReset) {\n          // Reset the text content of the parent before doing any insertions\n          resetTextContent(parent); // Clear ContentReset from the effect tag\n\n          parentFiber.flags &= ~ContentReset;\n        }\n\n        var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n        // children to find all the terminal nodes.\n\n        insertOrAppendPlacementNode(finishedWork, before, parent);\n        break;\n      }\n\n    case HostRoot:\n    case HostPortal:\n      {\n        var _parent = parentFiber.stateNode.containerInfo;\n\n        var _before = getHostSibling(finishedWork);\n\n        insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);\n        break;\n      }\n    // eslint-disable-next-line-no-fallthrough\n\n    default:\n      throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n  }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n  var tag = node.tag;\n  var isHost = tag === HostComponent || tag === HostText;\n\n  if (isHost) {\n    var stateNode = node.stateNode;\n\n    if (before) {\n      insertInContainerBefore(parent, stateNode, before);\n    } else {\n      appendChildToContainer(parent, stateNode);\n    }\n  } else if (tag === HostPortal) ; else {\n    var child = node.child;\n\n    if (child !== null) {\n      insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n      var sibling = child.sibling;\n\n      while (sibling !== null) {\n        insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n        sibling = sibling.sibling;\n      }\n    }\n  }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n  var tag = node.tag;\n  var isHost = tag === HostComponent || tag === HostText;\n\n  if (isHost) {\n    var stateNode = node.stateNode;\n\n    if (before) {\n      insertBefore(parent, stateNode, before);\n    } else {\n      appendChild(parent, stateNode);\n    }\n  } else if (tag === HostPortal) ; else {\n    var child = node.child;\n\n    if (child !== null) {\n      insertOrAppendPlacementNode(child, before, parent);\n      var sibling = child.sibling;\n\n      while (sibling !== null) {\n        insertOrAppendPlacementNode(sibling, before, parent);\n        sibling = sibling.sibling;\n      }\n    }\n  }\n} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n  {\n    // We only have the top Fiber that was deleted but we need to recurse down its\n    // children to find all the terminal nodes.\n    // Recursively delete all host nodes from the parent, detach refs, clean\n    // up mounted layout effects, and call componentWillUnmount.\n    // We only need to remove the topmost host child in each branch. But then we\n    // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n    // could split this into two separate traversals functions, where the second\n    // one doesn't include any removeChild logic. This is maybe the same\n    // function as \"disappearLayoutEffects\" (or whatever that turns into after\n    // the layout phase is refactored to use recursion).\n    // Before starting, find the nearest host parent on the stack so we know\n    // which instance/container to remove the children from.\n    // TODO: Instead of searching up the fiber return path on every deletion, we\n    // can track the nearest host component on the JS stack as we traverse the\n    // tree during the commit phase. This would make insertions faster, too.\n    var parent = returnFiber;\n\n    findParent: while (parent !== null) {\n      switch (parent.tag) {\n        case HostComponent:\n          {\n            hostParent = parent.stateNode;\n            hostParentIsContainer = false;\n            break findParent;\n          }\n\n        case HostRoot:\n          {\n            hostParent = parent.stateNode.containerInfo;\n            hostParentIsContainer = true;\n            break findParent;\n          }\n\n        case HostPortal:\n          {\n            hostParent = parent.stateNode.containerInfo;\n            hostParentIsContainer = true;\n            break findParent;\n          }\n      }\n\n      parent = parent.return;\n    }\n\n    if (hostParent === null) {\n      throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n    }\n\n    commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n    hostParent = null;\n    hostParentIsContainer = false;\n  }\n\n  detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n  // TODO: Use a static flag to skip trees that don't have unmount effects\n  var child = parent.child;\n\n  while (child !== null) {\n    commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n    child = child.sibling;\n  }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n  onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n  // into their subtree. There are simpler cases in the inner switch\n  // that don't modify the stack.\n\n  switch (deletedFiber.tag) {\n    case HostComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          safelyDetachRef(deletedFiber, nearestMountedAncestor);\n        } // Intentional fallthrough to next branch\n\n      }\n    // eslint-disable-next-line-no-fallthrough\n\n    case HostText:\n      {\n        // We only need to remove the nearest host child. Set the host parent\n        // to `null` on the stack to indicate that nested children don't\n        // need to be removed.\n        {\n          var prevHostParent = hostParent;\n          var prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = null;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          hostParent = prevHostParent;\n          hostParentIsContainer = prevHostParentIsContainer;\n\n          if (hostParent !== null) {\n            // Now that all the child effects have unmounted, we can remove the\n            // node from the tree.\n            if (hostParentIsContainer) {\n              removeChildFromContainer(hostParent, deletedFiber.stateNode);\n            } else {\n              removeChild(hostParent, deletedFiber.stateNode);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case DehydratedFragment:\n      {\n        // Delete the dehydrated suspense boundary and all of its content.\n\n\n        {\n          if (hostParent !== null) {\n            if (hostParentIsContainer) {\n              clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n            } else {\n              clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostPortal:\n      {\n        {\n          // When we go into a portal, it becomes the parent to remove from.\n          var _prevHostParent = hostParent;\n          var _prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = deletedFiber.stateNode.containerInfo;\n          hostParentIsContainer = true;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          hostParent = _prevHostParent;\n          hostParentIsContainer = _prevHostParentIsContainer;\n        }\n\n        return;\n      }\n\n    case FunctionComponent:\n    case ForwardRef:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          var updateQueue = deletedFiber.updateQueue;\n\n          if (updateQueue !== null) {\n            var lastEffect = updateQueue.lastEffect;\n\n            if (lastEffect !== null) {\n              var firstEffect = lastEffect.next;\n              var effect = firstEffect;\n\n              do {\n                var _effect = effect,\n                    destroy = _effect.destroy,\n                    tag = _effect.tag;\n\n                if (destroy !== undefined) {\n                  if ((tag & Insertion) !== NoFlags$1) {\n                    safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                  } else if ((tag & Layout) !== NoFlags$1) {\n                    {\n                      markComponentLayoutEffectUnmountStarted(deletedFiber);\n                    }\n\n                    if ( deletedFiber.mode & ProfileMode) {\n                      startLayoutEffectTimer();\n                      safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                      recordLayoutEffectDuration(deletedFiber);\n                    } else {\n                      safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                    }\n\n                    {\n                      markComponentLayoutEffectUnmountStopped();\n                    }\n                  }\n                }\n\n                effect = effect.next;\n              } while (effect !== firstEffect);\n            }\n          }\n        }\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case ClassComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          safelyDetachRef(deletedFiber, nearestMountedAncestor);\n          var instance = deletedFiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n          }\n        }\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case ScopeComponent:\n      {\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case OffscreenComponent:\n      {\n        if ( // TODO: Remove this dead flag\n         deletedFiber.mode & ConcurrentMode) {\n          // If this offscreen component is hidden, we already unmounted it. Before\n          // deleting the children, track that it's already unmounted so that we\n          // don't attempt to unmount the effects again.\n          // TODO: If the tree is hidden, in most cases we should be able to skip\n          // over the nested children entirely. An exception is we haven't yet found\n          // the topmost host node to delete, which we already track on the stack.\n          // But the other case is portals, which need to be detached no matter how\n          // deeply they are nested. We should use a subtree flag to track whether a\n          // subtree includes a nested portal.\n          var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        } else {\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        }\n\n        break;\n      }\n\n    default:\n      {\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n  }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n  // TODO: Move this to passive phase\n  var newState = finishedWork.memoizedState;\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n  var newState = finishedWork.memoizedState;\n\n  if (newState === null) {\n    var current = finishedWork.alternate;\n\n    if (current !== null) {\n      var prevState = current.memoizedState;\n\n      if (prevState !== null) {\n        var suspenseInstance = prevState.dehydrated;\n\n        if (suspenseInstance !== null) {\n          commitHydratedSuspenseInstance(suspenseInstance);\n        }\n      }\n    }\n  }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n  // If this boundary just timed out, then it will have a set of wakeables.\n  // For each wakeable, attach a listener so that when it resolves, React\n  // attempts to re-render the boundary in the primary (pre-timeout) state.\n  var wakeables = finishedWork.updateQueue;\n\n  if (wakeables !== null) {\n    finishedWork.updateQueue = null;\n    var retryCache = finishedWork.stateNode;\n\n    if (retryCache === null) {\n      retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n    }\n\n    wakeables.forEach(function (wakeable) {\n      // Memoize using the boundary fiber to prevent redundant listeners.\n      var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n      if (!retryCache.has(wakeable)) {\n        retryCache.add(wakeable);\n\n        {\n          if (isDevToolsPresent) {\n            if (inProgressLanes !== null && inProgressRoot !== null) {\n              // If we have pending work still, associate the original updaters with it.\n              restorePendingUpdaters(inProgressRoot, inProgressLanes);\n            } else {\n              throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n            }\n          }\n        }\n\n        wakeable.then(retry, retry);\n      }\n    });\n  }\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n  inProgressLanes = committedLanes;\n  inProgressRoot = root;\n  setCurrentFiber(finishedWork);\n  commitMutationEffectsOnFiber(finishedWork, root);\n  setCurrentFiber(finishedWork);\n  inProgressLanes = null;\n  inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n  // Deletions effects can be scheduled on any fiber type. They need to happen\n  // before the children effects hae fired.\n  var deletions = parentFiber.deletions;\n\n  if (deletions !== null) {\n    for (var i = 0; i < deletions.length; i++) {\n      var childToDelete = deletions[i];\n\n      try {\n        commitDeletionEffects(root, parentFiber, childToDelete);\n      } catch (error) {\n        captureCommitPhaseError(childToDelete, parentFiber, error);\n      }\n    }\n  }\n\n  var prevDebugFiber = getCurrentFiber();\n\n  if (parentFiber.subtreeFlags & MutationMask) {\n    var child = parentFiber.child;\n\n    while (child !== null) {\n      setCurrentFiber(child);\n      commitMutationEffectsOnFiber(child, root);\n      child = child.sibling;\n    }\n  }\n\n  setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n  var current = finishedWork.alternate;\n  var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n  // because the fiber tag is more specific. An exception is any flag related\n  // to reconcilation, because those can be set on all fiber types.\n\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          try {\n            commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n            commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          } // Layout effects are destroyed during the mutation phase so that all\n          // destroy functions for all fibers are called before any create functions.\n          // This prevents sibling component effects from interfering with each other,\n          // e.g. a destroy function in one component should never override a ref set\n          // by a create function in another component during the same commit.\n\n\n          if ( finishedWork.mode & ProfileMode) {\n            try {\n              startLayoutEffectTimer();\n              commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n\n            recordLayoutEffectDuration(finishedWork);\n          } else {\n            try {\n              commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case ClassComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Ref) {\n          if (current !== null) {\n            safelyDetachRef(current, current.return);\n          }\n        }\n\n        return;\n      }\n\n    case HostComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Ref) {\n          if (current !== null) {\n            safelyDetachRef(current, current.return);\n          }\n        }\n\n        {\n          // TODO: ContentReset gets cleared by the children during the commit\n          // phase. This is a refactor hazard because it means we must read\n          // flags the flags after `commitReconciliationEffects` has already run;\n          // the order matters. We should refactor so that ContentReset does not\n          // rely on mutating the flag during commit. Like by setting a flag\n          // during the render phase instead.\n          if (finishedWork.flags & ContentReset) {\n            var instance = finishedWork.stateNode;\n\n            try {\n              resetTextContent(instance);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n\n          if (flags & Update) {\n            var _instance4 = finishedWork.stateNode;\n\n            if (_instance4 != null) {\n              // Commit the work prepared earlier.\n              var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n              // as the newProps. The updatePayload will contain the real change in\n              // this case.\n\n              var oldProps = current !== null ? current.memoizedProps : newProps;\n              var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n              var updatePayload = finishedWork.updateQueue;\n              finishedWork.updateQueue = null;\n\n              if (updatePayload !== null) {\n                try {\n                  commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);\n                } catch (error) {\n                  captureCommitPhaseError(finishedWork, finishedWork.return, error);\n                }\n              }\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostText:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          {\n            if (finishedWork.stateNode === null) {\n              throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            }\n\n            var textInstance = finishedWork.stateNode;\n            var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n            // as the newProps. The updatePayload will contain the real change in\n            // this case.\n\n            var oldText = current !== null ? current.memoizedProps : newText;\n\n            try {\n              commitTextUpdate(textInstance, oldText, newText);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostRoot:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          {\n            if (current !== null) {\n              var prevRootState = current.memoizedState;\n\n              if (prevRootState.isDehydrated) {\n                try {\n                  commitHydratedContainer(root.containerInfo);\n                } catch (error) {\n                  captureCommitPhaseError(finishedWork, finishedWork.return, error);\n                }\n              }\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostPortal:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        return;\n      }\n\n    case SuspenseComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n        var offscreenFiber = finishedWork.child;\n\n        if (offscreenFiber.flags & Visibility) {\n          var newState = offscreenFiber.memoizedState;\n          var isHidden = newState !== null;\n\n          if (isHidden) {\n            var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;\n\n            if (!wasHidden) {\n              // TODO: Move to passive phase\n              markCommitTimeOfFallback();\n            }\n          }\n        }\n\n        if (flags & Update) {\n          try {\n            commitSuspenseCallback(finishedWork);\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n\n          attachSuspenseRetryListeners(finishedWork);\n        }\n\n        return;\n      }\n\n    case OffscreenComponent:\n      {\n        var _wasHidden = current !== null && current.memoizedState !== null;\n\n        if ( // TODO: Remove this dead flag\n         finishedWork.mode & ConcurrentMode) {\n          // Before committing the children, track on the stack whether this\n          // offscreen subtree was already hidden, so that we don't unmount the\n          // effects again.\n          var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        } else {\n          recursivelyTraverseMutationEffects(root, finishedWork);\n        }\n\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Visibility) {\n          var _newState = finishedWork.memoizedState;\n\n          var _isHidden = _newState !== null;\n\n          var offscreenBoundary = finishedWork;\n\n          {\n            // TODO: This needs to run whenever there's an insertion or update\n            // inside a hidden Offscreen tree.\n            hideOrUnhideAllChildren(offscreenBoundary, _isHidden);\n          }\n\n          {\n            if (_isHidden) {\n              if (!_wasHidden) {\n                if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {\n                  nextEffect = offscreenBoundary;\n                  var offscreenChild = offscreenBoundary.child;\n\n                  while (offscreenChild !== null) {\n                    nextEffect = offscreenChild;\n                    disappearLayoutEffects_begin(offscreenChild);\n                    offscreenChild = offscreenChild.sibling;\n                  }\n                }\n              }\n            }\n          }\n        }\n\n        return;\n      }\n\n    case SuspenseListComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          attachSuspenseRetryListeners(finishedWork);\n        }\n\n        return;\n      }\n\n    case ScopeComponent:\n      {\n\n        return;\n      }\n\n    default:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n        return;\n      }\n  }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n  // Placement effects (insertions, reorders) can be scheduled on any fiber\n  // type. They needs to happen after the children effects have fired, but\n  // before the effects on this fiber have fired.\n  var flags = finishedWork.flags;\n\n  if (flags & Placement) {\n    try {\n      commitPlacement(finishedWork);\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    } // Clear the \"placement\" from effect tag so that we know that this is\n    // inserted, before any life-cycles like componentDidMount gets called.\n    // TODO: findDOMNode doesn't rely on this any more but isMounted does\n    // and isMounted is deprecated anyway so we should be able to kill this.\n\n\n    finishedWork.flags &= ~Placement;\n  }\n\n  if (flags & Hydrating) {\n    finishedWork.flags &= ~Hydrating;\n  }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n  inProgressLanes = committedLanes;\n  inProgressRoot = root;\n  nextEffect = finishedWork;\n  commitLayoutEffects_begin(finishedWork, root, committedLanes);\n  inProgressLanes = null;\n  inProgressRoot = null;\n}\n\nfunction commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {\n  // Suspense layout effects semantics don't change for legacy roots.\n  var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;\n\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if ( fiber.tag === OffscreenComponent && isModernRoot) {\n      // Keep track of the current Offscreen stack's state.\n      var isHidden = fiber.memoizedState !== null;\n      var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n      if (newOffscreenSubtreeIsHidden) {\n        // The Offscreen tree is hidden. Skip over its layout effects.\n        commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n        continue;\n      } else {\n        // TODO (Offscreen) Also check: subtreeFlags & LayoutMask\n        var current = fiber.alternate;\n        var wasHidden = current !== null && current.memoizedState !== null;\n        var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n        var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n        var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.\n\n        offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n        offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n        if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n          // This is the root of a reappearing boundary. Turn its layout effects\n          // back on.\n          nextEffect = fiber;\n          reappearLayoutEffects_begin(fiber);\n        }\n\n        var child = firstChild;\n\n        while (child !== null) {\n          nextEffect = child;\n          commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.\n          root, committedLanes);\n          child = child.sibling;\n        } // Restore Offscreen state and resume in our-progress traversal.\n\n\n        nextEffect = fiber;\n        offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n        offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n        continue;\n      }\n    }\n\n    if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n    }\n  }\n}\n\nfunction commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & LayoutMask) !== NoFlags) {\n      var current = fiber.alternate;\n      setCurrentFiber(fiber);\n\n      try {\n        commitLayoutEffectOnFiber(root, current, fiber, committedLanes);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n\n      resetCurrentFiber();\n    }\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction disappearLayoutEffects_begin(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case MemoComponent:\n      case SimpleMemoComponent:\n        {\n          if ( fiber.mode & ProfileMode) {\n            try {\n              startLayoutEffectTimer();\n              commitHookEffectListUnmount(Layout, fiber, fiber.return);\n            } finally {\n              recordLayoutEffectDuration(fiber);\n            }\n          } else {\n            commitHookEffectListUnmount(Layout, fiber, fiber.return);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          // TODO (Offscreen) Check: flags & RefStatic\n          safelyDetachRef(fiber, fiber.return);\n          var instance = fiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          safelyDetachRef(fiber, fiber.return);\n          break;\n        }\n\n      case OffscreenComponent:\n        {\n          // Check if this is a\n          var isHidden = fiber.memoizedState !== null;\n\n          if (isHidden) {\n            // Nested Offscreen tree is already hidden. Don't disappear\n            // its effects.\n            disappearLayoutEffects_complete(subtreeRoot);\n            continue;\n          }\n\n          break;\n        }\n    } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n    if (firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      disappearLayoutEffects_complete(subtreeRoot);\n    }\n  }\n}\n\nfunction disappearLayoutEffects_complete(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction reappearLayoutEffects_begin(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if (fiber.tag === OffscreenComponent) {\n      var isHidden = fiber.memoizedState !== null;\n\n      if (isHidden) {\n        // Nested Offscreen tree is still hidden. Don't re-appear its effects.\n        reappearLayoutEffects_complete(subtreeRoot);\n        continue;\n      }\n    } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n    if (firstChild !== null) {\n      // This node may have been reused from a previous render, so we can't\n      // assume its return pointer is correct.\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      reappearLayoutEffects_complete(subtreeRoot);\n    }\n  }\n}\n\nfunction reappearLayoutEffects_complete(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic\n\n    setCurrentFiber(fiber);\n\n    try {\n      reappearLayoutEffectsOnFiber(fiber);\n    } catch (error) {\n      captureCommitPhaseError(fiber, fiber.return, error);\n    }\n\n    resetCurrentFiber();\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      // This node may have been reused from a previous render, so we can't\n      // assume its return pointer is correct.\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n  nextEffect = finishedWork;\n  commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);\n}\n\nfunction commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);\n    }\n  }\n}\n\nfunction commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & Passive) !== NoFlags) {\n      setCurrentFiber(fiber);\n\n      try {\n        commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n\n      resetCurrentFiber();\n    }\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( finishedWork.mode & ProfileMode) {\n          startPassiveEffectTimer();\n\n          try {\n            commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n          } finally {\n            recordPassiveEffectDuration(finishedWork);\n          }\n        } else {\n          commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n        }\n\n        break;\n      }\n  }\n}\n\nfunction commitPassiveUnmountEffects(firstChild) {\n  nextEffect = firstChild;\n  commitPassiveUnmountEffects_begin();\n}\n\nfunction commitPassiveUnmountEffects_begin() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var child = fiber.child;\n\n    if ((nextEffect.flags & ChildDeletion) !== NoFlags) {\n      var deletions = fiber.deletions;\n\n      if (deletions !== null) {\n        for (var i = 0; i < deletions.length; i++) {\n          var fiberToDelete = deletions[i];\n          nextEffect = fiberToDelete;\n          commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);\n        }\n\n        {\n          // A fiber was deleted from this parent fiber, but it's still part of\n          // the previous (alternate) parent fiber's list of children. Because\n          // children are a linked list, an earlier sibling that's still alive\n          // will be connected to the deleted fiber via its `alternate`:\n          //\n          //   live fiber\n          //   --alternate--> previous live fiber\n          //   --sibling--> deleted fiber\n          //\n          // We can't disconnect `alternate` on nodes that haven't been deleted\n          // yet, but we can disconnect the `sibling` and `child` pointers.\n          var previousFiber = fiber.alternate;\n\n          if (previousFiber !== null) {\n            var detachedChild = previousFiber.child;\n\n            if (detachedChild !== null) {\n              previousFiber.child = null;\n\n              do {\n                var detachedSibling = detachedChild.sibling;\n                detachedChild.sibling = null;\n                detachedChild = detachedSibling;\n              } while (detachedChild !== null);\n            }\n          }\n        }\n\n        nextEffect = fiber;\n      }\n    }\n\n    if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitPassiveUnmountEffects_complete();\n    }\n  }\n}\n\nfunction commitPassiveUnmountEffects_complete() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & Passive) !== NoFlags) {\n      setCurrentFiber(fiber);\n      commitPassiveUnmountOnFiber(fiber);\n      resetCurrentFiber();\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( finishedWork.mode & ProfileMode) {\n          startPassiveEffectTimer();\n          commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n          recordPassiveEffectDuration(finishedWork);\n        } else {\n          commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n        }\n\n        break;\n      }\n  }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // Deletion effects fire in parent -> child order\n    // TODO: Check if fiber has a PassiveStatic flag\n\n    setCurrentFiber(fiber);\n    commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n    resetCurrentFiber();\n    var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we\n    // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)\n\n    if (child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n    }\n  }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var sibling = fiber.sibling;\n    var returnFiber = fiber.return;\n\n    {\n      // Recursively traverse the entire deleted tree and clean up fiber fields.\n      // This is more aggressive than ideal, and the long term goal is to only\n      // have to detach the deleted tree at the root.\n      detachFiberAfterEffects(fiber);\n\n      if (fiber === deletedSubtreeRoot) {\n        nextEffect = null;\n        return;\n      }\n    }\n\n    if (sibling !== null) {\n      sibling.return = returnFiber;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = returnFiber;\n  }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n  switch (current.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( current.mode & ProfileMode) {\n          startPassiveEffectTimer();\n          commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n          recordPassiveEffectDuration(current);\n        } else {\n          commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n        }\n\n        break;\n      }\n  }\n} // TODO: Reuse reappearLayoutEffects traversal here?\n\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListMount(Layout | HasEffect, fiber);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = fiber.stateNode;\n\n          try {\n            instance.componentDidMount();\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListMount(Passive$1 | HasEffect, fiber);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = fiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n        }\n    }\n  }\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n  var symbolFor = Symbol.for;\n  COMPONENT_TYPE = symbolFor('selector.component');\n  HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');\n  ROLE_TYPE = symbolFor('selector.role');\n  TEST_NAME_TYPE = symbolFor('selector.test_id');\n  TEXT_TYPE = symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n  {\n    commitHooks.forEach(function (commitHook) {\n      return commitHook();\n    });\n  }\n}\n\nvar ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n  {\n    // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n    // act environment whenever `jest` is defined, but you can still turn off\n    // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n    // to false.\n    var isReactActEnvironmentGlobal = // $FlowExpectedError \u2013 Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n    typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest\n\n    var jestIsDefined = typeof jest !== 'undefined';\n    return  jestIsDefined && isReactActEnvironmentGlobal !== false;\n  }\n}\nfunction isConcurrentActEnvironment() {\n  {\n    var isReactActEnvironmentGlobal = // $FlowExpectedError \u2013 Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n    typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;\n\n    if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {\n      // TODO: Include link to relevant documentation page.\n      error('The current testing environment is not configured to support ' + 'act(...)');\n    }\n\n    return isReactActEnvironmentGlobal;\n  }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n    ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n    ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,\n    ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/*             */\n0;\nvar BatchedContext =\n/*               */\n1;\nvar RenderContext =\n/*                */\n2;\nvar CommitContext =\n/*                */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n  workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n  return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventTransitionLane = NoLanes;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n  return workInProgressRoot;\n}\nfunction requestEventTime() {\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    // We're inside React, so it's fine to read the actual time.\n    return now();\n  } // We're not inside React, so we may be in the middle of a browser event.\n\n\n  if (currentEventTime !== NoTimestamp) {\n    // Use the same start time for all updates until we enter React again.\n    return currentEventTime;\n  } // This is the first update since React yielded. Compute a new start time.\n\n\n  currentEventTime = now();\n  return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n  // Special cases\n  var mode = fiber.mode;\n\n  if ((mode & ConcurrentMode) === NoMode) {\n    return SyncLane;\n  } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n    // This is a render phase update. These are not officially supported. The\n    // old behavior is to give this the same \"thread\" (lanes) as\n    // whatever is currently rendering. So if you call `setState` on a component\n    // that happens later in the same render, it will flush. Ideally, we want to\n    // remove the special case and treat them as if they came from an\n    // interleaved event. Regardless, this pattern is not officially supported.\n    // This behavior is only a fallback. The flag only exists until we can roll\n    // out the setState warning, since existing code might accidentally rely on\n    // the current behavior.\n    return pickArbitraryLane(workInProgressRootRenderLanes);\n  }\n\n  var isTransition = requestCurrentTransition() !== NoTransition;\n\n  if (isTransition) {\n    if ( ReactCurrentBatchConfig$3.transition !== null) {\n      var transition = ReactCurrentBatchConfig$3.transition;\n\n      if (!transition._updatedFibers) {\n        transition._updatedFibers = new Set();\n      }\n\n      transition._updatedFibers.add(fiber);\n    } // The algorithm for assigning an update to a lane should be stable for all\n    // updates at the same priority within the same event. To do this, the\n    // inputs to the algorithm must be the same.\n    //\n    // The trick we use is to cache the first of each of these inputs within an\n    // event. Then reset the cached values once we can be sure the event is\n    // over. Our heuristic for that is whenever we enter a concurrent work loop.\n\n\n    if (currentEventTransitionLane === NoLane) {\n      // All transitions within the same event are assigned the same lane.\n      currentEventTransitionLane = claimNextTransitionLane();\n    }\n\n    return currentEventTransitionLane;\n  } // Updates originating inside certain React methods, like flushSync, have\n  // their priority set by tracking it with a context variable.\n  //\n  // The opaque type returned by the host config is internally a lane, so we can\n  // use that directly.\n  // TODO: Move this type conversion to the event priority module.\n\n\n  var updateLane = getCurrentUpdatePriority();\n\n  if (updateLane !== NoLane) {\n    return updateLane;\n  } // This update originated outside React. Ask the host environment for an\n  // appropriate priority, based on the type of event.\n  //\n  // The opaque type returned by the host config is internally a lane, so we can\n  // use that directly.\n  // TODO: Move this type conversion to the event priority module.\n\n\n  var eventLane = getCurrentEventPriority();\n  return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n  // This is a fork of `requestUpdateLane` designed specifically for Suspense\n  // \"retries\" \u2014 a special update that attempts to flip a Suspense boundary\n  // from its placeholder state to its primary/resolved state.\n  // Special cases\n  var mode = fiber.mode;\n\n  if ((mode & ConcurrentMode) === NoMode) {\n    return SyncLane;\n  }\n\n  return claimNextRetryLane();\n}\n\nfunction scheduleUpdateOnFiber(fiber, lane, eventTime) {\n  checkForNestedUpdates();\n\n  {\n    if (isRunningInsertionEffect) {\n      error('useInsertionEffect must not schedule updates.');\n    }\n  }\n\n  var root = markUpdateLaneFromFiberToRoot(fiber, lane);\n\n  if (root === null) {\n    return null;\n  }\n\n  {\n    if (isFlushingPassiveEffects) {\n      didScheduleUpdateDuringPassiveEffects = true;\n    }\n  } // Mark that the root has a pending update.\n\n\n  markRootUpdated(root, lane, eventTime);\n\n  if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n    // This update was dispatched during the render phase. This is a mistake\n    // if the update originates from user space (with the exception of local\n    // hook updates, which are handled differently and don't reach this\n    // function), but there are some internal React features that use this as\n    // an implementation detail, like selective hydration.\n    warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n  } else {\n    // This is a normal update, scheduled from outside the render phase. For\n    // example, during an input event.\n    {\n      if (isDevToolsPresent) {\n        addFiberToLanesMap(root, fiber, lane);\n      }\n    }\n\n    warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n    if (root === workInProgressRoot) {\n      // TODO: Consolidate with `isInterleavedUpdate` check\n      // Received an update to a tree that's in the middle of rendering. Mark\n      // that there was an interleaved update work on this root. Unless the\n      // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n      // phase update. In that case, we don't treat render phase updates as if\n      // they were interleaved, for backwards compat reasons.\n      if ( (executionContext & RenderContext) === NoContext) {\n        workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n      }\n\n      if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n        // The root already suspended with a delay, which means this render\n        // definitely won't finish. Since we have a new update, let's mark it as\n        // suspended now, right before marking the incoming update. This has the\n        // effect of interrupting the current render and switching to the update.\n        // TODO: Make sure this doesn't override pings that happen while we've\n        // already started rendering.\n        markRootSuspended$1(root, workInProgressRootRenderLanes);\n      }\n    }\n\n    ensureRootIsScheduled(root, eventTime);\n\n    if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n    !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n      // Flush the synchronous work now, unless we're already working or inside\n      // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n      // scheduleCallbackForFiber to preserve the ability to schedule a callback\n      // without immediately flushing it. We only do this for user-initiated\n      // updates, to preserve historical behavior of legacy mode.\n      resetRenderTimer();\n      flushSyncCallbacksOnlyInLegacyMode();\n    }\n  }\n\n  return root;\n}\nfunction scheduleInitialHydrationOnRoot(root, lane, eventTime) {\n  // This is a special fork of scheduleUpdateOnFiber that is only used to\n  // schedule the initial hydration of a root that has just been created. Most\n  // of the stuff in scheduleUpdateOnFiber can be skipped.\n  //\n  // The main reason for this separate path, though, is to distinguish the\n  // initial children from subsequent updates. In fully client-rendered roots\n  // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n  // updates, but hydration roots are special because the initial render must\n  // match what was rendered on the server.\n  var current = root.current;\n  current.lanes = lane;\n  markRootUpdated(root, lane, eventTime);\n  ensureRootIsScheduled(root, eventTime);\n} // This is split into a separate function so we can mark a fiber with pending\n// work without treating it as a typical update that originates from an event;\n// e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n// on a fiber.\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n  // Update the source fiber's lanes\n  sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n  var alternate = sourceFiber.alternate;\n\n  if (alternate !== null) {\n    alternate.lanes = mergeLanes(alternate.lanes, lane);\n  }\n\n  {\n    if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n      warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n    }\n  } // Walk the parent path to the root and update the child lanes.\n\n\n  var node = sourceFiber;\n  var parent = sourceFiber.return;\n\n  while (parent !== null) {\n    parent.childLanes = mergeLanes(parent.childLanes, lane);\n    alternate = parent.alternate;\n\n    if (alternate !== null) {\n      alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n    } else {\n      {\n        if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n          warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n        }\n      }\n    }\n\n    node = parent;\n    parent = parent.return;\n  }\n\n  if (node.tag === HostRoot) {\n    var root = node.stateNode;\n    return root;\n  } else {\n    return null;\n  }\n}\n\nfunction isInterleavedUpdate(fiber, lane) {\n  return (// TODO: Optimize slightly by comparing to root that fiber belongs to.\n    // Requires some refactoring. Not a big deal though since it's rare for\n    // concurrent apps to have more than a single root.\n    (workInProgressRoot !== null || // If the interleaved updates queue hasn't been cleared yet, then\n    // we should treat this as an interleaved update, too. This is also a\n    // defensive coding measure in case a new update comes in between when\n    // rendering has finished and when the interleaved updates are transferred\n    // to the main queue.\n    hasInterleavedUpdates()) && (fiber.mode & ConcurrentMode) !== NoMode && ( // If this is a render phase update (i.e. UNSAFE_componentWillReceiveProps),\n    // then don't treat this as an interleaved update. This pattern is\n    // accompanied by a warning but we haven't fully deprecated it yet. We can\n    // remove once the deferRenderPhaseUpdateToNextBatch flag is enabled.\n     (executionContext & RenderContext) === NoContext)\n  );\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\nfunction ensureRootIsScheduled(root, currentTime) {\n  var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n  // expired so we know to work on those next.\n\n  markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n  var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n  if (nextLanes === NoLanes) {\n    // Special case: There's nothing to work on.\n    if (existingCallbackNode !== null) {\n      cancelCallback$1(existingCallbackNode);\n    }\n\n    root.callbackNode = null;\n    root.callbackPriority = NoLane;\n    return;\n  } // We use the highest priority lane to represent the priority of the callback.\n\n\n  var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.\n\n  var existingCallbackPriority = root.callbackPriority;\n\n  if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n  // Scheduler task, rather than an `act` task, cancel it and re-scheduled\n  // on the `act` queue.\n  !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {\n    {\n      // If we're going to re-use an existing task, it needs to exist.\n      // Assume that discrete update microtasks are non-cancellable and null.\n      // TODO: Temporary until we confirm this warning is not fired.\n      if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {\n        error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');\n      }\n    } // The priority hasn't changed. We can reuse the existing task. Exit.\n\n\n    return;\n  }\n\n  if (existingCallbackNode != null) {\n    // Cancel the existing callback. We'll schedule a new one below.\n    cancelCallback$1(existingCallbackNode);\n  } // Schedule a new callback.\n\n\n  var newCallbackNode;\n\n  if (newCallbackPriority === SyncLane) {\n    // Special case: Sync React callbacks are scheduled on a special\n    // internal queue\n    if (root.tag === LegacyRoot) {\n      if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {\n        ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;\n      }\n\n      scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));\n    } else {\n      scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n    }\n\n    {\n      // Flush the queue in a microtask.\n      if ( ReactCurrentActQueue$1.current !== null) {\n        // Inside `act`, use our internal `act` queue so that these get flushed\n        // at the end of the current scope even when using the sync version\n        // of `act`.\n        ReactCurrentActQueue$1.current.push(flushSyncCallbacks);\n      } else {\n        scheduleMicrotask(function () {\n          // In Safari, appending an iframe forces microtasks to run.\n          // https://github.com/facebook/react/issues/22459\n          // We don't support running callbacks in the middle of render\n          // or commit so we need to check against that.\n          if (executionContext === NoContext) {\n            // It's only safe to do this conditionally because we always\n            // check for pending work before we exit the task.\n            flushSyncCallbacks();\n          }\n        });\n      }\n    }\n\n    newCallbackNode = null;\n  } else {\n    var schedulerPriorityLevel;\n\n    switch (lanesToEventPriority(nextLanes)) {\n      case DiscreteEventPriority:\n        schedulerPriorityLevel = ImmediatePriority;\n        break;\n\n      case ContinuousEventPriority:\n        schedulerPriorityLevel = UserBlockingPriority;\n        break;\n\n      case DefaultEventPriority:\n        schedulerPriorityLevel = NormalPriority;\n        break;\n\n      case IdleEventPriority:\n        schedulerPriorityLevel = IdlePriority;\n        break;\n\n      default:\n        schedulerPriorityLevel = NormalPriority;\n        break;\n    }\n\n    newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n  }\n\n  root.callbackPriority = newCallbackPriority;\n  root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n  {\n    resetNestedUpdateFlag();\n  } // Since we know we're in a React event, we can clear the current\n  // event time. The next update will compute a new event time.\n\n\n  currentEventTime = NoTimestamp;\n  currentEventTransitionLane = NoLanes;\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  } // Flush any pending passive effects before deciding which lanes to work on,\n  // in case they schedule additional work.\n\n\n  var originalCallbackNode = root.callbackNode;\n  var didFlushPassiveEffects = flushPassiveEffects();\n\n  if (didFlushPassiveEffects) {\n    // Something in the passive effect phase may have canceled the current task.\n    // Check if the task node for this root was changed.\n    if (root.callbackNode !== originalCallbackNode) {\n      // The current task was canceled. Exit. We don't need to call\n      // `ensureRootIsScheduled` because the check above implies either that\n      // there's a new task, or that there's no remaining work on this root.\n      return null;\n    }\n  } // Determine the next lanes to work on, using the fields stored\n  // on the root.\n\n\n  var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n  if (lanes === NoLanes) {\n    // Defensive coding. This is never expected to happen.\n    return null;\n  } // We disable time-slicing in some cases: if the work has been CPU-bound\n  // for too long (\"expired\" work, to prevent starvation), or we're in\n  // sync-updates-by-default mode.\n  // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n  // bug we're still investigating. Once the bug in Scheduler is fixed,\n  // we can remove this, since we track expiration ourselves.\n\n\n  var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);\n  var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n  if (exitStatus !== RootInProgress) {\n    if (exitStatus === RootErrored) {\n      // If something threw an error, try rendering one more time. We'll\n      // render synchronously to block concurrent data mutations, and we'll\n      // includes all pending updates are included. If it still fails after\n      // the second attempt, we'll give up and commit the resulting tree.\n      var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n      if (errorRetryLanes !== NoLanes) {\n        lanes = errorRetryLanes;\n        exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n      }\n    }\n\n    if (exitStatus === RootFatalErrored) {\n      var fatalError = workInProgressRootFatalError;\n      prepareFreshStack(root, NoLanes);\n      markRootSuspended$1(root, lanes);\n      ensureRootIsScheduled(root, now());\n      throw fatalError;\n    }\n\n    if (exitStatus === RootDidNotComplete) {\n      // The render unwound without completing the tree. This happens in special\n      // cases where need to exit the current render without producing a\n      // consistent tree or committing.\n      //\n      // This should only happen during a concurrent render, not a discrete or\n      // synchronous update. We should have already checked for this when we\n      // unwound the stack.\n      markRootSuspended$1(root, lanes);\n    } else {\n      // The render completed.\n      // Check if this render may have yielded to a concurrent event, and if so,\n      // confirm that any newly rendered stores are consistent.\n      // TODO: It's possible that even a concurrent render may never have yielded\n      // to the main thread, if it was fast enough, or if it expired. We could\n      // skip the consistency check in that case, too.\n      var renderWasConcurrent = !includesBlockingLane(root, lanes);\n      var finishedWork = root.current.alternate;\n\n      if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n        // A store was mutated in an interleaved event. Render again,\n        // synchronously, to block further mutations.\n        exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n        if (exitStatus === RootErrored) {\n          var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n          if (_errorRetryLanes !== NoLanes) {\n            lanes = _errorRetryLanes;\n            exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n            // concurrent events.\n          }\n        }\n\n        if (exitStatus === RootFatalErrored) {\n          var _fatalError = workInProgressRootFatalError;\n          prepareFreshStack(root, NoLanes);\n          markRootSuspended$1(root, lanes);\n          ensureRootIsScheduled(root, now());\n          throw _fatalError;\n        }\n      } // We now have a consistent tree. The next step is either to commit it,\n      // or, if something suspended, wait to commit it after a timeout.\n\n\n      root.finishedWork = finishedWork;\n      root.finishedLanes = lanes;\n      finishConcurrentRender(root, exitStatus, lanes);\n    }\n  }\n\n  ensureRootIsScheduled(root, now());\n\n  if (root.callbackNode === originalCallbackNode) {\n    // The task node scheduled for this root is the same one that's\n    // currently executed. Need to return a continuation.\n    return performConcurrentWorkOnRoot.bind(null, root);\n  }\n\n  return null;\n}\n\nfunction recoverFromConcurrentError(root, errorRetryLanes) {\n  // If an error occurred during hydration, discard server response and fall\n  // back to client side render.\n  // Before rendering again, save the errors from the previous attempt.\n  var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n\n  if (isRootDehydrated(root)) {\n    // The shell failed to hydrate. Set a flag to force a client rendering\n    // during the next attempt. To do this, we call prepareFreshStack now\n    // to create the root work-in-progress fiber. This is a bit weird in terms\n    // of factoring, because it relies on renderRootSync not calling\n    // prepareFreshStack again in the call below, which happens because the\n    // root and lanes haven't changed.\n    //\n    // TODO: I think what we should do is set ForceClientRender inside\n    // throwException, like we do for nested Suspense boundaries. The reason\n    // it's here instead is so we can switch to the synchronous work loop, too.\n    // Something to consider for a future refactor.\n    var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n    rootWorkInProgress.flags |= ForceClientRender;\n\n    {\n      errorHydratingContainer(root.containerInfo);\n    }\n  }\n\n  var exitStatus = renderRootSync(root, errorRetryLanes);\n\n  if (exitStatus !== RootErrored) {\n    // Successfully finished rendering on retry\n    // The errors from the failed first attempt have been recovered. Add\n    // them to the collection of recoverable errors. We'll log them in the\n    // commit phase.\n    var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n    workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n    // from the first attempt, to preserve the causal sequence.\n\n    if (errorsFromSecondAttempt !== null) {\n      queueRecoverableErrors(errorsFromSecondAttempt);\n    }\n  }\n\n  return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n  if (workInProgressRootRecoverableErrors === null) {\n    workInProgressRootRecoverableErrors = errors;\n  } else {\n    workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n  }\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n  switch (exitStatus) {\n    case RootInProgress:\n    case RootFatalErrored:\n      {\n        throw new Error('Root did not complete. This is a bug in React.');\n      }\n    // Flow knows about invariant, so it complains if I add a break\n    // statement, but eslint doesn't know about invariant, so it complains\n    // if I do. eslint-disable-next-line no-fallthrough\n\n    case RootErrored:\n      {\n        // We should have already attempted to retry this tree. If we reached\n        // this point, it errored again. Commit it.\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootSuspended:\n      {\n        markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n        // should immediately commit it or wait a bit.\n\n        if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n        !shouldForceFlushFallbacksInDEV()) {\n          // This render only included retries, no updates. Throttle committing\n          // retries so that we don't show too many loading states too quickly.\n          var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n          if (msUntilTimeout > 10) {\n            var nextLanes = getNextLanes(root, NoLanes);\n\n            if (nextLanes !== NoLanes) {\n              // There's additional work on this root.\n              break;\n            }\n\n            var suspendedLanes = root.suspendedLanes;\n\n            if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n              // We should prefer to render the fallback of at the last\n              // suspended level. Ping the last suspended level to try\n              // rendering it again.\n              // FIXME: What if the suspended lanes are Idle? Should not restart.\n              var eventTime = requestEventTime();\n              markRootPinged(root, suspendedLanes);\n              break;\n            } // The render is suspended, it hasn't timed out, and there's no\n            // lower priority work to do. Instead of committing the fallback\n            // immediately, wait for more data to arrive.\n\n\n            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);\n            break;\n          }\n        } // The work expired. Commit immediately.\n\n\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootSuspendedWithDelay:\n      {\n        markRootSuspended$1(root, lanes);\n\n        if (includesOnlyTransitions(lanes)) {\n          // This is a transition, so we should exit without committing a\n          // placeholder and without scheduling a timeout. Delay indefinitely\n          // until we receive more data.\n          break;\n        }\n\n        if (!shouldForceFlushFallbacksInDEV()) {\n          // This is not a transition, but we did trigger an avoided state.\n          // Schedule a placeholder to display after a short delay, using the Just\n          // Noticeable Difference.\n          // TODO: Is the JND optimization worth the added complexity? If this is\n          // the only reason we track the event time, then probably not.\n          // Consider removing.\n          var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n          var eventTimeMs = mostRecentEventTime;\n          var timeElapsedMs = now() - eventTimeMs;\n\n          var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n          if (_msUntilTimeout > 10) {\n            // Instead of committing the fallback immediately, wait for more data\n            // to arrive.\n            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);\n            break;\n          }\n        } // Commit the placeholder.\n\n\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootCompleted:\n      {\n        // The work completed. Ready to commit.\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    default:\n      {\n        throw new Error('Unknown root exit status.');\n      }\n  }\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n  // Search the rendered tree for external store reads, and check whether the\n  // stores were mutated in a concurrent event. Intentionally using an iterative\n  // loop instead of recursion so we can exit early.\n  var node = finishedWork;\n\n  while (true) {\n    if (node.flags & StoreConsistency) {\n      var updateQueue = node.updateQueue;\n\n      if (updateQueue !== null) {\n        var checks = updateQueue.stores;\n\n        if (checks !== null) {\n          for (var i = 0; i < checks.length; i++) {\n            var check = checks[i];\n            var getSnapshot = check.getSnapshot;\n            var renderedValue = check.value;\n\n            try {\n              if (!objectIs(getSnapshot(), renderedValue)) {\n                // Found an inconsistent store.\n                return false;\n              }\n            } catch (error) {\n              // If `getSnapshot` throws, return `false`. This will schedule\n              // a re-render, and the error will be rethrown during render.\n              return false;\n            }\n          }\n        }\n      }\n    }\n\n    var child = node.child;\n\n    if (node.subtreeFlags & StoreConsistency && child !== null) {\n      child.return = node;\n      node = child;\n      continue;\n    }\n\n    if (node === finishedWork) {\n      return true;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === finishedWork) {\n        return true;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  } // Flow doesn't know this is unreachable, but eslint does\n  // eslint-disable-next-line no-unreachable\n\n\n  return true;\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n  // When suspending, we should always exclude lanes that were pinged or (more\n  // rarely, since we try to avoid it) updated during the render phase.\n  // TODO: Lol maybe there's a better way to factor this besides this\n  // obnoxiously named function :)\n  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n  markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n  {\n    syncNestedUpdateFlag();\n  }\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  }\n\n  flushPassiveEffects();\n  var lanes = getNextLanes(root, NoLanes);\n\n  if (!includesSomeLane(lanes, SyncLane)) {\n    // There's no remaining sync work left.\n    ensureRootIsScheduled(root, now());\n    return null;\n  }\n\n  var exitStatus = renderRootSync(root, lanes);\n\n  if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n    // If something threw an error, try rendering one more time. We'll render\n    // synchronously to block concurrent data mutations, and we'll includes\n    // all pending updates are included. If it still fails after the second\n    // attempt, we'll give up and commit the resulting tree.\n    var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n    if (errorRetryLanes !== NoLanes) {\n      lanes = errorRetryLanes;\n      exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n    }\n  }\n\n  if (exitStatus === RootFatalErrored) {\n    var fatalError = workInProgressRootFatalError;\n    prepareFreshStack(root, NoLanes);\n    markRootSuspended$1(root, lanes);\n    ensureRootIsScheduled(root, now());\n    throw fatalError;\n  }\n\n  if (exitStatus === RootDidNotComplete) {\n    throw new Error('Root did not complete. This is a bug in React.');\n  } // We now have a consistent tree. Because this is a sync render, we\n  // will commit it even if something suspended.\n\n\n  var finishedWork = root.current.alternate;\n  root.finishedWork = finishedWork;\n  root.finishedLanes = lanes;\n  commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n  // pending level.\n\n  ensureRootIsScheduled(root, now());\n  return null;\n}\n\nfunction flushRoot(root, lanes) {\n  if (lanes !== NoLanes) {\n    markRootEntangled(root, mergeLanes(lanes, SyncLane));\n    ensureRootIsScheduled(root, now());\n\n    if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n      resetRenderTimer();\n      flushSyncCallbacks();\n    }\n  }\n}\nfunction batchedUpdates$1(fn, a) {\n  var prevExecutionContext = executionContext;\n  executionContext |= BatchedContext;\n\n  try {\n    return fn(a);\n  } finally {\n    executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n    // most batchedUpdates-like method.\n\n    if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n    !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n      resetRenderTimer();\n      flushSyncCallbacksOnlyInLegacyMode();\n    }\n  }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    return fn(a, b, c, d);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n\n    if (executionContext === NoContext) {\n      resetRenderTimer();\n    }\n  }\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync(fn) {\n  // In legacy mode, we flush pending passive effects at the beginning of the\n  // next event, not at the end of the previous one.\n  if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n    flushPassiveEffects();\n  }\n\n  var prevExecutionContext = executionContext;\n  executionContext |= BatchedContext;\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n  var previousPriority = getCurrentUpdatePriority();\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n\n    if (fn) {\n      return fn();\n    } else {\n      return undefined;\n    }\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n    executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n    // Note that this will happen even if batchedUpdates is higher up\n    // the stack.\n\n    if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n      flushSyncCallbacks();\n    }\n  }\n}\nfunction isAlreadyRendering() {\n  // Used by the renderer to print a warning if certain APIs are called from\n  // the wrong context.\n  return  (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\nfunction pushRenderLanes(fiber, lanes) {\n  push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n  subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n  workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n  subtreeRenderLanes = subtreeRenderLanesCursor.current;\n  pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n  root.finishedWork = null;\n  root.finishedLanes = NoLanes;\n  var timeoutHandle = root.timeoutHandle;\n\n  if (timeoutHandle !== noTimeout) {\n    // The root previous suspended and scheduled a timeout to commit a fallback\n    // state. Now that we have additional work, cancel the timeout.\n    root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n    cancelTimeout(timeoutHandle);\n  }\n\n  if (workInProgress !== null) {\n    var interruptedWork = workInProgress.return;\n\n    while (interruptedWork !== null) {\n      var current = interruptedWork.alternate;\n      unwindInterruptedWork(current, interruptedWork);\n      interruptedWork = interruptedWork.return;\n    }\n  }\n\n  workInProgressRoot = root;\n  var rootWorkInProgress = createWorkInProgress(root.current, null);\n  workInProgress = rootWorkInProgress;\n  workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n  workInProgressRootExitStatus = RootInProgress;\n  workInProgressRootFatalError = null;\n  workInProgressRootSkippedLanes = NoLanes;\n  workInProgressRootInterleavedUpdatedLanes = NoLanes;\n  workInProgressRootPingedLanes = NoLanes;\n  workInProgressRootConcurrentErrors = null;\n  workInProgressRootRecoverableErrors = null;\n  enqueueInterleavedUpdates();\n\n  {\n    ReactStrictModeWarnings.discardPendingWarnings();\n  }\n\n  return rootWorkInProgress;\n}\n\nfunction handleError(root, thrownValue) {\n  do {\n    var erroredWork = workInProgress;\n\n    try {\n      // Reset module-level state that was set during the render phase.\n      resetContextDependencies();\n      resetHooksAfterThrow();\n      resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n      // separate issue. Write a regression test using string refs.\n\n      ReactCurrentOwner$2.current = null;\n\n      if (erroredWork === null || erroredWork.return === null) {\n        // Expected to be working on a non-root fiber. This is a fatal error\n        // because there's no ancestor that can handle it; the root is\n        // supposed to capture all errors that weren't caught by an error\n        // boundary.\n        workInProgressRootExitStatus = RootFatalErrored;\n        workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n        // sibling, or the parent if there are no siblings. But since the root\n        // has no siblings nor a parent, we set it to null. Usually this is\n        // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n        // intentionally not calling those, we need set it here.\n        // TODO: Consider calling `unwindWork` to pop the contexts.\n\n        workInProgress = null;\n        return;\n      }\n\n      if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n        // Record the time spent rendering before an error was thrown. This\n        // avoids inaccurate Profiler durations in the case of a\n        // suspended render.\n        stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n      }\n\n      if (enableSchedulingProfiler) {\n        markComponentRenderStopped();\n\n        if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {\n          var wakeable = thrownValue;\n          markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n        } else {\n          markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n        }\n      }\n\n      throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n      completeUnitOfWork(erroredWork);\n    } catch (yetAnotherThrownValue) {\n      // Something in the return path also threw.\n      thrownValue = yetAnotherThrownValue;\n\n      if (workInProgress === erroredWork && erroredWork !== null) {\n        // If this boundary has already errored, then we had trouble processing\n        // the error. Bubble it to the next boundary.\n        erroredWork = erroredWork.return;\n        workInProgress = erroredWork;\n      } else {\n        erroredWork = workInProgress;\n      }\n\n      continue;\n    } // Return to the normal work loop.\n\n\n    return;\n  } while (true);\n}\n\nfunction pushDispatcher() {\n  var prevDispatcher = ReactCurrentDispatcher$2.current;\n  ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n  if (prevDispatcher === null) {\n    // The React isomorphic package does not include a default dispatcher.\n    // Instead the first renderer will lazily attach one, in order to give\n    // nicer error messages.\n    return ContextOnlyDispatcher;\n  } else {\n    return prevDispatcher;\n  }\n}\n\nfunction popDispatcher(prevDispatcher) {\n  ReactCurrentDispatcher$2.current = prevDispatcher;\n}\n\nfunction markCommitTimeOfFallback() {\n  globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n  workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n  if (workInProgressRootExitStatus === RootInProgress) {\n    workInProgressRootExitStatus = RootSuspended;\n  }\n}\nfunction renderDidSuspendDelayIfPossible() {\n  if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {\n    workInProgressRootExitStatus = RootSuspendedWithDelay;\n  } // Check if there are updates that we skipped tree that might have unblocked\n  // this render.\n\n\n  if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n    // Mark the current render as suspended so that we switch to working on\n    // the updates that were skipped. Usually we only suspend at the end of\n    // the render phase.\n    // TODO: We should probably always mark the root as suspended immediately\n    // (inside this function), since by suspending at the end of the render\n    // phase introduces a potential mistake where we suspend lanes that were\n    // pinged or updated while we were rendering.\n    markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n  }\n}\nfunction renderDidError(error) {\n  if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n    workInProgressRootExitStatus = RootErrored;\n  }\n\n  if (workInProgressRootConcurrentErrors === null) {\n    workInProgressRootConcurrentErrors = [error];\n  } else {\n    workInProgressRootConcurrentErrors.push(error);\n  }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n  // If something errored or completed, we can't really be sure,\n  // so those are false.\n  return workInProgressRootExitStatus === RootInProgress;\n}\n\nfunction renderRootSync(root, lanes) {\n  var prevExecutionContext = executionContext;\n  executionContext |= RenderContext;\n  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n  // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n    {\n      if (isDevToolsPresent) {\n        var memoizedUpdaters = root.memoizedUpdaters;\n\n        if (memoizedUpdaters.size > 0) {\n          restorePendingUpdaters(root, workInProgressRootRenderLanes);\n          memoizedUpdaters.clear();\n        } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n        // If we bailout on this work, we'll move them back (like above).\n        // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n        // That way we can keep the current update and future updates separate.\n\n\n        movePendingFibersToMemoized(root, lanes);\n      }\n    }\n\n    workInProgressTransitions = getTransitionsForLanes();\n    prepareFreshStack(root, lanes);\n  }\n\n  {\n    markRenderStarted(lanes);\n  }\n\n  do {\n    try {\n      workLoopSync();\n      break;\n    } catch (thrownValue) {\n      handleError(root, thrownValue);\n    }\n  } while (true);\n\n  resetContextDependencies();\n  executionContext = prevExecutionContext;\n  popDispatcher(prevDispatcher);\n\n  if (workInProgress !== null) {\n    // This is a sync render, so we should have finished the whole tree.\n    throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n  }\n\n  {\n    markRenderStopped();\n  } // Set this to null to indicate there's no in-progress render.\n\n\n  workInProgressRoot = null;\n  workInProgressRootRenderLanes = NoLanes;\n  return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n  // Already timed out, so perform work without checking if we need to yield.\n  while (workInProgress !== null) {\n    performUnitOfWork(workInProgress);\n  }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n  var prevExecutionContext = executionContext;\n  executionContext |= RenderContext;\n  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n  // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n    {\n      if (isDevToolsPresent) {\n        var memoizedUpdaters = root.memoizedUpdaters;\n\n        if (memoizedUpdaters.size > 0) {\n          restorePendingUpdaters(root, workInProgressRootRenderLanes);\n          memoizedUpdaters.clear();\n        } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n        // If we bailout on this work, we'll move them back (like above).\n        // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n        // That way we can keep the current update and future updates separate.\n\n\n        movePendingFibersToMemoized(root, lanes);\n      }\n    }\n\n    workInProgressTransitions = getTransitionsForLanes();\n    resetRenderTimer();\n    prepareFreshStack(root, lanes);\n  }\n\n  {\n    markRenderStarted(lanes);\n  }\n\n  do {\n    try {\n      workLoopConcurrent();\n      break;\n    } catch (thrownValue) {\n      handleError(root, thrownValue);\n    }\n  } while (true);\n\n  resetContextDependencies();\n  popDispatcher(prevDispatcher);\n  executionContext = prevExecutionContext;\n\n\n  if (workInProgress !== null) {\n    // Still work remaining.\n    {\n      markRenderYielded();\n    }\n\n    return RootInProgress;\n  } else {\n    // Completed the tree.\n    {\n      markRenderStopped();\n    } // Set this to null to indicate there's no in-progress render.\n\n\n    workInProgressRoot = null;\n    workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n    return workInProgressRootExitStatus;\n  }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n  // Perform work until Scheduler asks us to yield\n  while (workInProgress !== null && !shouldYield()) {\n    performUnitOfWork(workInProgress);\n  }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n  // The current, flushed, state of this fiber is the alternate. Ideally\n  // nothing should rely on this, but relying on it here means that we don't\n  // need an additional field on the work in progress.\n  var current = unitOfWork.alternate;\n  setCurrentFiber(unitOfWork);\n  var next;\n\n  if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n    startProfilerTimer(unitOfWork);\n    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n  } else {\n    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n  }\n\n  resetCurrentFiber();\n  unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n  if (next === null) {\n    // If this doesn't spawn new work, complete the current work.\n    completeUnitOfWork(unitOfWork);\n  } else {\n    workInProgress = next;\n  }\n\n  ReactCurrentOwner$2.current = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n  // Attempt to complete the current unit of work, then move to the next\n  // sibling. If there are no more siblings, return to the parent fiber.\n  var completedWork = unitOfWork;\n\n  do {\n    // The current, flushed, state of this fiber is the alternate. Ideally\n    // nothing should rely on this, but relying on it here means that we don't\n    // need an additional field on the work in progress.\n    var current = completedWork.alternate;\n    var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n    if ((completedWork.flags & Incomplete) === NoFlags) {\n      setCurrentFiber(completedWork);\n      var next = void 0;\n\n      if ( (completedWork.mode & ProfileMode) === NoMode) {\n        next = completeWork(current, completedWork, subtreeRenderLanes);\n      } else {\n        startProfilerTimer(completedWork);\n        next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n      }\n\n      resetCurrentFiber();\n\n      if (next !== null) {\n        // Completing this fiber spawned new work. Work on that next.\n        workInProgress = next;\n        return;\n      }\n    } else {\n      // This fiber did not complete because something threw. Pop values off\n      // the stack without entering the complete phase. If this is a boundary,\n      // capture values if possible.\n      var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes.\n\n\n      if (_next !== null) {\n        // If completing this work spawned new work, do that next. We'll come\n        // back here again.\n        // Since we're restarting, remove anything that is not a host effect\n        // from the effect tag.\n        _next.flags &= HostEffectMask;\n        workInProgress = _next;\n        return;\n      }\n\n      if ( (completedWork.mode & ProfileMode) !== NoMode) {\n        // Record the render duration for the fiber that errored.\n        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n        var actualDuration = completedWork.actualDuration;\n        var child = completedWork.child;\n\n        while (child !== null) {\n          actualDuration += child.actualDuration;\n          child = child.sibling;\n        }\n\n        completedWork.actualDuration = actualDuration;\n      }\n\n      if (returnFiber !== null) {\n        // Mark the parent fiber as incomplete and clear its subtree flags.\n        returnFiber.flags |= Incomplete;\n        returnFiber.subtreeFlags = NoFlags;\n        returnFiber.deletions = null;\n      } else {\n        // We've unwound all the way to the root.\n        workInProgressRootExitStatus = RootDidNotComplete;\n        workInProgress = null;\n        return;\n      }\n    }\n\n    var siblingFiber = completedWork.sibling;\n\n    if (siblingFiber !== null) {\n      // If there is more work to do in this returnFiber, do that next.\n      workInProgress = siblingFiber;\n      return;\n    } // Otherwise, return to the parent\n\n\n    completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n    workInProgress = completedWork;\n  } while (completedWork !== null); // We've reached the root.\n\n\n  if (workInProgressRootExitStatus === RootInProgress) {\n    workInProgressRootExitStatus = RootCompleted;\n  }\n}\n\nfunction commitRoot(root, recoverableErrors, transitions) {\n  // TODO: This no longer makes any sense. We already wrap the mutation and\n  // layout phases. Should be able to remove.\n  var previousUpdateLanePriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n  } finally {\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n    setCurrentUpdatePriority(previousUpdateLanePriority);\n  }\n\n  return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {\n  do {\n    // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n    // means `flushPassiveEffects` will sometimes result in additional\n    // passive effects. So we need to keep flushing in a loop until there are\n    // no more pending effects.\n    // TODO: Might be better if `flushPassiveEffects` did not automatically\n    // flush synchronous work at the end, to avoid factoring hazards like this.\n    flushPassiveEffects();\n  } while (rootWithPendingPassiveEffects !== null);\n\n  flushRenderPhaseStrictModeWarningsInDEV();\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  }\n\n  var finishedWork = root.finishedWork;\n  var lanes = root.finishedLanes;\n\n  {\n    markCommitStarted(lanes);\n  }\n\n  if (finishedWork === null) {\n\n    {\n      markCommitStopped();\n    }\n\n    return null;\n  } else {\n    {\n      if (lanes === NoLanes) {\n        error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n      }\n    }\n  }\n\n  root.finishedWork = null;\n  root.finishedLanes = NoLanes;\n\n  if (finishedWork === root.current) {\n    throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n  } // commitRoot never returns a continuation; it always finishes synchronously.\n  // So we can clear these now to allow a new callback to be scheduled.\n\n\n  root.callbackNode = null;\n  root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first\n  // pending time is whatever is left on the root fiber.\n\n  var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n  markRootFinished(root, remainingLanes);\n\n  if (root === workInProgressRoot) {\n    // We can reset these now that they are finished.\n    workInProgressRoot = null;\n    workInProgress = null;\n    workInProgressRootRenderLanes = NoLanes;\n  } // If there are pending passive effects, schedule a callback to process them.\n  // Do this as early as possible, so it is queued before anything else that\n  // might get scheduled in the commit phase. (See #16714.)\n  // TODO: Delete all other places that schedule the passive effect callback\n  // They're redundant.\n\n\n  if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {\n    if (!rootDoesHavePassiveEffects) {\n      rootDoesHavePassiveEffects = true;\n      // to store it in pendingPassiveTransitions until they get processed\n      // We need to pass this through as an argument to commitRoot\n      // because workInProgressTransitions might have changed between\n      // the previous render and commit if we throttle the commit\n      // with setTimeout\n\n      pendingPassiveTransitions = transitions;\n      scheduleCallback$1(NormalPriority, function () {\n        flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n        // *after* passive effects fire to avoid freeing a cache pool that may\n        // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n        return null;\n      });\n    }\n  } // Check if there are any effects in the whole tree.\n  // TODO: This is left over from the effect list implementation, where we had\n  // to check for the existence of `firstEffect` to satisfy Flow. I think the\n  // only other reason this optimization exists is because it affects profiling.\n  // Reconsider whether this is necessary.\n\n\n  var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n  var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n\n  if (subtreeHasEffects || rootHasEffect) {\n    var prevTransition = ReactCurrentBatchConfig$3.transition;\n    ReactCurrentBatchConfig$3.transition = null;\n    var previousPriority = getCurrentUpdatePriority();\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    var prevExecutionContext = executionContext;\n    executionContext |= CommitContext; // Reset this to null before calling lifecycles\n\n    ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n    // of the effect list for each phase: all mutation effects come before all\n    // layout effects, and so on.\n    // The first phase a \"before mutation\" phase. We use this phase to read the\n    // state of the host tree right before we mutate it. This is where\n    // getSnapshotBeforeUpdate is called.\n\n    var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);\n\n    {\n      // Mark the current commit time to be shared by all Profilers in this\n      // batch. This enables them to be grouped later.\n      recordCommitTime();\n    }\n\n\n    commitMutationEffects(root, finishedWork, lanes);\n\n    resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n    // the mutation phase, so that the previous tree is still current during\n    // componentWillUnmount, but before the layout phase, so that the finished\n    // work is current during componentDidMount/Update.\n\n    root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n\n    {\n      markLayoutEffectsStarted(lanes);\n    }\n\n    commitLayoutEffects(finishedWork, root, lanes);\n\n    {\n      markLayoutEffectsStopped();\n    }\n    // opportunity to paint.\n\n\n    requestPaint();\n    executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n  } else {\n    // No effects.\n    root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n    // no effects.\n    // TODO: Maybe there's a better way to report this.\n\n    {\n      recordCommitTime();\n    }\n  }\n\n  var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n  if (rootDoesHavePassiveEffects) {\n    // This commit has passive effects. Stash a reference to them. But don't\n    // schedule a callback until after flushing layout work.\n    rootDoesHavePassiveEffects = false;\n    rootWithPendingPassiveEffects = root;\n    pendingPassiveEffectsLanes = lanes;\n  } else {\n\n    {\n      nestedPassiveUpdateCount = 0;\n      rootWithPassiveNestedUpdates = null;\n    }\n  } // Read this again, since an effect might have updated it\n\n\n  remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n  // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n  // is to detect whether something might have called setState inside\n  // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n  // inside `componentDidCatch` is itself flawed \u2014 that's why we recommend\n  // `getDerivedStateFromError` instead. However, it could be improved by\n  // checking if remainingLanes includes Sync work, instead of whether there's\n  // any work remaining at all (which would also include stuff like Suspense\n  // retries or transitions). It's been like this for a while, though, so fixing\n  // it probably isn't that urgent.\n\n  if (remainingLanes === NoLanes) {\n    // If there's no remaining work, we can clear the set of already failed\n    // error boundaries.\n    legacyErrorBoundariesThatAlreadyFailed = null;\n  }\n\n  {\n    if (!rootDidHavePassiveEffects) {\n      commitDoubleInvokeEffectsInDEV(root.current, false);\n    }\n  }\n\n  onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n  {\n    if (isDevToolsPresent) {\n      root.memoizedUpdaters.clear();\n    }\n  }\n\n  {\n    onCommitRoot$1();\n  } // Always call this before exiting `commitRoot`, to ensure that any\n  // additional work on this root is scheduled.\n\n\n  ensureRootIsScheduled(root, now());\n\n  if (recoverableErrors !== null) {\n    // There were errors during this render, but recovered from them without\n    // needing to surface it to the UI. We log them here.\n    var onRecoverableError = root.onRecoverableError;\n\n    for (var i = 0; i < recoverableErrors.length; i++) {\n      var recoverableError = recoverableErrors[i];\n      onRecoverableError(recoverableError);\n    }\n  }\n\n  if (hasUncaughtError) {\n    hasUncaughtError = false;\n    var error$1 = firstUncaughtError;\n    firstUncaughtError = null;\n    throw error$1;\n  } // If the passive effects are the result of a discrete render, flush them\n  // synchronously at the end of the current task so that the result is\n  // immediately observable. Otherwise, we assume that they are not\n  // order-dependent and do not need to be observed by external systems, so we\n  // can wait until after paint.\n  // TODO: We can optimize this by not scheduling the callback earlier. Since we\n  // currently schedule the callback in multiple places, will wait until those\n  // are consolidated.\n\n\n  if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {\n    flushPassiveEffects();\n  } // Read this again, since a passive effect might have updated it\n\n\n  remainingLanes = root.pendingLanes;\n\n  if (includesSomeLane(remainingLanes, SyncLane)) {\n    {\n      markNestedUpdateScheduled();\n    } // Count the number of times the root synchronously re-renders without\n    // finishing. If there are too many, it indicates an infinite update loop.\n\n\n    if (root === rootWithNestedUpdates) {\n      nestedUpdateCount++;\n    } else {\n      nestedUpdateCount = 0;\n      rootWithNestedUpdates = root;\n    }\n  } else {\n    nestedUpdateCount = 0;\n  } // If layout work was scheduled, flush it now.\n\n\n  flushSyncCallbacks();\n\n  {\n    markCommitStopped();\n  }\n\n  return null;\n}\n\nfunction flushPassiveEffects() {\n  // Returns whether passive effects were flushed.\n  // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n  // probably just combine the two functions. I believe they were only separate\n  // in the first place because we used to wrap it with\n  // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n  // priority within React itself, so we can mutate the variable directly.\n  if (rootWithPendingPassiveEffects !== null) {\n    var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n    var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n    var prevTransition = ReactCurrentBatchConfig$3.transition;\n    var previousPriority = getCurrentUpdatePriority();\n\n    try {\n      ReactCurrentBatchConfig$3.transition = null;\n      setCurrentUpdatePriority(priority);\n      return flushPassiveEffectsImpl();\n    } finally {\n      setCurrentUpdatePriority(previousPriority);\n      ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n    }\n  }\n\n  return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n  {\n    pendingPassiveProfilerEffects.push(fiber);\n\n    if (!rootDoesHavePassiveEffects) {\n      rootDoesHavePassiveEffects = true;\n      scheduleCallback$1(NormalPriority, function () {\n        flushPassiveEffects();\n        return null;\n      });\n    }\n  }\n}\n\nfunction flushPassiveEffectsImpl() {\n  if (rootWithPendingPassiveEffects === null) {\n    return false;\n  } // Cache and clear the transitions flag\n\n\n  var transitions = pendingPassiveTransitions;\n  pendingPassiveTransitions = null;\n  var root = rootWithPendingPassiveEffects;\n  var lanes = pendingPassiveEffectsLanes;\n  rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n  // Figure out why and fix it. It's not causing any known issues (probably\n  // because it's only used for profiling), but it's a refactor hazard.\n\n  pendingPassiveEffectsLanes = NoLanes;\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Cannot flush passive effects while already rendering.');\n  }\n\n  {\n    isFlushingPassiveEffects = true;\n    didScheduleUpdateDuringPassiveEffects = false;\n  }\n\n  {\n    markPassiveEffectsStarted(lanes);\n  }\n\n  var prevExecutionContext = executionContext;\n  executionContext |= CommitContext;\n  commitPassiveUnmountEffects(root.current);\n  commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n  {\n    var profilerEffects = pendingPassiveProfilerEffects;\n    pendingPassiveProfilerEffects = [];\n\n    for (var i = 0; i < profilerEffects.length; i++) {\n      var _fiber = profilerEffects[i];\n      commitPassiveEffectDurations(root, _fiber);\n    }\n  }\n\n  {\n    markPassiveEffectsStopped();\n  }\n\n  {\n    commitDoubleInvokeEffectsInDEV(root.current, true);\n  }\n\n  executionContext = prevExecutionContext;\n  flushSyncCallbacks();\n\n  {\n    // If additional passive effects were scheduled, increment a counter. If this\n    // exceeds the limit, we'll fire a warning.\n    if (didScheduleUpdateDuringPassiveEffects) {\n      if (root === rootWithPassiveNestedUpdates) {\n        nestedPassiveUpdateCount++;\n      } else {\n        nestedPassiveUpdateCount = 0;\n        rootWithPassiveNestedUpdates = root;\n      }\n    } else {\n      nestedPassiveUpdateCount = 0;\n    }\n\n    isFlushingPassiveEffects = false;\n    didScheduleUpdateDuringPassiveEffects = false;\n  } // TODO: Move to commitPassiveMountEffects\n\n\n  onPostCommitRoot(root);\n\n  {\n    var stateNode = root.current.stateNode;\n    stateNode.effectDuration = 0;\n    stateNode.passiveEffectDuration = 0;\n  }\n\n  return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n  return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n  if (legacyErrorBoundariesThatAlreadyFailed === null) {\n    legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n  } else {\n    legacyErrorBoundariesThatAlreadyFailed.add(instance);\n  }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n  if (!hasUncaughtError) {\n    hasUncaughtError = true;\n    firstUncaughtError = error;\n  }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n  var errorInfo = createCapturedValue(error, sourceFiber);\n  var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n  enqueueUpdate(rootFiber, update);\n  var eventTime = requestEventTime();\n  var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);\n\n  if (root !== null) {\n    markRootUpdated(root, SyncLane, eventTime);\n    ensureRootIsScheduled(root, eventTime);\n  }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n  {\n    reportUncaughtErrorInDEV(error$1);\n    setIsRunningInsertionEffect(false);\n  }\n\n  if (sourceFiber.tag === HostRoot) {\n    // Error was thrown at the root. There is no parent, so the root\n    // itself should capture it.\n    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);\n    return;\n  }\n\n  var fiber = null;\n\n  {\n    fiber = nearestMountedAncestor;\n  }\n\n  while (fiber !== null) {\n    if (fiber.tag === HostRoot) {\n      captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n      return;\n    } else if (fiber.tag === ClassComponent) {\n      var ctor = fiber.type;\n      var instance = fiber.stateNode;\n\n      if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n        var errorInfo = createCapturedValue(error$1, sourceFiber);\n        var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n        enqueueUpdate(fiber, update);\n        var eventTime = requestEventTime();\n        var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);\n\n        if (root !== null) {\n          markRootUpdated(root, SyncLane, eventTime);\n          ensureRootIsScheduled(root, eventTime);\n        }\n\n        return;\n      }\n    }\n\n    fiber = fiber.return;\n  }\n\n  {\n    // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning\n    // will fire for errors that are thrown by destroy functions inside deleted\n    // trees. What it should instead do is propagate the error to the parent of\n    // the deleted tree. In the meantime, do not add this warning to the\n    // allowlist; this is only for our internal use.\n    error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n  }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n  var pingCache = root.pingCache;\n\n  if (pingCache !== null) {\n    // The wakeable resolved, so we no longer need to memoize, because it will\n    // never be thrown again.\n    pingCache.delete(wakeable);\n  }\n\n  var eventTime = requestEventTime();\n  markRootPinged(root, pingedLanes);\n  warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n  if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n    // Received a ping at the same priority level at which we're currently\n    // rendering. We might want to restart this render. This should mirror\n    // the logic of whether or not a root suspends once it completes.\n    // TODO: If we're rendering sync either due to Sync, Batched or expired,\n    // we should probably never restart.\n    // If we're suspended with delay, or if it's a retry, we'll always suspend\n    // so we can always restart.\n    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n      // Restart from the root.\n      prepareFreshStack(root, NoLanes);\n    } else {\n      // Even though we can't restart right now, we might get an\n      // opportunity later. So we mark this render as having a ping.\n      workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n    }\n  }\n\n  ensureRootIsScheduled(root, eventTime);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n  // The boundary fiber (a Suspense component or SuspenseList component)\n  // previously was rendered in its fallback state. One of the promises that\n  // suspended it has resolved, which means at least part of the tree was\n  // likely unblocked. Try rendering again, at a new lanes.\n  if (retryLane === NoLane) {\n    // TODO: Assign this to `suspenseState.retryLane`? to avoid\n    // unnecessary entanglement?\n    retryLane = requestRetryLane(boundaryFiber);\n  } // TODO: Special case idle priority?\n\n\n  var eventTime = requestEventTime();\n  var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);\n\n  if (root !== null) {\n    markRootUpdated(root, retryLane, eventTime);\n    ensureRootIsScheduled(root, eventTime);\n  }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n  var suspenseState = boundaryFiber.memoizedState;\n  var retryLane = NoLane;\n\n  if (suspenseState !== null) {\n    retryLane = suspenseState.retryLane;\n  }\n\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n  var retryLane = NoLane; // Default\n\n  var retryCache;\n\n  switch (boundaryFiber.tag) {\n    case SuspenseComponent:\n      retryCache = boundaryFiber.stateNode;\n      var suspenseState = boundaryFiber.memoizedState;\n\n      if (suspenseState !== null) {\n        retryLane = suspenseState.retryLane;\n      }\n\n      break;\n\n    case SuspenseListComponent:\n      retryCache = boundaryFiber.stateNode;\n      break;\n\n    default:\n      throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n  }\n\n  if (retryCache !== null) {\n    // The wakeable resolved, so we no longer need to memoize, because it will\n    // never be thrown again.\n    retryCache.delete(wakeable);\n  }\n\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n  return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction checkForNestedUpdates() {\n  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n    nestedUpdateCount = 0;\n    rootWithNestedUpdates = null;\n    throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');\n  }\n\n  {\n    if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n      nestedPassiveUpdateCount = 0;\n      rootWithPassiveNestedUpdates = null;\n\n      error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n    }\n  }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n  {\n    ReactStrictModeWarnings.flushLegacyContextWarning();\n\n    {\n      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n    }\n  }\n}\n\nfunction commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n  {\n    // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n    // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n    // Maybe not a big deal since this is DEV only behavior.\n    setCurrentFiber(fiber);\n    invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n    if (hasPassiveEffects) {\n      invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n    }\n\n    invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n    if (hasPassiveEffects) {\n      invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n    }\n\n    resetCurrentFiber();\n  }\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    var current = firstChild;\n    var subtreeRoot = null;\n\n    while (current !== null) {\n      var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n      if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {\n        current = current.child;\n      } else {\n        if ((current.flags & fiberFlags) !== NoFlags) {\n          invokeEffectFn(current);\n        }\n\n        if (current.sibling !== null) {\n          current = current.sibling;\n        } else {\n          current = subtreeRoot = current.return;\n        }\n      }\n    }\n  }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\n\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n  {\n    if ((executionContext & RenderContext) !== NoContext) {\n      // We let the other warning about render phase updates deal with this one.\n      return;\n    }\n\n    if (!(fiber.mode & ConcurrentMode)) {\n      return;\n    }\n\n    var tag = fiber.tag;\n\n    if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n      // Only warn for user-defined components, not internal ones like Suspense.\n      return;\n    } // We show the whole stack but dedupe on the top component's name because\n    // the problematic code almost always lies inside that component.\n\n\n    var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n    if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n      if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n        return;\n      }\n\n      didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n    } else {\n      didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n    }\n\n    var previousFiber = current;\n\n    try {\n      setCurrentFiber(fiber);\n\n      error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n    } finally {\n      if (previousFiber) {\n        setCurrentFiber(fiber);\n      } else {\n        resetCurrentFiber();\n      }\n    }\n  }\n}\n\nvar beginWork$1;\n\n{\n  var dummyFiber = null;\n\n  beginWork$1 = function (current, unitOfWork, lanes) {\n    // If a component throws an error, we replay it again in a synchronously\n    // dispatched event, so that the debugger will treat it as an uncaught\n    // error See ReactErrorUtils for more information.\n    // Before entering the begin phase, copy the work-in-progress onto a dummy\n    // fiber. If beginWork throws, we'll use this to reset the state.\n    var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n    try {\n      return beginWork(current, unitOfWork, lanes);\n    } catch (originalError) {\n      if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n        // Don't replay promises. Treat everything else like an error.\n        throw originalError;\n      } // Keep this code in sync with handleError; any changes here must have\n      // corresponding changes there.\n\n\n      resetContextDependencies();\n      resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n      // same fiber again.\n      // Unwind the failed stack frame\n\n      unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.\n\n      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n      if ( unitOfWork.mode & ProfileMode) {\n        // Reset the profiler timer.\n        startProfilerTimer(unitOfWork);\n      } // Run beginWork again.\n\n\n      invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n      if (hasCaughtError()) {\n        var replayError = clearCaughtError();\n\n        if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n          // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n          originalError._suppressLogging = true;\n        }\n      } // We always throw the original error in case the second render pass is not idempotent.\n      // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n\n      throw originalError;\n    }\n  };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n  didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n  {\n    if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n      switch (fiber.tag) {\n        case FunctionComponent:\n        case ForwardRef:\n        case SimpleMemoComponent:\n          {\n            var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n            var dedupeKey = renderingComponentName;\n\n            if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n              didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n              var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n              error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n            }\n\n            break;\n          }\n\n        case ClassComponent:\n          {\n            if (!didWarnAboutUpdateInRender) {\n              error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n              didWarnAboutUpdateInRender = true;\n            }\n\n            break;\n          }\n      }\n    }\n  }\n}\n\nfunction restorePendingUpdaters(root, lanes) {\n  {\n    if (isDevToolsPresent) {\n      var memoizedUpdaters = root.memoizedUpdaters;\n      memoizedUpdaters.forEach(function (schedulingFiber) {\n        addFiberToLanesMap(root, schedulingFiber, lanes);\n      }); // This function intentionally does not clear memoized updaters.\n      // Those may still be relevant to the current commit\n      // and a future one (e.g. Suspense).\n    }\n  }\n}\nvar fakeActCallbackNode = {};\n\nfunction scheduleCallback$1(priorityLevel, callback) {\n  {\n    // If we're currently inside an `act` scope, bypass Scheduler and push to\n    // the `act` queue instead.\n    var actQueue = ReactCurrentActQueue$1.current;\n\n    if (actQueue !== null) {\n      actQueue.push(callback);\n      return fakeActCallbackNode;\n    } else {\n      return scheduleCallback(priorityLevel, callback);\n    }\n  }\n}\n\nfunction cancelCallback$1(callbackNode) {\n  if ( callbackNode === fakeActCallbackNode) {\n    return;\n  } // In production, always call Scheduler. This function will be stripped out.\n\n\n  return cancelCallback(callbackNode);\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n  // Never force flush in production. This function should get stripped out.\n  return  ReactCurrentActQueue$1.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n  {\n    if (fiber.mode & ConcurrentMode) {\n      if (!isConcurrentActEnvironment()) {\n        // Not in an act environment. No need to warn.\n        return;\n      }\n    } else {\n      // Legacy mode has additional cases where we suppress a warning.\n      if (!isLegacyActEnvironment()) {\n        // Not in an act environment. No need to warn.\n        return;\n      }\n\n      if (executionContext !== NoContext) {\n        // Legacy mode doesn't warn if the update is batched, i.e.\n        // batchedUpdates or flushSync.\n        return;\n      }\n\n      if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n        // For backwards compatibility with pre-hooks code, legacy mode only\n        // warns for updates that originate from a hook.\n        return;\n      }\n    }\n\n    if (ReactCurrentActQueue$1.current === null) {\n      var previousFiber = current;\n\n      try {\n        setCurrentFiber(fiber);\n\n        error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + '  /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n      } finally {\n        if (previousFiber) {\n          setCurrentFiber(fiber);\n        } else {\n          resetCurrentFiber();\n        }\n      }\n    }\n  }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n  {\n    if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {\n      error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + '  /* finish loading suspended data */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');\n    }\n  }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n  {\n    isRunningInsertionEffect = isRunning;\n  }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n  {\n    resolveFamily = handler;\n  }\n};\nfunction resolveFunctionForHotReloading(type) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return type;\n    }\n\n    var family = resolveFamily(type);\n\n    if (family === undefined) {\n      return type;\n    } // Use the latest known implementation.\n\n\n    return family.current;\n  }\n}\nfunction resolveClassForHotReloading(type) {\n  // No implementation differences.\n  return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return type;\n    }\n\n    var family = resolveFamily(type);\n\n    if (family === undefined) {\n      // Check if we're dealing with a real forwardRef. Don't want to crash early.\n      if (type !== null && type !== undefined && typeof type.render === 'function') {\n        // ForwardRef is special because its resolved .type is an object,\n        // but it's possible that we only have its inner render function in the map.\n        // If that inner render function is different, we'll build a new forwardRef type.\n        var currentRender = resolveFunctionForHotReloading(type.render);\n\n        if (type.render !== currentRender) {\n          var syntheticType = {\n            $$typeof: REACT_FORWARD_REF_TYPE,\n            render: currentRender\n          };\n\n          if (type.displayName !== undefined) {\n            syntheticType.displayName = type.displayName;\n          }\n\n          return syntheticType;\n        }\n      }\n\n      return type;\n    } // Use the latest known implementation.\n\n\n    return family.current;\n  }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return false;\n    }\n\n    var prevType = fiber.elementType;\n    var nextType = element.type; // If we got here, we know types aren't === equal.\n\n    var needsCompareFamilies = false;\n    var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n    switch (fiber.tag) {\n      case ClassComponent:\n        {\n          if (typeof nextType === 'function') {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case FunctionComponent:\n        {\n          if (typeof nextType === 'function') {\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            // We don't know the inner type yet.\n            // We're going to assume that the lazy inner type is stable,\n            // and so it is sufficient to avoid reconciling it away.\n            // We're not going to unwrap or actually use the new lazy type.\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case ForwardRef:\n        {\n          if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case MemoComponent:\n      case SimpleMemoComponent:\n        {\n          if ($$typeofNextType === REACT_MEMO_TYPE) {\n            // TODO: if it was but can no longer be simple,\n            // we shouldn't set this.\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      default:\n        return false;\n    } // Check if both types have a family and it's the same one.\n\n\n    if (needsCompareFamilies) {\n      // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n      // This means both of them need to be registered to preserve state.\n      // If we unwrapped and compared the inner types for wrappers instead,\n      // then we would risk falsely saying two separate memo(Foo)\n      // calls are equivalent because they wrap the same Foo function.\n      var prevFamily = resolveFamily(prevType);\n\n      if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return;\n    }\n\n    if (typeof WeakSet !== 'function') {\n      return;\n    }\n\n    if (failedBoundaries === null) {\n      failedBoundaries = new WeakSet();\n    }\n\n    failedBoundaries.add(fiber);\n  }\n}\nvar scheduleRefresh = function (root, update) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return;\n    }\n\n    var staleFamilies = update.staleFamilies,\n        updatedFamilies = update.updatedFamilies;\n    flushPassiveEffects();\n    flushSync(function () {\n      scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n    });\n  }\n};\nvar scheduleRoot = function (root, element) {\n  {\n    if (root.context !== emptyContextObject) {\n      // Super edge case: root has a legacy _renderSubtree context\n      // but we don't know the parentComponent so we can't pass it.\n      // Just ignore. We'll delete this with _renderSubtree code path later.\n      return;\n    }\n\n    flushPassiveEffects();\n    flushSync(function () {\n      updateContainer(element, root, null, null);\n    });\n  }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n  {\n    var alternate = fiber.alternate,\n        child = fiber.child,\n        sibling = fiber.sibling,\n        tag = fiber.tag,\n        type = fiber.type;\n    var candidateType = null;\n\n    switch (tag) {\n      case FunctionComponent:\n      case SimpleMemoComponent:\n      case ClassComponent:\n        candidateType = type;\n        break;\n\n      case ForwardRef:\n        candidateType = type.render;\n        break;\n    }\n\n    if (resolveFamily === null) {\n      throw new Error('Expected resolveFamily to be set during hot reload.');\n    }\n\n    var needsRender = false;\n    var needsRemount = false;\n\n    if (candidateType !== null) {\n      var family = resolveFamily(candidateType);\n\n      if (family !== undefined) {\n        if (staleFamilies.has(family)) {\n          needsRemount = true;\n        } else if (updatedFamilies.has(family)) {\n          if (tag === ClassComponent) {\n            needsRemount = true;\n          } else {\n            needsRender = true;\n          }\n        }\n      }\n    }\n\n    if (failedBoundaries !== null) {\n      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n        needsRemount = true;\n      }\n    }\n\n    if (needsRemount) {\n      fiber._debugNeedsRemount = true;\n    }\n\n    if (needsRemount || needsRender) {\n      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n    }\n\n    if (child !== null && !needsRemount) {\n      scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n    }\n\n    if (sibling !== null) {\n      scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n    }\n  }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n  {\n    var hostInstances = new Set();\n    var types = new Set(families.map(function (family) {\n      return family.current;\n    }));\n    findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n    return hostInstances;\n  }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n  {\n    var child = fiber.child,\n        sibling = fiber.sibling,\n        tag = fiber.tag,\n        type = fiber.type;\n    var candidateType = null;\n\n    switch (tag) {\n      case FunctionComponent:\n      case SimpleMemoComponent:\n      case ClassComponent:\n        candidateType = type;\n        break;\n\n      case ForwardRef:\n        candidateType = type.render;\n        break;\n    }\n\n    var didMatch = false;\n\n    if (candidateType !== null) {\n      if (types.has(candidateType)) {\n        didMatch = true;\n      }\n    }\n\n    if (didMatch) {\n      // We have a match. This only drills down to the closest host components.\n      // There's no need to search deeper because for the purpose of giving\n      // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n      findHostInstancesForFiberShallowly(fiber, hostInstances);\n    } else {\n      // If there's no match, maybe there will be one further down in the child tree.\n      if (child !== null) {\n        findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n      }\n    }\n\n    if (sibling !== null) {\n      findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n    }\n  }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n  {\n    var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n    if (foundHostInstances) {\n      return;\n    } // If we didn't find any host children, fallback to closest host parent.\n\n\n    var node = fiber;\n\n    while (true) {\n      switch (node.tag) {\n        case HostComponent:\n          hostInstances.add(node.stateNode);\n          return;\n\n        case HostPortal:\n          hostInstances.add(node.stateNode.containerInfo);\n          return;\n\n        case HostRoot:\n          hostInstances.add(node.stateNode.containerInfo);\n          return;\n      }\n\n      if (node.return === null) {\n        throw new Error('Expected to reach root first.');\n      }\n\n      node = node.return;\n    }\n  }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n  {\n    var node = fiber;\n    var foundHostInstances = false;\n\n    while (true) {\n      if (node.tag === HostComponent) {\n        // We got a match.\n        foundHostInstances = true;\n        hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n      } else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === fiber) {\n        return foundHostInstances;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === fiber) {\n          return foundHostInstances;\n        }\n\n        node = node.return;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  }\n\n  return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n  hasBadMapPolyfill = false;\n\n  try {\n    var nonExtensibleObject = Object.preventExtensions({});\n    /* eslint-disable no-new */\n\n    new Map([[nonExtensibleObject, null]]);\n    new Set([nonExtensibleObject]);\n    /* eslint-enable no-new */\n  } catch (e) {\n    // TODO: Consider warning about bad polyfills\n    hasBadMapPolyfill = true;\n  }\n}\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n  // Instance\n  this.tag = tag;\n  this.key = key;\n  this.elementType = null;\n  this.type = null;\n  this.stateNode = null; // Fiber\n\n  this.return = null;\n  this.child = null;\n  this.sibling = null;\n  this.index = 0;\n  this.ref = null;\n  this.pendingProps = pendingProps;\n  this.memoizedProps = null;\n  this.updateQueue = null;\n  this.memoizedState = null;\n  this.dependencies = null;\n  this.mode = mode; // Effects\n\n  this.flags = NoFlags;\n  this.subtreeFlags = NoFlags;\n  this.deletions = null;\n  this.lanes = NoLanes;\n  this.childLanes = NoLanes;\n  this.alternate = null;\n\n  {\n    // Note: The following is done to avoid a v8 performance cliff.\n    //\n    // Initializing the fields below to smis and later updating them with\n    // double values will cause Fibers to end up having separate shapes.\n    // This behavior/bug has something to do with Object.preventExtension().\n    // Fortunately this only impacts DEV builds.\n    // Unfortunately it makes React unusably slow for some applications.\n    // To work around this, initialize the fields below with doubles.\n    //\n    // Learn more about this here:\n    // https://github.com/facebook/react/issues/14365\n    // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n    this.actualDuration = Number.NaN;\n    this.actualStartTime = Number.NaN;\n    this.selfBaseDuration = Number.NaN;\n    this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n    // This won't trigger the performance cliff mentioned above,\n    // and it simplifies other profiler code (including DevTools).\n\n    this.actualDuration = 0;\n    this.actualStartTime = -1;\n    this.selfBaseDuration = 0;\n    this.treeBaseDuration = 0;\n  }\n\n  {\n    // This isn't directly used but is handy for debugging internals:\n    this._debugSource = null;\n    this._debugOwner = null;\n    this._debugNeedsRemount = false;\n    this._debugHookTypes = null;\n\n    if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n      Object.preventExtensions(this);\n    }\n  }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n//    more difficult to predict when they get optimized and they are almost\n//    never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n//    always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n//    to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n//    is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n//    compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n  return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct$1(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n  return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n  if (typeof Component === 'function') {\n    return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n  } else if (Component !== undefined && Component !== null) {\n    var $$typeof = Component.$$typeof;\n\n    if ($$typeof === REACT_FORWARD_REF_TYPE) {\n      return ForwardRef;\n    }\n\n    if ($$typeof === REACT_MEMO_TYPE) {\n      return MemoComponent;\n    }\n  }\n\n  return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n  var workInProgress = current.alternate;\n\n  if (workInProgress === null) {\n    // We use a double buffering pooling technique because we know that we'll\n    // only ever need at most two versions of a tree. We pool the \"other\" unused\n    // node that we're free to reuse. This is lazily created to avoid allocating\n    // extra objects for things that are never updated. It also allow us to\n    // reclaim the extra memory if needed.\n    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n    workInProgress.elementType = current.elementType;\n    workInProgress.type = current.type;\n    workInProgress.stateNode = current.stateNode;\n\n    {\n      // DEV-only fields\n      workInProgress._debugSource = current._debugSource;\n      workInProgress._debugOwner = current._debugOwner;\n      workInProgress._debugHookTypes = current._debugHookTypes;\n    }\n\n    workInProgress.alternate = current;\n    current.alternate = workInProgress;\n  } else {\n    workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n    workInProgress.type = current.type; // We already have an alternate.\n    // Reset the effect tag.\n\n    workInProgress.flags = NoFlags; // The effects are no longer valid.\n\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.deletions = null;\n\n    {\n      // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n      // This prevents time from endlessly accumulating in new commits.\n      // This has the downside of resetting values for different priority renders,\n      // But works for yielding (the common case) and should support resuming.\n      workInProgress.actualDuration = 0;\n      workInProgress.actualStartTime = -1;\n    }\n  } // Reset all effects except static ones.\n  // Static effects are not specific to a render.\n\n\n  workInProgress.flags = current.flags & StaticMask;\n  workInProgress.childLanes = current.childLanes;\n  workInProgress.lanes = current.lanes;\n  workInProgress.child = current.child;\n  workInProgress.memoizedProps = current.memoizedProps;\n  workInProgress.memoizedState = current.memoizedState;\n  workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n  // it cannot be shared with the current fiber.\n\n  var currentDependencies = current.dependencies;\n  workInProgress.dependencies = currentDependencies === null ? null : {\n    lanes: currentDependencies.lanes,\n    firstContext: currentDependencies.firstContext\n  }; // These will be overridden during the parent's reconciliation\n\n  workInProgress.sibling = current.sibling;\n  workInProgress.index = current.index;\n  workInProgress.ref = current.ref;\n\n  {\n    workInProgress.selfBaseDuration = current.selfBaseDuration;\n    workInProgress.treeBaseDuration = current.treeBaseDuration;\n  }\n\n  {\n    workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n    switch (workInProgress.tag) {\n      case IndeterminateComponent:\n      case FunctionComponent:\n      case SimpleMemoComponent:\n        workInProgress.type = resolveFunctionForHotReloading(current.type);\n        break;\n\n      case ClassComponent:\n        workInProgress.type = resolveClassForHotReloading(current.type);\n        break;\n\n      case ForwardRef:\n        workInProgress.type = resolveForwardRefForHotReloading(current.type);\n        break;\n    }\n  }\n\n  return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n  // This resets the Fiber to what createFiber or createWorkInProgress would\n  // have set the values to before during the first pass. Ideally this wouldn't\n  // be necessary but unfortunately many code paths reads from the workInProgress\n  // when they should be reading from current and writing to workInProgress.\n  // We assume pendingProps, index, key, ref, return are still untouched to\n  // avoid doing another reconciliation.\n  // Reset the effect flags but keep any Placement tags, since that's something\n  // that child fiber is setting, not the reconciliation.\n  workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n  var current = workInProgress.alternate;\n\n  if (current === null) {\n    // Reset to createFiber's initial values.\n    workInProgress.childLanes = NoLanes;\n    workInProgress.lanes = renderLanes;\n    workInProgress.child = null;\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.memoizedProps = null;\n    workInProgress.memoizedState = null;\n    workInProgress.updateQueue = null;\n    workInProgress.dependencies = null;\n    workInProgress.stateNode = null;\n\n    {\n      // Note: We don't reset the actualTime counts. It's useful to accumulate\n      // actual time across multiple render passes.\n      workInProgress.selfBaseDuration = 0;\n      workInProgress.treeBaseDuration = 0;\n    }\n  } else {\n    // Reset to the cloned values that createWorkInProgress would've.\n    workInProgress.childLanes = current.childLanes;\n    workInProgress.lanes = current.lanes;\n    workInProgress.child = current.child;\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.deletions = null;\n    workInProgress.memoizedProps = current.memoizedProps;\n    workInProgress.memoizedState = current.memoizedState;\n    workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n    workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n    // it cannot be shared with the current fiber.\n\n    var currentDependencies = current.dependencies;\n    workInProgress.dependencies = currentDependencies === null ? null : {\n      lanes: currentDependencies.lanes,\n      firstContext: currentDependencies.firstContext\n    };\n\n    {\n      // Note: We don't reset the actualTime counts. It's useful to accumulate\n      // actual time across multiple render passes.\n      workInProgress.selfBaseDuration = current.selfBaseDuration;\n      workInProgress.treeBaseDuration = current.treeBaseDuration;\n    }\n  }\n\n  return workInProgress;\n}\nfunction createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n  var mode;\n\n  if (tag === ConcurrentRoot) {\n    mode = ConcurrentMode;\n\n    if (isStrictMode === true) {\n      mode |= StrictLegacyMode;\n\n      {\n        mode |= StrictEffectsMode;\n      }\n    }\n  } else {\n    mode = NoMode;\n  }\n\n  if ( isDevToolsPresent) {\n    // Always collect profile timings when DevTools are present.\n    // This enables DevTools to start capturing timing at any point\u2013\n    // Without some nodes in the tree having empty base times.\n    mode |= ProfileMode;\n  }\n\n  return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n  var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n  var resolvedType = type;\n\n  if (typeof type === 'function') {\n    if (shouldConstruct$1(type)) {\n      fiberTag = ClassComponent;\n\n      {\n        resolvedType = resolveClassForHotReloading(resolvedType);\n      }\n    } else {\n      {\n        resolvedType = resolveFunctionForHotReloading(resolvedType);\n      }\n    }\n  } else if (typeof type === 'string') {\n    fiberTag = HostComponent;\n  } else {\n    getTag: switch (type) {\n      case REACT_FRAGMENT_TYPE:\n        return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n      case REACT_STRICT_MODE_TYPE:\n        fiberTag = Mode;\n        mode |= StrictLegacyMode;\n\n        if ( (mode & ConcurrentMode) !== NoMode) {\n          // Strict effects should never run on legacy roots\n          mode |= StrictEffectsMode;\n        }\n\n        break;\n\n      case REACT_PROFILER_TYPE:\n        return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n      case REACT_SUSPENSE_TYPE:\n        return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n      case REACT_SUSPENSE_LIST_TYPE:\n        return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n      case REACT_OFFSCREEN_TYPE:\n        return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n      case REACT_LEGACY_HIDDEN_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_SCOPE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_CACHE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_TRACING_MARKER_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_DEBUG_TRACING_MODE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      default:\n        {\n          if (typeof type === 'object' && type !== null) {\n            switch (type.$$typeof) {\n              case REACT_PROVIDER_TYPE:\n                fiberTag = ContextProvider;\n                break getTag;\n\n              case REACT_CONTEXT_TYPE:\n                // This is a consumer\n                fiberTag = ContextConsumer;\n                break getTag;\n\n              case REACT_FORWARD_REF_TYPE:\n                fiberTag = ForwardRef;\n\n                {\n                  resolvedType = resolveForwardRefForHotReloading(resolvedType);\n                }\n\n                break getTag;\n\n              case REACT_MEMO_TYPE:\n                fiberTag = MemoComponent;\n                break getTag;\n\n              case REACT_LAZY_TYPE:\n                fiberTag = LazyComponent;\n                resolvedType = null;\n                break getTag;\n            }\n          }\n\n          var info = '';\n\n          {\n            if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n              info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n            }\n\n            var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n\n            if (ownerName) {\n              info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n            }\n          }\n\n          throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n        }\n    }\n  }\n\n  var fiber = createFiber(fiberTag, pendingProps, key, mode);\n  fiber.elementType = type;\n  fiber.type = resolvedType;\n  fiber.lanes = lanes;\n\n  {\n    fiber._debugOwner = owner;\n  }\n\n  return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n  var owner = null;\n\n  {\n    owner = element._owner;\n  }\n\n  var type = element.type;\n  var key = element.key;\n  var pendingProps = element.props;\n  var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n  {\n    fiber._debugSource = element._source;\n    fiber._debugOwner = element._owner;\n  }\n\n  return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n  var fiber = createFiber(Fragment, elements, key, mode);\n  fiber.lanes = lanes;\n  return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n  {\n    if (typeof pendingProps.id !== 'string') {\n      error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n    }\n  }\n\n  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n  fiber.elementType = REACT_PROFILER_TYPE;\n  fiber.lanes = lanes;\n\n  {\n    fiber.stateNode = {\n      effectDuration: 0,\n      passiveEffectDuration: 0\n    };\n  }\n\n  return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_SUSPENSE_TYPE;\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_OFFSCREEN_TYPE;\n  fiber.lanes = lanes;\n  var primaryChildInstance = {};\n  fiber.stateNode = primaryChildInstance;\n  return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n  var fiber = createFiber(HostText, content, null, mode);\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n  var fiber = createFiber(HostComponent, null, null, NoMode);\n  fiber.elementType = 'DELETED';\n  return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n  var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n  fiber.stateNode = dehydratedNode;\n  return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n  var pendingProps = portal.children !== null ? portal.children : [];\n  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n  fiber.lanes = lanes;\n  fiber.stateNode = {\n    containerInfo: portal.containerInfo,\n    pendingChildren: null,\n    // Used by persistent updates\n    implementation: portal.implementation\n  };\n  return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n  if (target === null) {\n    // This Fiber's initial properties will always be overwritten.\n    // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n    target = createFiber(IndeterminateComponent, null, null, NoMode);\n  } // This is intentionally written as a list of all properties.\n  // We tried to use Object.assign() instead but this is called in\n  // the hottest path, and Object.assign() was too slow:\n  // https://github.com/facebook/react/issues/12502\n  // This code is DEV-only so size is not a concern.\n\n\n  target.tag = source.tag;\n  target.key = source.key;\n  target.elementType = source.elementType;\n  target.type = source.type;\n  target.stateNode = source.stateNode;\n  target.return = source.return;\n  target.child = source.child;\n  target.sibling = source.sibling;\n  target.index = source.index;\n  target.ref = source.ref;\n  target.pendingProps = source.pendingProps;\n  target.memoizedProps = source.memoizedProps;\n  target.updateQueue = source.updateQueue;\n  target.memoizedState = source.memoizedState;\n  target.dependencies = source.dependencies;\n  target.mode = source.mode;\n  target.flags = source.flags;\n  target.subtreeFlags = source.subtreeFlags;\n  target.deletions = source.deletions;\n  target.lanes = source.lanes;\n  target.childLanes = source.childLanes;\n  target.alternate = source.alternate;\n\n  {\n    target.actualDuration = source.actualDuration;\n    target.actualStartTime = source.actualStartTime;\n    target.selfBaseDuration = source.selfBaseDuration;\n    target.treeBaseDuration = source.treeBaseDuration;\n  }\n\n  target._debugSource = source._debugSource;\n  target._debugOwner = source._debugOwner;\n  target._debugNeedsRemount = source._debugNeedsRemount;\n  target._debugHookTypes = source._debugHookTypes;\n  return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {\n  this.tag = tag;\n  this.containerInfo = containerInfo;\n  this.pendingChildren = null;\n  this.current = null;\n  this.pingCache = null;\n  this.finishedWork = null;\n  this.timeoutHandle = noTimeout;\n  this.context = null;\n  this.pendingContext = null;\n  this.callbackNode = null;\n  this.callbackPriority = NoLane;\n  this.eventTimes = createLaneMap(NoLanes);\n  this.expirationTimes = createLaneMap(NoTimestamp);\n  this.pendingLanes = NoLanes;\n  this.suspendedLanes = NoLanes;\n  this.pingedLanes = NoLanes;\n  this.expiredLanes = NoLanes;\n  this.mutableReadLanes = NoLanes;\n  this.finishedLanes = NoLanes;\n  this.entangledLanes = NoLanes;\n  this.entanglements = createLaneMap(NoLanes);\n  this.identifierPrefix = identifierPrefix;\n  this.onRecoverableError = onRecoverableError;\n\n  {\n    this.mutableSourceEagerHydrationData = null;\n  }\n\n  {\n    this.effectDuration = 0;\n    this.passiveEffectDuration = 0;\n  }\n\n  {\n    this.memoizedUpdaters = new Set();\n    var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n    for (var _i = 0; _i < TotalLanes; _i++) {\n      pendingUpdatersLaneMap.push(new Set());\n    }\n  }\n\n  {\n    switch (tag) {\n      case ConcurrentRoot:\n        this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n        break;\n\n      case LegacyRoot:\n        this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n        break;\n    }\n  }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks) {\n  var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n  // stateNode is any.\n\n\n  var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n  root.current = uninitializedFiber;\n  uninitializedFiber.stateNode = root;\n\n  {\n    var _initialState = {\n      element: initialChildren,\n      isDehydrated: hydrate,\n      cache: null,\n      // not enabled yet\n      transitions: null,\n      pendingSuspenseBoundaries: null\n    };\n    uninitializedFiber.memoizedState = _initialState;\n  }\n\n  initializeUpdateQueue(uninitializedFiber);\n  return root;\n}\n\nvar ReactVersion = '18.1.0';\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n  var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n  {\n    checkKeyStringCoercion(key);\n  }\n\n  return {\n    // This tag allow us to uniquely identify this as a React Portal\n    $$typeof: REACT_PORTAL_TYPE,\n    key: key == null ? null : '' + key,\n    children: children,\n    containerInfo: containerInfo,\n    implementation: implementation\n  };\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n  didWarnAboutNestedUpdates = false;\n  didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n  if (!parentComponent) {\n    return emptyContextObject;\n  }\n\n  var fiber = get(parentComponent);\n  var parentContext = findCurrentUnmaskedContext(fiber);\n\n  if (fiber.tag === ClassComponent) {\n    var Component = fiber.type;\n\n    if (isContextProvider(Component)) {\n      return processChildContext(fiber, Component, parentContext);\n    }\n  }\n\n  return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n  {\n    var fiber = get(component);\n\n    if (fiber === undefined) {\n      if (typeof component.render === 'function') {\n        throw new Error('Unable to find node on an unmounted component.');\n      } else {\n        var keys = Object.keys(component).join(',');\n        throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n      }\n    }\n\n    var hostFiber = findCurrentHostFiber(fiber);\n\n    if (hostFiber === null) {\n      return null;\n    }\n\n    if (hostFiber.mode & StrictLegacyMode) {\n      var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n      if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n        didWarnAboutFindNodeInStrictMode[componentName] = true;\n        var previousFiber = current;\n\n        try {\n          setCurrentFiber(hostFiber);\n\n          if (fiber.mode & StrictLegacyMode) {\n            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n          } else {\n            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n          }\n        } finally {\n          // Ideally this should reset to previous but this shouldn't be called in\n          // render and there's another warning for that anyway.\n          if (previousFiber) {\n            setCurrentFiber(previousFiber);\n          } else {\n            resetCurrentFiber();\n          }\n        }\n      }\n    }\n\n    return hostFiber.stateNode;\n  }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n  var hydrate = false;\n  var initialChildren = null;\n  return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n  var hydrate = true;\n  var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n  root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n  // a regular update because the initial render must match was was rendered\n  // on the server.\n  // NOTE: This update intentionally doesn't have a payload. We're only using\n  // the update to schedule work on the root fiber (and, for legacy roots, to\n  // enqueue the callback if one is provided).\n\n  var current = root.current;\n  var eventTime = requestEventTime();\n  var lane = requestUpdateLane(current);\n  var update = createUpdate(eventTime, lane);\n  update.callback = callback !== undefined && callback !== null ? callback : null;\n  enqueueUpdate(current, update);\n  scheduleInitialHydrationOnRoot(root, lane, eventTime);\n  return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n  {\n    onScheduleRoot(container, element);\n  }\n\n  var current$1 = container.current;\n  var eventTime = requestEventTime();\n  var lane = requestUpdateLane(current$1);\n\n  {\n    markRenderScheduled(lane);\n  }\n\n  var context = getContextForSubtree(parentComponent);\n\n  if (container.context === null) {\n    container.context = context;\n  } else {\n    container.pendingContext = context;\n  }\n\n  {\n    if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n      didWarnAboutNestedUpdates = true;\n\n      error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');\n    }\n  }\n\n  var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n  // being called \"element\".\n\n  update.payload = {\n    element: element\n  };\n  callback = callback === undefined ? null : callback;\n\n  if (callback !== null) {\n    {\n      if (typeof callback !== 'function') {\n        error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n      }\n    }\n\n    update.callback = callback;\n  }\n\n  enqueueUpdate(current$1, update);\n  var root = scheduleUpdateOnFiber(current$1, lane, eventTime);\n\n  if (root !== null) {\n    entangleTransitions(root, current$1, lane);\n  }\n\n  return lane;\n}\nfunction getPublicRootInstance(container) {\n  var containerFiber = container.current;\n\n  if (!containerFiber.child) {\n    return null;\n  }\n\n  switch (containerFiber.child.tag) {\n    case HostComponent:\n      return getPublicInstance(containerFiber.child.stateNode);\n\n    default:\n      return containerFiber.child.stateNode;\n  }\n}\nfunction attemptSynchronousHydration$1(fiber) {\n  switch (fiber.tag) {\n    case HostRoot:\n      var root = fiber.stateNode;\n\n      if (isRootDehydrated(root)) {\n        // Flush the first scheduled \"update\".\n        var lanes = getHighestPriorityPendingLanes(root);\n        flushRoot(root, lanes);\n      }\n\n      break;\n\n    case SuspenseComponent:\n      var eventTime = requestEventTime();\n      flushSync(function () {\n        return scheduleUpdateOnFiber(fiber, SyncLane, eventTime);\n      }); // If we're still blocked after this, we need to increase\n      // the priority of any promises resolving within this\n      // boundary so that they next attempt also has higher pri.\n\n      var retryLane = SyncLane;\n      markRetryLaneIfNotHydrated(fiber, retryLane);\n      break;\n  }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n  var suspenseState = fiber.memoizedState;\n\n  if (suspenseState !== null && suspenseState.dehydrated !== null) {\n    suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n  }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n  markRetryLaneImpl(fiber, retryLane);\n  var alternate = fiber.alternate;\n\n  if (alternate) {\n    markRetryLaneImpl(alternate, retryLane);\n  }\n}\nfunction attemptContinuousHydration$1(fiber) {\n  if (fiber.tag !== SuspenseComponent) {\n    // We ignore HostRoots here because we can't increase\n    // their priority and they should not suspend on I/O,\n    // since you have to wrap anything that might suspend in\n    // Suspense.\n    return;\n  }\n\n  var eventTime = requestEventTime();\n  var lane = SelectiveHydrationLane;\n  scheduleUpdateOnFiber(fiber, lane, eventTime);\n  markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n  if (fiber.tag !== SuspenseComponent) {\n    // We ignore HostRoots here because we can't increase\n    // their priority other than synchronously flush it.\n    return;\n  }\n\n  var eventTime = requestEventTime();\n  var lane = requestUpdateLane(fiber);\n  scheduleUpdateOnFiber(fiber, lane, eventTime);\n  markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n  var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n  if (hostFiber === null) {\n    return null;\n  }\n\n  return hostFiber.stateNode;\n}\n\nvar shouldErrorImpl = function (fiber) {\n  return null;\n};\n\nfunction shouldError(fiber) {\n  return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n  return false;\n};\n\nfunction shouldSuspend(fiber) {\n  return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n  var copyWithDeleteImpl = function (obj, path, index) {\n    var key = path[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n    if (index + 1 === path.length) {\n      if (isArray(updated)) {\n        updated.splice(key, 1);\n      } else {\n        delete updated[key];\n      }\n\n      return updated;\n    } // $FlowFixMe number or string is fine here\n\n\n    updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n    return updated;\n  };\n\n  var copyWithDelete = function (obj, path) {\n    return copyWithDeleteImpl(obj, path, 0);\n  };\n\n  var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n    var oldKey = oldPath[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n    if (index + 1 === oldPath.length) {\n      var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n      updated[newKey] = updated[oldKey];\n\n      if (isArray(updated)) {\n        updated.splice(oldKey, 1);\n      } else {\n        delete updated[oldKey];\n      }\n    } else {\n      // $FlowFixMe number or string is fine here\n      updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n      obj[oldKey], oldPath, newPath, index + 1);\n    }\n\n    return updated;\n  };\n\n  var copyWithRename = function (obj, oldPath, newPath) {\n    if (oldPath.length !== newPath.length) {\n      warn('copyWithRename() expects paths of the same length');\n\n      return;\n    } else {\n      for (var i = 0; i < newPath.length - 1; i++) {\n        if (oldPath[i] !== newPath[i]) {\n          warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n          return;\n        }\n      }\n    }\n\n    return copyWithRenameImpl(obj, oldPath, newPath, 0);\n  };\n\n  var copyWithSetImpl = function (obj, path, index, value) {\n    if (index >= path.length) {\n      return value;\n    }\n\n    var key = path[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here\n\n    updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n    return updated;\n  };\n\n  var copyWithSet = function (obj, path, value) {\n    return copyWithSetImpl(obj, path, 0, value);\n  };\n\n  var findHook = function (fiber, id) {\n    // For now, the \"id\" of stateful hooks is just the stateful hook index.\n    // This may change in the future with e.g. nested hooks.\n    var currentHook = fiber.memoizedState;\n\n    while (currentHook !== null && id > 0) {\n      currentHook = currentHook.next;\n      id--;\n    }\n\n    return currentHook;\n  }; // Support DevTools editable values for useState and useReducer.\n\n\n  overrideHookState = function (fiber, id, path, value) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithSet(hook.memoizedState, path, value);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  overrideHookStateDeletePath = function (fiber, id, path) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithDelete(hook.memoizedState, path);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n    }\n  }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n  overrideProps = function (fiber, path, value) {\n    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n  };\n\n  overridePropsDeletePath = function (fiber, path) {\n    fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n  };\n\n  overridePropsRenamePath = function (fiber, oldPath, newPath) {\n    fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n  };\n\n  scheduleUpdate = function (fiber) {\n    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n  };\n\n  setErrorHandler = function (newShouldErrorImpl) {\n    shouldErrorImpl = newShouldErrorImpl;\n  };\n\n  setSuspenseHandler = function (newShouldSuspendImpl) {\n    shouldSuspendImpl = newShouldSuspendImpl;\n  };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n  var hostFiber = findCurrentHostFiber(fiber);\n\n  if (hostFiber === null) {\n    return null;\n  }\n\n  return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n  return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n  return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n  return injectInternals({\n    bundleType: devToolsConfig.bundleType,\n    version: devToolsConfig.version,\n    rendererPackageName: devToolsConfig.rendererPackageName,\n    rendererConfig: devToolsConfig.rendererConfig,\n    overrideHookState: overrideHookState,\n    overrideHookStateDeletePath: overrideHookStateDeletePath,\n    overrideHookStateRenamePath: overrideHookStateRenamePath,\n    overrideProps: overrideProps,\n    overridePropsDeletePath: overridePropsDeletePath,\n    overridePropsRenamePath: overridePropsRenamePath,\n    setErrorHandler: setErrorHandler,\n    setSuspenseHandler: setSuspenseHandler,\n    scheduleUpdate: scheduleUpdate,\n    currentDispatcherRef: ReactCurrentDispatcher,\n    findHostInstanceByFiber: findHostInstanceByFiber,\n    findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n    // React Refresh\n    findHostInstancesForRefresh:  findHostInstancesForRefresh ,\n    scheduleRefresh:  scheduleRefresh ,\n    scheduleRoot:  scheduleRoot ,\n    setRefreshHandler:  setRefreshHandler ,\n    // Enables DevTools to append owner stacks to error messages in DEV mode.\n    getCurrentFiber:  getCurrentFiberForDevTools ,\n    // Enables DevTools to detect reconciler version rather than renderer version\n    // which may not match for third party renderers.\n    reconcilerVersion: ReactVersion\n  });\n}\n\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n  // In older browsers and test environments, fallback to console.error.\n  // eslint-disable-next-line react-internal/no-production-logging\n  console['error'](error);\n};\n\nfunction ReactDOMRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {\n  var root = this._internalRoot;\n\n  if (root === null) {\n    throw new Error('Cannot update an unmounted root.');\n  }\n\n  {\n    if (typeof arguments[1] === 'function') {\n      error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n    } else if (isValidContainer(arguments[1])) {\n      error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n    } else if (typeof arguments[1] !== 'undefined') {\n      error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n    }\n\n    var container = root.containerInfo;\n\n    if (container.nodeType !== COMMENT_NODE) {\n      var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n      if (hostInstance) {\n        if (hostInstance.parentNode !== container) {\n          error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n        }\n      }\n    }\n  }\n\n  updateContainer(children, root, null, null);\n};\n\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () {\n  {\n    if (typeof arguments[0] === 'function') {\n      error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n    }\n  }\n\n  var root = this._internalRoot;\n\n  if (root !== null) {\n    this._internalRoot = null;\n    var container = root.containerInfo;\n\n    {\n      if (isAlreadyRendering()) {\n        error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n      }\n    }\n\n    flushSync(function () {\n      updateContainer(null, root, null, null);\n    });\n    unmarkContainerAsRoot(container);\n  }\n};\n\nfunction createRoot(container, options) {\n  if (!isValidContainer(container)) {\n    throw new Error('createRoot(...): Target container is not a DOM element.');\n  }\n\n  warnIfReactDOMContainerInDEV(container);\n  var isStrictMode = false;\n  var concurrentUpdatesByDefaultOverride = false;\n  var identifierPrefix = '';\n  var onRecoverableError = defaultOnRecoverableError;\n  var transitionCallbacks = null;\n\n  if (options !== null && options !== undefined) {\n    {\n      if (options.hydrate) {\n        warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n      } else {\n        if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n          error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + '  let root = createRoot(domContainer);\\n' + '  root.render(<App />);');\n        }\n      }\n    }\n\n    if (options.unstable_strictMode === true) {\n      isStrictMode = true;\n    }\n\n    if (options.identifierPrefix !== undefined) {\n      identifierPrefix = options.identifierPrefix;\n    }\n\n    if (options.onRecoverableError !== undefined) {\n      onRecoverableError = options.onRecoverableError;\n    }\n\n    if (options.transitionCallbacks !== undefined) {\n      transitionCallbacks = options.transitionCallbacks;\n    }\n  }\n\n  var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n  markContainerAsRoot(root.current, container);\n  var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n  listenToAllSupportedEvents(rootContainerElement);\n  return new ReactDOMRoot(root);\n}\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n  if (target) {\n    queueExplicitHydrationTarget(target);\n  }\n}\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot(container, initialChildren, options) {\n  if (!isValidContainer(container)) {\n    throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n  }\n\n  warnIfReactDOMContainerInDEV(container);\n\n  {\n    if (initialChildren === undefined) {\n      error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n    }\n  } // For now we reuse the whole bag of options since they contain\n  // the hydration callbacks.\n\n\n  var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option\n\n  var mutableSources = options != null && options.hydratedSources || null;\n  var isStrictMode = false;\n  var concurrentUpdatesByDefaultOverride = false;\n  var identifierPrefix = '';\n  var onRecoverableError = defaultOnRecoverableError;\n\n  if (options !== null && options !== undefined) {\n    if (options.unstable_strictMode === true) {\n      isStrictMode = true;\n    }\n\n    if (options.identifierPrefix !== undefined) {\n      identifierPrefix = options.identifierPrefix;\n    }\n\n    if (options.onRecoverableError !== undefined) {\n      onRecoverableError = options.onRecoverableError;\n    }\n  }\n\n  var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n  markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n  listenToAllSupportedEvents(container);\n\n  if (mutableSources) {\n    for (var i = 0; i < mutableSources.length; i++) {\n      var mutableSource = mutableSources[i];\n      registerMutableSourceForHydration(root, mutableSource);\n    }\n  }\n\n  return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers  ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(node) {\n  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nfunction warnIfReactDOMContainerInDEV(container) {\n  {\n    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n      error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.');\n    }\n\n    if (isContainerMarkedAsRoot(container)) {\n      if (container._reactRootContainer) {\n        error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n      } else {\n        error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n      }\n    }\n  }\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n  topLevelUpdateWarnings = function (container) {\n    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\n\n      if (hostInstance) {\n        if (hostInstance.parentNode !== container) {\n          error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n        }\n      }\n    }\n\n    var isRootRenderedBySomeReact = !!container._reactRootContainer;\n    var rootEl = getReactRootElementInContainer(container);\n    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n    if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n      error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n    }\n\n    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n      error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n    }\n  };\n}\n\nfunction getReactRootElementInContainer(container) {\n  if (!container) {\n    return null;\n  }\n\n  if (container.nodeType === DOCUMENT_NODE) {\n    return container.documentElement;\n  } else {\n    return container.firstChild;\n  }\n}\n\nfunction noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n  // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n  if (isHydrationContainer) {\n    if (typeof callback === 'function') {\n      var originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(root);\n        originalCallback.call(instance);\n      };\n    }\n\n    var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n    false, // isStrictMode\n    false, // concurrentUpdatesByDefaultOverride,\n    '', // identifierPrefix\n    noopOnRecoverableError);\n    container._reactRootContainer = root;\n    markContainerAsRoot(root.current, container);\n    var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n    listenToAllSupportedEvents(rootContainerElement);\n    flushSync();\n    return root;\n  } else {\n    // First clear any existing content.\n    var rootSibling;\n\n    while (rootSibling = container.lastChild) {\n      container.removeChild(rootSibling);\n    }\n\n    if (typeof callback === 'function') {\n      var _originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(_root);\n\n        _originalCallback.call(instance);\n      };\n    }\n\n    var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n    false, // isStrictMode\n    false, // concurrentUpdatesByDefaultOverride,\n    '', // identifierPrefix\n    noopOnRecoverableError);\n\n    container._reactRootContainer = _root;\n    markContainerAsRoot(_root.current, container);\n\n    var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n\n    listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n    flushSync(function () {\n      updateContainer(initialChildren, _root, parentComponent, callback);\n    });\n    return _root;\n  }\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n  {\n    if (callback !== null && typeof callback !== 'function') {\n      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n    }\n  }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n  {\n    topLevelUpdateWarnings(container);\n    warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n  }\n\n  var maybeRoot = container._reactRootContainer;\n  var root;\n\n  if (!maybeRoot) {\n    // Initial mount\n    root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n  } else {\n    root = maybeRoot;\n\n    if (typeof callback === 'function') {\n      var originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(root);\n        originalCallback.call(instance);\n      };\n    } // Update\n\n\n    updateContainer(children, root, parentComponent, callback);\n  }\n\n  return getPublicRootInstance(root);\n}\n\nfunction findDOMNode(componentOrElement) {\n  {\n    var owner = ReactCurrentOwner$3.current;\n\n    if (owner !== null && owner.stateNode !== null) {\n      var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n      if (!warnedAboutRefsInRender) {\n        error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');\n      }\n\n      owner.stateNode._warnedAboutRefsInRender = true;\n    }\n  }\n\n  if (componentOrElement == null) {\n    return null;\n  }\n\n  if (componentOrElement.nodeType === ELEMENT_NODE) {\n    return componentOrElement;\n  }\n\n  {\n    return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n  }\n}\nfunction hydrate(element, container, callback) {\n  {\n    error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n    }\n  } // TODO: throw or warn if we couldn't hydrate?\n\n\n  return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n  {\n    error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n    }\n  }\n\n  return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n  {\n    error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(containerNode)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  if (parentComponent == null || !has(parentComponent)) {\n    throw new Error('parentComponent must be a valid React Component');\n  }\n\n  return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n    }\n  }\n\n  if (container._reactRootContainer) {\n    {\n      var rootEl = getReactRootElementInContainer(container);\n      var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n      if (renderedByDifferentReact) {\n        error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n      }\n    } // Unmount should not be batched.\n\n\n    flushSync(function () {\n      legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n        // $FlowFixMe This should probably use `delete container._reactRootContainer`\n        container._reactRootContainer = null;\n        unmarkContainerAsRoot(container);\n      });\n    }); // If you call unmountComponentAtNode twice in quick succession, you'll\n    // get `true` twice. That's probably fine?\n\n    return true;\n  } else {\n    {\n      var _rootEl = getReactRootElementInContainer(container);\n\n      var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n      var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n      if (hasNonRootReactChild) {\n        error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n      }\n    }\n\n    return false;\n  }\n}\n\nsetAttemptSynchronousHydration(attemptSynchronousHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetGetCurrentUpdatePriority(getCurrentUpdatePriority);\nsetAttemptHydrationAtPriority(runWithPriority);\n\n{\n  if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n  Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n  Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n    error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n  }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);\n\nfunction createPortal$1(children, container) {\n  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n  if (!isValidContainer(container)) {\n    throw new Error('Target container is not a DOM element.');\n  } // TODO: pass ReactDOM portal implementation as third argument\n  // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n  return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n  return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nvar Internals = {\n  usingClientEntryPoint: false,\n  // Keep in sync with ReactTestUtils.js.\n  // This is an array for better minification.\n  Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]\n};\n\nfunction createRoot$1(container, options) {\n  {\n    if (!Internals.usingClientEntryPoint && !false) {\n      error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n    }\n  }\n\n  return createRoot(container, options);\n}\n\nfunction hydrateRoot$1(container, initialChildren, options) {\n  {\n    if (!Internals.usingClientEntryPoint && !false) {\n      error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n    }\n  }\n\n  return hydrateRoot(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync$1(fn) {\n  {\n    if (isAlreadyRendering()) {\n      error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n    }\n  }\n\n  return flushSync(fn);\n}\nvar foundDevTools = injectIntoDevTools({\n  findFiberByHostInstance: getClosestInstanceFromNode,\n  bundleType:  1 ,\n  version: ReactVersion,\n  rendererPackageName: 'react-dom'\n});\n\n{\n  if (!foundDevTools && canUseDOM && window.top === window.self) {\n    // If we're in Chrome or Firefox, provide a download link if not installed.\n    if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n      var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n      if (/^(https?|file):$/.test(protocol)) {\n        // eslint-disable-next-line react-internal/no-production-logging\n        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');\n      }\n    }\n  }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.createRoot = createRoot$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync$1;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot$1;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n", "'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n", "'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n  exports.createRoot = m.createRoot;\n  exports.hydrateRoot = m.hydrateRoot;\n} else {\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n  exports.createRoot = function(c, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.createRoot(c, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n  exports.hydrateRoot = function(c, h, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.hydrateRoot(c, h, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n}\n", "/*!\n* sweetalert2 v11.4.17\n* Released under the MIT License.\n*/\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = global || self, global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n  const consolePrefix = 'SweetAlert2:';\n  /**\n   * Filter the unique values into a new array\n   * @param arr\n   */\n\n  const uniqueArray = arr => {\n    const result = [];\n\n    for (let i = 0; i < arr.length; i++) {\n      if (result.indexOf(arr[i]) === -1) {\n        result.push(arr[i]);\n      }\n    }\n\n    return result;\n  };\n  /**\n   * Capitalize the first letter of a string\n   * @param {string} str\n   * @returns {string}\n   */\n\n  const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);\n  /**\n   * @param {NodeList | HTMLCollection | NamedNodeMap | DOMTokenList} nodeList\n   * @returns {array}\n   */\n\n  const toArray = nodeList => Array.prototype.slice.call(nodeList);\n  /**\n   * Standardize console warnings\n   * @param {string | array} message\n   */\n\n  const warn = message => {\n    console.warn(\"\".concat(consolePrefix, \" \").concat(typeof message === 'object' ? message.join(' ') : message));\n  };\n  /**\n   * Standardize console errors\n   * @param {string} message\n   */\n\n  const error = message => {\n    console.error(\"\".concat(consolePrefix, \" \").concat(message));\n  };\n  /**\n   * Private global state for `warnOnce`\n   * @type {Array}\n   * @private\n   */\n\n  const previousWarnOnceMessages = [];\n  /**\n   * Show a console warning, but only if it hasn't already been shown\n   * @param {string} message\n   */\n\n  const warnOnce = message => {\n    if (!previousWarnOnceMessages.includes(message)) {\n      previousWarnOnceMessages.push(message);\n      warn(message);\n    }\n  };\n  /**\n   * Show a one-time console warning about deprecated params/methods\n   */\n\n  const warnAboutDeprecation = (deprecatedParam, useInstead) => {\n    warnOnce(\"\\\"\".concat(deprecatedParam, \"\\\" is deprecated and will be removed in the next major release. Please use \\\"\").concat(useInstead, \"\\\" instead.\"));\n  };\n  /**\n   * If `arg` is a function, call it (with no arguments or context) and return the result.\n   * Otherwise, just pass the value through\n   * @param arg\n   */\n\n  const callIfFunction = arg => typeof arg === 'function' ? arg() : arg;\n  const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function';\n  const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);\n  const isPromise = arg => arg && Promise.resolve(arg) === arg;\n  const getRandomElement = arr => arr[Math.floor(Math.random() * arr.length)];\n\n  const defaultParams = {\n    title: '',\n    titleText: '',\n    text: '',\n    html: '',\n    footer: '',\n    icon: undefined,\n    iconColor: undefined,\n    iconHtml: undefined,\n    template: undefined,\n    toast: false,\n    showClass: {\n      popup: 'swal2-show',\n      backdrop: 'swal2-backdrop-show',\n      icon: 'swal2-icon-show'\n    },\n    hideClass: {\n      popup: 'swal2-hide',\n      backdrop: 'swal2-backdrop-hide',\n      icon: 'swal2-icon-hide'\n    },\n    customClass: {},\n    target: 'body',\n    color: undefined,\n    backdrop: true,\n    heightAuto: true,\n    allowOutsideClick: true,\n    allowEscapeKey: true,\n    allowEnterKey: true,\n    stopKeydownPropagation: true,\n    keydownListenerCapture: false,\n    showConfirmButton: true,\n    showDenyButton: false,\n    showCancelButton: false,\n    preConfirm: undefined,\n    preDeny: undefined,\n    confirmButtonText: 'OK',\n    confirmButtonAriaLabel: '',\n    confirmButtonColor: undefined,\n    denyButtonText: 'No',\n    denyButtonAriaLabel: '',\n    denyButtonColor: undefined,\n    cancelButtonText: 'Cancel',\n    cancelButtonAriaLabel: '',\n    cancelButtonColor: undefined,\n    buttonsStyling: true,\n    reverseButtons: false,\n    focusConfirm: true,\n    focusDeny: false,\n    focusCancel: false,\n    returnFocus: true,\n    showCloseButton: false,\n    closeButtonHtml: '&times;',\n    closeButtonAriaLabel: 'Close this dialog',\n    loaderHtml: '',\n    showLoaderOnConfirm: false,\n    showLoaderOnDeny: false,\n    imageUrl: undefined,\n    imageWidth: undefined,\n    imageHeight: undefined,\n    imageAlt: '',\n    timer: undefined,\n    timerProgressBar: false,\n    width: undefined,\n    padding: undefined,\n    background: undefined,\n    input: undefined,\n    inputPlaceholder: '',\n    inputLabel: '',\n    inputValue: '',\n    inputOptions: {},\n    inputAutoTrim: true,\n    inputAttributes: {},\n    inputValidator: undefined,\n    returnInputValueOnDeny: false,\n    validationMessage: undefined,\n    grow: false,\n    position: 'center',\n    progressSteps: [],\n    currentProgressStep: undefined,\n    progressStepsDistance: undefined,\n    willOpen: undefined,\n    didOpen: undefined,\n    didRender: undefined,\n    willClose: undefined,\n    didClose: undefined,\n    didDestroy: undefined,\n    scrollbarPadding: true\n  };\n  const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose'];\n  const deprecatedParams = {};\n  const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture'];\n  /**\n   * Is valid parameter\n   * @param {string} paramName\n   */\n\n  const isValidParameter = paramName => {\n    return Object.prototype.hasOwnProperty.call(defaultParams, paramName);\n  };\n  /**\n   * Is valid parameter for Swal.update() method\n   * @param {string} paramName\n   */\n\n  const isUpdatableParameter = paramName => {\n    return updatableParams.indexOf(paramName) !== -1;\n  };\n  /**\n   * Is deprecated parameter\n   * @param {string} paramName\n   */\n\n  const isDeprecatedParameter = paramName => {\n    return deprecatedParams[paramName];\n  };\n\n  const checkIfParamIsValid = param => {\n    if (!isValidParameter(param)) {\n      warn(\"Unknown parameter \\\"\".concat(param, \"\\\"\"));\n    }\n  };\n\n  const checkIfToastParamIsValid = param => {\n    if (toastIncompatibleParams.includes(param)) {\n      warn(\"The parameter \\\"\".concat(param, \"\\\" is incompatible with toasts\"));\n    }\n  };\n\n  const checkIfParamIsDeprecated = param => {\n    if (isDeprecatedParameter(param)) {\n      warnAboutDeprecation(param, isDeprecatedParameter(param));\n    }\n  };\n  /**\n   * Show relevant warnings for given params\n   *\n   * @param params\n   */\n\n\n  const showWarningsForParams = params => {\n    if (!params.backdrop && params.allowOutsideClick) {\n      warn('\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`');\n    }\n\n    for (const param in params) {\n      checkIfParamIsValid(param);\n\n      if (params.toast) {\n        checkIfToastParamIsValid(param);\n      }\n\n      checkIfParamIsDeprecated(param);\n    }\n  };\n\n  const swalPrefix = 'swal2-';\n  /**\n   * @param {string[]} items\n   * @returns {object}\n   */\n\n  const prefix = items => {\n    const result = {};\n\n    for (const i in items) {\n      result[items[i]] = swalPrefix + items[i];\n    }\n\n    return result;\n  };\n  const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error', 'no-war']);\n  const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);\n\n  /**\n   * Gets the popup container which contains the backdrop and the popup itself.\n   *\n   * @returns {HTMLElement | null}\n   */\n\n  const getContainer = () => document.body.querySelector(\".\".concat(swalClasses.container));\n  /**\n   * @param {string} selectorString\n   * @returns {HTMLElement | null}\n   */\n\n  const elementBySelector = selectorString => {\n    const container = getContainer();\n    return container ? container.querySelector(selectorString) : null;\n  };\n  /**\n   * @param {string} className\n   * @returns {HTMLElement | null}\n   */\n\n  const elementByClass = className => {\n    return elementBySelector(\".\".concat(className));\n  };\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n\n  const getPopup = () => elementByClass(swalClasses.popup);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getIcon = () => elementByClass(swalClasses.icon);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getTitle = () => elementByClass(swalClasses.title);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getHtmlContainer = () => elementByClass(swalClasses['html-container']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getImage = () => elementByClass(swalClasses.image);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getProgressSteps = () => elementByClass(swalClasses['progress-steps']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getValidationMessage = () => elementByClass(swalClasses['validation-message']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getConfirmButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.confirm));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getDenyButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.deny));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getInputLabel = () => elementByClass(swalClasses['input-label']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getLoader = () => elementBySelector(\".\".concat(swalClasses.loader));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getCancelButton = () => elementBySelector(\".\".concat(swalClasses.actions, \" .\").concat(swalClasses.cancel));\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getActions = () => elementByClass(swalClasses.actions);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getFooter = () => elementByClass(swalClasses.footer);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']);\n  /**\n   * @returns {HTMLElement | null}\n   */\n\n  const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js\n\n  const focusable = \"\\n  a[href],\\n  area[href],\\n  input:not([disabled]),\\n  select:not([disabled]),\\n  textarea:not([disabled]),\\n  button:not([disabled]),\\n  iframe,\\n  object,\\n  embed,\\n  [tabindex=\\\"0\\\"],\\n  [contenteditable],\\n  audio[controls],\\n  video[controls],\\n  summary\\n\";\n  /**\n   * @returns {HTMLElement[]}\n   */\n\n  const getFocusableElements = () => {\n    const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])')) // sort according to tabindex\n    .sort((a, b) => {\n      const tabindexA = parseInt(a.getAttribute('tabindex'));\n      const tabindexB = parseInt(b.getAttribute('tabindex'));\n\n      if (tabindexA > tabindexB) {\n        return 1;\n      } else if (tabindexA < tabindexB) {\n        return -1;\n      }\n\n      return 0;\n    });\n    const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1');\n    return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el));\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isModal = () => {\n    return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']);\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isToast = () => {\n    return getPopup() && hasClass(getPopup(), swalClasses.toast);\n  };\n  /**\n   * @returns {boolean}\n   */\n\n  const isLoading = () => {\n    return getPopup().hasAttribute('data-loading');\n  };\n\n  const states = {\n    previousBodyPadding: null\n  };\n  /**\n   * Securely set innerHTML of an element\n   * https://github.com/sweetalert2/sweetalert2/issues/1926\n   *\n   * @param {HTMLElement} elem\n   * @param {string} html\n   */\n\n  const setInnerHtml = (elem, html) => {\n    elem.textContent = '';\n\n    if (html) {\n      const parser = new DOMParser();\n      const parsed = parser.parseFromString(html, \"text/html\");\n      toArray(parsed.querySelector('head').childNodes).forEach(child => {\n        elem.appendChild(child);\n      });\n      toArray(parsed.querySelector('body').childNodes).forEach(child => {\n        elem.appendChild(child);\n      });\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} className\n   * @returns {boolean}\n   */\n\n  const hasClass = (elem, className) => {\n    if (!className) {\n      return false;\n    }\n\n    const classList = className.split(/\\s+/);\n\n    for (let i = 0; i < classList.length; i++) {\n      if (!elem.classList.contains(classList[i])) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {SweetAlertOptions} params\n   */\n\n  const removeCustomClasses = (elem, params) => {\n    toArray(elem.classList).forEach(className => {\n      if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) {\n        elem.classList.remove(className);\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {SweetAlertOptions} params\n   * @param {string} className\n   */\n\n\n  const applyCustomClass = (elem, params, className) => {\n    removeCustomClasses(elem, params);\n\n    if (params.customClass && params.customClass[className]) {\n      if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {\n        return warn(\"Invalid type of customClass.\".concat(className, \"! Expected string or iterable object, got \\\"\").concat(typeof params.customClass[className], \"\\\"\"));\n      }\n\n      addClass(elem, params.customClass[className]);\n    }\n  };\n  /**\n   * @param {HTMLElement} popup\n   * @param {import('./renderers/renderInput').InputClass} inputClass\n   * @returns {HTMLInputElement | null}\n   */\n\n  const getInput = (popup, inputClass) => {\n    if (!inputClass) {\n      return null;\n    }\n\n    switch (inputClass) {\n      case 'select':\n      case 'textarea':\n      case 'file':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses[inputClass]));\n\n      case 'checkbox':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.checkbox, \" input\"));\n\n      case 'radio':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:checked\")) || popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.radio, \" input:first-child\"));\n\n      case 'range':\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.range, \" input\"));\n\n      default:\n        return popup.querySelector(\".\".concat(swalClasses.popup, \" > .\").concat(swalClasses.input));\n    }\n  };\n  /**\n   * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input\n   */\n\n  const focusInput = input => {\n    input.focus(); // place cursor at end of text in text input\n\n    if (input.type !== 'file') {\n      // http://stackoverflow.com/a/2345915\n      const val = input.value;\n      input.value = '';\n      input.value = val;\n    }\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   * @param {boolean} condition\n   */\n\n  const toggleClass = (target, classList, condition) => {\n    if (!target || !classList) {\n      return;\n    }\n\n    if (typeof classList === 'string') {\n      classList = classList.split(/\\s+/).filter(Boolean);\n    }\n\n    classList.forEach(className => {\n      if (Array.isArray(target)) {\n        target.forEach(elem => {\n          condition ? elem.classList.add(className) : elem.classList.remove(className);\n        });\n      } else {\n        condition ? target.classList.add(className) : target.classList.remove(className);\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   */\n\n  const addClass = (target, classList) => {\n    toggleClass(target, classList, true);\n  };\n  /**\n   * @param {HTMLElement | HTMLElement[] | null} target\n   * @param {string | string[] | readonly string[]} classList\n   */\n\n  const removeClass = (target, classList) => {\n    toggleClass(target, classList, false);\n  };\n  /**\n   * Get direct child of an element by class name\n   *\n   * @param {HTMLElement} elem\n   * @param {string} className\n   * @returns {HTMLElement | null}\n   */\n\n  const getDirectChildByClass = (elem, className) => {\n    const childNodes = toArray(elem.childNodes);\n\n    for (let i = 0; i < childNodes.length; i++) {\n      if (hasClass(childNodes[i], className)) {\n        return childNodes[i];\n      }\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} property\n   * @param {*} value\n   */\n\n  const applyNumericalStyle = (elem, property, value) => {\n    if (value === \"\".concat(parseInt(value))) {\n      value = parseInt(value);\n    }\n\n    if (value || parseInt(value) === 0) {\n      elem.style[property] = typeof value === 'number' ? \"\".concat(value, \"px\") : value;\n    } else {\n      elem.style.removeProperty(property);\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {string} display\n   */\n\n  const show = function (elem) {\n    let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';\n    elem.style.display = display;\n  };\n  /**\n   * @param {HTMLElement} elem\n   */\n\n  const hide = elem => {\n    elem.style.display = 'none';\n  };\n  /**\n   * @param {HTMLElement} parent\n   * @param {string} selector\n   * @param {string} property\n   * @param {string} value\n   */\n\n  const setStyle = (parent, selector, property, value) => {\n    /** @type {HTMLElement} */\n    const el = parent.querySelector(selector);\n\n    if (el) {\n      el.style[property] = value;\n    }\n  };\n  /**\n   * @param {HTMLElement} elem\n   * @param {any} condition\n   * @param {string} display\n   */\n\n  const toggle = function (elem, condition) {\n    let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex';\n    condition ? show(elem, display) : hide(elem);\n  };\n  /**\n   * borrowed from jquery $(elem).is(':visible') implementation\n   *\n   * @param {HTMLElement} elem\n   * @returns {boolean}\n   */\n\n  const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));\n  /**\n   * @returns {boolean}\n   */\n\n  const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton());\n  /**\n   * @returns {boolean}\n   */\n\n  const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight);\n  /**\n   * borrowed from https://stackoverflow.com/a/46352119\n   *\n   * @param {HTMLElement} elem\n   * @returns {boolean}\n   */\n\n  const hasCssAnimation = elem => {\n    const style = window.getComputedStyle(elem);\n    const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');\n    const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');\n    return animDuration > 0 || transDuration > 0;\n  };\n  /**\n   * @param {number} timer\n   * @param {boolean} reset\n   */\n\n  const animateTimerProgressBar = function (timer) {\n    let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    const timerProgressBar = getTimerProgressBar();\n\n    if (isVisible(timerProgressBar)) {\n      if (reset) {\n        timerProgressBar.style.transition = 'none';\n        timerProgressBar.style.width = '100%';\n      }\n\n      setTimeout(() => {\n        timerProgressBar.style.transition = \"width \".concat(timer / 1000, \"s linear\");\n        timerProgressBar.style.width = '0%';\n      }, 10);\n    }\n  };\n  const stopTimerProgressBar = () => {\n    const timerProgressBar = getTimerProgressBar();\n    const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = '100%';\n    const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);\n    const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100;\n    timerProgressBar.style.removeProperty('transition');\n    timerProgressBar.style.width = \"\".concat(timerProgressBarPercent, \"%\");\n  };\n\n  /**\n   * Detect Node env\n   *\n   * @returns {boolean}\n   */\n  const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined';\n\n  const RESTORE_FOCUS_TIMEOUT = 100;\n\n  /** @type {GlobalState} */\n\n  const globalState = {};\n\n  const focusPreviousActiveElement = () => {\n    if (globalState.previousActiveElement instanceof HTMLElement) {\n      globalState.previousActiveElement.focus();\n      globalState.previousActiveElement = null;\n    } else if (document.body) {\n      document.body.focus();\n    }\n  };\n  /**\n   * Restore previous active (focused) element\n   *\n   * @param {boolean} returnFocus\n   * @returns {Promise}\n   */\n\n\n  const restoreActiveElement = returnFocus => {\n    return new Promise(resolve => {\n      if (!returnFocus) {\n        return resolve();\n      }\n\n      const x = window.scrollX;\n      const y = window.scrollY;\n      globalState.restoreFocusTimeout = setTimeout(() => {\n        focusPreviousActiveElement();\n        resolve();\n      }, RESTORE_FOCUS_TIMEOUT); // issues/900\n\n      window.scrollTo(x, y);\n    });\n  };\n\n  const sweetHTML = \"\\n <div aria-labelledby=\\\"\".concat(swalClasses.title, \"\\\" aria-describedby=\\\"\").concat(swalClasses['html-container'], \"\\\" class=\\\"\").concat(swalClasses.popup, \"\\\" tabindex=\\\"-1\\\">\\n   <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.close, \"\\\"></button>\\n   <ul class=\\\"\").concat(swalClasses['progress-steps'], \"\\\"></ul>\\n   <div class=\\\"\").concat(swalClasses.icon, \"\\\"></div>\\n   <img class=\\\"\").concat(swalClasses.image, \"\\\" />\\n   <h2 class=\\\"\").concat(swalClasses.title, \"\\\" id=\\\"\").concat(swalClasses.title, \"\\\"></h2>\\n   <div class=\\\"\").concat(swalClasses['html-container'], \"\\\" id=\\\"\").concat(swalClasses['html-container'], \"\\\"></div>\\n   <input class=\\\"\").concat(swalClasses.input, \"\\\" />\\n   <input type=\\\"file\\\" class=\\\"\").concat(swalClasses.file, \"\\\" />\\n   <div class=\\\"\").concat(swalClasses.range, \"\\\">\\n     <input type=\\\"range\\\" />\\n     <output></output>\\n   </div>\\n   <select class=\\\"\").concat(swalClasses.select, \"\\\"></select>\\n   <div class=\\\"\").concat(swalClasses.radio, \"\\\"></div>\\n   <label for=\\\"\").concat(swalClasses.checkbox, \"\\\" class=\\\"\").concat(swalClasses.checkbox, \"\\\">\\n     <input type=\\\"checkbox\\\" />\\n     <span class=\\\"\").concat(swalClasses.label, \"\\\"></span>\\n   </label>\\n   <textarea class=\\\"\").concat(swalClasses.textarea, \"\\\"></textarea>\\n   <div class=\\\"\").concat(swalClasses['validation-message'], \"\\\" id=\\\"\").concat(swalClasses['validation-message'], \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses.actions, \"\\\">\\n     <div class=\\\"\").concat(swalClasses.loader, \"\\\"></div>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.confirm, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.deny, \"\\\"></button>\\n     <button type=\\\"button\\\" class=\\\"\").concat(swalClasses.cancel, \"\\\"></button>\\n   </div>\\n   <div class=\\\"\").concat(swalClasses.footer, \"\\\"></div>\\n   <div class=\\\"\").concat(swalClasses['timer-progress-bar-container'], \"\\\">\\n     <div class=\\\"\").concat(swalClasses['timer-progress-bar'], \"\\\"></div>\\n   </div>\\n </div>\\n\").replace(/(^|\\n)\\s*/g, '');\n  /**\n   * @returns {boolean}\n   */\n\n  const resetOldContainer = () => {\n    const oldContainer = getContainer();\n\n    if (!oldContainer) {\n      return false;\n    }\n\n    oldContainer.remove();\n    removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);\n    return true;\n  };\n\n  const resetValidationMessage = () => {\n    globalState.currentInstance.resetValidationMessage();\n  };\n\n  const addInputChangeListeners = () => {\n    const popup = getPopup();\n    const input = getDirectChildByClass(popup, swalClasses.input);\n    const file = getDirectChildByClass(popup, swalClasses.file);\n    /** @type {HTMLInputElement} */\n\n    const range = popup.querySelector(\".\".concat(swalClasses.range, \" input\"));\n    /** @type {HTMLOutputElement} */\n\n    const rangeOutput = popup.querySelector(\".\".concat(swalClasses.range, \" output\"));\n    const select = getDirectChildByClass(popup, swalClasses.select);\n    /** @type {HTMLInputElement} */\n\n    const checkbox = popup.querySelector(\".\".concat(swalClasses.checkbox, \" input\"));\n    const textarea = getDirectChildByClass(popup, swalClasses.textarea);\n    input.oninput = resetValidationMessage;\n    file.onchange = resetValidationMessage;\n    select.onchange = resetValidationMessage;\n    checkbox.onchange = resetValidationMessage;\n    textarea.oninput = resetValidationMessage;\n\n    range.oninput = () => {\n      resetValidationMessage();\n      rangeOutput.value = range.value;\n    };\n\n    range.onchange = () => {\n      resetValidationMessage();\n      rangeOutput.value = range.value;\n    };\n  };\n  /**\n   * @param {string | HTMLElement} target\n   * @returns {HTMLElement}\n   */\n\n\n  const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target;\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setupAccessibility = params => {\n    const popup = getPopup();\n    popup.setAttribute('role', params.toast ? 'alert' : 'dialog');\n    popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');\n\n    if (!params.toast) {\n      popup.setAttribute('aria-modal', 'true');\n    }\n  };\n  /**\n   * @param {HTMLElement} targetElement\n   */\n\n\n  const setupRTL = targetElement => {\n    if (window.getComputedStyle(targetElement).direction === 'rtl') {\n      addClass(getContainer(), swalClasses.rtl);\n    }\n  };\n  /**\n   * Add modal + backdrop + no-war message for Russians to DOM\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const init = params => {\n    // Clean up the old popup container if it exists\n    const oldContainerExisted = resetOldContainer();\n    /* istanbul ignore if */\n\n    if (isNodeEnv()) {\n      error('SweetAlert2 requires document to initialize');\n      return;\n    }\n\n    const container = document.createElement('div');\n    container.className = swalClasses.container;\n\n    if (oldContainerExisted) {\n      addClass(container, swalClasses['no-transition']);\n    }\n\n    setInnerHtml(container, sweetHTML);\n    const targetElement = getTarget(params.target);\n    targetElement.appendChild(container);\n    setupAccessibility(params);\n    setupRTL(targetElement);\n    addInputChangeListeners();\n    noWarMessageForRussians(container, params);\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions} params\n   */\n\n  const noWarMessageForRussians = (container, params) => {\n    if (params.toast) {\n      return;\n    } // This message is targeted at people who are corrupted by propaganda, everybody else\n    // is already against war either silently or actively.\n    //\n    // The point is to wrap the truth-bomb into a patriotic title so they will actually click it\n    // and listen to the uncomfortable truth about the war from the people they love or respect.\n\n\n    const message = getRandomElement([{\n      text: '\u0428\u0412\u0410\u0420\u0426\u0415\u041D\u0415\u0413\u0413\u0415\u0420 \u043E\u0431\u0440\u0430\u0442\u0438\u043B\u0441\u044F <br> \u043A \u0420\u0423\u0421\u0421\u041A\u041E\u041C\u0423 \u041D\u0410\u0420\u041E\u0414\u0423 \u043E \u0432\u043E\u0439\u043D\u0435',\n      // Arnold is loved in Russia by all people including those who are for this war\n      // His speech might change the mind of those who are brainwashed by propaganda\n      youtubeId: 'fWClXZd9c78'\n    }, {\n      text: '\u0420\u0423\u0421\u0421\u041A\u0418\u0419 \u041F\u0410\u0422\u0420\u0418\u041E\u0422 <br> \u043E\u0442\u043A\u0440\u044B\u043B \u0433\u043B\u0430\u0432\u043D\u0443\u044E \u0442\u0430\u0439\u043D\u0443 \u0441\u043F\u0435\u0446\u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438',\n      // In this video one of the most famous Russian nationalist leaders, Dmitry Demushkin,\n      // explains that this war has no sense and produces the exact opposite result of what\n      // it was intended to do.\n      youtubeId: '_RjBNkn88yA'\n    }, {\n      text: '\u0413\u0415\u0420\u041E\u0419 \u041D\u041E\u0412\u041E\u0420\u041E\u0421\u0421\u0418\u0418 \u0421\u0422\u0420\u0415\u041B\u041A\u041E\u0412 <br> \u0434\u0430\u043B \u043E\u0446\u0435\u043D\u043A\u0443 \u0445\u043E\u0434\u0443 \u0441\u043F\u0435\u0446\u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438',\n      // In this video Igor Girkin, who played a key role in the annexation of Crimea,\n      // explains that this war has failed already and all possible outcomes are bad for Russia.\n      youtubeId: 'yUmzQT4C8JY'\n    }, {\n      text: '\u0424\u0418\u041D\u0421\u041A\u0418\u0419 \u0414\u0420\u0423\u0413 \u0420\u041E\u0421\u0421\u0418\u0418 <br> \u0433\u043E\u0432\u043E\u0440\u0438\u0442 \u041F\u041E-\u0420\u0423\u0421\u0421\u041A\u0418 \u043E \u0441\u043F\u0435\u0446\u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438',\n      youtubeId: 'hkCYb6edUrQ'\n    }, {\n      text: '\u042E\u0420\u0418\u0419 \u041F\u041E\u0414\u041E\u041B\u042F\u041A\u0410 \u0447\u0435\u0441\u0442\u043D\u043E <br> \u043E \u0433\u0435\u043D\u0435\u0440\u0430\u043B\u0430\u0445 \u0420\u0423\u0421\u0421\u041A\u041E\u0419 \u0410\u0420\u041C\u0418\u0418',\n      youtubeId: 'w4-_8BJKfpk'\n    }, {\n      text: '\u041F\u043E\u043B\u043A\u043E\u0432\u043D\u0438\u043A \u0424\u0421\u0411 \u0421\u0422\u0420\u0415\u041B\u041A\u041E\u0412 <br> \u043E\u0431 \u0443\u0441\u043F\u0435\u0445\u0430\u0445 \u0420\u041E\u0421\u0421\u0418\u0418 \u0432 \u0441\u043F\u0435\u0446\u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438',\n      youtubeId: 'saK5UTKroDA'\n    }]); // The message will only be shown to Russian users visiting Russian sites\n\n    if (navigator.language === 'ru' && location.host.match(/\\.(ru|su|xn--p1ai)$/)) {\n      const noWar = document.createElement('div');\n      noWar.className = swalClasses['no-war'];\n      setInnerHtml(noWar, \"<a href=\\\"https://www.youtube.com/watch?v=\".concat(message.youtubeId, \"\\\" target=\\\"_blank\\\">\").concat(message.text, \"</a>\"));\n      container.appendChild(noWar);\n      container.style.paddingTop = '4em';\n    }\n  };\n\n  /**\n   * @param {HTMLElement | object | string} param\n   * @param {HTMLElement} target\n   */\n\n  const parseHtmlToContainer = (param, target) => {\n    // DOM element\n    if (param instanceof HTMLElement) {\n      target.appendChild(param);\n    } // Object\n    else if (typeof param === 'object') {\n      handleObject(param, target);\n    } // Plain string\n    else if (param) {\n      setInnerHtml(target, param);\n    }\n  };\n  /**\n   * @param {object} param\n   * @param {HTMLElement} target\n   */\n\n  const handleObject = (param, target) => {\n    // JQuery element(s)\n    if (param.jquery) {\n      handleJqueryElem(target, param);\n    } // For other objects use their string representation\n    else {\n      setInnerHtml(target, param.toString());\n    }\n  };\n  /**\n   * @param {HTMLElement} target\n   * @param {HTMLElement} elem\n   */\n\n\n  const handleJqueryElem = (target, elem) => {\n    target.textContent = '';\n\n    if (0 in elem) {\n      for (let i = 0; (i in elem); i++) {\n        target.appendChild(elem[i].cloneNode(true));\n      }\n    } else {\n      target.appendChild(elem.cloneNode(true));\n    }\n  };\n\n  /**\n   * @returns {'webkitAnimationEnd' | 'animationend' | false}\n   */\n\n  const animationEndEvent = (() => {\n    // Prevent run in Node env\n\n    /* istanbul ignore if */\n    if (isNodeEnv()) {\n      return false;\n    }\n\n    const testEl = document.createElement('div');\n    const transEndEventNames = {\n      WebkitAnimation: 'webkitAnimationEnd',\n      // Chrome, Safari and Opera\n      animation: 'animationend' // Standard syntax\n\n    };\n\n    for (const i in transEndEventNames) {\n      if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {\n        return transEndEventNames[i];\n      }\n    }\n\n    return false;\n  })();\n\n  /**\n   * Measure scrollbar width for padding body during modal show/hide\n   * https://github.com/twbs/bootstrap/blob/master/js/src/modal.js\n   *\n   * @returns {number}\n   */\n\n  const measureScrollbar = () => {\n    const scrollDiv = document.createElement('div');\n    scrollDiv.className = swalClasses['scrollbar-measure'];\n    document.body.appendChild(scrollDiv);\n    const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n    document.body.removeChild(scrollDiv);\n    return scrollbarWidth;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderActions = (instance, params) => {\n    const actions = getActions();\n    const loader = getLoader(); // Actions (buttons) wrapper\n\n    if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) {\n      hide(actions);\n    } else {\n      show(actions);\n    } // Custom class\n\n\n    applyCustomClass(actions, params, 'actions'); // Render all the buttons\n\n    renderButtons(actions, loader, params); // Loader\n\n    setInnerHtml(loader, params.loaderHtml);\n    applyCustomClass(loader, params, 'loader');\n  };\n  /**\n   * @param {HTMLElement} actions\n   * @param {HTMLElement} loader\n   * @param {SweetAlertOptions} params\n   */\n\n  function renderButtons(actions, loader, params) {\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton(); // Render buttons\n\n    renderButton(confirmButton, 'confirm', params);\n    renderButton(denyButton, 'deny', params);\n    renderButton(cancelButton, 'cancel', params);\n    handleButtonsStyling(confirmButton, denyButton, cancelButton, params);\n\n    if (params.reverseButtons) {\n      if (params.toast) {\n        actions.insertBefore(cancelButton, confirmButton);\n        actions.insertBefore(denyButton, confirmButton);\n      } else {\n        actions.insertBefore(cancelButton, loader);\n        actions.insertBefore(denyButton, loader);\n        actions.insertBefore(confirmButton, loader);\n      }\n    }\n  }\n  /**\n   * @param {HTMLElement} confirmButton\n   * @param {HTMLElement} denyButton\n   * @param {HTMLElement} cancelButton\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) {\n    if (!params.buttonsStyling) {\n      return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled);\n    }\n\n    addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors\n\n    if (params.confirmButtonColor) {\n      confirmButton.style.backgroundColor = params.confirmButtonColor;\n      addClass(confirmButton, swalClasses['default-outline']);\n    }\n\n    if (params.denyButtonColor) {\n      denyButton.style.backgroundColor = params.denyButtonColor;\n      addClass(denyButton, swalClasses['default-outline']);\n    }\n\n    if (params.cancelButtonColor) {\n      cancelButton.style.backgroundColor = params.cancelButtonColor;\n      addClass(cancelButton, swalClasses['default-outline']);\n    }\n  }\n  /**\n   * @param {HTMLElement} button\n   * @param {'confirm' | 'deny' | 'cancel'} buttonType\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function renderButton(button, buttonType, params) {\n    toggle(button, params[\"show\".concat(capitalizeFirstLetter(buttonType), \"Button\")], 'inline-block');\n    setInnerHtml(button, params[\"\".concat(buttonType, \"ButtonText\")]); // Set caption text\n\n    button.setAttribute('aria-label', params[\"\".concat(buttonType, \"ButtonAriaLabel\")]); // ARIA label\n    // Add buttons custom classes\n\n    button.className = swalClasses[buttonType];\n    applyCustomClass(button, params, \"\".concat(buttonType, \"Button\"));\n    addClass(button, params[\"\".concat(buttonType, \"ButtonClass\")]);\n  }\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderContainer = (instance, params) => {\n    const container = getContainer();\n\n    if (!container) {\n      return;\n    }\n\n    handleBackdropParam(container, params.backdrop);\n    handlePositionParam(container, params.position);\n    handleGrowParam(container, params.grow); // Custom class\n\n    applyCustomClass(container, params, 'container');\n  };\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['backdrop']} backdrop\n   */\n\n  function handleBackdropParam(container, backdrop) {\n    if (typeof backdrop === 'string') {\n      container.style.background = backdrop;\n    } else if (!backdrop) {\n      addClass([document.documentElement, document.body], swalClasses['no-backdrop']);\n    }\n  }\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['position']} position\n   */\n\n\n  function handlePositionParam(container, position) {\n    if (position in swalClasses) {\n      addClass(container, swalClasses[position]);\n    } else {\n      warn('The \"position\" parameter is not valid, defaulting to \"center\"');\n      addClass(container, swalClasses.center);\n    }\n  }\n  /**\n   * @param {HTMLElement} container\n   * @param {SweetAlertOptions['grow']} grow\n   */\n\n\n  function handleGrowParam(container, grow) {\n    if (grow && typeof grow === 'string') {\n      const growClass = \"grow-\".concat(grow);\n\n      if (growClass in swalClasses) {\n        addClass(container, swalClasses[growClass]);\n      }\n    }\n  }\n\n  /**\n   * This module contains `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateProps = {\n    awaitingPromise: new WeakMap(),\n    promise: new WeakMap(),\n    innerParams: new WeakMap(),\n    domCache: new WeakMap()\n  };\n\n  /// <reference path=\"../../../../sweetalert2.d.ts\"/>\n  /** @type {InputClass[]} */\n\n  const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderInput = (instance, params) => {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(instance);\n    const rerender = !innerParams || params.input !== innerParams.input;\n    inputClasses.forEach(inputClass => {\n      const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); // set attributes\n\n      setAttributes(inputClass, params.inputAttributes); // set class\n\n      inputContainer.className = swalClasses[inputClass];\n\n      if (rerender) {\n        hide(inputContainer);\n      }\n    });\n\n    if (params.input) {\n      if (rerender) {\n        showInput(params);\n      } // set custom class\n\n\n      setCustomClass(params);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n  const showInput = params => {\n    if (!renderInputType[params.input]) {\n      return error(\"Unexpected type of input! Expected \\\"text\\\", \\\"email\\\", \\\"password\\\", \\\"number\\\", \\\"tel\\\", \\\"select\\\", \\\"radio\\\", \\\"checkbox\\\", \\\"textarea\\\", \\\"file\\\" or \\\"url\\\", got \\\"\".concat(params.input, \"\\\"\"));\n    }\n\n    const inputContainer = getInputContainer(params.input);\n    const input = renderInputType[params.input](inputContainer, params);\n    show(inputContainer); // input autofocus\n\n    setTimeout(() => {\n      focusInput(input);\n    });\n  };\n  /**\n   * @param {HTMLInputElement} input\n   */\n\n\n  const removeAttributes = input => {\n    for (let i = 0; i < input.attributes.length; i++) {\n      const attrName = input.attributes[i].name;\n\n      if (!['type', 'value', 'style'].includes(attrName)) {\n        input.removeAttribute(attrName);\n      }\n    }\n  };\n  /**\n   * @param {InputClass} inputClass\n   * @param {SweetAlertOptions['inputAttributes']} inputAttributes\n   */\n\n\n  const setAttributes = (inputClass, inputAttributes) => {\n    const input = getInput(getPopup(), inputClass);\n\n    if (!input) {\n      return;\n    }\n\n    removeAttributes(input);\n\n    for (const attr in inputAttributes) {\n      input.setAttribute(attr, inputAttributes[attr]);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setCustomClass = params => {\n    const inputContainer = getInputContainer(params.input);\n\n    if (typeof params.customClass === 'object') {\n      addClass(inputContainer, params.customClass.input);\n    }\n  };\n  /**\n   * @param {HTMLInputElement | HTMLTextAreaElement} input\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setInputPlaceholder = (input, params) => {\n    if (!input.placeholder || params.inputPlaceholder) {\n      input.placeholder = params.inputPlaceholder;\n    }\n  };\n  /**\n   * @param {Input} input\n   * @param {Input} prependTo\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setInputLabel = (input, prependTo, params) => {\n    if (params.inputLabel) {\n      input.id = swalClasses.input;\n      const label = document.createElement('label');\n      const labelClass = swalClasses['input-label'];\n      label.setAttribute('for', input.id);\n      label.className = labelClass;\n\n      if (typeof params.customClass === 'object') {\n        addClass(label, params.customClass.inputLabel);\n      }\n\n      label.innerText = params.inputLabel;\n      prependTo.insertAdjacentElement('beforebegin', label);\n    }\n  };\n  /**\n   * @param {SweetAlertOptions['input']} inputType\n   * @returns {HTMLElement}\n   */\n\n\n  const getInputContainer = inputType => {\n    return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input);\n  };\n  /**\n   * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input\n   * @param {SweetAlertOptions['inputValue']} inputValue\n   */\n\n\n  const checkAndSetInputValue = (input, inputValue) => {\n    if (['string', 'number'].includes(typeof inputValue)) {\n      input.value = \"\".concat(inputValue);\n    } else if (!isPromise(inputValue)) {\n      warn(\"Unexpected type of inputValue! Expected \\\"string\\\", \\\"number\\\" or \\\"Promise\\\", got \\\"\".concat(typeof inputValue, \"\\\"\"));\n    }\n  };\n  /** @type Record<string, (input: Input | HTMLElement, params: SweetAlertOptions) => Input> */\n\n\n  const renderInputType = {};\n  /**\n   * @param {HTMLInputElement} input\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n  renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {\n    checkAndSetInputValue(input, params.inputValue);\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    input.type = params.input;\n    return input;\n  };\n  /**\n   * @param {HTMLInputElement} input\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.file = (input, params) => {\n    setInputLabel(input, input, params);\n    setInputPlaceholder(input, params);\n    return input;\n  };\n  /**\n   * @param {HTMLInputElement} range\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.range = (range, params) => {\n    const rangeInput = range.querySelector('input');\n    const rangeOutput = range.querySelector('output');\n    checkAndSetInputValue(rangeInput, params.inputValue);\n    rangeInput.type = params.input;\n    checkAndSetInputValue(rangeOutput, params.inputValue);\n    setInputLabel(rangeInput, range, params);\n    return range;\n  };\n  /**\n   * @param {HTMLSelectElement} select\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLSelectElement}\n   */\n\n\n  renderInputType.select = (select, params) => {\n    select.textContent = '';\n\n    if (params.inputPlaceholder) {\n      const placeholder = document.createElement('option');\n      setInnerHtml(placeholder, params.inputPlaceholder);\n      placeholder.value = '';\n      placeholder.disabled = true;\n      placeholder.selected = true;\n      select.appendChild(placeholder);\n    }\n\n    setInputLabel(select, select, params);\n    return select;\n  };\n  /**\n   * @param {HTMLInputElement} radio\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.radio = radio => {\n    radio.textContent = '';\n    return radio;\n  };\n  /**\n   * @param {HTMLLabelElement} checkboxContainer\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLInputElement}\n   */\n\n\n  renderInputType.checkbox = (checkboxContainer, params) => {\n    const checkbox = getInput(getPopup(), 'checkbox');\n    checkbox.value = '1';\n    checkbox.id = swalClasses.checkbox;\n    checkbox.checked = Boolean(params.inputValue);\n    const label = checkboxContainer.querySelector('span');\n    setInnerHtml(label, params.inputPlaceholder);\n    return checkbox;\n  };\n  /**\n   * @param {HTMLTextAreaElement} textarea\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLTextAreaElement}\n   */\n\n\n  renderInputType.textarea = (textarea, params) => {\n    checkAndSetInputValue(textarea, params.inputValue);\n    setInputPlaceholder(textarea, params);\n    setInputLabel(textarea, textarea, params);\n    /**\n     * @param {HTMLElement} el\n     * @returns {number}\n     */\n\n    const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); // https://github.com/sweetalert2/sweetalert2/issues/2291\n\n\n    setTimeout(() => {\n      // https://github.com/sweetalert2/sweetalert2/issues/1699\n      if ('MutationObserver' in window) {\n        const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);\n\n        const textareaResizeHandler = () => {\n          const textareaWidth = textarea.offsetWidth + getMargin(textarea);\n\n          if (textareaWidth > initialPopupWidth) {\n            getPopup().style.width = \"\".concat(textareaWidth, \"px\");\n          } else {\n            getPopup().style.width = null;\n          }\n        };\n\n        new MutationObserver(textareaResizeHandler).observe(textarea, {\n          attributes: true,\n          attributeFilter: ['style']\n        });\n      }\n    });\n    return textarea;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderContent = (instance, params) => {\n    const htmlContainer = getHtmlContainer();\n    applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML\n\n    if (params.html) {\n      parseHtmlToContainer(params.html, htmlContainer);\n      show(htmlContainer, 'block');\n    } // Content as plain text\n    else if (params.text) {\n      htmlContainer.textContent = params.text;\n      show(htmlContainer, 'block');\n    } // No content\n    else {\n      hide(htmlContainer);\n    }\n\n    renderInput(instance, params);\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderFooter = (instance, params) => {\n    const footer = getFooter();\n    toggle(footer, params.footer);\n\n    if (params.footer) {\n      parseHtmlToContainer(params.footer, footer);\n    } // Custom class\n\n\n    applyCustomClass(footer, params, 'footer');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderCloseButton = (instance, params) => {\n    const closeButton = getCloseButton();\n    setInnerHtml(closeButton, params.closeButtonHtml); // Custom class\n\n    applyCustomClass(closeButton, params, 'closeButton');\n    toggle(closeButton, params.showCloseButton);\n    closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderIcon = (instance, params) => {\n    const innerParams = privateProps.innerParams.get(instance);\n    const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon\n\n    if (innerParams && params.icon === innerParams.icon) {\n      // Custom or default content\n      setContent(icon, params);\n      applyStyles(icon, params);\n      return;\n    }\n\n    if (!params.icon && !params.iconHtml) {\n      hide(icon);\n      return;\n    }\n\n    if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) {\n      error(\"Unknown icon! Expected \\\"success\\\", \\\"error\\\", \\\"warning\\\", \\\"info\\\" or \\\"question\\\", got \\\"\".concat(params.icon, \"\\\"\"));\n      hide(icon);\n      return;\n    }\n\n    show(icon); // Custom or default content\n\n    setContent(icon, params);\n    applyStyles(icon, params); // Animate icon\n\n    addClass(icon, params.showClass.icon);\n  };\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n  const applyStyles = (icon, params) => {\n    for (const iconType in iconTypes) {\n      if (params.icon !== iconType) {\n        removeClass(icon, iconTypes[iconType]);\n      }\n    }\n\n    addClass(icon, iconTypes[params.icon]); // Icon color\n\n    setColor(icon, params); // Success icon background color\n\n    adjustSuccessIconBackgroundColor(); // Custom class\n\n    applyCustomClass(icon, params, 'icon');\n  }; // Adjust success icon background color to match the popup background color\n\n\n  const adjustSuccessIconBackgroundColor = () => {\n    const popup = getPopup();\n    const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');\n    /** @type {NodeListOf<HTMLElement>} */\n\n    const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');\n\n    for (let i = 0; i < successIconParts.length; i++) {\n      successIconParts[i].style.backgroundColor = popupBackgroundColor;\n    }\n  };\n\n  const successIconHtml = \"\\n  <div class=\\\"swal2-success-circular-line-left\\\"></div>\\n  <span class=\\\"swal2-success-line-tip\\\"></span> <span class=\\\"swal2-success-line-long\\\"></span>\\n  <div class=\\\"swal2-success-ring\\\"></div> <div class=\\\"swal2-success-fix\\\"></div>\\n  <div class=\\\"swal2-success-circular-line-right\\\"></div>\\n\";\n  const errorIconHtml = \"\\n  <span class=\\\"swal2-x-mark\\\">\\n    <span class=\\\"swal2-x-mark-line-left\\\"></span>\\n    <span class=\\\"swal2-x-mark-line-right\\\"></span>\\n  </span>\\n\";\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n  const setContent = (icon, params) => {\n    let oldContent = icon.innerHTML;\n    let newContent;\n\n    if (params.iconHtml) {\n      newContent = iconContent(params.iconHtml);\n    } else if (params.icon === 'success') {\n      newContent = successIconHtml;\n      oldContent = oldContent.replace(/ style=\".*?\"/g, ''); // undo adjustSuccessIconBackgroundColor()\n    } else if (params.icon === 'error') {\n      newContent = errorIconHtml;\n    } else {\n      const defaultIconHtml = {\n        question: '?',\n        warning: '!',\n        info: 'i'\n      };\n      newContent = iconContent(defaultIconHtml[params.icon]);\n    }\n\n    if (oldContent.trim() !== newContent.trim()) {\n      setInnerHtml(icon, newContent);\n    }\n  };\n  /**\n   * @param {HTMLElement} icon\n   * @param {SweetAlertOptions} params\n   */\n\n\n  const setColor = (icon, params) => {\n    if (!params.iconColor) {\n      return;\n    }\n\n    icon.style.color = params.iconColor;\n    icon.style.borderColor = params.iconColor;\n\n    for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) {\n      setStyle(icon, sel, 'backgroundColor', params.iconColor);\n    }\n\n    setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor);\n  };\n  /**\n   * @param {string} content\n   * @returns {string}\n   */\n\n\n  const iconContent = content => \"<div class=\\\"\".concat(swalClasses['icon-content'], \"\\\">\").concat(content, \"</div>\");\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderImage = (instance, params) => {\n    const image = getImage();\n\n    if (!params.imageUrl) {\n      return hide(image);\n    }\n\n    show(image, ''); // Src, alt\n\n    image.setAttribute('src', params.imageUrl);\n    image.setAttribute('alt', params.imageAlt); // Width, height\n\n    applyNumericalStyle(image, 'width', params.imageWidth);\n    applyNumericalStyle(image, 'height', params.imageHeight); // Class\n\n    image.className = swalClasses.image;\n    applyCustomClass(image, params, 'image');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderProgressSteps = (instance, params) => {\n    const progressStepsContainer = getProgressSteps();\n\n    if (!params.progressSteps || params.progressSteps.length === 0) {\n      return hide(progressStepsContainer);\n    }\n\n    show(progressStepsContainer);\n    progressStepsContainer.textContent = '';\n\n    if (params.currentProgressStep >= params.progressSteps.length) {\n      warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');\n    }\n\n    params.progressSteps.forEach((step, index) => {\n      const stepEl = createStepElement(step);\n      progressStepsContainer.appendChild(stepEl);\n\n      if (index === params.currentProgressStep) {\n        addClass(stepEl, swalClasses['active-progress-step']);\n      }\n\n      if (index !== params.progressSteps.length - 1) {\n        const lineEl = createLineElement(params);\n        progressStepsContainer.appendChild(lineEl);\n      }\n    });\n  };\n  /**\n   * @param {string} step\n   * @returns {HTMLLIElement}\n   */\n\n  const createStepElement = step => {\n    const stepEl = document.createElement('li');\n    addClass(stepEl, swalClasses['progress-step']);\n    setInnerHtml(stepEl, step);\n    return stepEl;\n  };\n  /**\n   * @param {SweetAlertOptions} params\n   * @returns {HTMLLIElement}\n   */\n\n\n  const createLineElement = params => {\n    const lineEl = document.createElement('li');\n    addClass(lineEl, swalClasses['progress-step-line']);\n\n    if (params.progressStepsDistance) {\n      applyNumericalStyle(lineEl, 'width', params.progressStepsDistance);\n    }\n\n    return lineEl;\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderTitle = (instance, params) => {\n    const title = getTitle();\n    toggle(title, params.title || params.titleText, 'block');\n\n    if (params.title) {\n      parseHtmlToContainer(params.title, title);\n    }\n\n    if (params.titleText) {\n      title.innerText = params.titleText;\n    } // Custom class\n\n\n    applyCustomClass(title, params, 'title');\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const renderPopup = (instance, params) => {\n    const container = getContainer();\n    const popup = getPopup(); // Width\n    // https://github.com/sweetalert2/sweetalert2/issues/2170\n\n    if (params.toast) {\n      applyNumericalStyle(container, 'width', params.width);\n      popup.style.width = '100%';\n      popup.insertBefore(getLoader(), getIcon());\n    } else {\n      applyNumericalStyle(popup, 'width', params.width);\n    } // Padding\n\n\n    applyNumericalStyle(popup, 'padding', params.padding); // Color\n\n    if (params.color) {\n      popup.style.color = params.color;\n    } // Background\n\n\n    if (params.background) {\n      popup.style.background = params.background;\n    }\n\n    hide(getValidationMessage()); // Classes\n\n    addClasses(popup, params);\n  };\n  /**\n   * @param {HTMLElement} popup\n   * @param {SweetAlertOptions} params\n   */\n\n  const addClasses = (popup, params) => {\n    // Default Class + showClass when updating Swal.update({})\n    popup.className = \"\".concat(swalClasses.popup, \" \").concat(isVisible(popup) ? params.showClass.popup : '');\n\n    if (params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['toast-shown']);\n      addClass(popup, swalClasses.toast);\n    } else {\n      addClass(popup, swalClasses.modal);\n    } // Custom class\n\n\n    applyCustomClass(popup, params, 'popup');\n\n    if (typeof params.customClass === 'string') {\n      addClass(popup, params.customClass);\n    } // Icon class (#1842)\n\n\n    if (params.icon) {\n      addClass(popup, swalClasses[\"icon-\".concat(params.icon)]);\n    }\n  };\n\n  /**\n   * @param {SweetAlert2} instance\n   * @param {SweetAlertOptions} params\n   */\n\n  const render = (instance, params) => {\n    renderPopup(instance, params);\n    renderContainer(instance, params);\n    renderProgressSteps(instance, params);\n    renderIcon(instance, params);\n    renderImage(instance, params);\n    renderTitle(instance, params);\n    renderCloseButton(instance, params);\n    renderContent(instance, params);\n    renderActions(instance, params);\n    renderFooter(instance, params);\n\n    if (typeof params.didRender === 'function') {\n      params.didRender(getPopup());\n    }\n  };\n\n  const DismissReason = Object.freeze({\n    cancel: 'cancel',\n    backdrop: 'backdrop',\n    close: 'close',\n    esc: 'esc',\n    timer: 'timer'\n  });\n\n  // Adding aria-hidden=\"true\" to elements outside of the active modal dialog ensures that\n  // elements not within the active modal dialog will not be surfaced if a user opens a screen\n  // reader\u2019s list of elements (headings, form controls, landmarks, etc.) in the document.\n\n  const setAriaHidden = () => {\n    const bodyChildren = toArray(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el === getContainer() || el.contains(getContainer())) {\n        return;\n      }\n\n      if (el.hasAttribute('aria-hidden')) {\n        el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));\n      }\n\n      el.setAttribute('aria-hidden', 'true');\n    });\n  };\n  const unsetAriaHidden = () => {\n    const bodyChildren = toArray(document.body.children);\n    bodyChildren.forEach(el => {\n      if (el.hasAttribute('data-previous-aria-hidden')) {\n        el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));\n        el.removeAttribute('data-previous-aria-hidden');\n      } else {\n        el.removeAttribute('aria-hidden');\n      }\n    });\n  };\n\n  const swalStringParams = ['swal-title', 'swal-html', 'swal-footer'];\n  const getTemplateParams = params => {\n    const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template;\n\n    if (!template) {\n      return {};\n    }\n    /** @type {DocumentFragment} */\n\n\n    const templateContent = template.content;\n    showWarningsForElements(templateContent);\n    const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams));\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n  const getSwalParams = templateContent => {\n    const result = {};\n    toArray(templateContent.querySelectorAll('swal-param')).forEach(param => {\n      showWarningsForAttributes(param, ['name', 'value']);\n      const paramName = param.getAttribute('name');\n      const value = param.getAttribute('value');\n\n      if (typeof defaultParams[paramName] === 'boolean' && value === 'false') {\n        result[paramName] = false;\n      }\n\n      if (typeof defaultParams[paramName] === 'object') {\n        result[paramName] = JSON.parse(value);\n      }\n    });\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const getSwalButtons = templateContent => {\n    const result = {};\n    toArray(templateContent.querySelectorAll('swal-button')).forEach(button => {\n      showWarningsForAttributes(button, ['type', 'color', 'aria-label']);\n      const type = button.getAttribute('type');\n      result[\"\".concat(type, \"ButtonText\")] = button.innerHTML;\n      result[\"show\".concat(capitalizeFirstLetter(type), \"Button\")] = true;\n\n      if (button.hasAttribute('color')) {\n        result[\"\".concat(type, \"ButtonColor\")] = button.getAttribute('color');\n      }\n\n      if (button.hasAttribute('aria-label')) {\n        result[\"\".concat(type, \"ButtonAriaLabel\")] = button.getAttribute('aria-label');\n      }\n    });\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const getSwalImage = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const image = templateContent.querySelector('swal-image');\n\n    if (image) {\n      showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']);\n\n      if (image.hasAttribute('src')) {\n        result.imageUrl = image.getAttribute('src');\n      }\n\n      if (image.hasAttribute('width')) {\n        result.imageWidth = image.getAttribute('width');\n      }\n\n      if (image.hasAttribute('height')) {\n        result.imageHeight = image.getAttribute('height');\n      }\n\n      if (image.hasAttribute('alt')) {\n        result.imageAlt = image.getAttribute('alt');\n      }\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const getSwalIcon = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const icon = templateContent.querySelector('swal-icon');\n\n    if (icon) {\n      showWarningsForAttributes(icon, ['type', 'color']);\n\n      if (icon.hasAttribute('type')) {\n        result.icon = icon.getAttribute('type');\n      }\n\n      if (icon.hasAttribute('color')) {\n        result.iconColor = icon.getAttribute('color');\n      }\n\n      result.iconHtml = icon.innerHTML;\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const getSwalInput = templateContent => {\n    const result = {};\n    /** @type {HTMLElement} */\n\n    const input = templateContent.querySelector('swal-input');\n\n    if (input) {\n      showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']);\n      result.input = input.getAttribute('type') || 'text';\n\n      if (input.hasAttribute('label')) {\n        result.inputLabel = input.getAttribute('label');\n      }\n\n      if (input.hasAttribute('placeholder')) {\n        result.inputPlaceholder = input.getAttribute('placeholder');\n      }\n\n      if (input.hasAttribute('value')) {\n        result.inputValue = input.getAttribute('value');\n      }\n    }\n\n    const inputOptions = templateContent.querySelectorAll('swal-input-option');\n\n    if (inputOptions.length) {\n      result.inputOptions = {};\n      toArray(inputOptions).forEach(option => {\n        showWarningsForAttributes(option, ['value']);\n        const optionValue = option.getAttribute('value');\n        const optionName = option.innerHTML;\n        result.inputOptions[optionValue] = optionName;\n      });\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   * @param {string[]} paramNames\n   */\n\n\n  const getSwalStringParams = (templateContent, paramNames) => {\n    const result = {};\n\n    for (const i in paramNames) {\n      const paramName = paramNames[i];\n      /** @type {HTMLElement} */\n\n      const tag = templateContent.querySelector(paramName);\n\n      if (tag) {\n        showWarningsForAttributes(tag, []);\n        result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim();\n      }\n    }\n\n    return result;\n  };\n  /**\n   * @param {DocumentFragment} templateContent\n   */\n\n\n  const showWarningsForElements = templateContent => {\n    const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']);\n    toArray(templateContent.children).forEach(el => {\n      const tagName = el.tagName.toLowerCase();\n\n      if (allowedElements.indexOf(tagName) === -1) {\n        warn(\"Unrecognized element <\".concat(tagName, \">\"));\n      }\n    });\n  };\n  /**\n   * @param {HTMLElement} el\n   * @param {string[]} allowedAttributes\n   */\n\n\n  const showWarningsForAttributes = (el, allowedAttributes) => {\n    toArray(el.attributes).forEach(attribute => {\n      if (allowedAttributes.indexOf(attribute.name) === -1) {\n        warn([\"Unrecognized attribute \\\"\".concat(attribute.name, \"\\\" on <\").concat(el.tagName.toLowerCase(), \">.\"), \"\".concat(allowedAttributes.length ? \"Allowed attributes are: \".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]);\n      }\n    });\n  };\n\n  var defaultInputValidators = {\n    /**\n     * @param {string} string\n     * @param {string} validationMessage\n     * @returns {Promise<void | string>}\n     */\n    email: (string, validationMessage) => {\n      return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');\n    },\n\n    /**\n     * @param {string} string\n     * @param {string} validationMessage\n     * @returns {Promise<void | string>}\n     */\n    url: (string, validationMessage) => {\n      // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013\n      return /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,63}\\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');\n    }\n  };\n\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n  function setDefaultInputValidators(params) {\n    // Use default `inputValidator` for supported input types if not provided\n    if (!params.inputValidator) {\n      Object.keys(defaultInputValidators).forEach(key => {\n        if (params.input === key) {\n          params.inputValidator = defaultInputValidators[key];\n        }\n      });\n    }\n  }\n  /**\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function validateCustomTargetElement(params) {\n    // Determine if the custom target element is valid\n    if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {\n      warn('Target parameter is not valid, defaulting to \"body\"');\n      params.target = 'body';\n    }\n  }\n  /**\n   * Set type, text and actions on popup\n   *\n   * @param {SweetAlertOptions} params\n   */\n\n\n  function setParameters(params) {\n    setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm\n\n    if (params.showLoaderOnConfirm && !params.preConfirm) {\n      warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\\n' + 'https://sweetalert2.github.io/#ajax-request');\n    }\n\n    validateCustomTargetElement(params); // Replace newlines with <br> in title\n\n    if (typeof params.title === 'string') {\n      params.title = params.title.split('\\n').join('<br />');\n    }\n\n    init(params);\n  }\n\n  class Timer {\n    constructor(callback, delay) {\n      this.callback = callback;\n      this.remaining = delay;\n      this.running = false;\n      this.start();\n    }\n\n    start() {\n      if (!this.running) {\n        this.running = true;\n        this.started = new Date();\n        this.id = setTimeout(this.callback, this.remaining);\n      }\n\n      return this.remaining;\n    }\n\n    stop() {\n      if (this.running) {\n        this.running = false;\n        clearTimeout(this.id);\n        this.remaining -= new Date().getTime() - this.started.getTime();\n      }\n\n      return this.remaining;\n    }\n\n    increase(n) {\n      const running = this.running;\n\n      if (running) {\n        this.stop();\n      }\n\n      this.remaining += n;\n\n      if (running) {\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    getTimerLeft() {\n      if (this.running) {\n        this.stop();\n        this.start();\n      }\n\n      return this.remaining;\n    }\n\n    isRunning() {\n      return this.running;\n    }\n\n  }\n\n  const fixScrollbar = () => {\n    // for queues, do not do this more than once\n    if (states.previousBodyPadding !== null) {\n      return;\n    } // if the body has overflow\n\n\n    if (document.body.scrollHeight > window.innerHeight) {\n      // add padding so the content doesn't shift after removal of scrollbar\n      states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding + measureScrollbar(), \"px\");\n    }\n  };\n  const undoScrollbar = () => {\n    if (states.previousBodyPadding !== null) {\n      document.body.style.paddingRight = \"\".concat(states.previousBodyPadding, \"px\");\n      states.previousBodyPadding = null;\n    }\n  };\n\n  /* istanbul ignore file */\n\n  const iOSfix = () => {\n    const iOS = // @ts-ignore\n    /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n    if (iOS && !hasClass(document.body, swalClasses.iosfix)) {\n      const offset = document.body.scrollTop;\n      document.body.style.top = \"\".concat(offset * -1, \"px\");\n      addClass(document.body, swalClasses.iosfix);\n      lockBodyScroll();\n      addBottomPaddingForTallPopups();\n    }\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1948\n   */\n\n  const addBottomPaddingForTallPopups = () => {\n    const ua = navigator.userAgent;\n    const iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);\n    const webkit = !!ua.match(/WebKit/i);\n    const iOSSafari = iOS && webkit && !ua.match(/CriOS/i);\n\n    if (iOSSafari) {\n      const bottomPanelHeight = 44;\n\n      if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) {\n        getContainer().style.paddingBottom = \"\".concat(bottomPanelHeight, \"px\");\n      }\n    }\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1246\n   */\n\n\n  const lockBodyScroll = () => {\n    const container = getContainer();\n    let preventTouchMove;\n\n    container.ontouchstart = e => {\n      preventTouchMove = shouldPreventTouchMove(e);\n    };\n\n    container.ontouchmove = e => {\n      if (preventTouchMove) {\n        e.preventDefault();\n        e.stopPropagation();\n      }\n    };\n  };\n\n  const shouldPreventTouchMove = event => {\n    const target = event.target;\n    const container = getContainer();\n\n    if (isStylus(event) || isZoom(event)) {\n      return false;\n    }\n\n    if (target === container) {\n      return true;\n    }\n\n    if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603\n    target.tagName !== 'TEXTAREA' && // #2266\n    !(isScrollable(getHtmlContainer()) && // #1944\n    getHtmlContainer().contains(target))) {\n      return true;\n    }\n\n    return false;\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1786\n   *\n   * @param {*} event\n   * @returns {boolean}\n   */\n\n\n  const isStylus = event => {\n    return event.touches && event.touches.length && event.touches[0].touchType === 'stylus';\n  };\n  /**\n   * https://github.com/sweetalert2/sweetalert2/issues/1891\n   *\n   * @param {TouchEvent} event\n   * @returns {boolean}\n   */\n\n\n  const isZoom = event => {\n    return event.touches && event.touches.length > 1;\n  };\n\n  const undoIOSfix = () => {\n    if (hasClass(document.body, swalClasses.iosfix)) {\n      const offset = parseInt(document.body.style.top, 10);\n      removeClass(document.body, swalClasses.iosfix);\n      document.body.style.top = '';\n      document.body.scrollTop = offset * -1;\n    }\n  };\n\n  const SHOW_CLASS_TIMEOUT = 10;\n  /**\n   * Open popup, add necessary classes and styles, fix scrollbar\n   *\n   * @param params\n   */\n\n  const openPopup = params => {\n    const container = getContainer();\n    const popup = getPopup();\n\n    if (typeof params.willOpen === 'function') {\n      params.willOpen(popup);\n    }\n\n    const bodyStyles = window.getComputedStyle(document.body);\n    const initialBodyOverflow = bodyStyles.overflowY;\n    addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'\n\n    setTimeout(() => {\n      setScrollingVisibility(container, popup);\n    }, SHOW_CLASS_TIMEOUT);\n\n    if (isModal()) {\n      fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow);\n      setAriaHidden();\n    }\n\n    if (!isToast() && !globalState.previousActiveElement) {\n      globalState.previousActiveElement = document.activeElement;\n    }\n\n    if (typeof params.didOpen === 'function') {\n      setTimeout(() => params.didOpen(popup));\n    }\n\n    removeClass(container, swalClasses['no-transition']);\n  };\n\n  const swalOpenAnimationFinished = event => {\n    const popup = getPopup();\n\n    if (event.target !== popup) {\n      return;\n    }\n\n    const container = getContainer();\n    popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);\n    container.style.overflowY = 'auto';\n  };\n\n  const setScrollingVisibility = (container, popup) => {\n    if (animationEndEvent && hasCssAnimation(popup)) {\n      container.style.overflowY = 'hidden';\n      popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);\n    } else {\n      container.style.overflowY = 'auto';\n    }\n  };\n\n  const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => {\n    iOSfix();\n\n    if (scrollbarPadding && initialBodyOverflow !== 'hidden') {\n      fixScrollbar();\n    } // sweetalert2/issues/1247\n\n\n    setTimeout(() => {\n      container.scrollTop = 0;\n    });\n  };\n\n  const addClasses$1 = (container, popup, params) => {\n    addClass(container, params.showClass.backdrop); // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059\n\n    popup.style.setProperty('opacity', '0', 'important');\n    show(popup, 'grid');\n    setTimeout(() => {\n      // Animate popup right after showing it\n      addClass(popup, params.showClass.popup); // and remove the opacity workaround\n\n      popup.style.removeProperty('opacity');\n    }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062\n\n    addClass([document.documentElement, document.body], swalClasses.shown);\n\n    if (params.heightAuto && params.backdrop && !params.toast) {\n      addClass([document.documentElement, document.body], swalClasses['height-auto']);\n    }\n  };\n\n  /**\n   * Shows loader (spinner), this is useful with AJAX requests.\n   * By default the loader be shown instead of the \"Confirm\" button.\n   */\n\n  const showLoading = buttonToReplace => {\n    let popup = getPopup();\n\n    if (!popup) {\n      new Swal(); // eslint-disable-line no-new\n    }\n\n    popup = getPopup();\n    const loader = getLoader();\n\n    if (isToast()) {\n      hide(getIcon());\n    } else {\n      replaceButton(popup, buttonToReplace);\n    }\n\n    show(loader);\n    popup.setAttribute('data-loading', 'true');\n    popup.setAttribute('aria-busy', 'true');\n    popup.focus();\n  };\n\n  const replaceButton = (popup, buttonToReplace) => {\n    const actions = getActions();\n    const loader = getLoader();\n\n    if (!buttonToReplace && isVisible(getConfirmButton())) {\n      buttonToReplace = getConfirmButton();\n    }\n\n    show(actions);\n\n    if (buttonToReplace) {\n      hide(buttonToReplace);\n      loader.setAttribute('data-button-to-replace', buttonToReplace.className);\n    }\n\n    loader.parentNode.insertBefore(loader, buttonToReplace);\n    addClass([popup, actions], swalClasses.loading);\n  };\n\n  const handleInputOptionsAndValue = (instance, params) => {\n    if (params.input === 'select' || params.input === 'radio') {\n      handleInputOptions(instance, params);\n    } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {\n      showLoading(getConfirmButton());\n      handleInputValue(instance, params);\n    }\n  };\n  const getInputValue = (instance, innerParams) => {\n    const input = instance.getInput();\n\n    if (!input) {\n      return null;\n    }\n\n    switch (innerParams.input) {\n      case 'checkbox':\n        return getCheckboxValue(input);\n\n      case 'radio':\n        return getRadioValue(input);\n\n      case 'file':\n        return getFileValue(input);\n\n      default:\n        return innerParams.inputAutoTrim ? input.value.trim() : input.value;\n    }\n  };\n\n  const getCheckboxValue = input => input.checked ? 1 : 0;\n\n  const getRadioValue = input => input.checked ? input.value : null;\n\n  const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;\n\n  const handleInputOptions = (instance, params) => {\n    const popup = getPopup();\n\n    const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params);\n\n    if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {\n      showLoading(getConfirmButton());\n      asPromise(params.inputOptions).then(inputOptions => {\n        instance.hideLoading();\n        processInputOptions(inputOptions);\n      });\n    } else if (typeof params.inputOptions === 'object') {\n      processInputOptions(params.inputOptions);\n    } else {\n      error(\"Unexpected type of inputOptions! Expected object, Map or Promise, got \".concat(typeof params.inputOptions));\n    }\n  };\n\n  const handleInputValue = (instance, params) => {\n    const input = instance.getInput();\n    hide(input);\n    asPromise(params.inputValue).then(inputValue => {\n      input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : \"\".concat(inputValue);\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    }).catch(err => {\n      error(\"Error in inputValue promise: \".concat(err));\n      input.value = '';\n      show(input);\n      input.focus();\n      instance.hideLoading();\n    });\n  };\n\n  const populateInputOptions = {\n    select: (popup, inputOptions, params) => {\n      const select = getDirectChildByClass(popup, swalClasses.select);\n\n      const renderOption = (parent, optionLabel, optionValue) => {\n        const option = document.createElement('option');\n        option.value = optionValue;\n        setInnerHtml(option, optionLabel);\n        option.selected = isSelected(optionValue, params.inputValue);\n        parent.appendChild(option);\n      };\n\n      inputOptions.forEach(inputOption => {\n        const optionValue = inputOption[0];\n        const optionLabel = inputOption[1]; // <optgroup> spec:\n        // https://www.w3.org/TR/html401/interact/forms.html#h-17.6\n        // \"...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)...\"\n        // check whether this is a <optgroup>\n\n        if (Array.isArray(optionLabel)) {\n          // if it is an array, then it is an <optgroup>\n          const optgroup = document.createElement('optgroup');\n          optgroup.label = optionValue;\n          optgroup.disabled = false; // not configurable for now\n\n          select.appendChild(optgroup);\n          optionLabel.forEach(o => renderOption(optgroup, o[1], o[0]));\n        } else {\n          // case of <option>\n          renderOption(select, optionLabel, optionValue);\n        }\n      });\n      select.focus();\n    },\n    radio: (popup, inputOptions, params) => {\n      const radio = getDirectChildByClass(popup, swalClasses.radio);\n      inputOptions.forEach(inputOption => {\n        const radioValue = inputOption[0];\n        const radioLabel = inputOption[1];\n        const radioInput = document.createElement('input');\n        const radioLabelElement = document.createElement('label');\n        radioInput.type = 'radio';\n        radioInput.name = swalClasses.radio;\n        radioInput.value = radioValue;\n\n        if (isSelected(radioValue, params.inputValue)) {\n          radioInput.checked = true;\n        }\n\n        const label = document.createElement('span');\n        setInnerHtml(label, radioLabel);\n        label.className = swalClasses.label;\n        radioLabelElement.appendChild(radioInput);\n        radioLabelElement.appendChild(label);\n        radio.appendChild(radioLabelElement);\n      });\n      const radios = radio.querySelectorAll('input');\n\n      if (radios.length) {\n        radios[0].focus();\n      }\n    }\n  };\n  /**\n   * Converts `inputOptions` into an array of `[value, label]`s\n   * @param inputOptions\n   */\n\n  const formatInputOptions = inputOptions => {\n    const result = [];\n\n    if (typeof Map !== 'undefined' && inputOptions instanceof Map) {\n      inputOptions.forEach((value, key) => {\n        let valueFormatted = value;\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    } else {\n      Object.keys(inputOptions).forEach(key => {\n        let valueFormatted = inputOptions[key];\n\n        if (typeof valueFormatted === 'object') {\n          // case of <optgroup>\n          valueFormatted = formatInputOptions(valueFormatted);\n        }\n\n        result.push([key, valueFormatted]);\n      });\n    }\n\n    return result;\n  };\n\n  const isSelected = (optionValue, inputValue) => {\n    return inputValue && inputValue.toString() === optionValue.toString();\n  };\n\n  /**\n   * Hides loader and shows back the button which was hidden by .showLoading()\n   */\n\n  function hideLoading() {\n    // do nothing if popup is closed\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      return;\n    }\n\n    const domCache = privateProps.domCache.get(this);\n    hide(domCache.loader);\n\n    if (isToast()) {\n      if (innerParams.icon) {\n        show(getIcon());\n      }\n    } else {\n      showRelatedButton(domCache);\n    }\n\n    removeClass([domCache.popup, domCache.actions], swalClasses.loading);\n    domCache.popup.removeAttribute('aria-busy');\n    domCache.popup.removeAttribute('data-loading');\n    domCache.confirmButton.disabled = false;\n    domCache.denyButton.disabled = false;\n    domCache.cancelButton.disabled = false;\n  }\n\n  const showRelatedButton = domCache => {\n    const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'));\n\n    if (buttonToReplace.length) {\n      show(buttonToReplace[0], 'inline-block');\n    } else if (allButtonsAreHidden()) {\n      hide(domCache.actions);\n    }\n  };\n\n  /**\n   * Gets the input DOM node, this method works with input parameter.\n   * @returns {HTMLElement | null}\n   */\n\n  function getInput$1(instance) {\n    const innerParams = privateProps.innerParams.get(instance || this);\n    const domCache = privateProps.domCache.get(instance || this);\n\n    if (!domCache) {\n      return null;\n    }\n\n    return getInput(domCache.popup, innerParams.input);\n  }\n\n  /**\n   * This module contains `WeakMap`s for each effectively-\"private  property\" that a `Swal` has.\n   * For example, to set the private property \"foo\" of `this` to \"bar\", you can `privateProps.foo.set(this, 'bar')`\n   * This is the approach that Babel will probably take to implement private methods/fields\n   *   https://github.com/tc39/proposal-private-methods\n   *   https://github.com/babel/babel/pull/7555\n   * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*\n   *   then we can use that language feature.\n   */\n  var privateMethods = {\n    swalPromiseResolve: new WeakMap(),\n    swalPromiseReject: new WeakMap()\n  };\n\n  /*\n   * Global function to determine if SweetAlert2 popup is shown\n   */\n\n  const isVisible$1 = () => {\n    return isVisible(getPopup());\n  };\n  /*\n   * Global function to click 'Confirm' button\n   */\n\n  const clickConfirm = () => getConfirmButton() && getConfirmButton().click();\n  /*\n   * Global function to click 'Deny' button\n   */\n\n  const clickDeny = () => getDenyButton() && getDenyButton().click();\n  /*\n   * Global function to click 'Cancel' button\n   */\n\n  const clickCancel = () => getCancelButton() && getCancelButton().click();\n\n  /**\n   * @param {GlobalState} globalState\n   */\n\n  const removeKeydownHandler = globalState => {\n    if (globalState.keydownTarget && globalState.keydownHandlerAdded) {\n      globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = false;\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {GlobalState} globalState\n   * @param {SweetAlertOptions} innerParams\n   * @param {*} dismissWith\n   */\n\n  const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => {\n    removeKeydownHandler(globalState);\n\n    if (!innerParams.toast) {\n      globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith);\n\n      globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();\n      globalState.keydownListenerCapture = innerParams.keydownListenerCapture;\n      globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {\n        capture: globalState.keydownListenerCapture\n      });\n      globalState.keydownHandlerAdded = true;\n    }\n  };\n  /**\n   * @param {SweetAlertOptions} innerParams\n   * @param {number} index\n   * @param {number} increment\n   */\n\n  const setFocus = (innerParams, index, increment) => {\n    const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match\n\n    if (focusableElements.length) {\n      index = index + increment; // rollover to first item\n\n      if (index === focusableElements.length) {\n        index = 0; // go to last item\n      } else if (index === -1) {\n        index = focusableElements.length - 1;\n      }\n\n      return focusableElements[index].focus();\n    } // no visible focusable elements, focus the popup\n\n\n    getPopup().focus();\n  };\n  const arrowKeysNextButton = ['ArrowRight', 'ArrowDown'];\n  const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp'];\n  /**\n   * @param {SweetAlert2} instance\n   * @param {KeyboardEvent} e\n   * @param {function} dismissWith\n   */\n\n  const keydownHandler = (instance, e, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams) {\n      return; // This instance has already been destroyed\n    } // Ignore keydown during IME composition\n    // https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition\n    // https://github.com/sweetalert2/sweetalert2/issues/720\n    // https://github.com/sweetalert2/sweetalert2/issues/2406\n\n\n    if (e.isComposing || e.keyCode === 229) {\n      return;\n    }\n\n    if (innerParams.stopKeydownPropagation) {\n      e.stopPropagation();\n    } // ENTER\n\n\n    if (e.key === 'Enter') {\n      handleEnter(instance, e, innerParams);\n    } // TAB\n    else if (e.key === 'Tab') {\n      handleTab(e, innerParams);\n    } // ARROWS - switch focus between buttons\n    else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) {\n      handleArrows(e.key);\n    } // ESC\n    else if (e.key === 'Escape') {\n      handleEsc(e, innerParams, dismissWith);\n    }\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const handleEnter = (instance, e, innerParams) => {\n    // https://github.com/sweetalert2/sweetalert2/issues/2386\n    if (!callIfFunction(innerParams.allowEnterKey)) {\n      return;\n    }\n\n    if (e.target && instance.getInput() && e.target instanceof HTMLElement && e.target.outerHTML === instance.getInput().outerHTML) {\n      if (['textarea', 'file'].includes(innerParams.input)) {\n        return; // do not submit\n      }\n\n      clickConfirm();\n      e.preventDefault();\n    }\n  };\n  /**\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const handleTab = (e, innerParams) => {\n    const targetElement = e.target;\n    const focusableElements = getFocusableElements();\n    let btnIndex = -1;\n\n    for (let i = 0; i < focusableElements.length; i++) {\n      if (targetElement === focusableElements[i]) {\n        btnIndex = i;\n        break;\n      }\n    } // Cycle to the next button\n\n\n    if (!e.shiftKey) {\n      setFocus(innerParams, btnIndex, 1);\n    } // Cycle to the prev button\n    else {\n      setFocus(innerParams, btnIndex, -1);\n    }\n\n    e.stopPropagation();\n    e.preventDefault();\n  };\n  /**\n   * @param {string} key\n   */\n\n\n  const handleArrows = key => {\n    const confirmButton = getConfirmButton();\n    const denyButton = getDenyButton();\n    const cancelButton = getCancelButton();\n\n    if (document.activeElement instanceof HTMLElement && ![confirmButton, denyButton, cancelButton].includes(document.activeElement)) {\n      return;\n    }\n\n    const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling';\n    let buttonToFocus = document.activeElement;\n\n    for (let i = 0; i < getActions().children.length; i++) {\n      buttonToFocus = buttonToFocus[sibling];\n\n      if (!buttonToFocus) {\n        return;\n      }\n\n      if (buttonToFocus instanceof HTMLButtonElement && isVisible(buttonToFocus)) {\n        break;\n      }\n    }\n\n    if (buttonToFocus instanceof HTMLButtonElement) {\n      buttonToFocus.focus();\n    }\n  };\n  /**\n   * @param {KeyboardEvent} e\n   * @param {SweetAlertOptions} innerParams\n   * @param {function} dismissWith\n   */\n\n\n  const handleEsc = (e, innerParams, dismissWith) => {\n    if (callIfFunction(innerParams.allowEscapeKey)) {\n      e.preventDefault();\n      dismissWith(DismissReason.esc);\n    }\n  };\n\n  /*\n   * Instance method to close sweetAlert\n   */\n\n  function removePopupAndResetState(instance, container, returnFocus, didClose) {\n    if (isToast()) {\n      triggerDidCloseAndDispose(instance, didClose);\n    } else {\n      restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose));\n      removeKeydownHandler(globalState);\n    }\n\n    const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088\n    // for some reason removing the container in Safari will scroll the document to bottom\n\n    if (isSafari) {\n      container.setAttribute('style', 'display:none !important');\n      container.removeAttribute('class');\n      container.innerHTML = '';\n    } else {\n      container.remove();\n    }\n\n    if (isModal()) {\n      undoScrollbar();\n      undoIOSfix();\n      unsetAriaHidden();\n    }\n\n    removeBodyClasses();\n  }\n\n  function removeBodyClasses() {\n    removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]);\n  }\n\n  function close(resolveValue) {\n    resolveValue = prepareResolveValue(resolveValue);\n    const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);\n    const didClose = triggerClosePopup(this);\n\n    if (this.isAwaitingPromise()) {\n      // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335\n      if (!resolveValue.isDismissed) {\n        handleAwaitingPromise(this);\n        swalPromiseResolve(resolveValue);\n      }\n    } else if (didClose) {\n      // Resolve Swal promise\n      swalPromiseResolve(resolveValue);\n    }\n  }\n  function isAwaitingPromise() {\n    return !!privateProps.awaitingPromise.get(this);\n  }\n\n  const triggerClosePopup = instance => {\n    const popup = getPopup();\n\n    if (!popup) {\n      return false;\n    }\n\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {\n      return false;\n    }\n\n    removeClass(popup, innerParams.showClass.popup);\n    addClass(popup, innerParams.hideClass.popup);\n    const backdrop = getContainer();\n    removeClass(backdrop, innerParams.showClass.backdrop);\n    addClass(backdrop, innerParams.hideClass.backdrop);\n    handlePopupAnimation(instance, popup, innerParams);\n    return true;\n  };\n\n  function rejectPromise(error) {\n    const rejectPromise = privateMethods.swalPromiseReject.get(this);\n    handleAwaitingPromise(this);\n\n    if (rejectPromise) {\n      // Reject Swal promise\n      rejectPromise(error);\n    }\n  }\n  const handleAwaitingPromise = instance => {\n    if (instance.isAwaitingPromise()) {\n      privateProps.awaitingPromise.delete(instance); // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335\n\n      if (!privateProps.innerParams.get(instance)) {\n        instance._destroy();\n      }\n    }\n  };\n\n  const prepareResolveValue = resolveValue => {\n    // When user calls Swal.close()\n    if (typeof resolveValue === 'undefined') {\n      return {\n        isConfirmed: false,\n        isDenied: false,\n        isDismissed: true\n      };\n    }\n\n    return Object.assign({\n      isConfirmed: false,\n      isDenied: false,\n      isDismissed: false\n    }, resolveValue);\n  };\n\n  const handlePopupAnimation = (instance, popup, innerParams) => {\n    const container = getContainer(); // If animation is supported, animate\n\n    const animationIsSupported = animationEndEvent && hasCssAnimation(popup);\n\n    if (typeof innerParams.willClose === 'function') {\n      innerParams.willClose(popup);\n    }\n\n    if (animationIsSupported) {\n      animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose);\n    } else {\n      // Otherwise, remove immediately\n      removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose);\n    }\n  };\n\n  const animatePopup = (instance, popup, container, returnFocus, didClose) => {\n    globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose);\n    popup.addEventListener(animationEndEvent, function (e) {\n      if (e.target === popup) {\n        globalState.swalCloseEventFinishedCallback();\n        delete globalState.swalCloseEventFinishedCallback;\n      }\n    });\n  };\n\n  const triggerDidCloseAndDispose = (instance, didClose) => {\n    setTimeout(() => {\n      if (typeof didClose === 'function') {\n        didClose.bind(instance.params)();\n      }\n\n      instance._destroy();\n    });\n  };\n\n  function setButtonsDisabled(instance, buttons, disabled) {\n    const domCache = privateProps.domCache.get(instance);\n    buttons.forEach(button => {\n      domCache[button].disabled = disabled;\n    });\n  }\n\n  function setInputDisabled(input, disabled) {\n    if (!input) {\n      return false;\n    }\n\n    if (input.type === 'radio') {\n      const radiosContainer = input.parentNode.parentNode;\n      const radios = radiosContainer.querySelectorAll('input');\n\n      for (let i = 0; i < radios.length; i++) {\n        radios[i].disabled = disabled;\n      }\n    } else {\n      input.disabled = disabled;\n    }\n  }\n\n  function enableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false);\n  }\n  function disableButtons() {\n    setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true);\n  }\n  function enableInput() {\n    return setInputDisabled(this.getInput(), false);\n  }\n  function disableInput() {\n    return setInputDisabled(this.getInput(), true);\n  }\n\n  function showValidationMessage(error) {\n    const domCache = privateProps.domCache.get(this);\n    const params = privateProps.innerParams.get(this);\n    setInnerHtml(domCache.validationMessage, error);\n    domCache.validationMessage.className = swalClasses['validation-message'];\n\n    if (params.customClass && params.customClass.validationMessage) {\n      addClass(domCache.validationMessage, params.customClass.validationMessage);\n    }\n\n    show(domCache.validationMessage);\n    const input = this.getInput();\n\n    if (input) {\n      input.setAttribute('aria-invalid', true);\n      input.setAttribute('aria-describedby', swalClasses['validation-message']);\n      focusInput(input);\n      addClass(input, swalClasses.inputerror);\n    }\n  } // Hide block with validation message\n\n  function resetValidationMessage$1() {\n    const domCache = privateProps.domCache.get(this);\n\n    if (domCache.validationMessage) {\n      hide(domCache.validationMessage);\n    }\n\n    const input = this.getInput();\n\n    if (input) {\n      input.removeAttribute('aria-invalid');\n      input.removeAttribute('aria-describedby');\n      removeClass(input, swalClasses.inputerror);\n    }\n  }\n\n  function getProgressSteps$1() {\n    const domCache = privateProps.domCache.get(this);\n    return domCache.progressSteps;\n  }\n\n  /**\n   * Updates popup parameters.\n   */\n\n  function update(params) {\n    const popup = getPopup();\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!popup || hasClass(popup, innerParams.hideClass.popup)) {\n      return warn(\"You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.\");\n    }\n\n    const validUpdatableParams = filterValidParams(params);\n    const updatedParams = Object.assign({}, innerParams, validUpdatableParams);\n    render(this, updatedParams);\n    privateProps.innerParams.set(this, updatedParams);\n    Object.defineProperties(this, {\n      params: {\n        value: Object.assign({}, this.params, params),\n        writable: false,\n        enumerable: true\n      }\n    });\n  }\n\n  const filterValidParams = params => {\n    const validUpdatableParams = {};\n    Object.keys(params).forEach(param => {\n      if (isUpdatableParameter(param)) {\n        validUpdatableParams[param] = params[param];\n      } else {\n        warn(\"Invalid parameter to update: \".concat(param));\n      }\n    });\n    return validUpdatableParams;\n  };\n\n  function _destroy() {\n    const domCache = privateProps.domCache.get(this);\n    const innerParams = privateProps.innerParams.get(this);\n\n    if (!innerParams) {\n      disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335\n\n      return; // This instance has already been destroyed\n    } // Check if there is another Swal closing\n\n\n    if (domCache.popup && globalState.swalCloseEventFinishedCallback) {\n      globalState.swalCloseEventFinishedCallback();\n      delete globalState.swalCloseEventFinishedCallback;\n    }\n\n    if (typeof innerParams.didDestroy === 'function') {\n      innerParams.didDestroy();\n    }\n\n    disposeSwal(this);\n  }\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n  const disposeSwal = instance => {\n    disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569)\n    // @ts-ignore\n\n    delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)\n\n    delete globalState.keydownHandler;\n    delete globalState.keydownTarget; // Unset currentInstance\n\n    delete globalState.currentInstance;\n  };\n  /**\n   * @param {SweetAlert2} instance\n   */\n\n\n  const disposeWeakMaps = instance => {\n    // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335\n    // @ts-ignore\n    if (instance.isAwaitingPromise()) {\n      unsetWeakMaps(privateProps, instance);\n      privateProps.awaitingPromise.set(instance, true);\n    } else {\n      unsetWeakMaps(privateMethods, instance);\n      unsetWeakMaps(privateProps, instance);\n    }\n  };\n  /**\n   * @param {object} obj\n   * @param {SweetAlert2} instance\n   */\n\n\n  const unsetWeakMaps = (obj, instance) => {\n    for (const i in obj) {\n      obj[i].delete(instance);\n    }\n  };\n\n\n\n  var instanceMethods = /*#__PURE__*/Object.freeze({\n    hideLoading: hideLoading,\n    disableLoading: hideLoading,\n    getInput: getInput$1,\n    close: close,\n    isAwaitingPromise: isAwaitingPromise,\n    rejectPromise: rejectPromise,\n    handleAwaitingPromise: handleAwaitingPromise,\n    closePopup: close,\n    closeModal: close,\n    closeToast: close,\n    enableButtons: enableButtons,\n    disableButtons: disableButtons,\n    enableInput: enableInput,\n    disableInput: disableInput,\n    showValidationMessage: showValidationMessage,\n    resetValidationMessage: resetValidationMessage$1,\n    getProgressSteps: getProgressSteps$1,\n    update: update,\n    _destroy: _destroy\n  });\n\n  const handleConfirmButtonClick = instance => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableButtons();\n\n    if (innerParams.input) {\n      handleConfirmOrDenyWithInput(instance, 'confirm');\n    } else {\n      confirm(instance, true);\n    }\n  };\n  const handleDenyButtonClick = instance => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableButtons();\n\n    if (innerParams.returnInputValueOnDeny) {\n      handleConfirmOrDenyWithInput(instance, 'deny');\n    } else {\n      deny(instance, false);\n    }\n  };\n  const handleCancelButtonClick = (instance, dismissWith) => {\n    instance.disableButtons();\n    dismissWith(DismissReason.cancel);\n  };\n\n  const handleConfirmOrDenyWithInput = (instance, type\n  /* 'confirm' | 'deny' */\n  ) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (!innerParams.input) {\n      return error(\"The \\\"input\\\" parameter is needed to be set when using returnInputValueOn\".concat(capitalizeFirstLetter(type)));\n    }\n\n    const inputValue = getInputValue(instance, innerParams);\n\n    if (innerParams.inputValidator) {\n      handleInputValidator(instance, inputValue, type);\n    } else if (!instance.getInput().checkValidity()) {\n      instance.enableButtons();\n      instance.showValidationMessage(innerParams.validationMessage);\n    } else if (type === 'deny') {\n      deny(instance, inputValue);\n    } else {\n      confirm(instance, inputValue);\n    }\n  };\n\n  const handleInputValidator = (instance, inputValue, type\n  /* 'confirm' | 'deny' */\n  ) => {\n    const innerParams = privateProps.innerParams.get(instance);\n    instance.disableInput();\n    const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)));\n    validationPromise.then(validationMessage => {\n      instance.enableButtons();\n      instance.enableInput();\n\n      if (validationMessage) {\n        instance.showValidationMessage(validationMessage);\n      } else if (type === 'deny') {\n        deny(instance, inputValue);\n      } else {\n        confirm(instance, inputValue);\n      }\n    });\n  };\n\n  const deny = (instance, value) => {\n    const innerParams = privateProps.innerParams.get(instance || undefined);\n\n    if (innerParams.showLoaderOnDeny) {\n      showLoading(getDenyButton());\n    }\n\n    if (innerParams.preDeny) {\n      privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received\n\n      const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage)));\n      preDenyPromise.then(preDenyValue => {\n        if (preDenyValue === false) {\n          instance.hideLoading();\n          handleAwaitingPromise(instance);\n        } else {\n          instance.closePopup({\n            isDenied: true,\n            value: typeof preDenyValue === 'undefined' ? value : preDenyValue\n          });\n        }\n      }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n    } else {\n      instance.closePopup({\n        isDenied: true,\n        value\n      });\n    }\n  };\n\n  const succeedWith = (instance, value) => {\n    instance.closePopup({\n      isConfirmed: true,\n      value\n    });\n  };\n\n  const rejectWith = (instance, error$$1) => {\n    instance.rejectPromise(error$$1);\n  };\n\n  const confirm = (instance, value) => {\n    const innerParams = privateProps.innerParams.get(instance || undefined);\n\n    if (innerParams.showLoaderOnConfirm) {\n      showLoading();\n    }\n\n    if (innerParams.preConfirm) {\n      instance.resetValidationMessage();\n      privateProps.awaitingPromise.set(instance || undefined, true); // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received\n\n      const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage)));\n      preConfirmPromise.then(preConfirmValue => {\n        if (isVisible(getValidationMessage()) || preConfirmValue === false) {\n          instance.hideLoading();\n          handleAwaitingPromise(instance);\n        } else {\n          succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);\n        }\n      }).catch(error$$1 => rejectWith(instance || undefined, error$$1));\n    } else {\n      succeedWith(instance, value);\n    }\n  };\n\n  const handlePopupClick = (instance, domCache, dismissWith) => {\n    const innerParams = privateProps.innerParams.get(instance);\n\n    if (innerParams.toast) {\n      handleToastClick(instance, domCache, dismissWith);\n    } else {\n      // Ignore click events that had mousedown on the popup but mouseup on the container\n      // This can happen when the user drags a slider\n      handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup\n\n      handleContainerMousedown(domCache);\n      handleModalClick(instance, domCache, dismissWith);\n    }\n  };\n\n  const handleToastClick = (instance, domCache, dismissWith) => {\n    // Closing toast by internal click\n    domCache.popup.onclick = () => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) {\n        return;\n      }\n\n      dismissWith(DismissReason.close);\n    };\n  };\n  /**\n   * @param {*} innerParams\n   * @returns {boolean}\n   */\n\n\n  const isAnyButtonShown = innerParams => {\n    return innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton;\n  };\n\n  let ignoreOutsideClick = false;\n\n  const handleModalMousedown = domCache => {\n    domCache.popup.onmousedown = () => {\n      domCache.container.onmouseup = function (e) {\n        domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't\n        // have any other direct children aside of the popup\n\n        if (e.target === domCache.container) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleContainerMousedown = domCache => {\n    domCache.container.onmousedown = () => {\n      domCache.popup.onmouseup = function (e) {\n        domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup\n\n        if (e.target === domCache.popup || domCache.popup.contains(e.target)) {\n          ignoreOutsideClick = true;\n        }\n      };\n    };\n  };\n\n  const handleModalClick = (instance, domCache, dismissWith) => {\n    domCache.container.onclick = e => {\n      const innerParams = privateProps.innerParams.get(instance);\n\n      if (ignoreOutsideClick) {\n        ignoreOutsideClick = false;\n        return;\n      }\n\n      if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {\n        dismissWith(DismissReason.backdrop);\n      }\n    };\n  };\n\n  const isJqueryElement = elem => typeof elem === 'object' && elem.jquery;\n\n  const isElement = elem => elem instanceof Element || isJqueryElement(elem);\n\n  const argsToParams = args => {\n    const params = {};\n\n    if (typeof args[0] === 'object' && !isElement(args[0])) {\n      Object.assign(params, args[0]);\n    } else {\n      ['title', 'html', 'icon'].forEach((name, index) => {\n        const arg = args[index];\n\n        if (typeof arg === 'string' || isElement(arg)) {\n          params[name] = arg;\n        } else if (arg !== undefined) {\n          error(\"Unexpected type of \".concat(name, \"! Expected \\\"string\\\" or \\\"Element\\\", got \").concat(typeof arg));\n        }\n      });\n    }\n\n    return params;\n  };\n\n  function fire() {\n    const Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return new Swal(...args);\n  }\n\n  /**\n   * Returns an extended version of `Swal` containing `params` as defaults.\n   * Useful for reusing Swal configuration.\n   *\n   * For example:\n   *\n   * Before:\n   * const textPromptOptions = { input: 'text', showCancelButton: true }\n   * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })\n   * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })\n   *\n   * After:\n   * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })\n   * const {value: firstName} = await TextPrompt('What is your first name?')\n   * const {value: lastName} = await TextPrompt('What is your last name?')\n   *\n   * @param mixinParams\n   */\n  function mixin(mixinParams) {\n    class MixinSwal extends this {\n      _main(params, priorityMixinParams) {\n        return super._main(params, Object.assign({}, mixinParams, priorityMixinParams));\n      }\n\n    }\n\n    return MixinSwal;\n  }\n\n  /**\n   * If `timer` parameter is set, returns number of milliseconds of timer remained.\n   * Otherwise, returns undefined.\n   */\n\n  const getTimerLeft = () => {\n    return globalState.timeout && globalState.timeout.getTimerLeft();\n  };\n  /**\n   * Stop timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const stopTimer = () => {\n    if (globalState.timeout) {\n      stopTimerProgressBar();\n      return globalState.timeout.stop();\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const resumeTimer = () => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.start();\n      animateTimerProgressBar(remaining);\n      return remaining;\n    }\n  };\n  /**\n   * Resume timer. Returns number of milliseconds of timer remained.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const toggleTimer = () => {\n    const timer = globalState.timeout;\n    return timer && (timer.running ? stopTimer() : resumeTimer());\n  };\n  /**\n   * Increase timer. Returns number of milliseconds of an updated timer.\n   * If `timer` parameter isn't set, returns undefined.\n   */\n\n  const increaseTimer = n => {\n    if (globalState.timeout) {\n      const remaining = globalState.timeout.increase(n);\n      animateTimerProgressBar(remaining, true);\n      return remaining;\n    }\n  };\n  /**\n   * Check if timer is running. Returns true if timer is running\n   * or false if timer is paused or stopped.\n   * If `timer` parameter isn't set, returns undefined\n   */\n\n  const isTimerRunning = () => {\n    return globalState.timeout && globalState.timeout.isRunning();\n  };\n\n  let bodyClickListenerAdded = false;\n  const clickHandlers = {};\n  function bindClickHandler() {\n    let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template';\n    clickHandlers[attr] = this;\n\n    if (!bodyClickListenerAdded) {\n      document.body.addEventListener('click', bodyClickListener);\n      bodyClickListenerAdded = true;\n    }\n  }\n\n  const bodyClickListener = event => {\n    for (let el = event.target; el && el !== document; el = el.parentNode) {\n      for (const attr in clickHandlers) {\n        const template = el.getAttribute(attr);\n\n        if (template) {\n          clickHandlers[attr].fire({\n            template\n          });\n          return;\n        }\n      }\n    }\n  };\n\n\n\n  var staticMethods = /*#__PURE__*/Object.freeze({\n    isValidParameter: isValidParameter,\n    isUpdatableParameter: isUpdatableParameter,\n    isDeprecatedParameter: isDeprecatedParameter,\n    argsToParams: argsToParams,\n    isVisible: isVisible$1,\n    clickConfirm: clickConfirm,\n    clickDeny: clickDeny,\n    clickCancel: clickCancel,\n    getContainer: getContainer,\n    getPopup: getPopup,\n    getTitle: getTitle,\n    getHtmlContainer: getHtmlContainer,\n    getImage: getImage,\n    getIcon: getIcon,\n    getInputLabel: getInputLabel,\n    getCloseButton: getCloseButton,\n    getActions: getActions,\n    getConfirmButton: getConfirmButton,\n    getDenyButton: getDenyButton,\n    getCancelButton: getCancelButton,\n    getLoader: getLoader,\n    getFooter: getFooter,\n    getTimerProgressBar: getTimerProgressBar,\n    getFocusableElements: getFocusableElements,\n    getValidationMessage: getValidationMessage,\n    isLoading: isLoading,\n    fire: fire,\n    mixin: mixin,\n    showLoading: showLoading,\n    enableLoading: showLoading,\n    getTimerLeft: getTimerLeft,\n    stopTimer: stopTimer,\n    resumeTimer: resumeTimer,\n    toggleTimer: toggleTimer,\n    increaseTimer: increaseTimer,\n    isTimerRunning: isTimerRunning,\n    bindClickHandler: bindClickHandler\n  });\n\n  let currentInstance;\n\n  class SweetAlert {\n    constructor() {\n      // Prevent run in Node env\n      if (typeof window === 'undefined') {\n        return;\n      }\n\n      currentInstance = this; // @ts-ignore\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      const outerParams = Object.freeze(this.constructor.argsToParams(args));\n      Object.defineProperties(this, {\n        params: {\n          value: outerParams,\n          writable: false,\n          enumerable: true,\n          configurable: true\n        }\n      }); // @ts-ignore\n\n      const promise = currentInstance._main(currentInstance.params);\n\n      privateProps.promise.set(this, promise);\n    }\n\n    _main(userParams) {\n      let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      showWarningsForParams(Object.assign({}, mixinParams, userParams));\n\n      if (globalState.currentInstance) {\n        // @ts-ignore\n        globalState.currentInstance._destroy();\n\n        if (isModal()) {\n          unsetAriaHidden();\n        }\n      }\n\n      globalState.currentInstance = currentInstance;\n      const innerParams = prepareParams(userParams, mixinParams);\n      setParameters(innerParams);\n      Object.freeze(innerParams); // clear the previous timer\n\n      if (globalState.timeout) {\n        globalState.timeout.stop();\n        delete globalState.timeout;\n      } // clear the restore focus timeout\n\n\n      clearTimeout(globalState.restoreFocusTimeout);\n      const domCache = populateDomCache(currentInstance);\n      render(currentInstance, innerParams);\n      privateProps.innerParams.set(currentInstance, innerParams);\n      return swalPromise(currentInstance, domCache, innerParams);\n    } // `catch` cannot be the name of a module export, so we define our thenable methods here instead\n\n\n    then(onFulfilled) {\n      const promise = privateProps.promise.get(this);\n      return promise.then(onFulfilled);\n    }\n\n    finally(onFinally) {\n      const promise = privateProps.promise.get(this);\n      return promise.finally(onFinally);\n    }\n\n  }\n\n  const swalPromise = (instance, domCache, innerParams) => {\n    return new Promise((resolve, reject) => {\n      // functions to handle all closings/dismissals\n      const dismissWith = dismiss => {\n        instance.closePopup({\n          isDismissed: true,\n          dismiss\n        });\n      };\n\n      privateMethods.swalPromiseResolve.set(instance, resolve);\n      privateMethods.swalPromiseReject.set(instance, reject);\n\n      domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance);\n\n      domCache.denyButton.onclick = () => handleDenyButtonClick(instance);\n\n      domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith);\n\n      domCache.closeButton.onclick = () => dismissWith(DismissReason.close);\n\n      handlePopupClick(instance, domCache, dismissWith);\n      addKeydownHandler(instance, globalState, innerParams, dismissWith);\n      handleInputOptionsAndValue(instance, innerParams);\n      openPopup(innerParams);\n      setupTimer(globalState, innerParams, dismissWith);\n      initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)\n\n      setTimeout(() => {\n        domCache.container.scrollTop = 0;\n      });\n    });\n  };\n\n  const prepareParams = (userParams, mixinParams) => {\n    const templateParams = getTemplateParams(userParams);\n    const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131\n\n    params.showClass = Object.assign({}, defaultParams.showClass, params.showClass);\n    params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass);\n    return params;\n  };\n  /**\n   * @param {SweetAlert2} instance\n   * @returns {DomCache}\n   */\n\n\n  const populateDomCache = instance => {\n    const domCache = {\n      popup: getPopup(),\n      container: getContainer(),\n      actions: getActions(),\n      confirmButton: getConfirmButton(),\n      denyButton: getDenyButton(),\n      cancelButton: getCancelButton(),\n      loader: getLoader(),\n      closeButton: getCloseButton(),\n      validationMessage: getValidationMessage(),\n      progressSteps: getProgressSteps()\n    };\n    privateProps.domCache.set(instance, domCache);\n    return domCache;\n  };\n  /**\n   * @param {GlobalState} globalState\n   * @param {SweetAlertOptions} innerParams\n   * @param {function} dismissWith\n   */\n\n\n  const setupTimer = (globalState$$1, innerParams, dismissWith) => {\n    const timerProgressBar = getTimerProgressBar();\n    hide(timerProgressBar);\n\n    if (innerParams.timer) {\n      globalState$$1.timeout = new Timer(() => {\n        dismissWith('timer');\n        delete globalState$$1.timeout;\n      }, innerParams.timer);\n\n      if (innerParams.timerProgressBar) {\n        show(timerProgressBar);\n        applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar');\n        setTimeout(() => {\n          if (globalState$$1.timeout && globalState$$1.timeout.running) {\n            // timer can be already stopped or unset at this point\n            animateTimerProgressBar(innerParams.timer);\n          }\n        });\n      }\n    }\n  };\n  /**\n   * @param {DomCache} domCache\n   * @param {SweetAlertOptions} innerParams\n   */\n\n\n  const initFocus = (domCache, innerParams) => {\n    if (innerParams.toast) {\n      return;\n    }\n\n    if (!callIfFunction(innerParams.allowEnterKey)) {\n      return blurActiveElement();\n    }\n\n    if (!focusButton(domCache, innerParams)) {\n      setFocus(innerParams, -1, 1);\n    }\n  };\n  /**\n   * @param {DomCache} domCache\n   * @param {SweetAlertOptions} innerParams\n   * @returns {boolean}\n   */\n\n\n  const focusButton = (domCache, innerParams) => {\n    if (innerParams.focusDeny && isVisible(domCache.denyButton)) {\n      domCache.denyButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {\n      domCache.cancelButton.focus();\n      return true;\n    }\n\n    if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {\n      domCache.confirmButton.focus();\n      return true;\n    }\n\n    return false;\n  };\n\n  const blurActiveElement = () => {\n    if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') {\n      document.activeElement.blur();\n    }\n  }; // Assign instance methods from src/instanceMethods/*.js to prototype\n\n\n  Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor\n\n  Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility\n\n  Object.keys(instanceMethods).forEach(key => {\n    SweetAlert[key] = function () {\n      if (currentInstance) {\n        return currentInstance[key](...arguments);\n      }\n    };\n  });\n  SweetAlert.DismissReason = DismissReason;\n  SweetAlert.version = '11.4.17';\n\n  const Swal = SweetAlert; // @ts-ignore\n\n  Swal.default = Swal;\n\n  return Swal;\n\n}));\nif (typeof this !== 'undefined' && this.Sweetalert2){  this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}\n\n\"undefined\"!=typeof document&&function(e,t){var n=e.createElement(\"style\");if(e.getElementsByTagName(\"head\")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,\".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px hsla(0deg,0%,0%,.075),0 1px 2px hsla(0deg,0%,0%,.075),1px 2px 4px hsla(0deg,0%,0%,.075),1px 3px 8px hsla(0deg,0%,0%,.075),2px 4px 16px hsla(0deg,0%,0%,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\\\"top-start     top            top-end\\\" \\\"center-start  center         center-end\\\" \\\"bottom-start  bottom-center  bottom-end\\\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:0 0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:0 0;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:0 0;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\\\"!\\\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:0 0;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-no-war{display:flex;position:fixed;z-index:1061;top:0;left:0;align-items:center;justify-content:center;width:100%;height:3.375em;background:#20232a;color:#fff;text-align:center}.swal2-no-war a{color:#61dafb;text-decoration:none}.swal2-no-war a:hover{text-decoration:underline}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}\");", "/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\nvar React = require('react');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE =  Symbol.for('react.element');\nvar REACT_PORTAL_TYPE =  Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE =  Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE =  Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE =  Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE =  Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE =  Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE =  Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE =  Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE =  Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE =  Symbol.for('react.memo');\nvar REACT_LAZY_TYPE =  Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE =  Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL =  Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n  {\n    {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n  key: true,\n  ref: true,\n  __self: true,\n  __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n  didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n  {\n    if (hasOwnProperty.call(config, 'ref')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n  {\n    if (hasOwnProperty.call(config, 'key')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n  {\n    if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n      var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n      if (!didWarnAboutStringRefs[componentName]) {\n        error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n        didWarnAboutStringRefs[componentName] = true;\n      }\n    }\n  }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingKey = function () {\n      if (!specialPropKeyWarningShown) {\n        specialPropKeyWarningShown = true;\n\n        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingKey.isReactWarning = true;\n    Object.defineProperty(props, 'key', {\n      get: warnAboutAccessingKey,\n      configurable: true\n    });\n  }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingRef = function () {\n      if (!specialPropRefWarningShown) {\n        specialPropRefWarningShown = true;\n\n        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingRef.isReactWarning = true;\n    Object.defineProperty(props, 'ref', {\n      get: warnAboutAccessingRef,\n      configurable: true\n    });\n  }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n  var element = {\n    // This tag allows us to uniquely identify this as a React Element\n    $$typeof: REACT_ELEMENT_TYPE,\n    // Built-in properties that belong on the element\n    type: type,\n    key: key,\n    ref: ref,\n    props: props,\n    // Record the component responsible for creating this element.\n    _owner: owner\n  };\n\n  {\n    // The validation flag is currently mutative. We put it on\n    // an external backing store so that we can freeze the whole object.\n    // This can be replaced with a WeakMap once they are implemented in\n    // commonly used development environments.\n    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n    // the validation flag non-enumerable (where possible, which should\n    // include every environment we run tests in), so the test framework\n    // ignores it.\n\n    Object.defineProperty(element._store, 'validated', {\n      configurable: false,\n      enumerable: false,\n      writable: true,\n      value: false\n    }); // self and source are DEV only properties.\n\n    Object.defineProperty(element, '_self', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: self\n    }); // Two elements created in two different places should be considered\n    // equal for testing purposes and therefore we hide it from enumeration.\n\n    Object.defineProperty(element, '_source', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: source\n    });\n\n    if (Object.freeze) {\n      Object.freeze(element.props);\n      Object.freeze(element);\n    }\n  }\n\n  return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n  {\n    var propName; // Reserved names are extracted\n\n    var props = {};\n    var key = null;\n    var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n    // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n    // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n    // but as an intermediary step, we will use jsxDEV for everything except\n    // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n    // key is explicitly declared to be undefined or not.\n\n    if (maybeKey !== undefined) {\n      {\n        checkKeyStringCoercion(maybeKey);\n      }\n\n      key = '' + maybeKey;\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    }\n\n    if (hasValidRef(config)) {\n      ref = config.ref;\n      warnIfStringRefCannotBeAutoConverted(config, self);\n    } // Remaining properties are added to a new props object\n\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        props[propName] = config[propName];\n      }\n    } // Resolve default props\n\n\n    if (type && type.defaultProps) {\n      var defaultProps = type.defaultProps;\n\n      for (propName in defaultProps) {\n        if (props[propName] === undefined) {\n          props[propName] = defaultProps[propName];\n        }\n      }\n    }\n\n    if (key || ref) {\n      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n      if (key) {\n        defineKeyPropWarningGetter(props, displayName);\n      }\n\n      if (ref) {\n        defineRefPropWarningGetter(props, displayName);\n      }\n    }\n\n    return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n  }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n  propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n  {\n    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n  }\n}\n\nfunction getDeclarationErrorAddendum() {\n  {\n    if (ReactCurrentOwner$1.current) {\n      var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n      if (name) {\n        return '\\n\\nCheck the render method of `' + name + '`.';\n      }\n    }\n\n    return '';\n  }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n  {\n    if (source !== undefined) {\n      var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n      var lineNumber = source.lineNumber;\n      return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n    }\n\n    return '';\n  }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  {\n    var info = getDeclarationErrorAddendum();\n\n    if (!info) {\n      var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n      if (parentName) {\n        info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n      }\n    }\n\n    return info;\n  }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n  {\n    if (!element._store || element._store.validated || element.key != null) {\n      return;\n    }\n\n    element._store.validated = true;\n    var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n      return;\n    }\n\n    ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n    // property, it may be the creator of the child that's responsible for\n    // assigning it a key.\n\n    var childOwner = '';\n\n    if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n      // Give the component that originally created this child.\n      childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n    }\n\n    setCurrentlyValidatingElement$1(element);\n\n    error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n    setCurrentlyValidatingElement$1(null);\n  }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n  {\n    if (typeof node !== 'object') {\n      return;\n    }\n\n    if (isArray(node)) {\n      for (var i = 0; i < node.length; i++) {\n        var child = node[i];\n\n        if (isValidElement(child)) {\n          validateExplicitKey(child, parentType);\n        }\n      }\n    } else if (isValidElement(node)) {\n      // This element was passed in a valid location.\n      if (node._store) {\n        node._store.validated = true;\n      }\n    } else if (node) {\n      var iteratorFn = getIteratorFn(node);\n\n      if (typeof iteratorFn === 'function') {\n        // Entry iterators used to provide implicit keys,\n        // but now we print a separate warning for them later.\n        if (iteratorFn !== node.entries) {\n          var iterator = iteratorFn.call(node);\n          var step;\n\n          while (!(step = iterator.next()).done) {\n            if (isValidElement(step.value)) {\n              validateExplicitKey(step.value, parentType);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n  {\n    var type = element.type;\n\n    if (type === null || type === undefined || typeof type === 'string') {\n      return;\n    }\n\n    var propTypes;\n\n    if (typeof type === 'function') {\n      propTypes = type.propTypes;\n    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n    // Inner props are checked in the reconciler.\n    type.$$typeof === REACT_MEMO_TYPE)) {\n      propTypes = type.propTypes;\n    } else {\n      return;\n    }\n\n    if (propTypes) {\n      // Intentionally inside to avoid triggering lazy initializers:\n      var name = getComponentNameFromType(type);\n      checkPropTypes(propTypes, element.props, 'prop', name, element);\n    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n      var _name = getComponentNameFromType(type);\n\n      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n    }\n\n    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n    }\n  }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n  {\n    var keys = Object.keys(fragment.props);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key !== 'children' && key !== 'key') {\n        setCurrentlyValidatingElement$1(fragment);\n\n        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n        setCurrentlyValidatingElement$1(null);\n        break;\n      }\n    }\n\n    if (fragment.ref !== null) {\n      setCurrentlyValidatingElement$1(fragment);\n\n      error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n      setCurrentlyValidatingElement$1(null);\n    }\n  }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n  {\n    var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n    // succeed and there will likely be errors in render.\n\n    if (!validType) {\n      var info = '';\n\n      if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n        info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n      }\n\n      var sourceInfo = getSourceInfoErrorAddendum(source);\n\n      if (sourceInfo) {\n        info += sourceInfo;\n      } else {\n        info += getDeclarationErrorAddendum();\n      }\n\n      var typeString;\n\n      if (type === null) {\n        typeString = 'null';\n      } else if (isArray(type)) {\n        typeString = 'array';\n      } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n        typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n        info = ' Did you accidentally export a JSX literal instead of a component?';\n      } else {\n        typeString = typeof type;\n      }\n\n      error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n    }\n\n    var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n    // TODO: Drop this when these are no longer allowed as the type argument.\n\n    if (element == null) {\n      return element;\n    } // Skip key warning if the type isn't valid since our key validation logic\n    // doesn't expect a non-string/function type and can throw confusing errors.\n    // We don't want exception behavior to differ between dev and prod.\n    // (Rendering will throw with a helpful message and as soon as the type is\n    // fixed, the key warnings will appear.)\n\n\n    if (validType) {\n      var children = props.children;\n\n      if (children !== undefined) {\n        if (isStaticChildren) {\n          if (isArray(children)) {\n            for (var i = 0; i < children.length; i++) {\n              validateChildKeys(children[i], type);\n            }\n\n            if (Object.freeze) {\n              Object.freeze(children);\n            }\n          } else {\n            error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n          }\n        } else {\n          validateChildKeys(children, type);\n        }\n      }\n    }\n\n    if (type === REACT_FRAGMENT_TYPE) {\n      validateFragmentProps(element);\n    } else {\n      validatePropTypes(element);\n    }\n\n    return element;\n  }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, true);\n  }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, false);\n  }\n}\n\nvar jsx =  jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs =  jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n  })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n", "import React from \"react\";\nimport ReactDOM from \"react-dom/client\"; \nimport \"./index.jsx\"     \n// import '../bundles/d3.v3.min.js';\n\n$(\".react-root\").each((i, object) => { \n\tconst reactProps = $(object).data(\"react-props\") || {};  \n\tlet Tagname = window.reactComponents[$(object).data(\"tag-name\")];  \n\tReactDOM.createRoot(object).render(<Tagname reactProps={ reactProps } />); \n});", "import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { CONSTANTS } from \"../bundles/constants.es6.jsx\";\nimport { SearchMenu } from \"../components/search_menu.es6.jsx\";\nimport { Paginate } from \"../components/paginate.es6.jsx\";\nimport { OrderStatus } from \"../components/order_status.es6.jsx\";\nimport Swal from \"sweetalert2\";\nimport * as Models from '../bundles/model.js';\nimport { motion } from \"framer-motion\";\n\n// \u6EFE\u52D5\u9032\u5834\u52D5\u756B\u6548\u679C\u9810\u8A2D\nconst fadeUp = {\n  initial: { opacity: 0, y: 40 },\n  whileInView: { opacity: 1, y: 0 },\n  viewport: { once: true, margin: \"-80px\" },\n  transition: { duration: 0.6, ease: \"easeOut\" }\n};\n\nconst fadeDown = {\n  initial: { opacity: 0, y: -40 },\n  whileInView: { opacity: 1, y: 0 },\n  viewport: { once: true, margin: \"-80px\" },\n  transition: { duration: 0.6, ease: \"easeOut\" }\n};\n\nconst zoomIn = {\n  initial: { opacity: 0, scale: 0.85 },\n  whileInView: { opacity: 1, scale: 1 },\n  viewport: { once: true, margin: \"-80px\" },\n  transition: { duration: 0.5, ease: \"easeOut\" }\n};\n\nconst flipLeft = {\n  initial: { opacity: 0, rotateY: 60 },\n  whileInView: { opacity: 1, rotateY: 0 },\n  viewport: { once: true, margin: \"-80px\" },\n  transition: { duration: 0.6, ease: \"easeOut\" }\n};\n\n// ===== Styles\uFF08\u653E\u5728 class \u5916\u9762\uFF0C\u907F\u514D\u6BCF\u6B21 render \u91CD\u65B0\u5EFA\u7ACB\u7269\u4EF6\uFF09 =====\nconst welcomeStyles = {\n  container: { fontFamily: \"'Helvetica Neue', Arial, sans-serif\", color: '#333' },\n  nav: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '1.5rem 2rem', background: 'linear-gradient(135deg, #ffffff 0%, #ffbe3e 100%)', backdropFilter: 'blur(10px)', borderBottom: '1px solid rgba(0,0,0,0.08)', position: 'sticky', top: 0, zIndex: 1000, boxShadow: '0 2px 20px rgba(0,0,0,0.08)', transition: 'all 0.3s ease' },\n  logoContainer: { display: 'flex', alignItems: 'center', gap: '0rem' },\n  logoIcon: { width: '40px', height: '40px', background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', borderRadius: '12px', display: 'flex', alignItems: 'center', justifyContent: 'center', color: 'white', fontSize: '1.2rem', fontWeight: 'bold', boxShadow: '0 4px 15px rgba(102, 126, 234, 0.4)', transition: 'all 0.3s ease' },\n  logo: { fontWeight: '700', fontSize: '1.5rem', textDecoration: 'none', color: '#1a202c', letterSpacing: '-0.025em' },\n  navLinks: { display: 'flex', alignItems: 'center', gap: '0.75rem' },\n  hero: { textAlign: 'center', padding: '1rem 2rem', backgroundColor: 'rgb(241 241 241)' },\n  heroH1: { fontSize: '2.8rem', fontWeight: 'bold', marginBottom: '1rem', color: '#2c3e50' },\n  heroH2: { fontSize: '1.5rem', fontWeight: '300', color: '#34495e', marginBottom: '2rem' },\n  section: { padding: '1rem 2rem', maxWidth: '1200px', margin: '0 auto', backgroundColor: '#fff' },\n  sectionTitle: { textAlign: 'center', fontSize: '2.5rem', fontWeight: 'bold', marginBottom: '3rem', color: '#2c3e50' },\n  featuresGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '2rem' },\n  featureCard: { backgroundColor: '#fff', border: '1px solid #eaeaea', borderRadius: '8px', padding: '2rem', textAlign: 'center', boxShadow: '0 4px 6px rgba(0,0,0,0.05)' },\n  featureIcon: { fontSize: '2rem', marginBottom: '1rem', color: '#3498db', fontWeight: 'bold' },\n  featureImage: { width: '100%', height: '200px', objectFit: 'cover', borderRadius: '8px 8px 0 0', marginBottom: '1rem' },\n  featureTitle: { fontSize: '1.5rem', fontWeight: 'bold', marginBottom: '0.5rem' },\n  featureDesc: { color: '#555', lineHeight: '1.6' },\n  navButton: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', height: '40px', padding: '0 1.25rem', backgroundColor: '#667eea', color: '#fff', textDecoration: 'none', borderRadius: '8px', fontWeight: '600', fontSize: '0.875rem', border: 'none', cursor: 'pointer', transition: 'all 0.2s ease', boxShadow: '0 2px 8px rgba(102, 126, 234, 0.2)', whiteSpace: 'nowrap' },\n  navButtonSecondary: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', height: '40px', padding: '0 1.25rem', backgroundColor: 'white', color: '#667eea', textDecoration: 'none', borderRadius: '8px', fontWeight: '600', fontSize: '0.875rem', border: '1.5px solid #667eea', cursor: 'pointer', transition: 'all 0.2s ease', whiteSpace: 'nowrap', boxSizing: 'border-box' },\n  navLink: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', height: '40px', padding: '0 0.75rem', textDecoration: 'none', color: '#dc3545', fontWeight: '500', fontSize: '0.875rem', borderRadius: '8px', transition: 'all 0.2s ease', whiteSpace: 'nowrap', boxSizing: 'border-box', border: '1.5px solid #dc3545', backgroundColor: 'transparent' },\n  userInfo: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', height: '40px', padding: '0 0.75rem', color: '#2d3748', fontWeight: '500', fontSize: '0.875rem', borderRadius: '8px', whiteSpace: 'nowrap', boxSizing: 'border-box' },\n  button: { display: 'inline-block', padding: '0.8rem 1.8rem', backgroundColor: '#3498db', color: '#fff', textDecoration: 'none', borderRadius: '5px', fontWeight: 'bold', fontSize: '1rem', transition: 'all 0.3s ease' },\n  buttonSecondary: { display: 'inline-block', padding: '0.8rem 1.8rem', backgroundColor: 'transparent', color: '#3498db', textDecoration: 'none', borderRadius: '5px', fontWeight: 'bold', fontSize: '1rem', border: '2px solid #3498db', marginLeft: '0.5rem', transition: 'all 0.3s ease' },\n  link: { textDecoration: 'none', color: '#3498db', fontWeight: '500' },\n  sitesDropdown: { position: 'relative', display: 'inline-block' },\n  sitesButton: { backgroundColor: '#007bff', color: 'white', height: '40px', padding: '0 1rem', border: '1px solid #007bff', borderRadius: '8px', cursor: 'pointer', fontSize: '0.875rem', fontWeight: '600', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.5rem', transition: 'all 0.15s ease-in-out', whiteSpace: 'nowrap', boxSizing: 'border-box' },\n  sitesButtonHover: { backgroundColor: '#0056b3', border: '1px solid #004085' },\n  sitesMenu: { position: 'absolute', top: '100%', right: '0', backgroundColor: '#fff', border: '1px solid rgba(0,0,0,.15)', borderRadius: '6px', boxShadow: '0 0.5rem 1rem rgba(0,0,0,.15)', minWidth: '220px', zIndex: 1000, marginTop: '0.125rem', padding: '0.5rem 0', fontSize: '0.875rem', color: '#212529', opacity: 0, transform: 'translateY(-10px)', transition: 'all 0.15s ease-in-out', visibility: 'hidden' },\n  sitesMenuOpen: { opacity: 1, transform: 'translateY(0)', visibility: 'visible' },\n  siteMenuItem: { display: 'block', padding: '0.5rem 1rem', textDecoration: 'none', color: '#212529', transition: 'all 0.15s ease-in-out', borderBottom: 'none', whiteSpace: 'nowrap', textAlign: 'left' },\n  siteMenuItemHover: { backgroundColor: '#f8f9fa', color: '#16181b' },\n  siteMenuDivider: { height: '0', margin: '0.5rem 0', overflow: 'hidden', borderTop: '1px solid #dee2e6' },\n  contactSection: { padding: '1rem 2rem', backgroundColor: '#fff', textAlign: 'center' },\n  contactContainer: { maxWidth: '800px', margin: '0 auto 2rem auto' },\n  contactGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '2rem', marginTop: '2rem' },\n  contactCard: { backgroundColor: '#f8f9fa', border: '2px solid #e9ecef', borderRadius: '12px', padding: '2rem', textAlign: 'center', transition: 'all 0.3s ease', cursor: 'pointer' },\n  contactCardHover: { transform: 'translateY(-5px)', boxShadow: '0 8px 25px rgba(0,0,0,0.1)', border: '2px solid #3498db' },\n  contactIcon: { fontSize: '2.5rem', marginBottom: '1rem', display: 'block' },\n  contactTitle: { fontSize: '1.3rem', fontWeight: 'bold', marginBottom: '0.5rem', marginTop: '0px', color: '#2c3e50' },\n  contactLink: { color: '#3498db', textDecoration: 'none', fontSize: '1rem', fontWeight: '500', display: 'inline-block', transition: 'color 0.3s ease' },\n  contactDesc: { color: '#6c757d', fontSize: '0.9rem', marginTop: '0.5rem' },\n  footer: { textAlign: 'center', padding: '2rem', background: 'linear-gradient(180deg, #ffe1b3 0%, #fba105 100%)', color: 'black' },\n  pricingSection: { padding: '1rem 2rem', backgroundColor: '#f8f9fa' },\n  pricingContainer: { maxWidth: '1200px', margin: '0 auto' },\n  pricingGrid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))', gap: '2rem', marginTop: '3rem' },\n  pricingCard: { backgroundColor: '#fff', border: '2px solid #e9ecef', borderRadius: '16px', padding: '2.5rem 2rem', textAlign: 'center', transition: 'all 0.3s ease', position: 'relative', display: 'flex', flexDirection: 'column' },\n  pricingCardHover: { transform: 'translateY(-8px)', boxShadow: '0 12px 35px rgba(102, 126, 234, 0.25)', border: '2px solid #667eea' },\n  pricingCardPopular: { border: '3px solid #667eea', boxShadow: '0 8px 25px rgba(102, 126, 234, 0.15)' },\n  popularBadge: { position: 'absolute', top: '-12px', left: '50%', transform: 'translateX(-50%)', backgroundColor: '#667eea', color: 'white', padding: '0.5rem 1.5rem', borderRadius: '20px', fontSize: '0.95rem', fontWeight: '700', letterSpacing: '0.5px', boxShadow: '0 4px 12px rgba(102, 126, 234, 0.3)' },\n  planName: { fontSize: '1.75rem', fontWeight: '700', color: '#2c3e50', marginBottom: '1rem', marginTop: '0.5rem' },\n  planPrice: { fontSize: '3rem', fontWeight: '800', color: '#667eea', marginBottom: '0.5rem', lineHeight: '1' },\n  planPriceUnit: { fontSize: '1rem', fontWeight: '400', color: '#6c757d' },\n  planDuration: { fontSize: '1rem', color: '#6c757d', marginBottom: '1.5rem', fontWeight: '500' },\n  planFeatures: { listStyle: 'none', padding: 0, margin: '1.5rem 0', flex: '1' },\n  planFeature: { padding: '0.75rem 0', color: '#555', fontSize: '1rem', borderBottom: '1px solid #f0f0f0', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.5rem' },\n  planFeatureIcon: { color: '#28a745', fontSize: '1.1rem', fontWeight: 'bold' },\n  planButton: { display: 'inline-block', padding: '1rem 2rem', backgroundColor: '#667eea', color: '#fff', textDecoration: 'none', borderRadius: '10px', fontWeight: '700', fontSize: '1rem', transition: 'all 0.3s ease', border: 'none', cursor: 'pointer', marginTop: 'auto', boxShadow: '0 4px 12px rgba(102, 126, 234, 0.2)' },\n  planButtonHover: { backgroundColor: '#5568d3', boxShadow: '0 6px 20px rgba(102, 126, 234, 0.35)', transform: 'translateY(-2px)' },\n  pricingNote: { textAlign: 'center', marginTop: '2.5rem', fontSize: '0.95rem', color: '#6c757d', fontStyle: 'italic' },\n  aboutRefund: { textAlign: 'center', fontSize: '0.95rem', color: '#6c757d', fontStyle: 'italic' }\n};\n\n// ===== \u5B50\u5143\u4EF6\u5B9A\u7FA9\uFF08\u653E\u5728 class \u5916\u9762\uFF0C\u907F\u514D render \u6642\u91CD\u65B0\u5EFA\u7ACB\u5C0E\u81F4\u52D5\u756B\u91CD\u64AD\uFF09 =====\n\nconst Feature = ({ icon, image, title, children, motionProps }) => (\n  <motion.div style={welcomeStyles.featureCard} {...motionProps}>\n    {image ? (\n      <img src={image} alt={title} style={welcomeStyles.featureImage} />\n    ) : (\n      <div style={welcomeStyles.featureIcon}>{icon}</div>\n    )}\n    <h3 style={welcomeStyles.featureTitle}>{title}</h3>\n    <p style={welcomeStyles.featureDesc}>{children}</p>\n  </motion.div>\n);\n\nconst ContactCard = ({ icon, title, width, link, linkText, description, isEmail = false, motionProps }) => {\n  const [isHovered, setIsHovered] = React.useState(false);\n\n  const handleClick = () => {\n    if (isEmail) {\n      window.location.href = `mailto:${link}`;\n    } else {\n      window.open(link, '_blank', 'noopener,noreferrer');\n    }\n  };\n\n  const isImageIcon = typeof icon === 'string' && (icon.startsWith('/') || icon.startsWith('http'));\n\n  return (\n    <motion.div\n      style={{\n        ...welcomeStyles.contactCard,\n        ...(isHovered ? welcomeStyles.contactCardHover : {})\n      }}\n      onMouseEnter={() => setIsHovered(true)}\n      onMouseLeave={() => setIsHovered(false)}\n      onClick={handleClick}\n      {...motionProps}\n    >\n      {isImageIcon ? (\n        <img\n          src={icon}\n          alt={title}\n          style={{\n            width: width ? width : '80px',\n            height: '80px',\n            objectFit: 'contain',\n            display: 'block',\n            margin: '0 auto'\n          }}\n        />\n      ) : (\n        <span style={{...welcomeStyles.contactIcon, color: isEmail ? '#e74c3c' : '#4267B2'}}>{icon}</span>\n      )}\n      <h3 style={welcomeStyles.contactTitle}>{title}</h3>\n      <a\n        href={isEmail ? `mailto:${link}` : link}\n        style={{\n          ...welcomeStyles.contactLink,\n          color: isHovered ? (isEmail ? '#c0392b' : '#365899') : (isEmail ? '#e74c3c' : '#4267B2')\n        }}\n        target={isEmail ? '_self' : '_blank'}\n        rel={isEmail ? '' : 'noopener noreferrer'}\n        onClick={(e) => e.stopPropagation()}\n      >\n        {linkText}\n      </a>\n      <p style={welcomeStyles.contactDesc}>{description}</p>\n    </motion.div>\n  );\n};\n\nconst SecondaryButton = ({ href, children }) => {\n  const [isHovered, setIsHovered] = React.useState(false);\n\n  return (\n    <a\n      href={href}\n      style={{\n        ...welcomeStyles.buttonSecondary,\n        backgroundColor: isHovered ? '#3498db' : 'transparent',\n        color: isHovered ? '#fff' : '#3498db'\n      }}\n      onMouseEnter={() => setIsHovered(true)}\n      onMouseLeave={() => setIsHovered(false)}\n    >\n      {children}\n    </a>\n  );\n};\n\nconst SmoothScrollButton = ({ onClick, style, children }) => {\n  const [isHovered, setIsHovered] = React.useState(false);\n\n  return (\n    <button\n      onClick={onClick}\n      style={{\n        ...style,\n        border: 'none',\n        cursor: 'pointer',\n        transform: isHovered ? 'translateY(-2px)' : 'translateY(0px)',\n        boxShadow: isHovered ? '0 6px 12px rgba(0,0,0,0.15)' : '0 4px 6px rgba(0,0,0,0.1)'\n      }}\n      onMouseEnter={() => setIsHovered(true)}\n      onMouseLeave={() => setIsHovered(false)}\n    >\n      {children}\n    </button>\n  );\n};\n\nconst PricingCard = ({ plan, isPopular = false, motionProps, scrollToSection }) => {\n  const [isHovered, setIsHovered] = React.useState(false);\n  const [isButtonHovered, setIsButtonHovered] = React.useState(false);\n\n  const totalAmount = plan.total_amount;\n  const months = plan.months || 1;\n  const maxMembershipCount = plan.max_membership_count;\n  const isFree = totalAmount === 0;\n  const isCustom = totalAmount === null;\n\n  const displayAmount = totalAmount !== null ? Math.floor(totalAmount) : 0;\n  const avgMonthlyAmount = totalAmount !== null ? Math.floor(totalAmount / months) : 0;\n\n  return (\n    <motion.div\n      style={{\n        ...welcomeStyles.pricingCard,\n        ...(isPopular ? welcomeStyles.pricingCardPopular : {}),\n        ...(isHovered ? welcomeStyles.pricingCardHover : {})\n      }}\n      onMouseEnter={() => setIsHovered(true)}\n      onMouseLeave={() => setIsHovered(false)}\n      {...motionProps}\n    >\n      {isPopular && <div style={welcomeStyles.popularBadge}>\u71B1\u9580\u65B9\u6848</div>}\n\n      <h3 style={welcomeStyles.planName}>{plan.name}</h3>\n\n      <div>\n        <div style={welcomeStyles.planPrice}>\n          {isCustom ? (\n            <span style={{fontSize: '2rem'}}>\u5BA2\u88FD\u5831\u50F9</span>\n          ) : isFree ? (\n            <>\n              \u514D\u8CBB\n              <span style={welcomeStyles.planPriceUnit}> / {months}\u500B\u6708</span>\n            </>\n          ) : (\n            <>\n              ${displayAmount.toLocaleString()}\n              <span style={welcomeStyles.planPriceUnit}> / {months}\u500B\u6708</span>\n            </>\n          )}\n        </div>\n        {!isCustom && !isFree && (\n          <div style={welcomeStyles.planDuration}>\n            \u5E73\u5747\u6BCF\u6708 ${avgMonthlyAmount.toLocaleString()}\n          </div>\n        )}\n        {isFree && (\n          <div style={welcomeStyles.planDuration}>\n            \u9AD4\u9A57\u5B8C\u6574\u529F\u80FD\n          </div>\n        )}\n        {isCustom && (\n          <div style={welcomeStyles.planDuration}>\n            \u4F9D\u9700\u6C42\u91CF\u8EAB\u8A02\u505A\n          </div>\n        )}\n      </div>\n\n      <ul style={welcomeStyles.planFeatures}>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          {maxMembershipCount ? `\u6700\u591A ${maxMembershipCount.toLocaleString()} \u540D\u6703\u54E1` : '\u7121\u6703\u54E1\u6578\u91CF\u9650\u5236'}\n        </li>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          {isCustom ? '\u65B9\u6848\u6548\u671F \u91CF\u8EAB\u8A02\u505A' : `\u65B9\u6848\u6548\u671F ${months} \u500B\u6708`}\n        </li>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          \u5B8C\u6574\u6703\u54E1\u7BA1\u7406\u529F\u80FD\n        </li>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          \u512A\u60E0\u5238\u767C\u653E\u7CFB\u7D71\n        </li>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          \u63A8\u64AD\u901A\u77E5\u670D\u52D9\n        </li>\n        <li style={welcomeStyles.planFeature}>\n          <span style={welcomeStyles.planFeatureIcon}>\u2713</span>\n          \u6578\u64DA\u5206\u6790\u5831\u8868\n        </li>\n      </ul>\n\n      <a\n        href={isCustom ? \"#contact\" : \"/sites/new\"}\n        onClick={isCustom ? (e) => { e.preventDefault(); scrollToSection('contact'); } : undefined}\n        style={{\n          ...welcomeStyles.planButton,\n          ...(isButtonHovered ? welcomeStyles.planButtonHover : {})\n        }}\n        onMouseEnter={() => setIsButtonHovered(true)}\n        onMouseLeave={() => setIsButtonHovered(false)}\n      >\n        {isCustom ? '\u806F\u7D61\u6211\u5011' : '\u7ACB\u5373\u7533\u8ACB'}\n      </a>\n    </motion.div>\n  );\n};\n\nconst SitesDropdown = ({ sites, adminPath }) => {\n  const [isOpen, setIsOpen] = React.useState(false);\n  const [hoveredItem, setHoveredItem] = React.useState(null);\n  const [isButtonHovered, setIsButtonHovered] = React.useState(false);\n  const dropdownRef = React.useRef(null);\n\n  React.useEffect(() => {\n    const handleClickOutside = (event) => {\n      if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {\n        setIsOpen(false);\n      }\n    };\n    if (isOpen) {\n      document.addEventListener('mousedown', handleClickOutside);\n    }\n    return () => {\n      document.removeEventListener('mousedown', handleClickOutside);\n    };\n  }, [isOpen]);\n\n  if (!sites || sites.length === 0) return null;\n\n  return (\n    <div ref={dropdownRef} style={welcomeStyles.sitesDropdown} className=\"welcome-sites-dropdown\">\n      <button\n        style={{ ...welcomeStyles.sitesButton, ...(isButtonHovered ? welcomeStyles.sitesButtonHover : {}) }}\n        onClick={() => setIsOpen(!isOpen)}\n        onMouseEnter={() => setIsButtonHovered(true)}\n        onMouseLeave={() => setIsButtonHovered(false)}\n      >\n        <i className=\"bi bi-shop\" style={{ fontSize: '1rem' }}></i>\n        \u6211\u7684\u5546\u5E97 ({sites.length})\n        <span style={{ transform: isOpen ? 'rotate(180deg)' : 'rotate(0deg)', transition: 'transform 0.15s ease-in-out', fontSize: '0.75rem' }}>\u25BC</span>\n      </button>\n      <div style={{ ...welcomeStyles.sitesMenu, ...(isOpen ? welcomeStyles.sitesMenuOpen : {}) }}>\n        <div style={{ padding: '0.5rem 1rem 0.25rem', fontSize: '0.75rem', fontWeight: '600', color: '#6c757d', textTransform: 'uppercase', letterSpacing: '0.05em' }}>\u9078\u64C7\u5546\u5E97</div>\n        <div style={welcomeStyles.siteMenuDivider}></div>\n        {sites.map((site, index) => (\n          <a key={site.id} href={`/${site.domain}/backend`}\n            style={{ ...welcomeStyles.siteMenuItem, ...(hoveredItem === index ? welcomeStyles.siteMenuItemHover : {}) }}\n            onMouseEnter={() => setHoveredItem(index)} onMouseLeave={() => setHoveredItem(null)} target=\"_blank\"\n          >\n            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '0.125rem' }}>\n              <span style={{ fontWeight: '500', fontSize: '0.875rem', textAlign: 'left', flex: 1 }}>{site.title || site.domain}</span>\n              <div style={{ display: 'flex', gap: '0.25rem', marginLeft: '0.5rem' }}>\n                {!site.published && (<span style={{ fontSize: '0.625rem', backgroundColor: '#ffc107', color: '#212529', padding: '0.125rem 0.375rem', borderRadius: '4px', fontWeight: '600' }}>\u672A\u516C\u958B</span>)}\n                {!site[\"active?\"] && (<span style={{ fontSize: '0.625rem', backgroundColor: '#dc3545', color: '#ffffff', padding: '0.125rem 0.375rem', borderRadius: '4px', fontWeight: '600' }}>\u672A\u555F\u7528</span>)}\n              </div>\n            </div>\n            <div style={{ fontSize: '0.75rem', color: '#6c757d', textAlign: 'left' }}>{site.domain}</div>\n          </a>\n        ))}\n        {adminPath && (\n          <>\n            <div style={welcomeStyles.siteMenuDivider}></div>\n            <a href={adminPath}\n              style={{ ...welcomeStyles.siteMenuItem, ...(hoveredItem === 'admin' ? welcomeStyles.siteMenuItemHover : {}), color: '#667eea', fontWeight: '600' }}\n              onMouseEnter={() => setHoveredItem('admin')} onMouseLeave={() => setHoveredItem(null)} target=\"_blank\"\n            >\n              <div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>\n                <i className=\"bi bi-gear\" style={{ fontSize: '0.875rem' }}></i>\n                <span>\u9032\u5165\u7BA1\u7406\u5F8C\u53F0</span>\n              </div>\n            </a>\n          </>\n        )}\n      </div>\n    </div>\n  );\n};\n\nclass WelcomeIndex extends React.Component {\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      currentSlide: 0\n    };\n\n    this.carouselInterval = null;\n  }\n\n  // \u5F9E props \u53D6\u5F97\u8F2A\u64AD\u5716\u7247\u8CC7\u6599\n  getCarouselImages = () => {\n    const { carousel_images } = this.props.reactProps;\n\n    // \u4F7F\u7528\u97FF\u61C9\u5F0F\u8A2D\u8A08\uFF0C\u6839\u64DA\u756B\u9762\u5BEC\u5EA6\u6C7A\u5B9A\u4F7F\u7528\u54EA\u7A2E\u5716\u7247\n    // \u756B\u9762\u5BEC\u5EA6\u5C0F\u65BC 576px \u4F7F\u7528\u624B\u6A5F\u7248\u5716\u7247\uFF0C\u5426\u5247\u4F7F\u7528\u96FB\u8166\u7248\u5716\u7247\n    const isMobile = this.isMobileScreen();\n\n    // \u5982\u679C\u8CC7\u6599\u5EAB\u4E2D\u6709\u8F2A\u64AD\u5716\u7247\uFF0C\u5247\u4F7F\u7528\u8CC7\u6599\u5EAB\u7684\u5716\u7247\n    if (carousel_images && carousel_images.length > 0) {\n      return carousel_images.map(img => {\n        // \u5982\u679C\u756B\u9762\u5BEC\u5EA6\u5C0F\u65BC 576px\uFF0C\u4F7F\u7528\u624B\u6A5F\u7248\u5716\u7247\uFF0C\u5426\u5247\u4F7F\u7528\u96FB\u8166\u7248\u5716\u7247\uFF08\u5982\u679C\u5B58\u5728\uFF09\n        return isMobile ? img.mobile_image_url : (img.desktop_image_url || img.mobile_image_url);\n      });\n    }\n\n    // \u5426\u5247\u4F7F\u7528\u9810\u8A2D\u5716\u7247\uFF08\u4F5C\u70BA\u5099\u7528\uFF09\n    return [];\n  };\n\n  // \u6AA2\u67E5\u87A2\u5E55\u5C3A\u5BF8\u662F\u5426\u70BA\u884C\u52D5\u88DD\u7F6E\u5C3A\u5BF8\n  isMobileScreen = () => {\n    return window.innerWidth < 576;\n  }\n\n  // \u8655\u7406\u87A2\u5E55\u5C3A\u5BF8\u8B8A\u5316\u4E8B\u4EF6\n  handleResize = () => {\n    // \u91CD\u65B0\u6E32\u67D3\u7D44\u4EF6\u4EE5\u4F7F\u7528\u6B63\u78BA\u7684\u5716\u7247\n    this.forceUpdate();\n  }\n\n  startCarousel = () => {\n    this.carouselInterval = setInterval(() => {\n      const carouselImages = this.getCarouselImages();\n      this.setState(prevState => ({\n        currentSlide: (prevState.currentSlide + 1) % carouselImages.length\n      }));\n    }, 5000); // \u6BCF5\u79D2\u5207\u63DB\u4E00\u6B21\n  };\n\n  stopCarousel = () => {\n    if (this.carouselInterval) {\n      clearInterval(this.carouselInterval);\n    }\n  };\n\n  goToSlide = (index) => {\n    this.setState({ currentSlide: index });\n    this.stopCarousel();\n    this.startCarousel();\n  };\n\n  previousSlide = () => {\n    const carouselImages = this.getCarouselImages();\n    this.setState(prevState => ({\n      currentSlide: (prevState.currentSlide - 1 + carouselImages.length) % carouselImages.length\n    }));\n    this.stopCarousel();\n    this.startCarousel();\n  };\n\n  nextSlide = () => {\n    const carouselImages = this.getCarouselImages();\n    this.setState(prevState => ({\n      currentSlide: (prevState.currentSlide + 1) % carouselImages.length\n    }));\n    this.stopCarousel();\n    this.startCarousel();\n  };\n\n  showRefundModal = () => {\n    Swal.fire({\n      title: '<strong>\u95DC\u65BC\u6D88\u8CBB\u8005\u9000\u8CBB\u898F\u5B9A</strong>',\n      html: `\n        <div style=\"text-align: left; line-height: 1.8;\">\n          <p><strong>\u63D0\u4F9B30\u5929\u514D\u8CBB\u8A66\u7528\u7CFB\u7D71\uFF1A</strong><br/>\n          \u5BA2\u6236\u5728\u521D\u59CB\u8CFC\u8CB7\u6642\uFF0C\u6211\u5011\u6709\u63D0\u4F9B\u4E00\u500B\u6708\u7684\u5168\u529F\u80FD\u514D\u8CBB\u8A66\u7528\u671F\uFF0C\u8B93\u5BA2\u6236\u8003\u616E30\u5929\u5F8C\u624D\u9032\u884C\u8CFC\u8CB7\u4F7F\u7528\uFF0C\u82E530\u5929\u5F8C\u6C92\u6709\u8981\u7E7C\u7E8C\u4F7F\u7528\uFF0C\u5247\u4E0D\u9700\u8981\u652F\u4ED8\u4EFB\u4F55\u8CBB\u7528\u3002</p>\n          <p><strong>\u5BA2\u6236\u82E5\u8981\u63D0\u524D\u53D6\u6D88\u76F8\u95DC\u7CFB\u7D71\uFF1A\u300C\u6309\u671F\u4ED8\u8CBB\uFF0C\u4E0D\u9000\u5DF2\u4ED8\u300D</strong><br/>\n          \u5BA2\u6236\u96A8\u6642\u53EF\u4EE5\u53D6\u6D88\u8A02\u95B1\uFF0C\u4F46\u670D\u52D9\u6703\u6301\u7E8C\u5230\u7576\u524D\u5DF2\u4ED8\u8CBB\u9031\u671F\u7684\u7D50\u675F\u65E5\uFF0C\u4E0B\u4E00\u671F\u5C07\u4E0D\u518D\u7E8C\u8CBB\u3002</p>\n          <p><strong>\u91DD\u5C0D\u9810\u4ED8\u9577\u671F\u65B9\u6848\uFF08\u4F8B\u5982\u5E74\u8CBB\uFF09\uFF1A</strong><br/>\n          \u6309\u6BD4\u4F8B\u9000\u6B3E\uFF08\u4F46\u6309\u6708\u8CBB\u7387\u8A08\u7B97\uFF09\uFF1A \u7533\u8ACB\u9000\u8CBB\u5FC5\u9808\u63D0\u524D\u8AAA\u660E\uFF0C\u4F8B\u598211\u6708\u8981\u66AB\u505C\u4F7F\u7528\uFF0C\u9808\u65BC9\u6708\u5E95\u524D\u544A\u77E5\uFF0C\u4E26\u4E14\u8A08\u7B97\u523010\u6708\u4EFD\u8CBB\u7528\uFF0C\u5269\u9918\u6708\u4EFD\u9000\u8CBB\uFF0C\u4F9D\u64DA\u4F7F\u7528\u7684\u6708\u4EFD\u6309\u7167\u539F\u6708\u8CBB\u7387\uFF08\u901A\u5E38\u9AD8\u65BC\u5E74\u8CBB\u7684\u5E73\u5747\u6708\u8CBB\uFF09\u8A08\u7B97\uFF0C\u4E26\u4E14\u6263\u966410%\u7684\u76F8\u95DC\u8CBB\u7528\u3002</p>\n          <p><strong>\u9055\u898F\u6216\u7D42\u6B62\u5354\u8B70\uFF1A</strong><br/>\n          \u5982\u679C\u5BA2\u6236\u56E0\u9055\u53CD\u670D\u52D9\u689D\u6B3E\uFF08\u4F8B\u5982\u975E\u6CD5\u4F7F\u7528\u3001\u6FEB\u7528\u8CC7\u6E90\uFF09\u800C\u88AB\u5F37\u5236\u7D42\u6B62\u670D\u52D9\u3002\n          \u6B64\u7A2E\u60C5\u6CC1\u4E0B\uFF0C\u516C\u53F8\u5C07\u4E0D\u9000\u9084\u4EFB\u4F55\u5DF2\u4ED8\u8CBB\u7528\u3002</p>\n        </div>\n      `,\n      showCloseButton: true,\n      focusConfirm: false,\n      confirmButtonText: '\u4E86\u89E3'\n    });\n  }\n\n  componentDidMount() {\n    // \u958B\u59CB\u8F2A\u64AD\n    this.startCarousel();\n\n    // \u6DFB\u52A0\u87A2\u5E55\u5C3A\u5BF8\u8B8A\u5316\u76E3\u807D\u5668\n    window.addEventListener('resize', this.handleResize);\n\n    // \u52A0\u5165\u97FF\u61C9\u5F0F CSS \u548C hover \u6548\u679C\n    const style = document.createElement('style');\n    style.textContent = `\n      /* Carousel Styles */\n      .carousel-container {\n        position: relative;\n        width: 100%;\n        padding-bottom: 37.4%; /* \u96FB\u8166\u7248\u5716\u7247\u6BD4\u4F8B (718/1920 = 37.4%) */\n        overflow: hidden;\n        margin: 0;\n        background-color: #f8f9fa; /* \u7559\u767D\u5340\u57DF\u7684\u80CC\u666F\u8272 */\n      }\n\n      /* \u884C\u52D5\u88DD\u7F6E\u4F7F\u7528\u624B\u6A5F\u7248\u5716\u7247\u6BD4\u4F8B */\n      @media (max-width: 575.98px) {\n        .carousel-container {\n          padding-bottom: 53.33%; /* \u624B\u6A5F\u7248\u5716\u7247\u6BD4\u4F8B (1024/1920 = 53.33%) */\n        }\n      }\n\n      .carousel-slide {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        opacity: 0;\n        transition: opacity 1s ease-in-out;\n      }\n\n      .carousel-slide.active {\n        opacity: 1;\n      }\n\n      .carousel-slide img {\n        width: 100%;\n        height: 100%;\n        object-fit: contain; /* \u5B8C\u6574\u986F\u793A\u5716\u7247\uFF0C\u4E0D\u88C1\u5207 */\n      }\n\n      .carousel-indicators {\n        position: absolute;\n        bottom: 20px;\n        left: 50%;\n        transform: translateX(-50%);\n        display: flex;\n        gap: 10px;\n        z-index: 10;\n      }\n\n      .carousel-indicator {\n        width: 12px;\n        height: 12px;\n        border-radius: 50%;\n        background-color: rgba(255, 255, 255, 0.5);\n        cursor: pointer;\n        transition: all 0.3s ease;\n        border: none;\n        padding: 0;\n        outline: none;\n      }\n\n      .carousel-indicator.active {\n        background-color: rgba(255, 255, 255, 0.9);\n        transform: scale(1.2);\n      }\n\n      .carousel-indicator:hover {\n        background-color: rgba(255, 255, 255, 0.8);\n      }\n\n      .carousel-arrow {\n        position: absolute;\n        top: 50%;\n        transform: translateY(-50%);\n        background-color: rgba(0, 0, 0, 0.5);\n        color: white;\n        border: none;\n        width: 50px;\n        height: 50px;\n        border-radius: 50%;\n        cursor: pointer;\n        font-size: 1.5rem;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        transition: all 0.3s ease;\n        z-index: 10;\n      }\n\n      .carousel-arrow:hover {\n        background-color: rgba(0, 0, 0, 0.7);\n        transform: translateY(-50%) scale(1.1);\n      }\n\n      .carousel-arrow.left {\n        left: 20px;\n      }\n\n      .carousel-arrow.right {\n        right: 20px;\n      }\n\n      @media (max-width: 768px) {\n        /* \u884C\u52D5\u7248\u4E5F\u4F7F\u7528 16:9 \u6BD4\u4F8B */\n\n        .carousel-arrow {\n          width: 40px;\n          height: 40px;\n          font-size: 1.2rem;\n        }\n\n        .carousel-arrow.left {\n          left: 10px;\n        }\n\n        .carousel-arrow.right {\n          right: 10px;\n        }\n\n        .carousel-indicators {\n          bottom: 10px;\n        }\n\n        .carousel-indicator {\n          width: 10px;\n          height: 10px;\n          min-width: 10px;\n          min-height: 10px;\n        }\n      }\n\n      /* Feature Card Styles */\n      .welcome-features-grid > div {\n        position: relative;\n        overflow: hidden;\n      }\n\n      /* \u6838\u5FC3\u529F\u80FD\u7279\u8272 - \u85CD\u7DA0\u8272\u7CFB */\n      #features .welcome-features-grid > div::before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        height: 10px; \n        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);\n        border-radius: 8px 8px 0 0;\n      }\n\n      /* \u9069\u7528\u5C0D\u8C61 - \u6A59\u8272\u7CFB */\n      #target-audience .welcome-features-grid > div::before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        height: 10px;\n        background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%); \n        border-radius: 8px 8px 0 0;\n      }\n\n      /* Pricing Card Styles */\n      .welcome-pricing-grid > div {\n        position: relative;\n      }\n\n      /* \u65B9\u6848\u8207\u50F9\u683C - \u7D2B\u8272\u7CFB */\n      #pricing .welcome-pricing-grid > div::before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        height: 10px;\n        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n        border-radius: 16px 16px 0 0;\n        z-index: 0;\n      }\n\n      /* \u71B1\u9580\u65B9\u6848\u653E\u5927\u6548\u679C */\n      #pricing .welcome-pricing-grid > div:has(> div[style*=\"border: 3px solid\"]) {\n        transform: scale(1.08);\n        z-index: 10;\n      }\n\n      @media (max-width: 768px) {\n        #pricing .welcome-pricing-grid > div:has(> div[style*=\"border: 3px solid\"]) {\n          transform: scale(1.05);\n        }\n      }\n\n      /* Header Hover Effects */\n      .welcome-nav a {\n        text-decoration: none !important;\n      }\n\n      .welcome-logo-container {\n        text-decoration: none !important;\n      }\n\n      .welcome-logo-container img {\n        transition: all 0.3s ease !important;\n      }\n\n      .welcome-logo-container:hover img {\n        transform: scale(1.05) !important;\n        filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3)) !important;\n      }\n       \n      @media screen and (max-width: 767px) {\n        .welcome-logo-container {\n          display: none !important;\n        } \n      }\n\n      @media screen and (min-width: 768px) {\n        .phone-mode-favicon {\n          display: none !important; \n        }  \n      }\n\n      /* Navigation Button Hover Effects */\n      .nav-button-primary:hover {\n        background-color: #5a67d8 !important;\n        transform: translateY(-1px) !important;\n        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;\n      }\n      \n      .nav-button-secondary:hover {\n        background-color: #667eea !important;\n        color: white !important;\n        transform: translateY(-1px) !important;\n        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;\n      }\n      \n      .nav-link:hover {\n        background-color: #f7fafc !important;\n        color: #2d3748 !important;\n      }\n      \n      /* Desktop Logout Button Hover Effect */\n      .nav-button-logout:hover {\n        background-color: #dc3545 !important;\n        color: white !important;\n        transform: translateY(-1px) !important;\n        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;\n      }\n\n      /* Mobile Navigation Unified Styles */\n      @media (max-width: 768px) {\n        .welcome-nav {\n          flex-direction: column !important;\n          padding: 2rem 1rem !important;\n          gap: 1rem !important;\n        }\n        \n        .welcome-nav-links {\n          flex-direction: column !important;\n          gap: 0.75rem !important;\n          width: 100% !important;\n        }\n        \n        .welcome-nav-item {\n          text-align: center !important;\n          width: 100% !important;\n          display: flex !important;\n          justify-content: center !important;\n          align-items: center !important;\n        }\n        \n        /* Unified Mobile Button Styles */\n        .welcome-nav-item > *,\n        .welcome-nav-item > a,\n        .welcome-nav-item > span,\n        .welcome-sites-dropdown,\n        .welcome-sites-dropdown button {\n          width: 100% !important;\n          min-width: 200px !important;\n          max-width: 280px !important;\n          height: 48px !important;\n          display: flex !important;\n          align-items: center !important;\n          justify-content: center !important;\n          gap: 0.5rem !important; \n          border-radius: 8px !important;\n          font-size: 0.875rem !important;\n          font-weight: 600 !important;\n          text-decoration: none !important;\n          transition: all 0.2s ease !important;\n          box-sizing: border-box !important;\n          white-space: nowrap !important;\n        }\n        \n        /* Primary Button Style (\u85CD\u8272\u4E3B\u6309\u9215) */\n        .nav-button-primary {\n          background-color: #007bff !important;\n          color: white !important;\n          border: 2px solid #007bff !important;\n        }\n        \n        .nav-button-primary:hover {\n          background-color: #0056b3 !important;\n          border-color: #0056b3 !important;\n          transform: translateY(-1px) !important;\n        }\n        \n        /* Secondary Button Style (\u767D\u8272\u6B21\u6309\u9215 - \u7DAD\u6301\u684C\u9762\u7248\u7D2B\u8272\u8A2D\u8A08) */\n        .nav-button-secondary {\n          background-color: white !important;\n          color: #667eea !important;\n          border: 2px solid #667eea !important;\n        }\n        \n        .nav-button-secondary:hover {\n          background-color: #667eea !important;\n          color: white !important;\n          transform: translateY(-1px) !important;\n        }\n        \n        /* Info Button Style (\u8CC7\u8A0A\u6309\u9215) */\n        \n        \n        /* Logout Button Style (\u767B\u51FA\u6309\u9215) */\n        .nav-button-logout {\n          background-color: white !important;\n          color: #dc3545 !important;\n          border: 2px solid #dc3545 !important;\n        }\n        \n        .nav-button-logout:hover {\n          background-color: #dc3545 !important;\n          color: white !important;\n          transform: translateY(-1px) !important;\n        }\n        \n        .welcome-hero h1 {\n          font-size: 2rem !important;\n        }\n        \n        .welcome-hero h2 {\n          font-size: 1.2rem !important;\n        }\n        \n        .welcome-hero-buttons {\n          flex-direction: column !important;\n          align-items: center !important;\n        }\n        \n        .welcome-hero-buttons > * {\n          width: 100% !important;\n          max-width: 300px !important;\n          text-align: center !important;\n        }\n        \n        .welcome-section {\n          padding: 2rem 1rem !important;\n        }\n        \n        .welcome-features-grid {\n          grid-template-columns: 1fr !important;\n        }\n        \n        .welcome-contact-grid {\n          grid-template-columns: 1fr !important;\n        }\n\n        .welcome-pricing-grid {\n          grid-template-columns: 1fr !important;\n        }\n\n        /* Sites Dropdown Menu Text Alignment - Force Left Alignment */\n        .welcome-sites-dropdown .siteMenuItem,\n        .welcome-sites-dropdown a,\n        .welcome-sites-dropdown div {\n          text-align: left !important;\n        }\n      }\n      \n      @media (max-width: 480px) {\n        .welcome-nav {\n          padding: 1rem 0.5rem !important;\n        }\n\n        .welcome-logo-container img {\n          height: 35px !important;\n          width: auto !important;\n        }\n\n        .welcome-hero {\n          padding: 3rem 1rem !important;\n        }\n\n        .welcome-hero h1 {\n          font-size: 1.8rem !important;\n        }\n\n        .welcome-hero h2 {\n          font-size: 1rem !important;\n        }\n      }\n    `;\n    document.head.appendChild(style);\n  }\n\n  componentWillUnmount() {\n    // \u6E05\u7406\u8A08\u6642\u5668\n    this.stopCarousel();\n\n    // \u79FB\u9664\u87A2\u5E55\u5C3A\u5BF8\u8B8A\u5316\u76E3\u807D\u5668\n    window.removeEventListener('resize', this.handleResize);\n  }\n\n  render() {\n    const { current_user, sites, charged_plans, default_membership_limit } = this.props.reactProps;\n\n    const styles = welcomeStyles;\n    // \u5E73\u6ED1\u6EFE\u52D5\u5230\u6307\u5B9A\u5340\u584A\n    const scrollToSection = (sectionId) => {\n      const element = document.getElementById(sectionId);\n      if (element) {\n        element.scrollIntoView({\n          behavior: 'smooth',\n          block: 'start'\n        });\n      }\n    };\n\n    return (\n      <div style={styles.container}>\n        <header>\n          <nav style={styles.nav} className=\"welcome-nav\">\n            <a href=\"/\" style={styles.logoContainer} className=\"welcome-logo-container\">\n              <img src=\"/favicon.png\" alt=\"ShowCard\" style={{ height: '70px', width: 'auto' }} />\n              <span style={{ fontWeight: '700', fontSize: '1.5rem', color: '#1a202c', marginLeft: '0px' }}>ShowCard</span>\n            </a>\n            <div style={styles.navLinks} className=\"welcome-nav-links\">\n              {current_user ? (\n                <> \n                  <div className=\"welcome-nav-item\">\n                    <span style={styles.userInfo} className=\"nav-button-info\">\n                      <img className=\"phone-mode-favicon\" src=\"/favicon.png\" alt=\"ShowCard\" style={{ height: '54px', width: 'auto' }} />\n \n                      <i className=\"bi bi-person-circle\" style={{ fontSize: '1rem', marginRight: '3px', position: 'relative', top: '2px' }}></i>\n                      \u4F60\u597D, {current_user.mobile}\n                    </span>\n                  </div> \n                  <div className=\"welcome-nav-item\">\n                    <SitesDropdown sites={sites} adminPath={current_user && current_user.admin_path} />\n                  </div>\n                  <div className=\"welcome-nav-item\">\n                    <a href=\"/sites/new\" style={styles.navButtonSecondary} className=\"nav-button-secondary\" target=\"_blank\">\n                      <i className=\"bi bi-plus-circle\" style={{ fontSize: '1rem', marginRight: '3px', position: 'relative', top: '2px' }}></i>\n                      \u7533\u8ACB\u5546\u5BB6\n                    </a>\n                  </div> \n                  <div className=\"welcome-nav-item\">\n                    <a href=\"/users/sign_out\" data-turbo-method=\"delete\" style={{...styles.navLink, backgroundColor: \"white\" }} className=\"nav-button-logout\">\n                      <i className=\"bi bi-box-arrow-right\" style={{ fontSize: '1rem', marginRight: '3px', position: 'relative', top: '2px' }}></i>\n                      \u767B\u51FA\n                    </a>\n                  </div>\n                </>\n              ) : (\n                <>\n                  <div className=\"welcome-nav-item\">\n                    <a href=\"/users/sign_in\" style={styles.navButton} className=\"nav-button-primary\">\n                      <i className=\"bi bi-box-arrow-in-right\" style={{ fontSize: '1rem', marginRight: '5px', position: 'relative', top: '1px' }}></i>\n                      <span style={{ lineHeight: 1 }}>\u5546\u5BB6\u767B\u5165</span>\n                    </a>\n                  </div>\n                  <div className=\"welcome-nav-item\">\n                    <a href=\"/sites/new\" style={styles.navButtonSecondary} className=\"nav-button-secondary\">\n                      <i className=\"bi bi-plus-circle\" style={{ fontSize: '1rem', marginRight: '5px', position: 'relative', top: '1px' }}></i> \n                      <span style={{ lineHeight: 1 }}>\u7533\u8ACB\u5546\u5BB6</span>\n                    </a>\n                  </div>\n                </>\n              )}\n            </div>\n          </nav>\n        </header>\n\n        <main>\n          {/* \u8F2A\u64AD\u5716\u7247\u5340\u584A */}\n          <section className=\"carousel-container\">\n            {this.getCarouselImages().map((image, index) => (\n              <div\n                key={index}\n                className={`carousel-slide ${index === this.state.currentSlide ? 'active' : ''}`}\n              >\n                <img src={image} alt={`\u8F2A\u64AD\u5716\u7247 ${index + 1}`} />\n              </div>\n            ))}\n\n            {/* \u5DE6\u53F3\u7BAD\u982D */}\n            <button\n              className=\"carousel-arrow left\"\n              onClick={this.previousSlide}\n              aria-label=\"\u4E0A\u4E00\u5F35\"\n            >\n              &#8249;\n            </button>\n            <button\n              className=\"carousel-arrow right\"\n              onClick={this.nextSlide}\n              aria-label=\"\u4E0B\u4E00\u5F35\"\n            >\n              &#8250;\n            </button>\n\n            {/* \u6307\u793A\u5668 */}\n            <div className=\"carousel-indicators\">\n              {this.getCarouselImages().map((_, index) => (\n                <button\n                  key={index}\n                  className={`carousel-indicator ${index === this.state.currentSlide ? 'active' : ''}`}\n                  onClick={() => this.goToSlide(index)}\n                  aria-label={`\u524D\u5F80\u7B2C ${index + 1} \u5F35`}\n                />\n              ))}\n            </div>\n          </section>\n\n          <section style={styles.hero} className=\"welcome-hero\">\n            <motion.h1 style={styles.heroH1} {...fadeDown}>ShowCard - \u667A\u80FD\u6703\u54E1\u7BA1\u7406\u7CFB\u7D71</motion.h1>\n            <div style={{maxWidth: '900px', margin: '0 auto', lineHeight: '1.8'}}>\n              <motion.p style={{fontSize: '1.2rem', color: '#34495e', marginBottom: '1rem'}} {...fadeUp} transition={{ ...fadeUp.transition, delay: 0.1 }}>\n                \u5E02\u5834\u4E2D\u5546\u54C1\u6210\u5343\u4E0A\u842C,\u6D88\u8CBB\u8005\u662F\u5426\u8CB7\u55AE?\u662F\u5426\u4E3B\u52D5\u7A4D\u6975?<br/>\n                \u53D6\u6C7A\u65BC\u5E02\u5834\u662F\u5426\u6EFF\u8DB3\u6D88\u8CBB\u8005\u5167\u5FC3\u7684\u9700\u6C42\u8207\u7167\u9867\u3002\n              </motion.p>\n              <motion.p style={{fontSize: '1.1rem', color: '#555', marginBottom: '1rem'}} {...fadeUp} transition={{ ...fadeUp.transition, delay: 0.2 }}>\n                ShowCard\u662F\u4E00\u6B3E\u4EE5\u4EBA\u70BA\u672C\u7684\u5E97\u5BB6\u6703\u54E1\u5361app,\u6211\u5011\u4EE5\u6D88\u8CBB\u8005\u70BA\u4E3B\u9AD4,<br/>\n                \u9032\u800C\u8A2D\u8A08\u9019\u4E00\u6B3E\u96FB\u5B50\u5316\u6703\u54E1\u5361\u7684\u6703\u54E1\u4FC3\u92B7\u7BA1\u7406\u7CFB\u7D71\u3002\n              </motion.p>\n              <motion.p style={{fontSize: '1rem', color: '#666'}} {...fadeUp} transition={{ ...fadeUp.transition, delay: 0.3 }}>\n                \u4E3B\u8981\u662F\u7528\u4F86\u53D6\u4EE3\u50B3\u7D71\u5BE6\u9AD4\u6703\u54E1\u5361,\u4E14\u5C07\u5BA3\u50B3\u8207\u4FC3\u92B7\u5F62\u5F0F\u904B\u7528\u5728\u624B\u6A5F\u3001App\u3001LINE \u4E2D\u5448\u73FE,<br/>\n                \u9664\u4E86\u57FA\u672C\u7684\u6703\u54E1\u8B58\u5225\u529F\u80FD\u5916,\u9084\u53EF\u7D50\u5408\u4FC3\u92B7\u3001\u56DE\u994B\u8207\u6578\u64DA\u8FFD\u8E64\u7B49\u670D\u52D9\u3002\n              </motion.p>\n            </div>\n            <motion.div {...zoomIn} transition={{ ...zoomIn.transition, delay: 0.4 }}>\n            <div style={{ display: 'flex', gap: '1rem', justifyContent: 'center', flexWrap: 'wrap', marginTop: '2rem', marginBottom: '2rem' }} className=\"welcome-hero-buttons\">\n              <SmoothScrollButton \n                onClick={() => scrollToSection('features')} \n                style={styles.button}\n              >\n                \u63A2\u7D22\u6838\u5FC3\u529F\u80FD\n              </SmoothScrollButton>\n              <SmoothScrollButton\n                onClick={() => scrollToSection('target-audience')}\n                style={{...styles.button, backgroundColor: '#2c3e50'}}\n              >\n                \u4E86\u89E3\u9069\u7528\u5C0D\u8C61\n              </SmoothScrollButton>\n              <SmoothScrollButton\n                onClick={() => scrollToSection('pricing')}\n                style={{...styles.button, backgroundColor: '#28a745'}}\n              >\n                \u67E5\u770B\u65B9\u6848\u50F9\u683C\n              </SmoothScrollButton>\n              <SmoothScrollButton\n                onClick={() => scrollToSection('contact')}\n                style={{...styles.button, backgroundColor: '#ff6b35'}}\n              >\n                \u806F\u7D61\u6211\u5011\n              </SmoothScrollButton>\n            </div>\n            </motion.div>\n          </section>\n\n          <section id=\"features\" style={styles.section} className=\"welcome-section\">\n            <motion.h2 style={styles.sectionTitle} {...fadeUp}>\u6838\u5FC3\u529F\u80FD\u7279\u8272</motion.h2>\n            <div style={styles.featuresGrid} className=\"welcome-features-grid\">\n              <Feature image=\"/home_page_feature/5.png\" title=\"\u591A\u5143\u8EAB\u4EFD\u9A57\u8B49\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0 }}}>\n                \u6574\u5408 LINE \u767B\u5165\u8207\u624B\u6A5F\u865F\u78BC\u8A8D\u8B49\uFF0C\u63A1\u7528 JWT \u4EE4\u724C\u8207\u52A0\u5BC6\u5132\u5B58\uFF0C\u517C\u9867\u4FBF\u5229\u8207\u5B89\u5168\u3002\n              </Feature>\n              <Feature image=\"/home_page_feature/4.png\" title=\"\u667A\u80FD QR \u78BC\u7CFB\u7D71\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0.1 }}}>\n                \u57FA\u65BC Vision Camera \u7684\u9AD8\u6548\u6383\u63CF\u5F15\u64CE\uFF0C\u81EA\u52D5\u8B58\u5225\u5167\u5BB9\uFF0C\u4E26\u70BA\u5E97\u5BB6\u751F\u6210\u5C08\u5C6C QR \u78BC\u3002\n              </Feature>\n              <Feature image=\"/home_page_feature/3.png\" title=\"\u96D9\u6A21\u5F0F\u71DF\u904B\u67B6\u69CB\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0.2 }}}>\n                \u63D0\u4F9B\u5B8C\u6574\u7684\u524D\u53F0\u5BA2\u6236\u9AD4\u9A57\uFF08\u63A2\u7D22\u5E97\u5BB6\u3001\u700F\u89BD\u512A\u60E0\uFF09\u8207\u5F8C\u53F0\u7BA1\u7406\u529F\u80FD\uFF08\u6703\u54E1\u3001\u5E97\u5BB6\u3001\u6578\u64DA\uFF09\u3002\n              </Feature>\n              <Feature image=\"/home_page_feature/6.png\" title=\"\u500B\u4EBA\u5316\u5C08\u5C6C\u9AD4\u9A57\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0.3 }}}>\n                \u52D5\u614B\u4E3B\u984C\u3001\u7121\u969C\u7919\u5B57\u9AD4\u8ABF\u6574\u3001\u8DE8\u5E73\u53F0\u97FF\u61C9\u5F0F\u4ECB\u9762\u8207 Firebase \u5373\u6642\u63A8\u64AD\u901A\u77E5\u3002\n              </Feature>\n              <Feature image=\"/home_page_feature/2.png\" title=\"\u79D1\u6280\u5316\u4FC3\u92B7\u6D3B\u52D5\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0.4 }}}>\n                \u63D0\u4F9B\u591A\u5143\u8A2D\u5B9A\u7684\u4FC3\u92B7\u6A21\u5F0F\uFF0C\u91DD\u5C0D\u65B0\u5BA2\u6236\u3001\u8001\u5BA2\u6236\u9700\u6C42\n              </Feature>\n              <Feature image=\"/home_page_feature/1.png\" title=\"\u6574\u5408\u670D\u52D9\u80FD\u529B\" motionProps={{...fadeUp, transition: { ...fadeUp.transition, delay: 0.5 }}}>\n                \u6574\u5408\u5730\u7406\u4F4D\u7F6E\u3001\u5716\u50CF\u8655\u7406\u3001Firebase \u63A8\u64AD\u7B49\u670D\u52D9\u3002\n              </Feature>\n            </div>\n          </section>\n\n          <section id=\"target-audience\" style={{ ...styles.section }} className=\"welcome-section\">\n            <motion.h2 style={styles.sectionTitle} {...fadeUp}>\u9069\u7528\u5C0D\u8C61</motion.h2>\n            <div style={styles.featuresGrid} className=\"welcome-features-grid\">\n              <Feature image=\"/home_page_target/1.png\" title=\"\u96F6\u552E\u5546\u5BB6\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0 }}}>\n                \u9069\u5408\u5404\u985E\u96F6\u552E\u5E97\u9762\uFF0C\u5305\u542B\u670D\u98FE\u30013C\u3001\u751F\u6D3B\u7528\u54C1\u7B49\uFF0C\u900F\u904E\u6703\u54E1\u7BA1\u7406\u63D0\u5347\u9867\u5BA2\u56DE\u8CFC\u7387\u8207\u5FE0\u8AA0\u5EA6\u3002\n              </Feature>\n              <Feature image=\"/home_page_target/2.png\" title=\"\u9910\u98F2\u696D\u8005\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0.1 }}}>\n                \u63D0\u4F9B\u9910\u5EF3\u3001\u5496\u5561\u5EF3\u3001\u98F2\u6599\u5E97\u7B49\u9910\u98F2\u696D\u8005\u5B8C\u6574\u7684\u6703\u54E1\u4FC3\u92B7\u529F\u80FD\uFF0C\u8F15\u9B06\u7BA1\u7406\u8001\u9867\u5BA2\u8207\u65B0\u5BA2\u6E90\u3002\n              </Feature>\n              <Feature image=\"/home_page_target/3.png\" title=\"\u670D\u52D9\u696D\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0.2 }}}>\n                \u9069\u7528\u65BC\u7F8E\u5BB9\u7F8E\u9AEE\u3001\u5065\u8EAB\u623F\u3001\u8A3A\u6240\u7B49\u670D\u52D9\u578B\u7522\u696D\uFF0C\u6709\u6548\u8FFD\u8E64\u5BA2\u6236\u6D88\u8CBB\u8A18\u9304\u8207\u504F\u597D\u3002\n              </Feature>\n              <Feature image=\"/home_page_target/4.png\" title=\"\u9023\u9396\u4F01\u696D\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0.3 }}}>\n                \u652F\u63F4\u591A\u5E97\u7BA1\u7406\u529F\u80FD\uFF0C\u8B93\u9023\u9396\u54C1\u724C\u80FD\u7D71\u4E00\u7BA1\u7406\u6703\u54E1\u8CC7\u6599\uFF0C\u4E26\u5F48\u6027\u8A2D\u5B9A\u5404\u5E97\u4FC3\u92B7\u6D3B\u52D5\u3002\n              </Feature>\n              <Feature image=\"/home_page_target/5.png\" title=\"\u5C45\u5BB6\u670D\u52D9\u8207\u7DAD\u4FEE\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0.4 }}}>\n                \u5C08\u70BA\u6C34\u96FB\u3001\u51B7\u6C23\u7DAD\u4FEE\u3001\u6E05\u6F54\u670D\u52D9\u7B49\u5C45\u5BB6\u7DAD\u8B77\u696D\u8005\u8A2D\u8A08\uFF0C\u8F15\u9B06\u5EFA\u7ACB\u5BA2\u6236\u8CC7\u6599\u5EAB\uFF0C\u5B9A\u671F\u63A8\u64AD\u4FDD\u990A\u63D0\u9192\u8207\u512A\u60E0\u8A0A\u606F\u3002\n              </Feature>\n              <Feature image=\"/home_page_target/6.png\" title=\"\u65C5\u904A\u8207\u7968\u52D9\u5A1B\u6A02\" motionProps={{...flipLeft, transition: { ...flipLeft.transition, delay: 0.5 }}}>\n                \u9069\u5408\u65C5\u884C\u793E\u3001\u666F\u9EDE\u9580\u7968\u8CA9\u552E\u3001\u96FB\u5F71\u9662\u3001\u5C55\u89BD\u7B49\u5A1B\u6A02\u7522\u696D\uFF0C\u63D0\u4F9B\u6703\u54E1\u5C08\u5C6C\u512A\u60E0\u8207\u6D3B\u52D5\u901A\u77E5\uFF0C\u63D0\u5347\u5BA2\u6236\u53C3\u8207\u5EA6\u3002\n              </Feature>\n            </div>\n          </section>\n\n          <section id=\"pricing\" style={{ ...styles.pricingSection, backgroundColor: \"white\" }} className=\"welcome-section\">\n            <div style={styles.pricingContainer}>\n              <motion.h2 style={styles.sectionTitle} {...fadeUp}>\u65B9\u6848\u8207\u50F9\u683C</motion.h2>\n              <p style={{fontSize: '1.1rem', color: '#6c757d', textAlign: 'center', marginBottom: '1rem'}}>\n                \u95DC\u65BCShowCard\u7684\u6536\u8CBB\u90E8\u5206\u4E3B\u8981\u6709\u63D0\u4F9B\u4EE5\u4E0B\u5E7E\u7A2E\uFF1A<br/>\u5E97\u5BB6\u53EF\u4EE5\u6839\u64DA\u4E0B\u65B9\u6536\u8CBB\u65B9\u6848\uFF0C\u9078\u64C7\u6700\u9069\u5408\u5546\u5BB6\u898F\u6A21\u7684\u65B9\u6848\uFF0C\u9748\u6D3B\u64F4\u5C55\u6703\u54E1\u7BA1\u7406\u9700\u6C42\n              </p>\n              <div style={styles.pricingGrid} className=\"welcome-pricing-grid\">\n                {/* \u514D\u8CBB\u8A66\u7528\u65B9\u6848 */}\n                <PricingCard\n                  key=\"free-trial\"\n                  plan={{\n                    id: 'free-trial',\n                    name: '\u514D\u8CBB\u8A66\u7528',\n                    total_amount: 0,\n                    months: 1,\n                    max_membership_count: default_membership_limit\n                  }}\n                  isPopular={false}\n                  motionProps={{...zoomIn, transition: { ...zoomIn.transition, delay: 0 }}}\n                  scrollToSection={scrollToSection}\n                />\n\n                {/* \u8CC7\u6599\u5EAB\u4E2D\u7684\u4ED8\u8CBB\u65B9\u6848 */}\n                {charged_plans && charged_plans.map((plan, index) => (\n                  <PricingCard\n                    key={plan.id}\n                    plan={plan}\n                    isPopular={false}\n                    motionProps={{...zoomIn, transition: { ...zoomIn.transition, delay: (index + 1) * 0.15 }}}\n                    scrollToSection={scrollToSection}\n                  />\n                ))}\n\n                {/* \u5BA2\u88FD\u5316\u65B9\u6848 */}\n                <PricingCard\n                  key=\"custom\"\n                  plan={{\n                    id: 'custom',\n                    name: '\u5BA2\u88FD\u5316\u65B9\u6848',\n                    total_amount: null,\n                    months: 12,\n                    max_membership_count: null\n                  }}\n                  isPopular={false}\n                  motionProps={{...zoomIn, transition: { ...zoomIn.transition, delay: ((charged_plans ? charged_plans.length : 0) + 1) * 0.15 }}}\n                  scrollToSection={scrollToSection}\n                />\n              </div>\n              <p style={styles.pricingNote}>\n                \uD83D\uDCA1 \u63D0\u793A\uFF1A\u514D\u8CBB\u8A66\u7528\u671F\u9593\u53EF\u9AD4\u9A57\u5B8C\u6574\u529F\u80FD\u3002\u5982\u9700\u66F4\u5927\u5BB9\u91CF\u6216\u5BA2\u88FD\u5316\u65B9\u6848\uFF0C\u6B61\u8FCE\u806F\u7E6B\u6211\u5011\u3002\n              </p>\n              <div style={{...styles.aboutRefund, marginTop: '1rem', cursor: 'pointer', color: '#007bff'}} onClick={this.showRefundModal}>\n                \u9EDE\u6B64\u986F\u793A\u95DC\u65BC\u9000\u8CBB\u898F\u5B9A\n              </div>\n            </div>\n          </section>\n\n          <section id=\"contact\" style={{ ...styles.contactSection, backgroundColor: \"rgb(241 241 241)\" }}>\n            <div style={styles.contactContainer}>\n              <motion.h2 style={styles.sectionTitle} {...fadeUp}>\u806F\u7D61\u6211\u5011</motion.h2>\n              <p style={{fontSize: '1.1rem', color: '#6c757d', marginBottom: '2rem'}}>\n                \u6709\u4EFB\u4F55\u554F\u984C\u6216\u9700\u8981\u5354\u52A9\uFF1F\u6211\u5011\u7684\u5C08\u696D\u5718\u968A\u96A8\u6642\u70BA\u60A8\u670D\u52D9\n              </p>\n              <div style={styles.contactGrid} className=\"welcome-contact-grid\">\n                <ContactCard\n                  icon={ false ? \"\uD83D\uDCD8\" : \"/home_page_contact/1.png\" }\n                  title=\"\u7DDA\u4E0A\u5BA2\u670D\"\n                  width=\"180px\"\n                  link=\"https://www.facebook.com/Showcard888/\"\n                  linkText=\"Showcard\u7C89\u7D72\u5C08\u9801\"\n                  description=\"\u6B61\u8FCE\u900F\u904EFacebook\u7C89\u7D72\u5C08\u9801\u8207\u6211\u5011\u5373\u6642\u5C0D\u8A71\u8207\u6D3D\u8A62\uFF0C\u8B1D\u8B1D\"\n                  isEmail={false}\n                  motionProps={{...flipLeft, transition: { ...fadeUp.transition, delay: 0 }}}\n                />\n                <ContactCard\n                  icon={ false ? \"\u2709\uFE0F\" : \"/home_page_contact/2.png\" }\n                  title=\"\u5BA2\u670D\u4FE1\u7BB1\"\n                  width=\"120px\"\n                  link=\"showcardwang@gmail.com\"\n                  linkText=\"showcardwang@gmail.com\"\n                  description=\"\u7121\u8AD6\u4EFB\u4F55\u554F\u984C\uFF0C\u6B61\u8FCE\u5BC4\u9001\u90F5\u4EF6\u5230\u5BA2\u670D\u4FE1\u7BB1\uFF0C\u6211\u5011\u5C07\u76E1\u5FEB\u56DE\u8986\u60A8\"\n                  isEmail={true}\n                  motionProps={{...flipLeft, transition: { ...fadeUp.transition, delay: 0.2 }}}\n                />\n              </div>\n            </div>\n          </section>\n        </main>\n\n        <motion.footer style={styles.footer} {...fadeUp}>\n          <p>&copy; {new Date().getFullYear()} ShowCard. All Rights Reserved.</p>\n          <p style={{marginTop: '0.5rem'}}>\n            <a\n              href=\"/privacy_and_terms\"\n              target=\"_blank\"\n              style={{\n                color: 'black',\n                textDecoration: 'none',\n                fontSize: '0.9rem',\n                transition: 'color 0.3s ease'\n              }}\n              onMouseOver={(e) => e.target.style.color = 'blue'}\n              onMouseOut={(e) => e.target.style.color = 'black'}\n            >\n              \u96B1\u79C1\u6B0A\u653F\u7B56\u8207\u670D\u52D9\u689D\u6B3E\n            </a>\n          </p>\n        </motion.footer>\n      </div>\n    );\n  }\n}\n\nwindow.reactComponents = window.reactComponents ? window.reactComponents : {};\nwindow.reactComponents.WelcomeIndex = WelcomeIndex;", "const CONSTANTS = {\n\tSite: {\n\t\tINVOICE_TYPE: {\n\t    \"\u4E8C\u806F\u5F0F\u767C\u7968\" : 1,\n\t    \"\u4E09\u806F\u5F0F\u767C\u7968\" : 2,\n\t    \"\u6350\u8D08\u767C\u7968\" : 3\n\t\t},\n\t\tINVOICE_CARRIER_TYPE: {\n\t    \"\u624B\u6A5F\u689D\u78BC\" : 0,\n\t    \"\u81EA\u7136\u4EBA\u6191\u8B49\u689D\u78BC\" : 1,\n\t    \"\u5EE0\u5546\u96FB\u5B50\u767C\u7968\u8F09\u5177\" : 2\n\t\t}\n\t},\n\tRole: {\n\t\tTYPE : {\n\t\t\t\"\u6700\u9AD8\u7BA1\u7406\u8005\" : \"admin\",\n\t\t\t\"\u7CFB\u7D71\u7BA1\u7406\u8005\" : \"manager\",\n\t\t\t\"\u7DB2\u7AD9\u7BA1\u7406\u8005\" : \"site_manager\",\n\t\t\t\"\u8CC7\u6DF1\u5BA2\u670D\u4EBA\u54E1\" : \"senior_service_staff\",\n\t\t\t\"\u5BA2\u670D\u4EBA\u54E1\" : \"service_staff\",\n\t\t\t\"\u516C\u544A\u7BA1\u7406\u4EBA\u54E1\" : \"news_staff\",\n\t\t\t\"\u6703\u8A08\u4EBA\u54E1\" : \"account_staff\"\n\t\t}\n\t},\n\tNews: {\n\t\tSCOPE: {\n\t\t\t\"\u5168\u90E8\" : 1,\n\t\t\t\"\u524D\u53F0\" : 2,\n\t\t\t\"\u5F8C\u53F0\" : 3\n\t\t}\n\t},\n\tCoupon: {\n    TYPE_CODE : {\n      \"\u6703\u54E1\u512A\u60E0\" : 1,\n      \"\u521D\u6B21\u52A0\u5165\u6703\u54E1\u512A\u60E0\" : 2,\n      \"\u4E00\u822C\u512A\u60E0\" : 3,\n    },\n    EXPIRED_TYPE : {\n      \"\u56FA\u5B9A\u671F\u9650\" : 0,\n      \"\u76F8\u5C0D\u671F\u9650\" : 1,\n    },\n    EXPIRED_DURATION_UNIT : {\n      \"\u5C0F\u6642\" : 0,\n      \"\u5929\" : 1,\n      \"\u6708\" : 2,\n      \"\u5E74\" : 3,\n    },\n\t},\n\tChargedRecord : {\n\t\tPAY_METHOD : {\n\t\t\t\"\u532F\u6B3E\" : 1,\n\t\t\t\"\u7DDA\u4E0A\u7E73\u8CBB\" : 2\n\t\t},\n\t  RECORD_TYPE : {\n\t    \"\u7CFB\u7D71\u4F7F\u7528\u8CBB\" : 0,\n\t    \"\u5176\u4ED6\" : 1,\n\t    \"line\u52A0\u8CFC\" : 2,\n\t    \"\u51FA\u8CA8\u6A5F\u52A0\u8CFC\" : 3,\n\t    \"\u5BA2\u88FD\u4ED8\u8CBB\" : 4\n\t  }\n\t}\n}\n\nexport { CONSTANTS }", "import React from 'react'\nimport ReactDOM from \"react-dom\"; \n\nclass SearchMenu extends React.Component {\n  constructor(props) {\n    super(props);\n    let { settings } = this.props;\n \n    this.state = {\n      data : settings\n    } \n  }\n\n  componentDidMount() {  \n\n  }\n \n  createDom(obj,index) {\n    let that = this; \n\n    switch(obj.type) {\n      case \"input\": \n        return <div key={index} className=\"form-group\"> \n            <label style={{ marginLeft: \"3px\"}}>{obj.title}</label>\n            <input style={{ marginLeft: \"3px\"}} type=\"text\" className=\"form-control\" name={obj.name} placeholder={obj.placeholder} value={obj.value} onChange={(e)=>{that.state.data[index] = { ...obj, value: e.target.value }; that.setState({data: that.state.data});}}></input>\n          </div> \n      case \"select\": \n        return <div key={index} className=\"form-group\">\n          {obj.showTitle &&\n            <label style={{ marginLeft: \"3px\"}}>{obj.title}</label> \n          }\n          <select style={{ marginLeft: \"3px\"}} name={obj.name} className=\"form-control\" value={obj.value} onChange={(e)=>{that.state.data[index] = { ...obj, value: e.target.value }; that.setState({data: that.state.data});}}>\n            {obj.defaultOption != undefined && <option value={obj.defaultOption.value}>{obj.defaultOption.name}</option>}\n            { obj.options.map((option, opInx) => \n              Array.isArray(option) ? <option key={opInx} value={option[1]}>{option[0]}</option> : <option key={opInx} value={option.value}>{option.name}</option>\n            )}     \n          </select>\n        </div>  \n      case \"date\": \n        return <div key={index} className=\"form-group p-t-sm\"> \n          <label style={{ marginLeft: \"3px\"}}>{obj.title}</label> \n          <div className=\"pos-r\" style={{display: \"inherit\"}}> \n            <span style={{ zIndex: \"9999\"}} className=\"arrow-warning border start-date-notice rounded pos-r sq-64\">\n              <span className=\"notice-content\" >\u82E5\u67E5\u7121\u8CC7\u6599\uFF0C\u53EF\u8ABF\u6574\u65E5\u671F\u518D\u6B21\u67E5\u8A62</span>\n              <span className=\"arrow-down arrow-warning left\"></span> \n            </span>\n            {obj.startDate && obj.startDate.match(/^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$/) == null &&\n              <span style={{ zIndex: \"9999\"}} className=\"arrow-warning border start-date-notice rounded pos-r sq-64\">\n                <span className=\"notice-content\" >\u8ACB\u6B63\u78BA\u586B\u5BEB\u65E5\u671F</span>\n                <span className=\"arrow-down arrow-warning left\"></span> \n              </span>\n            }\n            <input data-index={index} data-name={ \"startDate\" } style={{ marginLeft: \"3px\",marginRight: \"3px\"}} name={obj.startName} type=\"text\" className=\"form-control input-small\"  autoComplete=\"off\" ref= {that.plugIn} value={obj.startDate} onChange={(e)=>{that.state.data[index] = { ...obj, startDate: e.target.value }; that.setState({data: that.state.data});}}/>\n            ~\n            {obj.endDate && obj.endDate.match(/^((19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01]))*$/) == null &&\n              <span style={{ zIndex: \"9999\"}} className=\"arrow-warning border start-date-notice rounded pos-r sq-64\">\n              <span className=\"notice-content\" >\u8ACB\u6B63\u78BA\u586B\u5BEB\u65E5\u671F</span>\n              <span className=\"arrow-down arrow-warning left\"></span> \n            </span>\n            }\n            {obj.startDate && obj.endDate && obj.startDate > obj.endDate &&\n              <span style={{ zIndex: \"9999\"}} className=\"arrow-warning border start-date-notice rounded pos-r sq-64\">\n                <span className=\"notice-content\" >\u8FC4\u65E5\u5FC5\u9808\u5927\u65BC\u8D77\u65E5</span>\n                <span className=\"arrow-down arrow-warning left\"></span> \n              </span>\n            }\n            <input data-index={index} data-name={ \"endDate\" } style={{ marginLeft: \"3px\"}}  name={obj.endName} type=\"text\" className=\"form-control input-small\" autoComplete=\"off\" ref= {that.plugIn} value={obj.endDate} onChange={(e)=>{that.state.data[index] = { ...obj, endDate: e.target.value }; that.setState({data: that.state.data});}}/>\n          </div>  \n        </div>         \n      case \"productTagSelect\": \n        return <div key={index} className=\"form-group\">\n          {obj.showTitle &&\n            <label style={{ marginLeft: \"3px\", marginRight: \"3px\"}}>{obj.title}</label> \n          }\n          <select className=\"form-control\" value={ obj.value } name={obj.name} onChange={(e)=>{that.state.data[index] = { ...obj, value: e.target.value }; that.setState({data: that.state.data});}}> \n            <option value=\"\">\u8ACB\u9078\u64C7</option>  \n            { obj.productTags.filter((v,i)=>{ return (v[\"product_category_id\"] ?? \"\" ) == \"\" }).length > 0 && \n              <optgroup label=\"\u7121\u5206\u985E\">\n                { obj.productTags.map((tag, index2) =>  \n                  <option className={ `${ (tag[\"product_category_id\"] ?? \"\" ) == \"\" ? \"\" : \"hide\" }` } value={ tag[\"id\"] } key={ index2 }>{ tag[\"name\"] }</option>\n                )}\n              </optgroup>\n            } \n            { obj.productCategories.map((product_category, index) =>  \n              <optgroup key={ index } label={ product_category.name }>\n                { obj.productTags.map((tag, index2) =>  \n                  <option className={ `${ tag[\"product_category_id\"] == product_category.id ? \"\" : \"hide\" }` } value={ tag[\"id\"] } key={ index2 }>{ tag[\"name\"] }</option>\n                )}\n              </optgroup> \n            )} \n          </select>\n        </div>\n\n    }\n  }\n\n  render () {  \n    let { data } = this.state; \n\n    return <React.Fragment>\n      { data.map((dom, index) => \n        this.createDom(dom,index)\n      )}\n    </React.Fragment>;\n  }   \n}\n\nSearchMenu.defaultProps = {\n  settings: [], \n};\n\nexport { SearchMenu }  \n", "import React from 'react'\nimport ReactDOM from \"react-dom\"; \n \nclass Paginate extends React.Component {\n  constructor(props) {\n    super(props); \n    let { currentPage } = this.props;\n\n    this.state = { \n      inputPage: currentPage\n    }\n    this.changeState = this.changeState.bind(this);   \n    this.goToPage = this.goToPage.bind(this);   \n    this.keyDownEvent = this.keyDownEvent.bind(this);    \n    this.thisComponentStyle = this.thisComponentStyle.bind(this);\n  } \n\n  thisComponentStyle(){\n    const id = \"PaginateStyle\";\n    if( document.getElementById(id) == null ){\n      const $style = document.createElement(\"style\");\n      $style.setAttribute(\"id\", id);\n      document.head.appendChild($style); \n      $style.innerHTML = `  \n        .pagination {\n          display: inline-block;\n          padding-left: 0;\n          margin: 20px 0;\n          border-radius: 0;\n        }\n        .pagination > li {\n          display: inline;\n        }\n        .pagination > li > a,\n        .pagination > li > span {\n          position: relative;\n          float: left;\n          padding: 6px 12px;\n          line-height: 1.538462;\n          text-decoration: none;\n          color: #2c3e50;\n          background-color: #fff;\n          border: 1px solid #cad6e2;\n          margin-left: -1px;\n        }\n        .pagination > li:first-child > a,\n        .pagination > li:first-child > span {\n          margin-left: 0;\n          border-bottom-left-radius: 0;\n          border-top-left-radius: 0;\n        }\n        .pagination > li:last-child > a,\n        .pagination > li:last-child > span {\n          border-bottom-right-radius: 0;\n          border-top-right-radius: 0;\n        }\n        .pagination > li > a:hover, .pagination > li > a:focus,\n        .pagination > li > span:hover,\n        .pagination > li > span:focus {\n          z-index: 2;\n          color: #fff;\n          background-color: #2c3e50;\n          border-color: #2c3e50;\n        }\n        .pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,\n        .pagination > .active > span,\n        .pagination > .active > span:hover,\n        .pagination > .active > span:focus {\n          z-index: 3;\n          color: #fff;\n          background-color: #2c3e50;\n          border-color: #2c3e50;\n          cursor: default;\n        }\n        .pagination > .disabled > span,\n        .pagination > .disabled > span:hover,\n        .pagination > .disabled > span:focus,\n        .pagination > .disabled > a,\n        .pagination > .disabled > a:hover,\n        .pagination > .disabled > a:focus {\n          color: #cad6e2;\n          background-color: #fff;\n          border-color: #cad6e2;\n          cursor: not-allowed;\n        }\n      `; \n    } \n  }\n\n  changeState(e, key){ \n    let setState = {};\n    setState[key] = $(e.target).val();\n    this.setState(setState); \n  }\n\n  keyDownEvent(e,params){ \n    let that = this;\n    if(e.type && e.type === \"keydown\") {\n      if(e.keyCode == 13 || e.keyCode == 9){\n        if( that.props.isAjax ){ \n          that.props.onChange.apply(this, [e.target.value]);  \n        } else {\n          this.goToPage(e); \n        } \n      }  \n    } \n  }  \n     \n  goToPage(e){  \n    let { currentPage } = this.props; \n    let { inputPage } = this.state; \n    if (inputPage != currentPage) {\n      location.href = location.href.removeUrlHash().updateQueryStringParameter(\"page\",inputPage);\n    } \n    e.preventDefault();\n    e.stopPropagation();\n  }     \n    \n  componentDidMount() {\n    let that = this;  \n    that.thisComponentStyle();\n    $(document).ready(function(){\n      $(document).on(\"click\",\"ul.pagination li.disabled\",function(){\n        return false;\n      });\n    });\n  }\n\n  render () {\n    let that = this; \n    let { pageSize, isLastPage, currentPage } = this.props;\n    let { inputPage } = this.state;\n    let thisLocation = location.href.removeUrlHash(); \n\n    return <div className=\"col-md-12 text-center no-print\"><ul className=\"pagination\"> \n      <li className={ (currentPage != 1) ? \"\" : \"disabled\" }>\n        <a onClick={(e) => { \n          if( that.props.isAjax ){ \n            if (currentPage != 1) {\n              that.props.onChange.apply(that, [1]);  \n            } \n            e.preventDefault();\n            e.stopPropagation(); \n          } \n        }} href={ (currentPage - 1) > 0 ? thisLocation.updateQueryStringParameter(\"page\", 1 ) : \"\" }>\u00AB</a>\n      </li> \n      <li className={ (currentPage - 1) > 0 ? \"\" : \"disabled\" }>\n        <a onClick={(e) => { \n          if( that.props.isAjax ){ \n            if ((currentPage - 1) > 0) {\n              that.props.onChange.apply(that, [currentPage - 1]);  \n            } \n            e.preventDefault();\n            e.stopPropagation(); \n          } \n        }} href={ (currentPage - 1) > 0 ? thisLocation.updateQueryStringParameter(\"page\", currentPage - 1 ) : \"\" }>\u4E0A\u4E00\u9801</a>\n      </li> \n      <li className=\"active\">\n        <input onKeyDown={(e) => this.keyDownEvent(e)} onChange={(e) => this.changeState(e, \"inputPage\")} style={{ border: \"1px solid #686262\", marginLeft: \"1px\", marginRight: \"2px\", width: \"45px\", height: \"38px\", float: \"left\", textAlign: \"center\" }} type=\"text\" defaultValue={ inputPage } /> \n        { inputPage != currentPage && \n          <a style={{ cursor: \"pointer\" }} href=\"#\" onClick={(e) => { \n            if( that.props.isAjax ){ \n              that.props.onChange.apply(that, [inputPage]); \n              e.preventDefault();\n              e.stopPropagation(); \n            } else {\n              that.goToPage(e) \n            }\n          }}>\u524D\u5F80\u6307\u5B9A\u9801\u9762</a>\n        } \n      </li>\n      <li className={ isLastPage ? \"disabled\" : \"\" }>\n        <a onClick={(e) => { \n          if( that.props.isAjax ){ \n            if (!isLastPage) {\n              that.props.onChange.apply(that, [currentPage + 1]);  \n            } \n            e.preventDefault();\n            e.stopPropagation(); \n          }\n        }} href={ isLastPage ? \"\" : thisLocation.updateQueryStringParameter(\"page\", currentPage + 1 ) }>\u4E0B\u4E00\u9801</a>\n      </li> \n      <li className={ isLastPage ? \"disabled\" : \"\" }>\n        <a onClick={(e) => { \n          if( that.props.isAjax ){ \n            if (!isLastPage) {\n              that.props.onChange.apply(that, [\"last\"]);  \n            } \n            e.preventDefault();\n            e.stopPropagation(); \n          }\n        }} href={ isLastPage ? \"\" : thisLocation.updateQueryStringParameter(\"page\", \"last\" ) }>\u00BB</a>\n      </li>\n    </ul></div>;\n  }\n}\n\nPaginate.defaultProps = {\n  currentPage: 1, \n  pageSize: 20, \n  isLastPage: true, \n  isAjax: false,\n  onChange: function(){}\n};\n \nexport { Paginate }  \n", "import React from 'react'\nimport ReactDOM from \"react-dom\"; \nimport { CONSTANTS } from \"../bundles/constants.es6.jsx\"; \n\nclass OrderStatus extends React.Component {\n  constructor(props){\n    super(props);\n    this.state = {\n      currentStatus: this.props.currentStatus \n    };\n \n    this.swap = this.swap.bind(this);\n    this.selectOptions = this.selectOptions.bind(this);\n    this.getEvent = this.getEvent.bind(this); \n  };\n \n  swap(json){\n    var ret = {};\n    for(var key in json){\n      ret[json[key]] = key;\n    }\n    return ret;\n  }\n\n  selectOptions(){ \n    let that = this;\n    let allStatus = new Set();\n    for(let key in CONSTANTS.Order.STATUS_EVENT) {  \n      if(CONSTANTS.Order.STATUS_EVENT[key][\"from\"].indexOf(that.state.currentStatus) != -1){\n        for(let index=0; index < CONSTANTS.Order.STATUS_EVENT[key][\"to\"].length ; index++ ){\n          allStatus.add(CONSTANTS.Order.STATUS_EVENT[key][\"to\"][index]); \n        }\n      }\n    }  \n    return Array.from(allStatus);   \n  }\n\n  getEvent(from, to){ \n    let that = this;\n    let event = null;\n    for(let key in CONSTANTS.Order.STATUS_EVENT) {  \n      if(\n        CONSTANTS.Order.STATUS_EVENT[key][\"from\"].indexOf(from) != -1 &&\n        CONSTANTS.Order.STATUS_EVENT[key][\"to\"].indexOf(to) != -1\n        ){\n        event = key;\n      }\n    }  \n    return event;   \n  } \n\n  componentDidMount() {\n    const that = this;\n      \n  };\n\n  render () {\n    const that = this; \n\n    return <React.Fragment>\n      { that.selectOptions().length == 0 &&\n        <span>{ that.swap(CONSTANTS.Order.STATUS)[that.state.currentStatus] }</span>\n      }\n      { that.selectOptions().length > 0 &&\n        <select value={ that.state.currentStatus } name=\"orderStatus\" className={ `${ that.props.required ? \"required\" : \"\" }` } onChange={(e)=>{ that.props.onChange.apply(this, [e, that.state.currentStatus, e.target.value , that.getEvent(that.state.currentStatus, e.target.value)]); that.setState({ currentStatus: e.target.value }); }} >\n          <option value={ that.state.currentStatus }>{ that.swap(CONSTANTS.Order.STATUS)[that.state.currentStatus] }</option>\n          { that.selectOptions().map((status, index) => \n            <option key={index} value={ status }>{ that.swap(CONSTANTS.Order.STATUS)[status] }</option>\n          )}     \n        </select>\n      } \n    </React.Fragment>\n  };\n};\n\nOrderStatus.defaultProps = { \n  required: false,\n  currentStatus: \"\u5F85\u78BA\u8A8D\",\n  onChange: function(){} \n};\n\nexport { OrderStatus }   ", "Array.prototype.ids_to_class = async function(className) {\n  if ( !this || this.length == 0 ) {\n    return [];\n  }\n  if (className == \"Orders\") {\n    let orders = (await new OrderModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return orders.to_orders_class();\n  }\n  if (className == \"Users\") {\n    let users = (await new UserModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return users.to_users_class();\n  }\n  if (className == \"Products\") {\n    let products = (await new ProductModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return products.to_products_class();\n  }\n  if (className == \"CouponRelations\") {\n    let couponRelations = (await new CouponRelationModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return couponRelations.to_coupon_relations_class();\n  }\n  if (className == \"Coupons\") {\n    let coupons = (await new CouponModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return coupons.to_coupons_class();\n  }\n  if (className == \"ShipmentItems\") {\n    let shipmentItems = (await new ShipmentItemModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return shipmentItems.to_shipment_items_class();\n  }\n  if (className == \"Shipments\") {\n    let shipments = (await new ShipmentModel().where(\"id in ?\", [this]).get_datas()).rows;\n    return shipments.to_shipments_class();\n  }\n}\nArray.prototype.batch_load = async function(loadName, params = []) {\n  const props = {\n    user: { className : \"Users\", foreignKey: \"user_id\"},\n    product: { className : \"Products\", foreignKey: \"product_id\"},\n    site: { className : \"Sites\", foreignKey: \"site_id\"},\n    creator: { className : \"Users\", foreignKey: \"created_by\"},\n    updator: { className : \"Users\", foreignKey: \"updated_by\"},\n    coupon_relation: { className : \"CouponRelations\", foreignKey: \"coupon_relation_id\"}\n  }\n\n  let { className, foreignKey } = props[loadName];\n\n  foreignKey = foreignKey ?? `${ loadName }_id`;\n  let datas = await this.map(d => d[foreignKey]).ids_to_class(className);\n  for ( let each of this ) {\n    if (each[foreignKey]) {\n      await each['load_'+loadName].apply(each,[ datas, ...params]);\n    }\n  }\n  return this;\n}\nArray.prototype.batch_load_product_tags = async function(productTags = [], productTagRelations = []) {\n  for( let each of this ){\n    if (each instanceof ProductModel) {\n      each.load_product_tags(productTags, productTagRelations);\n    } else if ( each instanceof ProductCategoryModel ) {\n      each.load_product_tags(productTags);\n    }\n  }\n  return this;\n}\nArray.prototype.batch_load_product = async function(datas) {\n  if (datas) {\n    for( let each of this ){\n      each.load_product(datas);\n    }\n    return this;\n  } else {\n    return await this.batch_load(\"product\");\n  }\n}\nArray.prototype.batch_load_user = async function(datas) {\n  if (datas) {\n    for( let each of this ){\n      each.load_user(datas);\n    }\n    return this;\n  } else {\n    return await this.batch_load(\"user\");\n  }\n}\nArray.prototype.batch_load_site = async function(datas) {\n  if (datas) {\n    for( let each of this ){\n      each.load_site(datas);\n    }\n    return this;\n  } else {\n    return await this.batch_load(\"site\");\n  }\n}\nArray.prototype.batch_load_coupon_relation = async function(datas) {\n  if (datas) {\n    for( let each of this ){\n      each.load_coupon_relation(datas);\n    }\n    return this;\n  } else {\n    return await this.batch_load(\"coupon_relation\");\n  }\n}\nArray.prototype.batch_load_creator = async function(datas) {\n  if (datas) {\n    for( let each of this ){\n      each.load_creator(datas);\n    }\n    return this;\n  } else {\n    return await this.batch_load(\"creator\");\n  }\n}\nArray.prototype.to_product_categories_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ProductCategoryModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ProductCategoryModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_advances_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof AdvanceModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new AdvanceModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_charged_record_payments_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ChargedRecordPaymentModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ChargedRecordPaymentModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_sites_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof SiteModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new SiteModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_charged_records_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ChargedRecordModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ChargedRecordModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_shipments_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ShipmentModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ShipmentModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_shipment_items_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ShipmentItemModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ShipmentItemModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_advance_balances_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof AdvanceBalanceModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new AdvanceBalanceModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_orders_class = function(isIds = false) {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof OrderModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new OrderModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_coupons_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof CouponModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new CouponModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_coupon_product_relations_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof CouponProductRelationModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new CouponProductRelationModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_coupon_limits_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof CouponLimitModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new CouponLimitModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_coupon_relations_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof CouponRelationModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new CouponRelationModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_product_models_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ProductModelClass) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ProductModelClass(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_users_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof UserModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new UserModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_products_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ProductModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ProductModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_product_prices_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ProductPriceModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ProductPriceModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_product_images_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof ProductImageModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new ProductImageModel(each));\n    }\n  }\n  return modelArray;\n}\nArray.prototype.to_memberships_class = function() {\n  let modelArray = [];\n  for ( let each of this ) {\n    if (each instanceof MembershipModel) {\n      modelArray.push(each);\n    } else {\n      modelArray.push(new MembershipModel(each));\n    }\n  }\n  return modelArray;\n}\n\n// Array.prototype.load_coupon_relation = async function(throughWhatColumn) {\n//   if (this.first() instanceof OrderModelModel) {\n//     let orderIds = this.map(o => o.id);\n//     let buyOrderCouponRelations = (await (new CouponRelationModel()).where(` ${ throughWhatColumn } in ? `,[orderIds]).get_datas()).rows.to_coupon_relations_class();\n\n//     let orderModels = this;\n//     for ( let order of orderModels ) {\n//       order.load_coupon_relation(throughWhatColumn, buyOrderCouponRelations);\n//     }\n//     return orderModels;\n//   }\n//   return [];\n// }\n\nArray.prototype.load_coupon_limits = async function(couponLimits) {\n  if (this.first() instanceof CouponModel) {\n    let couponIds = this.map(c => c.id);\n    couponLimits = couponLimits ? couponLimits.to_coupon_limits_class() : (couponIds.length == 0 ? [] : (await (new CouponLimitModel()).where(\"coupon_id in ? \",[couponIds]).get_datas()).rows.to_coupon_limits_class());\n    let couponModels = this;\n    for ( let couponModel of couponModels ) {\n      couponModel.load_coupon_limits(couponLimits);\n    }\n    return couponModels;\n  }\n  return [];\n}\n\nArray.prototype.load_product_prices = async function(productPrices) {\n  if (this.first() instanceof ProductModelClass) {\n    let productModelIds = this.map(c => c.id);\n\n    if (productPrices == undefined) {\n      productPrices = productModelIds.length == 0 ? [] : (await (new ProductPriceModel()).where(\"product_model_id in ? \",[productModelIds]).get_datas()).rows.to_product_prices_class();\n    }\n\n    let productModels = this;\n    for ( let productModel of productModels ) {\n      productModel.load_product_prices(productPrices);\n    }\n    return productModels;\n  }\n  return [];\n}\n\nfunction uuid(hasDash) {\n  var S4 = function() {\n    return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n  }\n  var guid = function() {\n    if(hasDash){\n      return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n    } else {\n      return (S4()+S4()+S4()+S4()+S4()+S4()+S4()+S4());\n    }\n  }\n  return guid();\n}\n\nexport class WindowModel {\n  constructor(that) {\n    this.child_window = null;\n    this.connecting_data = null;\n    for (const key in that) {\n      this[`${key}`] = that[key];\n    }\n    this.uuid = this.uuid ?? uuid();\n  }\n\n  async post_message_to_window(targetWindow, type, params = {}){\n    let that = this;\n    if (that.uuid) {\n      targetWindow.postMessage(JSON.stringify({\n        type: type,\n        uuid: that.uuid,\n        ...params\n      }), '*');\n    }\n  }\n\n  receive_window_message(type, applyFn, uuid = null){\n    let that = this;\n    uuid = uuid ?? that.uuid;\n    window.addEventListener('message', function(event){\n      if( typeof event.data == \"string\" ) {\n        let data = JSON.parse(event.data);\n        let dataUUID = data.uuid ?? \"\";\n\n        //\u5982\u679C\u6709\u6307\u5B9A uuid \u5C31\u6BD4\u5C0D\n        if ( uuid == dataUUID) {\n          if ( !uuid || ( uuid == dataUUID ) ) {\n            if (data[\"type\"] == type || data[\"type\"] == encodeURI(type)) {\n              applyFn.apply(that,[data]);\n            }\n          }\n        }\n      }\n    },false);\n    return this;\n  }\n}\n\nexport class Model {\n  constructor(that) {\n    for (const key in that) {\n      if (that[\"id\"] && key.indexOf('_was') == -1) {\n        this[`${key}_was`] = that[key];\n      }\n      this[`${key}`] = that[key];\n    }\n    this.tableName = \"\";\n    this.customSelect = \"*\";\n    this.orderBy = \"id DESC\";\n    this.keyWhereConditions = {};\n    this.customeWhereConditions = {};\n    this.joinConditions = [];\n    this.currentPage = 1; //default 1\n    this.pageSize = 20; //default 20\n    this.afterSaveData = {};\n    this.dataCount = 0;\n  }\n\n  async ajax(params={}){\n    let { method=\"GET\", contentType=\"application/json\", body=null, url=\"\"  } = params;\n    let settings = {\n      \"method\": method,\n      headers: {\n        'Content-Type': contentType,\n        'X-CSRF-Token': $('meta[name=\"csrf-token\"]').attr('content')\n      }\n    };\n\n    if (body) {\n      settings[\"body\"] = JSON.stringify(body);\n    }\n\n    try {\n      const fetchResponse = await fetch(url, settings);\n      const data = await fetchResponse.json();\n      return data;\n    } catch (e) {\n      return {\n        success: false,\n        errors: [e.message]\n      }\n    }\n  }\n\n  async destroy_by_ajax(params={}){\n    if ( !params[\"domain\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9domain');\n      return false;\n    }\n    if ( !params[\"tablePluralName\"] || !params[\"tableSingularName\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9tablePluralName \u6216\u662F tableSingularName');\n      return false;\n    }\n\n    let body = {};\n    body[params[\"tableSingularName\"]] = params[\"data\"];\n\n    return await this.ajax({\n      ...params,\n      method: \"DELETE\",\n      body:body,\n      url:`/${ params[\"domain\"] }/${ params[\"isBackend\"] ? \"backend/\" : \"\" }${ params[\"tablePluralName\"] }${ params[\"isNew\"] ? \"\" : (\"/\"+params[\"id\"]) }`\n    });\n  }\n\n  async save_ajax(params={}){\n    if ( params[\"isNew\"] !== true && params[\"isNew\"] !== false ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9isNew');\n      return false;\n    }\n    if ( !params[\"isAdmin\"] && !params[\"domain\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9domain');\n      return false;\n    }\n    if ( !params[\"isNew\"] && !params[\"id\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9id');\n      return false;\n    }\n    if ( !params[\"tablePluralName\"] || !params[\"tableSingularName\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9tablePluralName \u6216\u662F tableSingularName');\n      return false;\n    }\n\n    let body = {};\n    body[params[\"tableSingularName\"]] = params[\"data\"];\n\n    return await this.ajax({\n      ...params,\n      method: params[\"isNew\"] ? \"POST\" : \"PUT\",\n      body:body,\n      url:`/${ params[\"domain\"] ? `${ params[\"domain\"] }/` : `` }${ params[\"isBackend\"] ? \"backend/\" : \"\" }${ params[\"isAdmin\"] ? \"admin/\" : \"\" }${ params[\"path\"] ? params[\"path\"] : params[\"tablePluralName\"] }${ params[\"isNew\"] ? \"\" : (\"/\"+params[\"id\"]) }`\n    });\n  }\n\n  async get_datas_by_ajax(params) {\n    if ( !params[\"domain\"] ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9domain');\n      return false;\n    }\n    if ( !this.tableName ) {\n      alert('\u6C92\u6709\u5B9A\u7FA9 this.tableName');\n      return false;\n    }\n\n    // let body = {};\n    // body = params;\n\n    params[\"isAjax\"] = true;\n\n    let searchParams = new URLSearchParams(params);\n\n    return await this.ajax({\n      ...params,\n      method: \"GET\",\n      url:`/${ params[\"domain\"] }/${ params[\"isBackend\"] ? \"backend/\" : \"\" }${ this.tableName }.json?${ searchParams.toString() }`\n    });\n  }\n\n  clone(){\n    return Object.assign(Object.create(Object.getPrototypeOf(this)), this);\n  }\n\n  filter_whitelist(whitelist) {\n    let result = {};\n    for (let key in this) {\n      if (whitelist.includes(key)) {\n          result[key] = this[key];\n      }\n    }\n    return result;\n  }\n\n  to_json(keys){\n    return this.filter_whitelist(keys);\n  }\n\n  page_size(size){\n    this.pageSize = size;\n    return this;\n  }\n\n  current_page(page){\n    this.currentPage = page;\n    return this;\n  }\n\n  after_save(){\n    return {...this.afterSaveData};\n  }\n\n  clear_conditions() {\n    this.keyWhereConditions = {};\n    this.customeWhereConditions = {};\n    this.joinConditions = [];\n    return this;\n  }\n\n  set_import(params) {\n    for( let key in params ) {\n      this[key] = params[key];\n    }\n    return this;\n  }\n\n  set_id(id) {\n    this.id = id;\n    return this;\n  }\n\n  set_uuid() {\n    this.uuid = this.uuid ? this.uuid : Utility.generateID();\n    return this;\n  }\n\n  async set_last_page() {\n    this.dataCount = await this.get_data_count();\n    this.currentPage = Math.ceil( this.dataCount/this.pageSize );\n  }\n\n  async get_last_page() {\n    let dataCount = await this.get_data_count();\n    return Math.ceil( dataCount/this.pageSize );\n  }\n\n  page(value) {\n    if (Number.isInteger(Number(value))) {\n      this.currentPage = Number(value);\n    } else {\n      alert('page\u53EA\u53EF\u8F38\u5165\u6578\u5B57');\n    }\n    return this;\n  }\n  size(value) {\n    if (Number.isInteger(Number(value))) {\n      this.pageSize = Number(value);\n    } else {\n      alert('size\u53EA\u53EF\u8F38\u5165\u6578\u5B57');\n    }\n    return this;\n  }\n\n  join(condition){\n    this.joinConditions.push(condition);\n    return this;\n  }\n\n  where(key, value = []) {\n    if( Array.isArray(value) ){\n      this.customeWhereConditions[key] = value;\n    } else {\n      this.keyWhereConditions[key] = value;\n    }\n    return this;\n  }\n\n  select(customSelect){\n    this.customSelect = customSelect;\n    return this;\n  }\n\n  order_by(orderBy){\n    this.orderBy = orderBy;\n    return this;\n  }\n\n  async get_data_count(){\n    let that = this;\n    let sqlObjs = [{sql: \"BEGIN\"},\n    {\n      tableName: this.tableName,\n      sql: `SELECT COUNT(*) FROM ${ this.tableName } `\n    },\n    {sql: \"END\"}];\n\n    let count = 0;\n    let isLastPage = false;\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      count = results?.datasByTableName[that.tableName]?.rows[0][\"count\"];\n    }).catch(async err => {\n      if( err?.message ){\n        alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n      throw err;\n    });\n    return count;\n  }\n\n  generate_sql(customeWhereConditions, keyWhereConditions) {\n    let sql = \"\";\n    let params = [];\n    let i = 1;\n\n    // Add keyWhereConditions to the SQL query\n    for (const [key, value] of Object.entries(keyWhereConditions)) {\n      sql += `${key} = ? AND `;\n      if (Array.isArray(value)) {\n        params = [ ...params, ...value ];\n      } else {\n        params.push(value);\n      }\n      i++;\n    }\n\n    // Add customeWhereConditions to the SQL query\n    for (const [key, value] of Object.entries(customeWhereConditions)) {\n      let condition = key;\n\n      for (let data of value) {\n        //\u5982\u679C \u78B0\u5230 \u5167\u5BB9\u662F array \u5C31\u6539\u9020sql\u5167\u5BB9\n        if (Array.isArray(data)) {\n          condition = condition.replace(\"?\",` (${ Array.from({length: data.length}, () => \"$\").join() }) `);\n        } else {\n          condition = condition.replace(\"?\",\"$\");\n        }\n      }\n      condition = condition.replace(/\\$/gi,'?');\n\n      sql += `( ${condition} ) AND`;\n\n      value.forEach((val) => {\n        if (Array.isArray(val)) {\n          params = [ ...params, ...val ];\n        } else {\n          params.push(val);\n        }\n        i++;\n      });\n    }\n\n    // Remove the extra \"AND\" at the end of the query\n    sql = sql.slice(0, -4);\n\n    i = 1;\n    return {\n      sql : sql.replace(/\\?/g, () => `$${i++}`),\n      params: params,\n    };\n  }\n\n  get_sql() {\n    let sqlResult = this.generate_sql(this.customeWhereConditions, this.keyWhereConditions);\n    let currentPage = this.currentPage;\n    let pageSize = this.pageSize;\n\n    let sql = `SELECT ${ this.customSelect } FROM ${ this.tableName }\n            ${ this.joinConditions.join(\" \") }\n            ${ sqlResult[\"sql\"].length > 0 ? \"WHERE\" : \"\" } ${ sqlResult[\"sql\"] }\n            ${ this.orderBy ? `ORDER BY ${ this.orderBy }` : `` }\n            ${ pageSize ? `LIMIT ${ pageSize + 1 } ` : `` }\n            ${ (currentPage && pageSize) ? `OFFSET ${ (currentPage-1)*pageSize }` : `` }\n            `;\n    let params = sqlResult[\"params\"];\n    return {\n      sql: sql,\n      params: params\n    }\n  }\n\n  async get_datas(){\n    let that = this;\n    let whereClauseParts = [];\n    let sqlResult = this.generate_sql(this.customeWhereConditions, this.keyWhereConditions);\n    let sqlObjs = [{sql: \"BEGIN\"},\n    {\n      tableName: this.tableName,\n      sql:  `SELECT ${ this.customSelect } FROM ${ this.tableName }\n            ${ this.joinConditions.join(\" \") }\n            ${ sqlResult[\"sql\"].length > 0 ? \"WHERE\" : \"\" } ${ sqlResult[\"sql\"] }\n            ${ this.orderBy ? `ORDER BY ${ this.orderBy }` : `` }\n            ${ this.pageSize ? `LIMIT ${ this.pageSize + 1 } ` : `` }\n            ${ (this.currentPage && this.pageSize) ? `OFFSET ${ (this.currentPage-1)*this.pageSize }` : `` }\n            `,\n      params: sqlResult[\"params\"]\n    },\n    {sql: \"END\"}];\n\n    let rows = [];\n    let isLastPage = false;\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      rows = results?.datasByTableName[that.tableName]?.rows;\n      // Object.assign(this, product);\n    }).catch(async err => {\n      if( err?.message ){\n        alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n      throw err;\n    });\n\n    if (this.pageSize) {\n      isLastPage = rows.length > this.pageSize ? false : true;\n      rows = rows.slice(0, this.pageSize);\n    }\n\n    return {\n      rows: rows,\n      isLastPage: isLastPage\n    };\n  }\n\n  async destroy(){\n    let that = this;\n    let sqlObjs = [{sql: \"BEGIN\"},\n      ...this.destroy_sql(),\n    {sql: \"END\"}];\n\n    let rows = [];\n    let rowCount = 0;\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      rowCount = results?.datasByTableName[that.tableName]?.rowCount;\n    }).catch(async err => {\n      if( err?.message ){\n        alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n      throw err;\n    });\n\n    return {\n      rowCount: rowCount\n    };\n  }\n\n  destroy_sql(){\n    let that = this;\n    let whereClauseParts = [];\n    let defaultConditions = {};\n\n    if (that.id) {\n      defaultConditions[\"id\"] = that.id;\n    }\n\n    let keyWhereConditions = { ...defaultConditions, ...this.keyWhereConditions };\n    let sqlResult = this.generate_sql(this.customeWhereConditions, keyWhereConditions);\n\n    let hasWhereConditions = sqlResult[\"params\"].length > 0;\n    let sqlObjs = [];\n    if( hasWhereConditions || that.id ){\n      sqlObjs = [\n      ...sqlObjs,\n      {\n        tableName: this.tableName,\n        sql:  `DELETE FROM ${ this.tableName }\n              ${ hasWhereConditions ? \"WHERE\" : \"\" } ${ sqlResult[\"sql\"] }\n              `,\n        params: sqlResult[\"params\"]\n      },{\n        sql:  `SELECT id FROM ${ this.tableName }\n              ${ hasWhereConditions ? \"WHERE\" : \"\" } ${ sqlResult[\"sql\"] }\n              `,\n        params: sqlResult[\"params\"],\n        validate: function(currentResult, allResults){\n          let success = (currentResult.rows.length == 0);\n          return success;\n        },\n        errorMessage: \"\u522A\u9664\u5931\u6557\"\n      }];\n    } else {\n      alert('\u4E0D\u53EF\u4EE5\u7121\u689D\u4EF6\u522A\u9664\u8CC7\u6599');\n    }\n\n    return [...sqlObjs];\n  }\n\n  async load_order(orders) {\n    if (this.order_id == 0) {\n      return;\n    }\n\n    let row = await this.load_one_relation_table_by_foreign_key(orders, \"orders\", \"order\", \"order_id\");\n    return row;\n  }\n\n  async load_gift_orders(orders, foreignKey, CONSTANTS) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(orders, \"orders\", foreignKey);  //\"coupon_relation_id\"\n    rows = rows ? rows.filter(o => o.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] ) : [];\n    this.gift_orders = this.orders ? this.orders.to_orders_class().filter(o => o.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] ) : [];\n    return rows;\n  }\n\n  async load_buy_order(orders, foreignKey, CONSTANTS) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(orders, \"orders\", foreignKey);  //\"coupon_relation_id\"\n    rows = rows ? rows.filter(o => o.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"] ) : [];\n    this.buy_order = this.orders ? this.orders.to_orders_class().filter(o => o.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"] )?.first() : null;\n    return rows;\n  }\n\n  load_member_level(member_levels) {\n    if( member_levels ){\n      this.member_level = member_levels.filter(m => m.id == this.member_level_id).first();\n    }\n    return this;\n  }\n\n  async load_product(products) {\n    let row = await this.load_one_relation_table_by_foreign_key(products, \"products\", \"product\", \"product_id\");\n    return row;\n  }\n\n  async load_product_model(product_models) {\n    let row = await this.load_one_relation_table_by_foreign_key(product_models, \"product_models\", \"product_model\", \"product_model_id\");\n    return row;\n  }\n\n  async load_coupon_relation(coupon_relations) {\n    let row = await this.load_one_relation_table_by_foreign_key(coupon_relations, \"coupon_relations\", \"coupon_relation\", \"coupon_relation_id\");\n    return row;\n  }\n\n  load_gift_product(products) {\n    if( products ){\n      this.gift_product = products.filter(p => p.id == this.gift_product_id).to_products_class().first();\n      return this;\n    }\n  }\n\n  load_buy_product(products) {\n    if( products ){\n      this.buy_product = products.filter(p => p.id == this.buy_product_id).to_products_class().first();\n      return this;\n    }\n  }\n\n  async load_user(users) {\n    let row = await this.load_one_relation_table_by_foreign_key(users, \"users\", \"user\", \"user_id\");\n    return row;\n  }\n\n  async load_creator(users) {\n    if( users ){\n      this.creator = users.filter(u => u.id == this.created_by).to_users_class().first();\n      return this;\n    } else {\n      let users = (await new UserModel().where(\"id in ?\", [[this.created_by]]).get_datas()).rows.to_users_class();\n      let that = await this.load_creator(users);\n      return that;\n    }\n  }\n\n  async load_updator(users) {\n    if( users ){\n      this.updator = users.filter(u => u.id == this.updated_by).to_users_class().first();\n      return this;\n    } else {\n      let users = (await new UserModel().where(\"id in ?\", [[this.updated_by]]).get_datas()).rows.to_users_class();\n      let that = await this.load_updator(users);\n      return that;\n    }\n  }\n\n  async load_site(sites) {\n    let row = await this.load_one_relation_table_by_foreign_key(sites, \"sites\", \"site\", \"site_id\");\n    return row;\n  }\n\n  async load_coupon(coupons) {\n    let row = await this.load_one_relation_table_by_foreign_key(coupons, \"coupons\", \"coupon\", \"coupon_id\");\n    return row;\n  }\n\n  async load_coupon_limits(coupon_limits, foreignKey) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(coupon_limits, \"coupon_limits\", foreignKey);\n    rows = rows ? rows : [];\n    for ( let row of rows ) {\n      row.resource = await (new CouponLimitModel(row)).load_resource();\n    }\n    return rows;\n  }\n\n  async load_coupon_product_relations(coupon_product_relations, foreignKey) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(coupon_product_relations, \"coupon_product_relations\", foreignKey);\n    rows = rows ? rows : [];\n    return rows;\n  }\n\n  async load_product_prices(product_prices, foreignKey) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(product_prices, \"product_prices\", foreignKey);\n    rows = rows ? rows : [];\n    return rows;\n  }\n\n  async load_product_models(product_models, foreignKey) {\n    let rows = await this.load_plural_relation_table_by_foreign_key(product_models, \"product_models\", foreignKey);\n    rows = rows ? rows : [];\n    return rows;\n  }\n\n  async load_plural_relation_table_by_foreign_key(datas, tablePluralName, foreignKey) {\n    if (this[\"id\"] == undefined) {\n      alert(`\u8ACB\u5148\u5B9A\u7FA9id`);\n      return [];\n    }\n\n    let that = this;\n    if (datas) {\n      this[tablePluralName] = datas.filter(o => o.id == that[foreignKey]);\n    } else {\n      let sqlObjs = [{sql: \"BEGIN\"},\n      {\n        tableName: tablePluralName,\n        sql: `SELECT * FROM ${ tablePluralName } WHERE ${foreignKey} = $1`,\n        params: [ this[\"id\"] ]\n      },\n      {sql: \"END\"}];\n\n      await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n        this[tablePluralName] = results?.datasByTableName[tablePluralName]?.rows ?? [];\n      }).catch(async err => {\n        if( err?.message ){\n          alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n        }\n        throw err;\n      });\n    }\n    return this[tablePluralName];\n  }\n\n  async load_one_relation_table_by_foreign_key(datas, tablePluralName, tableSingularName, foreignKey) {\n    if (this[foreignKey] == undefined) {\n      alert(`\u8ACB\u5148\u5B9A\u7FA9${ foreignKey }`);\n      return [];\n    }\n\n    let that = this;\n    if (datas) {\n      this[tableSingularName] = datas.filter(o => o.id == that[foreignKey]).first();\n\n      if (!this[tableSingularName]) {\n        alert(`load_${tableSingularName}\u5931\u6557`);\n      }\n    } else {\n      let sqlObjs = [{sql: \"BEGIN\"},\n      {\n        tableName: tablePluralName,\n        sql: `SELECT * FROM ${ tablePluralName } WHERE id = $1`,\n        params: [ that[foreignKey] ]\n      },\n      {sql: \"END\"}];\n\n      await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n        this[tableSingularName] = results?.datasByTableName[tablePluralName]?.rows[0];\n      }).catch(async err => {\n        if( err?.message ){\n          alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n        }\n        throw err;\n      });\n    }\n    return this[tableSingularName];\n  }\n\n  dynamic_update_number() {\n    let that = this;\n    let number = null;\n    return [{\n      dynamicParams: {\n        number: function(results){\n          number = that.set_number_append_id(results[that.tableName].rows[0].id);\n          that.afterSaveData[\"number\"] = number;\n          return number;\n        },\n        id: function(results){\n          return results[that.tableName].rows[0].id;\n        }\n      },\n      sql: `\n        UPDATE ${ that.tableName }\n        SET number = {@number}\n        WHERE id = {@id}`\n    }];\n  }\n\n  set_number_append_id(id) {\n    id = id*1 > 0 ? id : -1*id;\n    const now = new Date();\n    let year = now.getFullYear().toString();\n    let month = (now.getMonth() + 1).toString().padStart(2, '0');\n    let day = now.getDate().toString().padStart(2, '0');\n    let hour = now.getHours().toString().padStart(2, '0');\n    let minute = now.getMinutes().toString().padStart(2, '0');\n    let second = now.getSeconds().toString().padStart(2, '0');\n    let milliseconds = now.getMilliseconds().toString().padStart(3, '0');\n\n    let number = `${year}${month}${day}${hour}${minute}${second}${milliseconds}`;\n    let idString = (id % 1000).toString().padStart(3, '0');\n\n    if (Number.isInteger(Number(idString))) {\n      return `P${number.substring(0, number.length - 4)}${idString}`;\n    } else {\n      return null;\n    }\n  }\n}\n\nexport class ShipmentModel extends Model {\n  constructor(that) {\n    super(that)\n\n    this.tableName = \"shipments\";\n  }\n\n  async load_shipment_items_and_orders_and_advances(orders, shipmentItems, advances) {\n    if( orders ) {\n      this.shipment_items = shipmentItems.filter(i => i.shipment_id == this.id);\n\n      for ( let shipmentItem of this.shipment_items ) {\n        await shipmentItem.load_order(orders);\n      }\n\n      this.advances = advances.filter(i => i.shipment_id == this.id);\n      let thisShipmentOrderIds = shipmentItems.filter(i => i.shipment_id == this.id).map(i => i.order_id );\n      this.orders = orders.filter(o=> thisShipmentOrderIds.includes(o.id) );\n    } else {\n      let shipmentItems = (await new ShipmentItemModel().where(\"shipment_id\", this.id).get_datas()).rows.to_shipment_items_class();\n      let orders = await shipmentItems.map(i => i.order_id).ids_to_class(\"Orders\");\n      let advances = (await new AdvanceModel().where(\"shipment_id\", this.id).get_datas()).rows.to_advances_class();\n      return await this.load_shipment_items_and_orders_and_advances(orders, shipmentItems, advances);\n    }\n    return this;\n  }\n\n  async load_coupon_relation(couponRelations){\n    if( couponRelations ){\n      couponRelations = couponRelations.to_coupon_relations_class();\n      this.coupon_relation = couponRelations?.filter( c => c.shipment_id == this.id )?.first();\n      return this;\n    } else {\n      let couponRelations = (await (new CouponRelationModel()).where(\" shipment_id = ? \",this.id).get_datas()).rows.to_coupon_relations_class();\n      return this.load_coupon_relation(couponRelations);\n    }\n  }\n\n  async batch_load_coupon_relation_and_gift_orders(shipments, couponRelations = null, shipmentGiftOrders = null) {\n    shipments = shipments.to_shipments_class();\n    let shipmentIds = shipments.map(o => o.id);\n\n    if (!shipmentIds || shipmentIds.length == 0 ) {\n      return shipments;\n    }\n\n    couponRelations = couponRelations ? couponRelations.to_coupon_relations_class() : (await (new CouponRelationModel()).where(\" shipment_id in ? \",[shipmentIds]).get_datas()).rows.to_coupon_relations_class();\n    let couponRelationIds = couponRelations.map(c => c.id);\n    shipmentGiftOrders = shipmentGiftOrders ? shipmentGiftOrders.to_orders_class() : (couponRelationIds.length == 0 ? [] : (await (new OrderModel()).where(\"coupon_relation_id in ? \",[couponRelationIds]).get_datas()).rows.to_orders_class());\n\n    shipmentGiftOrders = await new OrderModel().batch_load_product(shipmentGiftOrders);\n\n    for ( let shipment of shipments ) {\n      shipment.load_coupon_relation(couponRelations);\n      if (shipment.coupon_relation) {\n        shipment.coupon_relation.set_import({ \"CONSTANTS\" : this.CONSTANTS }).load_gift_orders(shipmentGiftOrders);\n        let giftOrderModels = ( shipment.coupon_relation.gift_orders ?? [] ).to_orders_class();\n      }\n    }\n\n    return shipments;\n  }\n\n  dynamic_validate_number(){\n    return [{\n      sql: \"SELECT * FROM shipments WHERE id = {@shipment_id} AND shipments.number IS NOT NULL\",\n      dynamicParams: {\n        shipment_id: function(results){\n          return results.shipments.rows[0].id;\n        }\n      },\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length != 0);\n        return success;\n      },\n      errorMessage: \"\u5C1A\u672A\u5BEB\u5165\u51FA\u8CA8\u7DE8\u865F\"\n    }];\n  }\n\n  validate_column_logic_sql(){\n    return [\n      ...this.dynamic_validate_number(),\n      // ...this.validate_advance_balance()\n    ];\n  }\n\n  set_buy_orders(orders){\n    this.buy_orders = orders.to_orders_class();\n    return this;\n  }\n\n  set_remark(remark){\n    this.remark = remark;\n    return this;\n  }\n\n  set_shipped_at(shipped_at){\n    this.shipped_at = shipped_at;\n    return this;\n  }\n\n  set_status(status){\n\n    if ( status && !this.CONSTANTS) {\n      alert('shipment set_status \u6C92\u6709 this.CONSTANTS');\n      return this;\n    }\n\n    if ( status && !Object.values(this.CONSTANTS.Shipment.STATUS).includes(status)) {\n      alert(' shipment set_status \u50B3\u5165\u7684\u53C3\u6578 \u6C92\u6709\u5305\u542B\u5728 CONSTANTS.Shipment.STATUS ');\n      return this;\n    }\n\n    this.status = status;\n    return this;\n  }\n\n  set_order_amount(order_amount){\n    this.order_amount = order_amount;\n\n    //\u6703\u5F71\u97FF\u4EE5\u4E0B\u5169\u500B\u53C3\u6578 \u6240\u4EE5\u8A2D\u70BANULL \u5FC5\u9808\u91CD\u7B97\n    this.advance_amount = null;\n    this.total_amount = null;\n    return this;\n  }\n\n  set_tax_and_discount_amount(){\n    if (!this.site) {\n      alert('set_tax_and_discount_amount \u6C92\u6709 load_site');\n    }\n\n    this.tax_included = this.site.tax_included;\n    this.tax_rate = this.site.tax_rate;\n    this.tax = ( this.tax_included ? Math.round(this.order_amount - (this.order_amount / (1 + this.tax_rate/100))) : Math.round(this.order_amount * (this.tax_rate / 100))) || 0;\n\n    if (this.coupon_relation) {\n      this.discount_amount_was = this.discount_amount;\n      if (this.coupon_relation.discount_type == this.CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u56FA\u5B9A\u91D1\u984D\"] ) {\n        this.discount_amount = this.coupon_relation.discount;\n      } else if( this.coupon_relation.discount_type == this.CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u6BD4\u7387\"] ) {\n        if ([undefined, null, \"\"].includes(this.order_amount)) {\n          alert('\u6C92\u6709\u8A2D\u5B9A this.order_amount');\n          return;\n        }\n        this.discount_amount = this.coupon_relation.coupon.get_discount_amount( this.tax_included ? this.order_amount : ( this.order_amount + this.tax ) , this.CONSTANTS);\n      } else {\n        this.discount_amount = 0;\n      }\n\n      //\u628A \u5982\u679C\u6298\u6263\u50F9\u683C\u88AB\u6539\u8B8A\u4E86 \u5C31\u628A total_amount \u8A2D\u5B9A\u70BA null, \u5FC5\u9808\u91CD\u7B97\n      if (this.discount_amount_was != this.discount_amount) {\n        this.total_amount = null;\n      }\n    } else {\n      this.discount_amount = 0;\n    }\n\n    this.advance_amount = null;\n\n    return this;\n  }\n\n  set_advance_amount(advance_amount){\n    this.advance_amount = advance_amount;\n    return this;\n  }\n\n  set_total_amount(){\n\n  //\u8981\u6309\u7167\u4EE5\u4E0B\u9806\u5E8F\n        // .set_order_amount(this.get_shipment_orders_amount())\n        // .set_tax(false, 0, 0) // tax \u9084\u6C92\u7B97\n        // .set_discount_amount(0) //\u7D50\u5E33\u512A\u60E0 \u9084\u6C92\u505A\n        // .set_advance_amount(0) // \u5132\u503C\u91D1\u984D \u9084\u6C92\u505A\n        // .set_total_amount();\n\n    if ( [undefined, null, \"\"].includes(this.tax) ) {\n      alert(' set_total_amount \u8ACB\u5148 \u5B9A\u7FA9 this.tax ');\n      return;\n    }\n    if ( [undefined, null, \"\"].includes(this.order_amount) ) {\n      alert(' set_total_amount \u8ACB\u5148 \u5B9A\u7FA9 this.order_amount ');\n      return;\n    }\n    if ( [undefined, null, \"\"].includes(this.discount_amount) ) {\n      alert(' set_total_amount \u8ACB\u5148 \u5B9A\u7FA9 this.discount_amount ');\n      return;\n    }\n    // if ( [undefined, null, \"\"].includes(this.advance_amount) ) {\n    //   alert(' set_total_amount \u8ACB\u5148 \u5B9A\u7FA9 this.advance_amount ');\n    //   return;\n    // }\n\n    this.advance_amount = this.advance_amount ?? 0;\n\n    this.total_amount = this.order_amount - this.discount_amount + ( this.tax_included ? 0 : (this.tax ?? 0) );\n\n    //\u5982\u679C \u9867\u5BA2\u9858\u610F\u652F\u4ED8\u7684\u5132\u503C\u91D1 \u8D85\u904E \u76EE\u524D\u61C9\u4ED8\u91D1\u984D , \u81EA\u52D5\u8ABF\u964D \u9867\u5BA2\u9858\u610F\u652F\u4ED8\u7684\u5132\u503C\u91D1, \u5247 \u5132\u503C\u91D1 \u548C \u61C9\u4ED8\u91D1\u984D \u525B\u597D\u62B5\u92B7\n    if (this.advance_amount > this.total_amount) {\n      this.advance_amount = this.total_amount;\n      this.total_amount = 0;\n    } else {\n      this.total_amount = this.total_amount - this.advance_amount;\n    }\n\n    return this;\n  }\n\n  set_site(site){\n    this.site = site;\n    return this;\n  }\n\n  set_buyer(user_id){\n    this.user_id = user_id;\n    return this;\n  }\n\n  // set_tax(tax_included, tax_rate) {\n  //   this.tax_included = tax_included;\n  //   this.tax_rate = tax_rate;\n  //   this.tax = ( this.tax_included ? Math.round(this.order_amount - (this.order_amount / (1 + this.tax_rate/100))) : Math.round(this.order_amount * (this.tax_rate / 100))) || 0;\n\n  //   //\u6703\u5F71\u97FF\u4EE5\u4E0B\u5169\u500B\u53C3\u6578 \u6240\u4EE5\u8A2D\u70BANULL \u5FC5\u9808\u91CD\u7B97\n  //   this.advance_amount = null;\n  //   this.total_amount = null;\n  //   return this;\n  // }\n\n  set_receiver(receiver, received_mobile) {\n    this.receiver = receiver;\n    this.received_mobile = received_mobile;\n    return this;\n  }\n\n  show_order_detail_list(CONSTANTS){\n    let stringList = [];\n    for (let order of this.buy_orders) {\n      stringList = [...stringList, `${ order?.product?.name }${ order?.quantity ? `*${order?.quantity}` : `` } $${ order?.quantity * order?.price }`];\n      if (\n        order.coupon_relation &&\n        order.coupon_relation.type_code == CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"]\n        ) {\n        let couponRelation = order.coupon_relation;\n        if (order.coupon_relation.gift_product) {\n          stringList = [...stringList, `(\u8D08\u54C1)${ couponRelation.gift_product?.name }${ couponRelation?.gift_count ? `*${couponRelation?.gift_count}` : `` } `];\n        } else {\n          stringList = [...stringList, `(\u8D08\u54C1)${ couponRelation.gift }${ couponRelation?.gift_count ? `*${couponRelation?.gift_count}` : `` } `];\n        }\n      }\n      if (\n        order.coupon_relation &&\n        order.coupon_relation.type_code == CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]\n        ) {\n        stringList = [...stringList, `(\u6298\u6263)${ order?.product?.name }${ order?.discount_amount ? ` -$${order?.discount_amount}` : `` } `];\n      }\n    }\n    return stringList;\n  }\n\n  async save_sql(options = {}){\n    let that = this;\n    let validate = true;\n\n    if ( !window.app.state.staff.user_id ) {\n      alert('user_id \u70BA\u7A7A\u503C, \u53EF\u80FD\u6C92\u6709\u767B\u5165');\n      validate = false;\n    }\n\n    if ( validate && !this.orders ) {\n      alert('\u6C92\u6709\u8A02\u55AE');\n      validate = false;\n    }\n\n    if ( validate && this.orders && this.orders.map((order) => order.user_id).unique().length > 1 ) {\n      alert(\"\u51FA\u8CA8\u55AE\u5167\u7684\u8A02\u55AE\u4E0D\u53EF\u540C\u6642\u5305\u542B\u591A\u500B\u8CFC\u8CB7\u4EBA\");\n      validate = false;\n    }\n\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"shipments\",\n      \"id,number(NullIfEmpty),site_id,device_id(NullIfEmpty),user_id,remark,shipped_at(NullIfEmpty),status,order_amount,discount_amount,tax,tax_rate,total_amount,advance_amount,receiver,received_mobile,created_at,updated_at,tax_included\"\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    let shipmentItemsSaveSql = [];\n    let couponRelationsSql = [];\n    let couponRelationGiftOrdersSql = [];\n    let advanceSaveSql = [];\n    let updateOrderStatusSql = [];\n    if( options[\"saveRelationTable\"] ) {\n\n      if (this.orders == undefined) {\n        alert('\u8ACB\u5148\u5B9A\u7FA9orders');\n        return [];\n      }\n\n      //\u5132\u5B58 shipment_items\n      for(const order of this.orders ) {\n\n        //\u6BCF\u4E00\u500B order \u90FD\u8DDF\u7B2C\u4E00\u7B46 order\u6BD4\u8F03site_id \u5982\u679C\u767C\u751F\u4E0D\u540C \u5247\u8CC7\u6599\u932F\u8AA4\n        if (order[\"site_id\"] != this.orders[0][\"site_id\"]) {\n          alert('\u8A02\u55AE\u7684site_id\u8CC7\u6599\u4E0D\u540C');\n          validate = false;\n        }\n        //\u6BCF\u4E00\u500B order \u90FD\u8DDF\u7B2C\u4E00\u7B46 order\u6BD4\u8F03user_id \u5982\u679C\u767C\u751F\u4E0D\u540C \u5247\u8CC7\u6599\u932F\u8AA4\n        if (order[\"user_id\"] != this.orders[0][\"user_id\"]) {\n          alert('\u8A02\u55AE\u7684user_id\u8CC7\u6599\u4E0D\u540C');\n          validate = false;\n        }\n\n        let shippedQty = ( order[\"shipped_qty_for_shipment\"] ? order[\"shipped_qty_for_shipment\"]*1 : ( order[\"quantity\"]*1 - (order[\"shipped_qty\"] ?? 0)*1 ) )*1;\n        let item = new ShipmentItemModel()\n                   .set_shipment(null, shippedQty, order.total_price)\n                   .set_order_id(order.id);\n\n        await item.load_order();\n        shipmentItemsSaveSql = [ ...shipmentItemsSaveSql, ...item.save_sql({\"saveRelationTable\": true}) ];\n\n      }\n\n      updateOrderStatusSql = this.update_orders_status_to_complete_Sql(this.orders.map(o => o.id));\n\n\n\n      //\u5982\u679C\u6709\u6EFF\u984D\u512A\u60E0 \u5C31save coupon_relation\n\n      //coupon_relation_used_count\n      // shipment_discount_amount\n      // user_id\n\n      if (this.coupon_relation) {\n        couponRelationsSql = this.coupon_relation\n          .save_sql({\n            \"CONSTANTS\": options[\"CONSTANTS\"],\n            \"saveRelationTable\" : true,\n            \"dynamicParams\" : {\n              shipment_id: function(results){\n                return results.shipments.rows?.first()?.id\n              }\n            },\n        });\n\n        if (this.coupon_relation.gift_orders) {\n\n          for (let giftOrder of this.coupon_relation.gift_orders) {\n            // giftOrder.load_product(products);\n\n            giftOrder.set_status(this.CONSTANTS.Order.STATUS[\"\u5B8C\u6210\"], giftOrder.created_by);\n\n            let giftOrderSaveResult = (await giftOrder.save_sql({\n              // caches: {\n              //   products: products, //\u6279\u6B21\u8655\u7406\n              //   productModels: productModels //\u6279\u6B21\u8655\u7406\n              // },\n              saveRelationTable:true,\n              passStockQtyValidate: true,\n              dynamicParams: {\n                coupon_relation_id: function(results) {\n                  return results?.coupon_relations?.rows[0]?.id;\n                }\n              }\n            }));\n\n            let sql = giftOrderSaveResult[\"sql\"];\n\n            couponRelationGiftOrdersSql = [...couponRelationGiftOrdersSql, ...sql];\n          }\n        }\n      }\n\n      let firstOrder = this.orders[0];\n      if( this.advance_amount ) {\n\n        advanceSaveSql = new AdvanceModel()\n        .set_system_created(true)\n        .set_site(firstOrder.site_id)\n        .set_whose_advance(firstOrder.user_id)\n        .set_amount(this.advance_amount * -1)\n        .set_constants(options[\"CONSTANTS\"].Advance.TYPE_CODE['\u6298\u62B5'])\n        .set_editor(this.user_id)\n        .save_sql({\n          \"saveRelationTable\" : true,\n          \"dynamicParams\" : {\n            description: function(results){\n              return `\u51FA\u8CA8\u7DE8\u865F\uFF1A${ that.afterSaveData[\"number\"]  }`\n            },\n            shipment_id: function(results){\n              return results.shipments.rows?.first()?.id\n            }\n          },\n        });\n      }\n    }\n\n    if (validate) {\n      let result = [\n        saveSql,\n        ...shipmentItemsSaveSql,\n        ...super.dynamic_update_number(),\n        ...this.validate_column_logic_sql(),\n        ...couponRelationsSql,\n        ...couponRelationGiftOrdersSql,\n        ...advanceSaveSql,\n        ...updateOrderStatusSql,\n\n\n        // {\n        //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n        //   params: [],\n        //   validate: function(currentResult, allResults){\n        //     let success = false;\n        //     return success;\n        //   },\n        //   errorMessage: \"\u5C31\u662F\u932F\"\n        // },\n      ];\n      return result;\n    }\n    return [];\n  }\n\n  update_orders_status_to_complete_Sql(orderIds, status) {\n    if (!orderIds || orderIds.length == 0) {\n      return [];\n    }\n\n    let idsSql = [];\n    let start = 2;\n    let end = orderIds.length - 1 + start;\n    for (let i = start; i <= end; i++) {\n      idsSql.push(i);\n    }\n\n    let idsSqlString = '$' + idsSql.join(',$');\n\n    return [{\n      tableName: \"orders\",\n      params:[ this.CONSTANTS.Order.STATUS[\"\u5B8C\u6210\"], ...orderIds ],\n      sql: `\n        UPDATE orders\n        SET status = $1\n        WHERE shipped_qty = quantity AND id IN (${ idsSqlString })`\n      }\n    ];\n  }\n\n  destroy_shipment_item_sql(orderIds){\n    if (!orderIds || orderIds.length == 0) {\n      return [];\n    }\n\n    let idsSql = [];\n    let start = 1;\n    let end = orderIds.length - 1 + start;\n    for (let i = start; i <= end; i++) {\n      idsSql.push(i);\n    }\n\n    let idsSqlString = '$' + idsSql.join(',$');\n\n    return [{\n      tableName: \"shipment_items\",\n      params:[ ...orderIds ],\n      sql: `\n        DELETE FROM shipment_items\n        WHERE order_id IN (${ idsSqlString })`\n    }];\n  }\n\n  against_advance_sql(againstAdvances) {\n    let shipmentId = this.shipment_id;\n    let sqls = [];\n\n    for ( let againstAdvance of againstAdvances ) {\n      sqls = [ ...sqls,  ...new AdvanceModel()\n        .set_system_created(true)\n        .set_site(this.site_id)\n        .set_whose_advance(againstAdvance.user_id)\n        .set_amount(againstAdvance.amount * -1)\n        .set_constants(this.CONSTANTS.Advance.TYPE_CODE['\u4F5C\u5EE2'])\n        .set_editor(window.app.state.staff.user_id)\n        .save_sql({\n          \"saveRelationTable\" : true,\n          \"dynamicParams\" : {\n            description: function(results){\n              return `\u9810\u5132\u91D1\u9000\u9084 \u539F\u56E0\uFE30\u51FA\u8CA8\u55AE\u4F5C\u5EE2`\n            },\n            shipment_id: function(results){\n              return shipmentId;\n            }\n          }\n        })\n      ];\n    }\n    return sqls;\n  }\n\n  update_shipment_item_sql_for_destroy() {\n    if (!this.shipment_items) {\n      alert(' update_shipment_item_sql_for_destroy \u6C92\u6709 this.shipment_items ');\n    }\n\n    let sql = [];\n    for ( let shipmentItem of this.shipment_items ) {\n      sql = [ ...sql,\n        ...shipmentItem\n        .set_order_id(0) //\u8A2D\u62100 \u4EE3\u8868\u5DF2\u7D93\u8DDF\u539F\u5148\u7684\u8A02\u55AE\u5207\u65B7\u9023\u63A5\u4E86 shipmentItem\u672C\u8EAB\u5C31\u8B8A\u6210\u4E00\u500B\u7D00\u9304\u6A94\u6848\n        .set_recored_data_of_canceled_shipment()\n        .save_sql()\n      ];\n    }\n    return sql;\n  }\n\n  async destroy_sql(options = {}){\n    let that = this;\n    let updateOrderStatusAndShippedQtySql = [];\n    let updateShipmentItemForDestroySql = [];\n    let updateAdvanceBalanceSql = [];\n    let againstAdvanceSql = [];\n    let destroyOrdersSql = [];\n    let destroyCouponRelationSql = [];\n\n    if ( !this.orders ) {\n      alert('shipment destroy_sql \u8ACB\u5148\u5B9A\u7FA9 this.orders');\n      return [];\n    }\n\n    if ( !this.shipment_items ) {\n      alert('shipment destroy_sql \u8ACB\u5148\u5B9A\u7FA9 this.shipment_items');\n      return [];\n    }\n\n    if (options[\"destroyRelationTable\"]) {\n      // updateOrderStatusAndShippedQtySql = this.update_orders_status_to_complete_Sql(this.orders.map(o => o.id), this.CONSTANTS.Order.STATUS[\"\u51FA\u8CA8\u8655\u7406\u4E2D\"], false);\n      // updateShipmentItemForDestroySql = this.destroy_shipment_item_sql(this.orders.map(o => o.id));\n\n      this.orders = this.orders.to_orders_class();\n\n      // let orderIds = this.orders.map(o => o.id);\n      // let thisOrdersShipmentItems = (await new AdvanceBalanceModel().where(\"site_id\",this.site_id).where(\"user_id\",this.user_id).get_datas()).rows.to_advance_balances_class().first();\n\n\n      for (let order of this.orders ) {\n        if (!order.is_on_site_checkout_order) {\n          // \u9019\u88E1\u8981\u628A \u7DDA\u4E0A\u8A02\u55AE \u6539\u56DE\u53BB\u5C1A\u672A\u51FA\u8CA8\u7684\u72C0\u6CC1 ====\n\n      //     //\n      // 1. pending => completed\n\n      // 2. shipped_qty => 0 => 2\n\n      // 3. ShipmentItemModel \u780D\u6389\n\n      // 4. \u5982\u679C\u6709\u4F7F\u7528 advance \u5247\u8981\u518D\u65B0\u589E\u4E00\u500B advance \u7528\u4F86\u8FD4\u9084\u5132\u503C\u91D1\n\n          // order.set_status(this.CONSTANTS.Order.STATUS[\"\u51FA\u8CA8\u8655\u7406\u4E2D\"], window.app.state.staff.user_id);\n\n\n          await order.load_shipment_items(this.shipment_items);\n          updateOrderStatusAndShippedQtySql = [ ...updateOrderStatusAndShippedQtySql, ...order.set_import({ \"CONSTANTS\" : this.CONSTANTS }).update_status_and_shipped_qty_sql_for_destroy_shipment(this.id) ];\n\n          // let currentShipmentItem = this.shipment_items.filter(i => i.order_id == order.id).first();\n          // if (currentShipmentItem) {\n          //   // order.load_shipment_items(this.shipment_items);\n          //   // order.update_status_and_shipped_qty_sql_for_destroy_shipment();\n\n\n          //   // order\n          //   //   // quantity, shipped_qty_for_shipment, price, couponType, cost = null, shippedQty = null, isGift = false, CONSTANTS\n          //   //   .set_quantity_and_price(order.quantity, null , order.price,  order.coupon_type, order.cost, order.shipped_qty + currentShipmentItem.shipped_qty, this.CONSTANTS)\n          //   //   .set_discount_amount(this.CONSTANTS, splitOrder.coupon_relation)\n          //   //   .set_total_price();\n          // } else {\n          //   alert('\u8CC7\u6599\u6709\u8AA4 Order \u6C92\u6709 ShipmentItem \u7121\u6CD5\u6B63\u78BA\u8655\u7406');\n          // }\n\n\n\n        } else {\n          let orderSql = await order.destroy_sql({\n            CONSTANTS: this.CONSTANTS,\n            destroyRelationTable: true\n          });\n          destroyOrdersSql = [\n            ...destroyOrdersSql,\n            ...orderSql\n          ];\n        }\n      }\n\n      if(!this.advances){\n        alert('ShipmentModel destroy_sql \u6C92\u6709 this.advances ');\n      }\n\n      //\u5982\u679C\u6709\u7528\u9810\u5132\u91D1 \u8981\u6C96\u92B7\n      if(this.advances.filter(a => !a.against_advance_id).length > 0) {\n        againstAdvanceSql = this.against_advance_sql(this.advances.filter(a => !a.against_advance_id));\n      }\n\n      let advanceBalanceModel = (await new AdvanceBalanceModel().where(\"site_id\",this.site_id).where(\"user_id\",this.user_id).get_datas()).rows.to_advance_balances_class().first();\n      updateAdvanceBalanceSql = advanceBalanceModel.update_balance_sql();\n\n      destroyCouponRelationSql = new CouponRelationModel().where(\"shipment_id\", this.id).destroy_sql();\n\n\n\n      //     //\n      // 1. pending => completed\n\n      // 2. shipped_qty => 0 => 2\n\n      // 3. ShipmentItemModel \u780D\u6389\n\n      // 4. \u5982\u679C\u6709\u4F7F\u7528 advance \u5247\u8981\u518D\u65B0\u589E\u4E00\u500B advance \u7528\u4F86\u8FD4\u9084\u5132\u503C\u91D1\n\n    }\n\n    // this.set_status(this.CONSTANTS.Shipment.STATUS[\"\u4F5C\u5EE2\"]);\n\n    updateShipmentItemForDestroySql = this.update_shipment_item_sql_for_destroy();\n\n    let sqlObjs = [{sql: \"BEGIN\"},\n      {\n        tableName: \"shipments\",\n        params:[ this.id, this.CONSTANTS.Shipment.STATUS[\"\u4F5C\u5EE2\"] ],\n        sql: `\n          UPDATE shipments\n          SET status = $2\n          WHERE id = $1`\n      },\n      ...updateOrderStatusAndShippedQtySql,\n      ...destroyOrdersSql,\n      ...updateShipmentItemForDestroySql,\n      ...againstAdvanceSql,\n      ...updateAdvanceBalanceSql,\n      ...destroyCouponRelationSql,\n      // {\n      //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n      //   params: [],\n      //   validate: function(currentResult, allResults){\n      //     let success = false;\n      //     return success;\n      //   },\n      //   errorMessage: \"\u5C31\u662F\u932F\"\n      // },\n\n    {sql: \"END\"}];\n\n    return sqlObjs;\n  }\n\n\n\n  async destroy(options = {}){\n    let that = this;\n    let success = true;\n    let errors = [];\n\n    let sqlObjs = await this.destroy_sql(options);\n\n    let rowCount = 0;\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      rowCount = results?.datasByTableName[that.tableName]?.rowCount;\n    }).catch(async err => {\n      if( err?.message ) {\n        success = false;\n        errors.push(err?.message);\n      }\n    });\n\n    return {\n      success: success,\n      errors: errors,\n      rowCount: rowCount\n    };\n  }\n}\n\nexport class CouponProductRelationModel extends Model {\n  constructor(that) {\n    super(that)\n\n    this.tableName = \"coupon_product_relations\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  load_product(products){\n    if( products ){\n      this.product = (products?.filter(p=>(p.id == this.product_id ))?.first() ?? {});\n      this.product = [this.product].to_products_class().first();\n    }\n    return this;\n  }\n\n  set_coupon_product_relation(couponId, productId, productModelId, coupon_type) {\n    this.coupon_id = couponId;\n    this.product_id = productId;\n    this.product_model_id = productModelId;\n    this.coupon_relation_id = null;\n    this.quantity = null;\n    this.coupon_type = coupon_type;\n    return this;\n  }\n\n  // set_coupon_relation_product_relation(productId, productModelId, couponRelationId, quantity, type) {\n  //   this.coupon_id = null;\n  //   this.product_id = productId;\n  //   this.product_model_id = productModelId;\n  //   this.coupon_relation_id = couponRelationId;\n  //   this.quantity = quantity;\n  //   this.type = type;\n  //   return this;\n  // }\n\n  save_sql(options = {}){\n    let that = this;\n    let dynamicParams = options[\"dynamicParams\"] ?? {};\n    this.afterSaveData = {...this};\n\n    if (!this.product_id) {\n      alert(`CouponProductRelationModel save_sql product_id \u6216\u662F coupon_type \u4E0D\u53EF\u4EE5\u662F\u7A7A\u503C`);\n      return;\n    }\n\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      this.tableName,\n      `id,coupon_id${ dynamicParams[\"coupon_id\"] ? \"(IsDynamicParam)\" : \"\" },product_id,product_model_id(NullIfEmpty),coupon_type,created_at,updated_at`,\n      {...dynamicParams}\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    let addStockQtySql = [];\n    if (this.quantity) {\n      if (this.product_id) {\n        if (this.product_model_id) {\n          addStockQtySql = new ProductModelClass({ id: this.product_model_id, product_id: this.product_id }).add_stock_qty_sql(this.quantity*-1, true);\n        } else {\n          addStockQtySql = new ProductModel({id: this.product_id}).add_stock_qty_sql(this.quantity*-1);\n        }\n      }\n    }\n\n    return [\n      saveSql,\n      ...addStockQtySql\n    ]\n  }\n\n}\n\n\nexport class CouponRelationModel extends Model {\n  constructor(that) {\n    super(that)\n\n    this.tableName = \"coupon_relations\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  set_coupon_relation_columns(coupon){\n\n    if (!coupon) {\n      alert(`\u6C92\u6709\u5B9A\u7FA9 CouponRelationModel set_coupon_relation_columns coupon`);\n      return;\n    }\n    this.coupon = coupon;\n    this.coupon_id = coupon.id;\n    this.discount_type = coupon.discount_type;\n    this.discount = coupon.discount;\n    this.limit_amount = coupon.limit_amount;\n    this.name = coupon.name;\n    this.code = coupon.code;\n    this.type_code = coupon.type_code;\n    this.limited_count = coupon.limited_count;\n    this.start_time = coupon.start_time;\n    this.end_time = coupon.end_time;\n    this.used_count = coupon.used_count;\n    this.gift = coupon.gift;\n    this.buy_product_id = coupon.buy_product_id;\n    this.gift_product_id = coupon.gift_product_id;\n    this.buy_count = coupon.buy_count;\n    this.gift_count = coupon.gift_count;\n    this.limit_user_used_count = coupon.limit_user_used_count;\n    return this;\n  }\n\n  coupon_can_be_used() {\n    this.notice_messages = [];\n    if ( [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(this.type_code*1) &&\n      (!this.buy_order || this.buy_order.quantity != this.buy_count) ) {\n      if (this.buy_order) {\n        this.notice_messages.push(`\u518D\u52A0${ this.buy_count - this.buy_order.quantity }\u4EF6\u5546\u54C1( ${ this.coupon.buy_product.name } )\u6EFF\u8DB3\u512A\u60E0\u689D\u4EF6`);\n      // console.log(`\u518D\u52A0${ this.buy_count - this.buy_order.quantity }\u4EF6\u5546\u54C1( ${ this.coupon.buy_product.name } )\u6EFF\u8DB3\u512A\u60E0\u689D\u4EF6`);\n      }\n\n      return false;\n    }\n\n    if ( this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"] == this.type_code ||\n          this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"] == this.type_code  ) {\n      if ( !this.gift_orders ) {\n        this.notice_messages.push(`\u53EF\u52A0\u8D08 ${ this.coupon.gift_product.name } ${ this.coupon.gift_count }\u4EF6`);\n      // console.log(`\u53EF\u52A0\u8D08 ${ this.coupon.gift_product.name } ${ this.coupon.gift_count }\u4EF6`);\n\n        return false;\n      }\n\n      let giftOrdersQuantitySum = this.gift_orders_quantity_sum();\n      if (giftOrdersQuantitySum != this.gift_count) {\n        this.notice_messages.push(`\u53EF\u52A0\u8D08 ${ this.coupon.gift_product.name } ${ this.coupon.gift_count - giftOrdersQuantitySum }\u4EF6`);\n      // console.log(`\u53EF\u52A0\u8D08 ${ this.coupon.gift_product.name } ${ this.coupon.gift_count - giftOrdersQuantitySum }\u4EF6`);\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  gift_orders_quantity_sum(){\n    let giftOrdersQuantitySum = 0;\n    if (!this.gift_orders) {\n      return 0;\n    }\n    for ( let giftOrder of this.gift_orders ) {\n      giftOrdersQuantitySum = giftOrdersQuantitySum + giftOrder.quantity;\n    }\n    return giftOrdersQuantitySum;\n  }\n\n  clear_buy_order_and_gift_order_bind() {\n    if (this.buy_order) {\n      this.buy_order.coupon_relation = null;\n      this.buy_order\n        .set_quantity_and_price(this.buy_order.quantity, this.buy_order.shipped_qty_for_shipment, this.buy_order.price, null, this.buy_order.cost, this.buy_order.shipped_qty, this.CONSTANTS)\n        .set_discount_amount(this.CONSTANTS)\n        .set_total_price();\n\n      this.buy_order = null;\n    }\n    if (this.gift_orders) {\n      for (let giftOrder of this.gift_orders ) {\n        giftOrder.coupon_relation = null;\n        giftOrder\n          .set_quantity_and_price(giftOrder.quantity, giftOrder.shipped_qty_for_shipment, giftOrder.price, null, giftOrder.cost, giftOrder.shipped_qty, this.CONSTANTS)\n          .set_discount_amount(this.CONSTANTS)\n          .set_total_price();\n      }\n      this.gift_orders = null;\n    }\n    return this;\n  }\n\n\n\n  batch_load_gift_orders_and_buy_order_and_related_products(CONSTANTS, couponRelations, buyAndGiftOrders, buyAndGiftOrderProducts) {\n    // let couponRelationIds = couponRelations.map(o => o.id);\n    // let orders = couponRelationIds.length == 0 ? [] : (await (new OrderModel()).where(\" coupon_relation_id in ? \",[couponRelationIds]).get_datas()).rows.to_orders_class();\n\n    // let productIds = orders.map(o => o.product_id);\n    // let products = productIds.length == 0 ? [] : (await (new ProductModel()).where(\" id in ? \",[productIds]).get_datas()).rows.to_products_class();\n\n    buyAndGiftOrders = buyAndGiftOrders.to_orders_class();\n    buyAndGiftOrderProducts = buyAndGiftOrderProducts.to_products_class();\n\n    for ( let order of buyAndGiftOrders ) {\n      order.load_product(buyAndGiftOrderProducts);\n    }\n\n    couponRelations = couponRelations.to_coupon_relations_class();\n    for ( let couponRelation of couponRelations ) {\n      couponRelation.load_buy_order(CONSTANTS, buyAndGiftOrders);\n      couponRelation.set_import({ \"CONSTANTS\" : CONSTANTS }).load_gift_orders(buyAndGiftOrders);\n    }\n  }\n\n  async load_gift_orders(orders){\n    if( orders ){\n      this.gift_orders = (orders?.filter(o=>(o.coupon_relation_id == this.id )) ?? []).to_orders_class();\n      this.gift_orders = this.gift_orders.filter(o => o.coupon_type == this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] );\n      return this;\n    } else {\n      let ordersWas = this.orders;\n      await super.load_gift_orders(null, \"coupon_relation_id\",this.CONSTANTS);\n      this.orders = ordersWas;\n      return this;\n    }\n  }\n\n  async load_buy_order(CONSTANTS, orders){\n    if( orders ){\n      let thisCouponRelationOrders = (orders?.filter(o=>(o.coupon_relation_id == this.id )) ?? [])?.to_orders_class();\n      this.buy_order = thisCouponRelationOrders.filter(o => o.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"] ).first();\n      return this;\n    } else {\n      let ordersWas = this.orders;\n      await super.load_buy_order(null, \"coupon_relation_id\",CONSTANTS);\n      this.orders = ordersWas;\n      return this;\n    }\n  }\n\n  set_buy_and_gift_count(coupon){\n    this.buy_count = coupon.buy_count;\n    this.gift_count = coupon.gift_count;\n    return this;\n  }\n\n  set_shipment_discount_amount(coupon, needToPayAmount, CONSTANTS) {\n    switch (coupon.type_code) {\n      case CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]:\n        coupon.get_discount_amount(needToPayAmount, CONSTANTS);\n      \u3000break;\n      case CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"]:\n        this.shipment_discount_amount = coupon.cost_of_gift(CONSTANTS);\n      \u3000break;\n      case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u7D05\u5229(\u56DE\u994B\u5132\u503C\u91D1)\"]:\n        coupon.get_discount_amount(needToPayAmount, CONSTANTS);\n      \u3000break;\n      case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]:\n        this.shipment_discount_amount = coupon.cost_of_gift(CONSTANTS);\n      \u3000break;\n      case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"]:\n        coupon.get_discount_amount(needToPayAmount, CONSTANTS);\n      \u3000break;\n      default:\n    }\n\n    return this;\n  }\n  set_whose_buy(userId){\n    this.user_id = userId;\n    return this;\n  }\n  set_buy_order(orderId){\n    this.buy_order_id = orderId;\n    return this;\n  }\n  // set_gift_order(orderId){\n  //   this.gift_order_id = orderId;\n  //   return this;\n  // }\n\n  validate_column_logic_sql(){\n    if (!this.coupon_id) {\n      alert('CouponRelationModel validate_column_logic_sql this.coupon_id \u6C92\u8A2D\u5B9A');\n    }\n\n    let sqlObj = new CouponModel().active().where(\"id\", this.coupon_id).get_sql();\n\n    return [{\n      sql: sqlObj.sql,\n      params: sqlObj.params,\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length != 0);\n        return success;\n      },\n      errorMessage: \"\u6B64\u512A\u60E0\u5DF2\u505C\u7528\"\n    }];\n  }\n\n  async load_buy_order_and_product_and_product_models(orders, products, productModels) {\n    if (orders) {\n      orders = orders.to_orders_class();\n    } else {\n      orders = (await new OrderModel().where(\"coupon_relation_id\", this.id).get_datas()).rows.to_orders_class();\n    }\n    let productIds = orders.map(o => o.product_id).filter(i => i).unique();\n\n    if (products) {\n      products = products.to_products_class();\n    } else {\n      products = productIds.length == 0 ? [] : (await new ProductModel().where(\"id in ?\", [productIds]).get_datas()).rows.to_products_class();\n    }\n\n    if (productModels) {\n      productModels = productModels.to_productModels_class();\n    } else {\n      productModels = productIds.length == 0 ? [] : (await new ProductModelClass().where(\"product_id in ?\", [productIds]).get_datas()).rows.to_product_models_class();\n    }\n\n    for (let product of products) {\n      product.load_product_models(productModels);\n    }\n\n    for (let order of orders) {\n      order.load_product(products);\n    }\n\n    return row;\n  }\n\n\n  save_sql(options){\n    let that = this;\n\n    if(!options[\"CONSTANTS\"]){\n      alert(`\u6C92\u6709\u50B3\u5165CONSTANTS\u53C3\u6578`);\n      return false;\n    }\n\n    let shipment_id = this.shipment_id ? this.shipment_id : \"{@shipment_id}\";\n    this.afterSaveData = {...this};\n\n    let saveSql = [{...this, shipment_id: shipment_id}].toSaveSqlObjs(\n      \"coupon_relations\",\n      `id,shipment_id(IsDynamicParam),coupon_id,shipment_discount_amount,discount_type,discount,limit_amount,end_time,used_count,type_code,limited_count,start_time,name,code,gift,limit_user_used_count,coupon_relation_used_count,user_id,buy_count,gift_count`,\n      {\n        shipment_id: function(results){\n          return results.shipments?.rows?.first()?.id\n        }\n      }\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n      if(options?.afterSaveCallBack){\n        options?.afterSaveCallBack.apply(this,[result, sqlString, sqlParams, datasByTableName]);\n      }\n    }};\n\n    let increaseCouponUsedCountSql = [];\n    let couponProductRelationModelSqls = [];\n    let validateStockQtySql = [];\n    if (options[\"saveRelationTable\"]) {\n      increaseCouponUsedCountSql = this.increase_coupon_used_count_sql();\n    }\n\n    return [\n      saveSql,\n      ...increaseCouponUsedCountSql,\n      ...this.validate_column_logic_sql(),\n      ...validateStockQtySql\n    ]\n  }\n\n  increase_coupon_used_count_sql() {\n\n    if (!this.coupon_id) {\n      alert(\"\u6C92\u6709\u8A2D\u5B9Acoupon_id\");\n    }\n\n    return [{\n      tableName: \"coupons\",\n      params:[this.coupon_id ],\n      sql: `\n        UPDATE coupons\n        SET used_count = used_count + 1\n        WHERE id = $1`\n    }];\n  }\n}\n\nexport class ShipmentItemModel extends Model {\n\n  constructor(that) {\n    super(that)\n    this.tableName = \"shipment_items\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  async batch_load_order_and_related_tables(shipmentItems){\n    let orderIds = shipmentItems.map(o => o.order_id);\n    let allOrders = await orderIds.ids_to_class(\"Orders\");\n\n    let couponRelationIds = allOrders.map(o => o.coupon_relation_id);\n    let allCouponRelations = await couponRelationIds.ids_to_class(\"CouponRelations\");\n\n    let couponIds = allCouponRelations.map(o => o.coupon_id);\n    let allCoupons = await couponIds.ids_to_class(\"Coupons\");\n\n    for ( let couponRelation of allCouponRelations ) {\n      couponRelation.load_coupon(allCoupons);\n    }\n\n    for ( let order of allOrders ) {\n      order.load_coupon_relation(allCouponRelations);\n    }\n\n    for ( let shipmentItem of shipmentItems ) {\n      shipmentItem.load_order(allOrders);\n    }\n\n    return shipmentItems;\n  }\n\n  set_shipment(shipmentId, shippedQty, shipmentTotalPrice){\n    this.shipment_id = shipmentId;\n    this.shipped_qty = shippedQty;\n    this.shipment_total_price = shipmentTotalPrice;\n    return this;\n  }\n\n  set_order_id(orderId){\n    this.order_id = orderId;\n    return this;\n  }\n\n  set_recored_data_of_canceled_shipment(){\n\n    if (!this.order) {\n      alert(` set_recored_data_of_canceled_shipment \u6C92\u6709\u8B80\u53D6 this.order `);\n      return this;\n    }\n    if (!this.order.product) {\n      alert(` set_recored_data_of_canceled_shipment \u6C92\u6709\u8B80\u53D6 this.order.product `);\n      return this;\n    }\n\n    this.price = this.order.price;\n    this.discount_amount = this.order.discount_amount;\n    this.total_price = this.order.total_price;\n    this.buyer_name = this.order.buyer_name;\n    this.buyer_mobile = this.order.buyer_mobile;\n    this.product_name = this.order.product.name;\n    this.coupon_type = this.order.coupon_type;\n    this.coupon_relation_id = this.order.coupon_relation_id;\n    this.coupon_name = this.order.coupon_relation ? this.order.coupon_relation.coupon.name : \"\";\n\n    return this;\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    if (this[\"order_id\"] == undefined) {\n      alert('\u8ACB\u5148\u5B9A\u7FA9order_id');\n      return [];\n    }\n    if (this.order.constructor.name != 'Order') {\n      this.order = new OrderModel(this.order);\n    }\n\n    let shipment_id = this.shipment_id ? this.shipment_id : \"{@shipment_id}\";\n    let isDynamicShipmentId = this.shipment_id ? false : true;\n    this.afterSaveData = {...this};\n\n    let saveSql = [{...this, shipment_id: shipment_id}].toSaveSqlObjs(\n      \"shipment_items\",\n      `id,shipment_id(IsDynamicParam),order_id,shipped_qty,shipment_total_price,discount_amount,total_price,buyer_name,buyer_mobile,product_name,coupon_type,coupon_relation_id,coupon_name,updated_at,created_at`,\n      {\n        shipment_id: function(results){\n          return isDynamicShipmentId ? results.shipments.rows?.first()?.id : shipment_id;\n        }\n      }\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    let triggerAddShippedQtySql = [];\n    if (options[\"saveRelationTable\"]) {\n      triggerAddShippedQtySql = new OrderModel({ \"id\": that[\"order_id\"] }).add_shipped_qty_sql(this[\"shipped_qty\"]);\n    }\n\n    return [\n      saveSql,\n      ...triggerAddShippedQtySql,\n      ...this.order.validate_column_logic_sql()\n    ]\n  }\n\n  random_data(){\n    let data = {\n      shipment_id: Math.floor(Math.random() * 1000000),\n      order_id: Math.floor(Math.random() * 1000000),\n      shipped_qty: Math.random() * 100,\n      created_at: new Date(),\n      updated_at: new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n}\n\nexport class AdvanceModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"advances\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  random_data(){\n    let data = {\n      site_id : Math.floor(Math.random() * 1000000),\n      user_id : Math.floor(Math.random() * 1000000),\n      amount : Math.random() * 100,\n      description : \"Some random description\",\n      system_created : Math.random() > 0.5,\n      shipment_id : Math.floor(Math.random() * 1000000),\n      deleted : Math.random() > 0.5,\n      against_advance_id : Math.floor(Math.random() * 1000000),\n      type_code : Math.floor(Math.random() * 1000000),\n      created_by : Math.floor(Math.random() * 1000000),\n      updated_by : Math.floor(Math.random() * 1000000),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      // this[`${key}_was`] = data[key];\n      this[`${key}`] = data[key];\n    }\n  }\n\n  can_destroy(CONSTANTS) {\n    if(!CONSTANTS){\n      alert(`\u6C92\u6709\u50B3\u5165CONSTANTS\u53C3\u6578`);\n      return false;\n    }\n    return !this.against_advance_id && ( !this.system_created || this.type_code == CONSTANTS.Advance.TYPE_CODE[\"\u5EF6\u9072\u4ED8\u6B3E\"] )\n  }\n\n  // update_balance_sql() {\n  //   if (this[\"destroyed?\"] == undefined) {\n  //     alert('\u8ACB\u5148\u5B9A\u7FA9destroyed?');\n  //     return [];\n  //   }\n\n  //   return [{\n  //     params:[this.site_id, this.user_id],\n  //     sql: `\n  //       INSERT INTO advance_balances (site_id, user_id, balance, id)\n  //       SELECT  $1, $2, 0 ,(SELECT COALESCE((SELECT MIN(id) FROM advance_balances WHERE id < 0), 0)-1)\n  //       WHERE\n  //       NOT EXISTS (  SELECT 1 FROM advance_balances WHERE site_id = $1 AND user_id = $2 );`\n  //   },\n  //   {\n  //     tableName: \"advance_balances\",\n  //     params:[this.user_id, this.site_id, this[\"destroyed?\"] ? -1*this.amount : this.amount ],\n  //     sql: `\n  //       UPDATE advance_balances\n  //       SET balance = balance + $3\n  //       WHERE site_id = $2 AND user_id = $1`\n  //   }];\n  // }\n\n  validate_column_logic_sql(){\n    return [];\n  }\n\n  set_site(siteOrId) {\n    if (siteOrId.id) {\n      this.site_id = siteOrId.id;\n    } else {\n      this.site_id = siteOrId;\n    }\n    return this;\n  }\n\n  set_system_created(systemCreated){\n    this.system_created = systemCreated;\n    return this;\n  }\n\n  set_whose_advance(userOrId)  {\n    if (userOrId.id) {\n      this.user_id = userOrId.id;\n    } else {\n      this.user_id = userOrId;\n    }\n    return this;\n  }\n\n  set_amount(amount) {\n    this.amount = amount;\n    return this;\n  }\n\n  set_constants(typeCode) {\n    this.type_code = typeCode;\n    return this;\n  }\n\n  set_editor(editUserId) {\n    this.created_by = this.created_by ? this.created_by : editUserId;\n    this.updated_by = editUserId;\n    return this;\n  }\n\n  save_sql(options = {}){\n    let that = this;\n\n    let dynamicParams = options[\"dynamicParams\"] ?? {};\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"advances\",\n      `updated_at,site_id,user_id,amount,id,system_created,shipment_id${ dynamicParams[\"shipment_id\"] ? \"(IsDynamicParam)\" : \"\" },deleted(FalseIfBlank),against_advance_id,type_code,created_by,updated_by,created_at,description${ dynamicParams[\"description\"] ? \"(IsDynamicParam)\" : \"\" }`,\n      {...dynamicParams}\n    )[0];\n\n    let updateAdvanceBalanceSql = [];\n    if( options[\"saveRelationTable\"] ) {\n      updateAdvanceBalanceSql = [...new AdvanceBalanceModel({\"site_id\": that.site_id ,\"user_id\": that.user_id}).add_balance_sql(that[\"destroyed?\"] ? -1*that.amount : that.amount)];\n    }\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    return [\n      saveSql,\n      ...updateAdvanceBalanceSql,\n      ...this.validate_column_logic_sql()\n    ]\n  }\n}\n\n//product_model \u7684 class\nexport class ProductModelClass extends Model {\n  constructor(that) {\n    super(that);\n    this.tableName = \"product_models\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  async load_coupon_product_relations(coupon_product_relations) {\n    if( coupon_product_relations ){\n      return this.coupon_product_relations = coupon_product_relations.filter(p=>(p.product_model_id == this.id && p.product_model_id ));\n    } else {\n      return await super.load_coupon_product_relations(coupon_product_relations, \"product_model_id\");\n    }\n  }\n\n  async load_product(products){\n    if( products ){\n      return this.product = (products?.filter(p=>(p.id == this.product_id ))?.first() ?? {});\n    } else {\n      return await super.load_product();\n    }\n  }\n\n  async load_product_prices(product_prices) {\n    if( product_prices ){\n      return this.product_prices = product_prices.filter(p=>(p.product_model_id == this.id && p.product_model_id ));\n    } else {\n      return await super.load_product_prices(product_prices, \"product_model_id\");\n    }\n  }\n\n  add_stock_qty_sql(addQty, triggerProductAddStockQtySql = false) {\n    if ( !this.id ) {\n      alert('add_stock_qty_sql \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    if ( !addQty && addQty != 0 ) {\n      alert('\u8ACB\u5148\u5B9A\u7FA9addQty');\n      return [];\n    }\n\n    let productAddStockQtySql = [];\n    if (triggerProductAddStockQtySql && this.product_id) {\n      productAddStockQtySql = (new ProductModel({id: this.product_id })).add_stock_qty_sql(addQty);\n    }\n\n    return [{\n      sql: `\n        UPDATE ${ this.tableName }\n        SET stock_qty = stock_qty + $2\n        WHERE id=$1 AND stock_qty IS NOT NULL ;`,\n      params: [ this.id, addQty ]\n    },\n    ...productAddStockQtySql\n    ];\n  }\n\n  validate_ean_after_save_sql(options = {}){\n    if ( !this.ean ) {\n      return [];\n    }\n\n    let sqlObj = {\n      sql: `\n        (\n          SELECT id,ean\n          FROM products\n          WHERE ean = $1\n        )\n        UNION\n        (\n          SELECT id,ean\n          FROM  product_models\n          WHERE ean = $2\n        )\n      `,\n      params: [ this.ean, this.ean ],\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length <= 1);\n        return success;\n      },\n      errorMessage: \"\u5DF2\u6709\u76F8\u540C\u570B\u969B\u689D\u78BC\"\n    }\n\n    return [sqlObj];\n  }\n\n  validate_column_logic_sql(options){\n    return [\n      ...this.validate_ean_after_save_sql(options)\n    ];\n  }\n\n  to_json(whitelist){\n    let data = whitelist ? whitelist : [\"id\", \"product_id\", \"name\", \"ean\", \"price\", \"cost\", \"stock_qty\", \"site_id\", \"created_at\", \"updated_at\"]\n    return super.to_json(data);\n  }\n\n  get_current_price(memberLevelId){\n\n    if ( !this.product_prices ) {\n      alert('\u8ACB\u5148\u5B9A\u7FA9 ProductModel \u7684 this.product_prices');\n      return 0;\n    }\n\n    // if(!this.product){\n    //   await this.load_product();\n    // }\n    if(!this?.product?.product_prices){\n      alert('ProductModelClass get_current_price \u8ACB\u5148\u5B9A\u7FA9 this.product.product_prices');\n      return 0;\n    }\n\n    let defaultMemberLevelPrice = this.product.product_prices.filter(r=>(!r.product_model_id && r.member_level_id == memberLevelId )).first();\n    let price = (defaultMemberLevelPrice && defaultMemberLevelPrice.price) ? defaultMemberLevelPrice.price : this.product.price; //\u9810\u8A2D\u662F\u5546\u54C1\u7684\u50F9\u683C\n    let reason = \"\";\n    let isProductPrice = true;\n    let thisProductPrices = this.product_prices ? this.product_prices : [];\n\n    //\u63A5\u4E0B\u4F86\u5224\u65B7\u662F\u5426\u5957\u7528\u6703\u54E1\u7B49\u7D1A\u50F9\u683C\n    if(isProductPrice && !memberLevelId){\n      reason = \"\u8A72\u6703\u54E1\u6C92\u6709\u8A2D\u5B9A\u7B49\u7D1A\";\n      isProductPrice = false;\n    }\n\n    if(isProductPrice && thisProductPrices.length == 0){\n      reason = \"\u6C92\u6709\u8A2D\u5B9A\u6703\u54E1\u4EFB\u4F55\u7B49\u7D1A\u50F9\u683C\";\n      isProductPrice = false;\n    }\n\n    if(isProductPrice){\n      let currentMemberLevelPrice = thisProductPrices.filter(price => price.member_level_id == memberLevelId ).first();\n      if(currentMemberLevelPrice && currentMemberLevelPrice.price){\n        price = currentMemberLevelPrice.price\n      } else {\n        reason = \"\u6C92\u6709\u8A2D\u5B9A\u76F8\u5C0D\u61C9\u7684\u6703\u54E1\u7B49\u7D1A\u50F9\u683C\";\n        isProductPrice = false;\n      }\n    }\n\n    return price;\n  }\n}\n\n\n\n//product \u7684 class\nexport class ProductModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"products\";\n  }\n\n  get_current_price(memberLevelId, productModelId){\n    let defaultPrice = this.price;\n\n    if(!this?.product_prices){\n      alert('ProductModel get_current_price \u8ACB\u5148\u5B9A\u7FA9 this.product_prices');\n      return [];\n    }\n\n    if (memberLevelId && productModelId) { //\u662F\u6703\u54E1 \u53C8\u9078\u5F62\u5F0F\n      let thisPrice = this.product_prices.filter(p => p.member_level_id == memberLevelId && p.product_model_id == productModelId)?.first()?.price;\n      if (thisPrice) {\n        return thisPrice*1;\n      } else {\n        return this.get_current_price(memberLevelId, '');\n      }\n    } else if (memberLevelId && !productModelId) { //\u662F\u6703\u54E1 \u4E0D\u9078\u5F62\u5F0F\n      let thisPrice = this.product_prices.filter(p => p.member_level_id == memberLevelId && !p.product_model_id)?.first()?.price;\n      if (thisPrice) {\n        return thisPrice*1;\n      }\n    } else if (!memberLevelId && productModelId) { //\u4E0D\u662F\u6703\u54E1 \u9078\u5F62\u5F0F\n      let thisPrice = this.product_models.filter(p => p.id == productModelId)?.first()?.price;\n      if (thisPrice) {\n        return thisPrice*1;\n      }\n    } else if(!memberLevelId && !productModelId) { //\u4E0D\u662F\u6703\u54E1 \u4E0D\u9078\u5F62\u5F0F\n      //do nothing\n    }\n    return defaultPrice*1;\n  }\n\n  async get_autocomplete(params={}){\n    return await super.ajax({\n      ...params,\n      method:\"GET\",\n      url:'/' + params.domain +`/backend/products/autocomplete.json?limit=10&searchOtherData=${ params.searchOtherData }&include_off_shelf_product=&no_order=1&term=` + (params.value ?? '') + '&user_id=' + (params.currentUserId ?? '') + '&product_id=' + (params.productId ? params.productId : \"\")\n    });\n  }\n\n  async get_products(params={}){\n    return await super.ajax({\n      ...params,\n      method:\"GET\",\n      url: `/${ params.domain }/backend/products/get_products.json?include_relatied_data=${ params[\"include_relatied_data\"] }&ids=${ params[\"ids\"] ? encodeURIComponent(JSON.stringify(params[\"ids\"])) : \"\"}`\n    });\n  }\n\n  async create_batch_order_by_ajax(body) {\n    return await this.ajax({\n      method: \"POST\",\n      body:body,\n      url:`/${ body.current_site.domain }/backend/products/${ body.product.id }/create_batch_order.json`\n    });\n  }\n\n  // async register_by_ajax(params) {\n  //   return await this.ajax({\n  //     method: \"POST\",\n  //     body:params,\n  //     url:`/sites`\n  //   });\n  // }\n\n  validate_product_and_product_model_stock_qty_sql(){\n    if ( !this.id ) {\n      return [];\n    }\n\n    let sqlObj = {\n      sql: `\n        (\n          SELECT id AS product_id, null AS product_model_id, stock_qty\n          FROM products\n          WHERE id = $1 AND stock_qty < 0\n        )\n        UNION\n        (\n          SELECT product_id AS product_id, id AS product_model_id, stock_qty\n          FROM  product_models\n          WHERE product_id = $2 AND stock_qty < 0\n        )\n      `,\n      params: [ this.id, this.id ],\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length == 0);\n        return success;\n      },\n      errorMessage: \"\u5546\u54C1\u5EAB\u5B58\u4E0D\u8DB3\"\n    }\n    return [sqlObj];\n  }\n\n  async load_product_prices(product_prices) {\n    if( product_prices ){\n      return this.product_prices = product_prices.filter(p=>(p.product_id == this.id && !p.product_model_id ));\n    } else {\n      return await super.load_product_prices(product_prices, \"product_id\");\n    }\n  }\n\n  load_product_models(product_models) {\n    if( product_models ){\n      this.product_models = product_models.filter(p=>( p.product_id == this.id ));\n      return this;\n    }\n  }\n\n  async load_product_tags(productTags = null, productTagRelations = null) {\n    if( productTags && productTagRelations ) {\n      this.product_tags = productTagRelations.filter(p=>( p.product_id == this.id ));\n      for (let product_tag of this.product_tags) {\n        product_tag.name = productTags?.filter(t => t.id == product_tag.product_tag_id)?.first()?.name;\n      }\n      return this;\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  not_set_product_model_prices() {\n    if (!this.product_models) {\n      alert('not_set_product_model_prices \u6C92\u5B9A\u7FA9 product_models');\n      return;\n    }\n\n    for ( let productModel of this.product_models ) {\n      if (!productModel.product_prices) {\n        alert('not_set_product_model_prices \u6C92\u5B9A\u7FA9 product_models \u7684 product_prices');\n        return;\n      }\n    }\n\n    let notSetProductModelPrices = true;\n    for ( let productModel of this.product_models ) {\n      for ( let productPrice of productModel.product_prices) {\n        if (productPrice.price || productPrice.price === 0) {\n          notSetProductModelPrices = false;\n        }\n      }\n    }\n    return notSetProductModelPrices;\n  }\n\n  validate_ean_after_save_sql(options = {}){\n    if ( !this.ean ) {\n      return [];\n    }\n\n    let sqlObj = {\n      sql: `\n        (\n          SELECT id,ean\n          FROM products\n          WHERE ean = $1\n        )\n        UNION\n        (\n          SELECT id,ean\n          FROM  product_models\n          WHERE ean = $2\n        )\n      `,\n      params: [ this.ean, this.ean ],\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length <= 1);\n        return success;\n      },\n      errorMessage: \"\u5DF2\u6709\u76F8\u540C\u570B\u969B\u689D\u78BC\"\n    }\n\n    return [sqlObj];\n  }\n\n  validate_column_logic_sql(options){\n    return [\n      ...this.validate_ean_after_save_sql(options)\n    ];\n  }\n\n  add_stock_qty_sql(addQty) {\n    if ( !this.id ) {\n      alert(' ProductModel add_stock_qty_sql \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    if ( !addQty ) {\n      alert('\u8ACB\u5148\u5B9A\u7FA9addQty');\n      return [];\n    }\n\n    return [{\n      sql: `\n        UPDATE ${ this.tableName }\n        SET stock_qty = stock_qty + $2\n        WHERE id=$1 AND stock_qty IS NOT NULL ;`,\n      params: [ this.id, addQty ]\n    }];\n  }\n\n  // get_current_price(memberLevelId){\n  //   if ( !this.id ) {\n  //     alert('Product \u8ACB\u5148\u5B9A\u7FA9id');\n  //     return [];\n  //   }\n  //   if ( !this.price ) {\n  //     alert('Product \u8ACB\u5148\u5B9A\u7FA9price');\n  //     return [];\n  //   }\n\n  //   if(!this?.product_prices){\n  //     alert('ProductModel get_current_price \u8ACB\u5148\u5B9A\u7FA9 this.product_prices');\n  //     return [];\n  //   }\n\n  //   let defaultMemberLevelPrice = this.product_prices.filter(r=>(!r.product_model_id && r.member_level_id == memberLevelId )).first();\n  //   let price = (defaultMemberLevelPrice && defaultMemberLevelPrice.price) ? defaultMemberLevelPrice.price : this.price;\n  //   return price;\n  // }\n\n  increase_orders_count_sql() {\n    if ( !this.id ) {\n      alert('Product \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    return [{\n      sql: `\n        UPDATE ${ this.tableName }\n        SET orders_count = COALESCE(orders_count,0) + 1\n        WHERE id=$1;`,\n      params: [ this.id ]\n    }];\n  }\n\n  decrease_orders_count_sql() {\n    if ( !this.id ) {\n      alert('Product \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    return [{\n      sql: `\n        UPDATE ${ this.tableName }\n        SET orders_count = COALESCE(orders_count,0) - 1\n        WHERE id=$1;`,\n      params: [ this.id ]\n    }];\n  }\n\n  async check_changes_stock_and_package_qty(params){\n    let { order, caches, newQuantity, newProductModelId, newProductId, oldProductId, orderId, passStockQtyValidate = false } = params;\n    let result = {};\n\n    if (oldProductId == newProductId) {\n      result = this.check_changes_stock_and_package_qty_in_the_same_product({\n        order : order,\n        caches : caches,\n        newQuantity: newQuantity,\n        newProductModelId: newProductModelId,\n        productId: newProductId,\n        orderId: orderId,\n        passStockQtyValidate: passStockQtyValidate\n      });\n    } else {\n      //\u5982\u679C\u5546\u54C1\u8B8A\u66F4 \u5C31\u62C6\u958B\u5169\u500B\u770B\u5F85 \u820A\u5F97\u9084\u56DE\u53BB \u65B0\u7684\u52A0\u9032\u4F86\n      if (oldProductId) {\n        result = await this.check_changes_stock_and_package_qty_in_the_same_product({\n          order : order,\n          caches : caches,\n          newQuantity: 0,\n          newProductModelId: null,\n          productId: oldProductId,\n          orderId: orderId,\n          passStockQtyValidate: passStockQtyValidate\n        });\n      }\n      if (newProductId) {\n        result = await this.check_changes_stock_and_package_qty_in_the_same_product({\n          order : order,\n          caches : caches,\n          newQuantity: newQuantity,\n          newProductModelId: newProductModelId,\n          productId: newProductId,\n          orderId: null,\n          success: result[\"success\"],\n          errors: result[\"errors\"],\n          messages: result[\"messages\"],\n          stockAndPackageQtyMessages: result[\"stockAndPackageQtyMessages\"],\n          updateStockAndPackageQtySqlObjs: result[\"updateStockAndPackageQtySqlObjs\"],\n          passStockQtyValidate: passStockQtyValidate\n        });\n      }\n    }\n    return result;\n  }\n\n  async destroy(params) {\n    let that = this;\n    let result = await super.destroy_by_ajax({\n      tablePluralName: \"products\",\n      tableSingularName: \"product\",\n      id: that.id,\n      domain : params[\"domain\"],\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"]\n    });\n\n    return result;\n  }\n\n  async check_changes_stock_and_package_qty_in_the_same_product(params)\n  {\n    let { caches, newQuantity, newProductModelId, productId, orderId = null, success = true, errors = [], messages = [], stockAndPackageQtyMessages = {}, updateStockAndPackageQtySqlObjs = [], passStockQtyValidate = false } = params;\n    let calculateProductStockResult = {};\n\n    if ( success && !productId) {\n      success = false;\n      errors.push(\"\u5C1A\u672A\u9078\u53D6\u5546\u54C1\");\n    }\n\n    let sqlObjs = null;\n    if ( success ) {\n      sqlObjs = [{sql: \"BEGIN\"},\n      {\n        tableName: \"orders\",\n        sql: \"SELECT * FROM orders WHERE id=$1\",\n        params: [orderId]\n      },{\n        tableName: \"products\",\n        sql: \"SELECT * FROM products WHERE id=$1 OR id={@product_id}\",\n        params: [productId],\n        dynamicParams: {\n          product_id: function(results){\n            return results.orders.rows?.first()?.product_id ?? productId;\n          }\n        }\n      },{\n        tableName: \"product_models\",\n        sql: \"SELECT * FROM product_models WHERE product_id=$1 OR id={@product_id}\",\n        params: [productId],\n        dynamicParams: {\n          product_id: function(results){\n            return results.orders.rows?.first()?.product_id ?? productId;\n          }\n        }\n      },\n      {sql: \"END\"}];\n    }\n\n    if (success) {\n\n      if ( caches && caches.products && caches.productModels) {\n\n        //\u50B3\u5165cache \u8CC7\u6599 \u7684\u60C5\u6CC1\u4E0B \u9810\u8A2D \u662F\u8981\u65B0\u589E \u6240\u4EE5  thisOrder, quantityWas, oldProductModelId \u7D66\u7A7A\u76F4\n        //\u70BA\u4EC0\u9EBC\u8981\u5BEB\u9019\u9EBC\u602A\u7684\u908F\u8F2F \u4E00\u5207\u90FD\u662F\u70BA\u4E86\u901F\u5EA6 Orz\n        let thisProduct = caches.products.filter(p => p.id == productId)?.first();\n        let thisOrder = null; //order;\n        let thisProductModels = caches.productModels.filter(p => p.product_id == productId);\n        let productModelsGroupById = thisProductModels.groupBy(\"id\");\n        let quantityWas = 0; //thisOrder?.quantity ?? 0;\n        let oldProductModelId = null; //thisOrder?.product_model_id;\n        calculateProductStockResult = calculateProductStock(thisProduct, thisOrder, thisProductModels, productModelsGroupById, quantityWas, oldProductModelId, success, errors, stockAndPackageQtyMessages, updateStockAndPackageQtySqlObjs);\n\n      } else {\n        await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then((results) => {\n\n          let thisProduct = results?.datasByTableName?.products?.rows[0];\n          let thisOrder = results?.datasByTableName?.orders?.rows[0];\n          let thisProductModels = results?.datasByTableName?.product_models?.rows ?? [];\n          let productModelsGroupById = thisProductModels.groupBy(\"id\");\n          let quantityWas = thisOrder?.quantity ?? 0;\n          let oldProductModelId = thisOrder?.product_model_id;\n          calculateProductStockResult = calculateProductStock(thisProduct, thisOrder, thisProductModels, productModelsGroupById, quantityWas, oldProductModelId, success, errors, stockAndPackageQtyMessages, updateStockAndPackageQtySqlObjs);\n\n        }).catch(async err => {\n          if( err?.message ) {\n            success = false;\n            errors.push(err.message);\n          }\n          throw err;\n        });\n      }\n    }\n\n    function calculateProductStock(product, order, productModels, productModelsGroupById, quantityWas, oldProductModelId, success, errors, stockAndPackageQtyMessages, updateStockAndPackageQtySqlObjs){\n\n      if ( success && !product ) {\n        success = false;\n        errors.push(\"\u7121\u6B64\u5546\u54C1\");\n      }\n\n      if ( success && orderId != null && !order) {\n        success = false;\n        errors.push(\"\u7121\u6B64\u8A02\u55AE\");\n      }\n\n      let subQuantity = newQuantity - quantityWas;\n\n      if(success) {\n        // \u6263\u5546\u54C1\u53EF\u8A02\u8CFC\u91CF\n        if (product.stock_qty) { //\u6709\u8A2D\u5B9A\u53EF\u8A02\u8CFC\u91CF\u624D\u9A57\u8B49\n          let productStockQty = product.stock_qty\n          if (productStockQty >= subQuantity) {\n            if (subQuantity != 0) {\n              messages.push(`\u5546\u54C1\u53EF\u8A02\u8CFC\u91CF${(subQuantity > 0 ? \"\" : \"+\")}${subQuantity*-1}`);\n              stockAndPackageQtyMessages[\"product\"] = {\n                \"id\" : product.id,\n                \"from_stock_qty\" : productStockQty,\n                \"to_stock_qty\" : productStockQty - subQuantity,\n                \"add_quantity\" : -1 * subQuantity\n              }\n\n              updateStockAndPackageQtySqlObjs = [\n                ...updateStockAndPackageQtySqlObjs,\n                ...new ProductModel({id: product.id}).add_stock_qty_sql(-1 * subQuantity)\n              ];\n\n              if (!passStockQtyValidate) {\n                updateStockAndPackageQtySqlObjs = [...updateStockAndPackageQtySqlObjs,\n                {\n                  sql: `\n                    SELECT *\n                    FROM products\n                    WHERE id=$1 AND stock_qty = $2\n                  `,\n                  params: [ product.id, productStockQty - subQuantity],\n                  validate: function(currentResult, allResults){\n                    let success = (currentResult.rows.length != 0);\n                    return success;\n                  },\n                  errorMessage: \"\u5546\u54C1\u5EAB\u5B58\u8ABF\u6574\u767C\u751F\u932F\u8AA4\"\n                }]\n              }\n            }\n          } else {\n            success = false;\n            errors.push(`\u5546\u54C1(${ product.name })\u53EF\u8A02\u8CFC\u91CF\u4E0D\u8DB3,\u76EE\u524D\u5EAB\u5B58${ productStockQty }`);\n          }\n        }\n      }\n\n      let productModelChanges = {};\n      if (success && ( oldProductModelId || newProductModelId ) ) {\n        // \u5148\u8FD4\u9084\u820A\u7684\u5EAB\u5B58\n        if (oldProductModelId) {\n          productModelChanges[oldProductModelId] = oldProductModelId ? {\n            \"from\" : quantityWas,\n            \"to\" : 0 //\u9810\u8A2D\u7D660\n          } : null;\n        }\n\n        // \u518D\u6263\u6389\u65B0\u8CB7\u7684\u5EAB\u5B58\n        if (newProductModelId) {\n          productModelChanges[newProductModelId] = newProductModelId ? {\n            \"from\" : productModelChanges[newProductModelId]?.from ? productModelChanges[newProductModelId]?.from : 0,\n            \"to\" : newQuantity //\u9810\u8A2D\u7D660\n          } : null;\n        }\n\n        //\u5224\u65B7\u8A02\u8CFC\u91CF\u662F\u5426\u8DB3\u5920\n        for (var key in productModelChanges) {\n          let productModelId = key;\n          let addQuantity = productModelChanges[key][\"from\"] - productModelChanges[key][\"to\"];\n          // ps. addQuantity \u6709\u53EF\u80FD\u662F\u6B63\u7684\u4E5F\u6709\u53EF\u80FD\u662F\u8CA0\u7684\n\n          let currentProductModel = productModelsGroupById[productModelId]?.first();\n          if ( success && !currentProductModel ) {\n            success = false;\n            errors.push(`\u5546\u54C1\u5F62\u5F0F(${ productModelId })\u4E0D\u5B58\u5728`);\n          }\n\n          if (currentProductModel[\"stock_qty\"] == null ||\n            currentProductModel[\"stock_qty\"] == undefined ) {\n            //\u6C92\u8A2D\u5B9A\u6578\u91CF\u5C31\u6C92\u5FC5\u8981\u7E7C\u7E8C\u8655\u7406\u6578\u91CF\u52A0\u6E1B\u4E86\n            break;\n          }\n\n          if ( success && (currentProductModel[\"stock_qty\"] + addQuantity) < 0 ) {\n            success = false;\n            errors.push(`${currentProductModel[\"name\"]}\u53EF\u8A02\u8CFC\u91CF\u4E0D\u8DB3,\u76EE\u524D\u5EAB\u5B58${ currentProductModel[\"stock_qty\"] }`);\n          }\n\n          if (success) {\n            messages.push(`\u5546\u54C1\u5F62\u5F0F(${currentProductModel[\"name\"]}) \u53EF\u8A02\u8CFC\u91CF${ addQuantity > 0 ? \"+\" : \"\" }${addQuantity}`);\n            updateStockAndPackageQtySqlObjs = [\n              ...updateStockAndPackageQtySqlObjs,\n              ...new ProductModelClass({id: currentProductModel[\"id\"]}).add_stock_qty_sql(addQuantity)\n            ];\n\n            if (!passStockQtyValidate) {\n              updateStockAndPackageQtySqlObjs = [...updateStockAndPackageQtySqlObjs,\n              {\n                sql: `\n                  SELECT *\n                  FROM product_models\n                  WHERE id=$1 AND stock_qty = $2\n                `,\n                params: [ currentProductModel.id, currentProductModel[\"stock_qty\"] + addQuantity],\n                validate: function(currentResult, allResults){\n                  let success = (currentResult.rows.length != 0);\n                  return success;\n                },\n                errorMessage: \"\u5546\u54C1\u5F62\u5F0F\u5EAB\u5B58\u8ABF\u6574\u767C\u751F\u932F\u8AA4\"\n              }]\n            }\n          }\n        }\n      }\n      return {\n        success : success,\n        errors : errors,\n        stockAndPackageQtyMessages : stockAndPackageQtyMessages,\n        updateStockAndPackageQtySqlObjs : updateStockAndPackageQtySqlObjs\n      }\n    }\n\n    return {\n      success: calculateProductStockResult[\"success\"],\n      errors: calculateProductStockResult[\"errors\"],\n      messages: calculateProductStockResult[\"messages\"],\n      stockAndPackageQtyMessages: calculateProductStockResult[\"stockAndPackageQtyMessages\"],\n      updateStockAndPackageQtySqlObjs: calculateProductStockResult[\"updateStockAndPackageQtySqlObjs\"]\n    }\n  }\n}\n\nexport class OrderModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"orders\";\n    this.saveTableName = \"orders\";\n\n    this.price = [undefined, null, \"\"].includes(this.price) ? this.price : this.price*1;\n    this.quantity = [undefined, null, \"\"].includes(this.quantity) ? this.quantity : this.quantity*1;\n    this.cost = [undefined, null, \"\"].includes(this.cost) ? this.cost : this.cost*1;\n    this.shipped_qty = [undefined, null, \"\"].includes(this.shipped_qty) ? this.shipped_qty : this.shipped_qty*1;\n    this.total_price = [undefined, null, \"\"].includes(this.total_price) ? this.total_price : this.total_price*1;\n    // this.shipment_items = [];\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 10000),\n      site_id : Math.floor(Math.random() * 100) + 1,\n      device_id : Math.floor(Math.random() * 100) + 1,\n      user_id : Math.floor(Math.random() * 100) + 1,\n      product_id : Math.floor(Math.random() * 100) + 1,\n      product_model_id : Math.floor(Math.random() * 100) + 1,\n      product_source_message_id : Math.floor(Math.random() * 100) + 1,\n      member_level_id : Math.floor(Math.random() * 100) + 1,\n      sale_type : Math.floor(Math.random() * 100) + 1,\n      source : Math.floor(Math.random() * 100) + 1,\n      number : Math.random().toString(36).substring(2, 8),\n      status : Math.random() > 0.5 ? 'pending' : 'completed',\n      change_status_by : Math.floor(Math.random() * 100) + 1,\n      change_status_at : new Date(),\n      canceled_reason : Math.random() > 0.5 ? 'out of stock' : '',\n      remark : Math.random() > 0.5 ? 'some remark' : '',\n      seller_message : Math.random() > 0.5 ? 'some seller message' : '',\n      buyer_message : Math.random() > 0.5 ? 'some buyer message' : '',\n      price : Math.random() * 1000,\n      cost : Math.random() * 1000,\n      quantity : Math.floor(Math.random() * 10) + 1,\n      shipped_qty : Math.floor(Math.random() * 10) + 1,\n      total_price : price * quantity,\n      model : \"Model \" + Math.floor(Math.random() * 100),\n      source_message : \"Source Message \" + Math.floor(Math.random() * 100),\n      created_by : Math.floor(Math.random() * 100),\n      updated_by : Math.floor(Math.random() * 100),\n      created_at : new Date(),\n      updated_at : new Date(),\n      buyer_name : \"Buyer \" + Math.floor(Math.random() * 100),\n      buyer_mobile : \"111-111-1111\"\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async update_status(params){\n    let body = params;\n    return await this.ajax({\n      ...params,\n      method: \"PUT\",\n      body:body,\n      url:`/${ params[\"domain\"] }/backend/orders/${ this.id }/update_status`\n    });\n  }\n\n  async update_remark(params){\n    let body = params;\n    return await this.ajax({\n      ...params,\n      method: \"PUT\",\n      body:body,\n      url:`/${ params[\"domain\"] }/backend/orders/${ this.id }/update_remark`\n    });\n  }\n\n  async load_shipment_items(shipmentItems){\n    if( shipmentItems ) {\n      this.shipment_items = shipmentItems.filter(i=>( i.order_id == this.id ));\n      return this;\n    } else {\n      let shipmentItems = this.id ? (await new ShipmentItemModel().where(\"order_id\", this.id ).get_datas()).rows.to_shipment_items_class() : [];\n      return await this.load_shipment_items(shipmentItems);\n    }\n  }\n\n  update_status_and_shipped_qty_sql_for_destroy_shipment(shipmentId){\n    let sql = [];\n\n    //\u8D08\u54C1\u4E0D\u505A\u8655\u7406\n    if ( this.coupon_type == this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] ) {\n      return [];\n    }\n\n    if (!this.shipment_items) {\n      alert('update_status_and_shipped_qty_sql_for_destroy_shipment \u6C92\u6709 shipment_items');\n      return [];\n    }\n\n    let shipmentItem = this.shipment_items.filter(i => i.shipment_id == shipmentId).first();\n\n    if (!shipmentItem) {\n      alert('update_status_and_shipped_qty_sql_for_destroy_shipment \u6C92\u6709\u5C0D\u61C9\u7684 shipment_item');\n      return [];\n    }\n\n    return [{\n      tableName: \"orders\",\n      params:[ this.CONSTANTS.Order.STATUS[\"\u51FA\u8CA8\u8655\u7406\u4E2D\"], shipmentItem.shipped_qty, this.id ],\n      sql: `\n        UPDATE orders\n        SET status = $1,\n            shipped_qty = shipped_qty - $2\n        WHERE id = $3`\n    }];\n  }\n\n  async batch_load_product(orders, products = null, productModels = null, productPrices = null) {\n    orders = orders.to_orders_class();\n\n    if (!orders || orders.length == 0 ) {\n      return orders;\n    }\n\n    let productIds = orders.map(o => o.product_id);\n    let allProducts = products ? products.to_products_class() : (await new ProductModel().where(\"id in ?\", [productIds]).get_datas()).rows.to_products_class();\n    let allProductModels = productModels ? productModels.to_product_models_class() :  (await new ProductModelClass().where(\"product_id in ?\", [productIds]).get_datas()).rows.to_product_models_class();\n    let allProductPrices = productPrices ? productPrices.to_product_prices_class() :  (await new ProductPriceModel().where(\"product_id in ?\", [productIds]).get_datas()).rows.to_product_prices_class();\n\n    for (let productModel of allProductModels) {\n      await productModel.load_product_prices(allProductPrices);\n      await productModel.load_product(allProducts);\n    }\n\n    for (let product of allProducts) {\n      await product.load_product_models(allProductModels);\n    }\n\n    for ( let order of orders ) {\n      order.load_product(allProducts);\n    }\n\n    return orders;\n  }\n\n  async batch_load_shipment_items(orders, shipmentItems = null) {\n    orders = orders.to_orders_class();\n    let orderIds = orders.map(o => o.id);\n\n    if (!shipmentItems) {\n      shipmentItems = orderIds.length == 0 ? [] : (await (new ShipmentItemModel()).where(\" order_id in ? \",[orderIds]).get_datas()).rows.to_shipment_items_class();\n    }\n\n    for ( let order of orders ) {\n      order.load_shipment_items(shipmentItems);\n    }\n    return orders;\n  }\n\n  async batch_load_coupon_relation_and_gift_orders(orders) {\n    orders = orders.to_orders_class();\n    let couponRelationIds = orders.map(o => o.coupon_relation_id);\n\n    if (!couponRelationIds || couponRelationIds.length == 0 ) {\n      return orders;\n    }\n\n    let couponRelations = (await (new CouponRelationModel()).where(\" id in ? \",[couponRelationIds]).get_datas()).rows.to_coupon_relations_class();\n    // let couponRelationIds = couponRelations.map(c => c.id);\n    let orderGiftOrders = (await (new OrderModel()).where(\" coupon_relation_id in ? \",[couponRelationIds]).get_datas()).rows.to_orders_class();\n\n    orderGiftOrders = await new OrderModel().batch_load_product(orderGiftOrders);\n\n    for ( let order of orders ) {\n      if (order.coupon_relation_id) {\n        order.load_coupon_relation(couponRelations);\n        if (order.coupon_relation) {\n          order.coupon_relation.set_import({ \"CONSTANTS\" : this.CONSTANTS }).load_gift_orders(orderGiftOrders);\n          let giftOrderModels = ( order.coupon_relation.gift_orders ?? [] ).to_orders_class();\n        }\n      }\n    }\n\n    return orders;\n  }\n\n  async batch_load_coupon_relation(orders) {\n    orders = orders.to_orders_class();\n    let couponRelationIds = orders.map(o => o.coupon_relation_id);\n    let couponRelations = (await (new CouponRelationModel()).where(\" id in ? \",[couponRelationIds]).get_datas()).rows.to_coupon_relations_class();\n\n    for ( let order of orders ) {\n      if (order.coupon_relation_id) {\n        order.load_coupon_relation(couponRelations);\n      }\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  async destroy_sql(options = {}){\n    let that = this;\n    let decreaseOrdersCountSql = [];\n    let errorMessage = [];\n    let checkStockResult = {};\n\n    let destroyCouponRelationSql = [];\n    let destroyGiftSql = [];\n\n    if ( !options.CONSTANTS ) {\n      alert('OrderModel destroy \u8ACB\u5148\u5B9A\u7FA9 options.CONSTANTS');\n      return [];\n    }\n\n    if ( !this.product_id ) {\n      alert('OrderModel \u8ACB\u5148\u5B9A\u7FA9 this.product_id');\n      return [];\n    }\n\n    if ( !this.id ) {\n      alert('OrderModel \u8ACB\u5148\u5B9A\u7FA9 this.id');\n      return [];\n    }\n\n    if (options[\"destroyRelationTable\"]) {\n      decreaseOrdersCountSql = new ProductModel({id: this.product_id}).decrease_orders_count_sql();\n\n      checkStockResult = await new ProductModel().check_changes_stock_and_package_qty({\n        newQuantity: 0,\n        newProductModelId: null,\n        newProductId: this.product_id,\n        oldProductId: this.product_id,\n        orderId: this.id,\n        passStockQtyValidate: true\n      });\n\n      if (!checkStockResult[\"success\"]) {\n        errorMessage = [{\n          sql: \"SELECT * FROM member_levels WHERE id=0\", //\u4E3B\u8981\u662F\u986F\u793A\u932F\u8AA4, \u96A8\u4FBF\u4E82\u5BEB\u4E00\u500Bsql\n          params: [],\n          validate: function(currentResult, allResults){\n            let success = false;\n            return success;\n          },\n          errorMessage: checkStockResult[\"errors\"].join(',')\n        }];\n      }\n\n      //\u5982\u679C\u4E0D\u662F\u8D08\u54C1\u624D\u522A\u9664\u4EE5\u4E0B\u5167\u5BB9\n      if (!options.isDeleteGift) {\n        let couponRelationModel = (await new CouponRelationModel().where(\"id\",this.coupon_relation_id).get_datas()).rows?.to_coupon_relations_class().first();\n        if (couponRelationModel) {\n          destroyCouponRelationSql = couponRelationModel?.destroy_sql();\n          await couponRelationModel.set_import({ \"CONSTANTS\" : options.CONSTANTS }).load_gift_orders();\n          if (couponRelationModel.gift_orders) {\n            for ( let giftOrder of couponRelationModel.gift_orders ) {\n              let sql = await giftOrder.destroy_sql({destroyRelationTable: true, isDeleteGift: true, CONSTANTS: options.CONSTANTS })\n              destroyGiftSql = [ ...destroyGiftSql, ...sql ];\n            }\n            // destroyGiftSql = await couponRelationModel.gift_order.destroy_sql({destroyRelationTable: true, isDeleteGift: true, CONSTANTS: options.CONSTANTS });\n          }\n        }\n      }\n    }\n\n    let sqlObjs = [\n      // {sql: \"BEGIN\"},\n      ...super.destroy_sql(),\n      ...decreaseOrdersCountSql,\n      ...errorMessage,\n      ...( checkStockResult[\"updateStockAndPackageQtySqlObjs\"] ?? [] ),\n\n      ...destroyCouponRelationSql,\n      ...destroyGiftSql,\n      // {\n      //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n      //   params: [],\n      //   validate: function(currentResult, allResults){\n      //     let success = false;\n      //     return success;\n      //   },\n      //   errorMessage: \"\u5C31\u662F\u932F\"\n      // },\n\n    // {sql: \"END\"}\n    ];\n\n    return sqlObjs;\n  }\n\n  set_current_used_coupon(coupon){\n    this.current_used_coupon = coupon;\n    return this;\n  }\n\n\n  // \u5224\u65B7\u6B64\u8A02\u55AE(this) \u53EF\u4EE5\u7528\u90A3\u4E9B\u512A\u60E0 \u4E26\u4E14 \u986F\u793A\u5C1A\u672A\u9054\u6210\u7684 buy_product \u689D\u4EF6\n  // \u7136\u5F8C\u8A2D\u5B9A\u6210 order.active_coupons\n  set_active_coupons(activeCoupons, quantity) {\n\n    if (!this.product_id) {\n      alert('set_active_coupons \u6C92\u6709\u5B9A\u7FA9 this.product_id');\n      return this;\n    }\n\n    if (!this.CONSTANTS) {\n      alert('set_active_coupons \u6C92\u6709\u5B9A\u7FA9 this.CONSTANTS');\n      return this;\n    }\n\n    this.active_coupons = activeCoupons.filter(c => (\n      c.buy_product_id == this.product_id &&\n      [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(c.type_code*1)\n    ));\n\n    this.active_coupons = this.active_coupons.to_coupons_class();\n\n    for ( let activeCoupon of this.active_coupons ) {\n      activeCoupon\n        .set_import({ \"Swal\" : this.Swal, \"CONSTANTS\" : this.CONSTANTS })\n        .order_coupon_buy_product_validate(this);\n    }\n\n    return this;\n  }\n\n  set_site(siteId) {\n    this.site_id = siteId;\n    return this;\n  }\n\n  set_discount_amount(CONSTANTS, couponRelation){\n    // if ( coupon && !couponRelation ) {\n    //   alert(' set_total_price \u8ACB\u5148 load_coupon_relation ');\n    //   return;\n    // }\n\n    if (couponRelation) {\n      this.discount_amount_was = this.discount_amount;\n      if (couponRelation.discount_type == CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u56FA\u5B9A\u91D1\u984D\"] ) {\n        this.discount_amount = couponRelation.discount;\n      } else if( couponRelation.discount_type == CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u6BD4\u7387\"] ) {\n\n        if ([undefined, null, \"\"].includes(this.price)) {\n          alert('\u6C92\u6709\u8A2D\u5B9A this.price');\n          return;\n        }\n        if ([undefined, null, \"\"].includes(this.quantity)) {\n          alert('\u6C92\u6709\u8A2D\u5B9A this.quantity');\n          return;\n        }\n\n        // this.discount_amount = (this.price * this.quantity * couponRelation.discount / 100 );\n        // 20 \u4EE3\u8868 20% = \u62538\u6298\n\n        this.discount_amount = couponRelation.coupon.get_discount_amount(this.price * ( this.shipped_qty_for_shipment || this.quantity ), CONSTANTS);\n        // 20 \u4EE3\u8868 20% = \u62538\u6298\n\n        //get_discount_amount\n\n      } else {\n        this.discount_amount = 0;\n      }\n\n      //\u628A \u5982\u679C\u6298\u6263\u50F9\u683C\u88AB\u6539\u8B8A\u4E86 \u5C31\u628A total_price \u8A2D\u5B9A\u70BA null, \u5FC5\u9808\u91CD\u7B97\n      if (this.discount_amount_was != this.discount_amount) {\n        this.total_price = null;\n      }\n    } else {\n      this.discount_amount = 0;\n    }\n    return this;\n  }\n\n  set_total_price(isGift = false) {\n\n    if ( [undefined, null, \"\"].includes(this.discount_amount) ) {\n      alert(' set_total_price \u8ACB\u5148 \u5B9A\u7FA9 this.discount_amount ');\n      return;\n    }\n    if ( [undefined, null, \"\"].includes(this.price) ) {\n      alert(' set_total_price \u8ACB\u5148 \u5B9A\u7FA9 this.price ');\n      return;\n    }\n    if ( [undefined, null, \"\"].includes(this.quantity) ) {\n      alert(' set_total_price \u8ACB\u5148 \u5B9A\u7FA9 this.quantity ');\n      return;\n    }\n\n    if (isGift) {\n      this.total_price_if_not_gift = (this.price_if_not_gift * ( this.shipped_qty_for_shipment || this.quantity ) - this.discount_amount);\n      this.total_price = 0;\n      return this;\n    }\n\n    if ( this.id ) {\n\n      if ( !this.shipment_items) {\n        alert(' set_total_price \u7531\u65BC\u662F\u90E8\u5206\u51FA\u8CA8\u8A02\u55AE \u6240\u4EE5\u5FC5\u9808\u6709 this.shipment_items \u4EE5\u505A\u5224\u65B7 ');\n        return;\n      }\n\n      let sumOfShipmentItemsShippedQty = this.shipment_items.reduce((accumulator, currentValue) => { return accumulator + currentValue.shipped_qty; }, 0) ?? 0;\n      let sumOfShipmentItemsShipmentTotalPrice = this.shipment_items.reduce((accumulator, currentValue) => { return accumulator + currentValue.shipment_total_price*1; }, 0) ?? 0;\n      if ( ( sumOfShipmentItemsShippedQty + ( this.shipped_qty_for_shipment || this.quantity ) ) == this.quantity ) {\n        this.total_price = this.total_price_was - sumOfShipmentItemsShipmentTotalPrice;\n      } else {\n        this.total_price = (this.price * ( this.shipped_qty_for_shipment || this.quantity ) - this.discount_amount);\n      }\n    } else {\n      this.total_price = (this.price * ( this.shipped_qty_for_shipment || this.quantity ) - this.discount_amount);\n    }\n\n    return this;\n  }\n\n  set_quantity_and_price(quantity, shipped_qty_for_shipment, price, couponType, cost = null, shippedQty = null, CONSTANTS){\n    // shipped_qty_for_shipment = shipped_qty_for_shipment || quantity;\n\n    //\u50B3\u9032\u4F86\u7684 cost \u662F\u4E00\u500B\u5546\u54C1\u6578\u76EE\u7684 cost\n    if (quantity == undefined || quantity == null) {\n      alert(' set_quantity_and_price quantity \u6578\u503C\u4E0D\u6B63\u78BA ');\n      return;\n    }\n    if (price == undefined || price == null) {\n      alert(' set_quantity_and_price price \u6578\u503C\u4E0D\u6B63\u78BA ');\n      return;\n    }\n\n    this.cost = cost == null ? this.cost : cost;\n    this.shipped_qty = shippedQty == null ? this.shipped_qty : shippedQty;\n    this.shipped_qty_for_shipment = [undefined, null, \"\"].includes(shipped_qty_for_shipment) ? shipped_qty_for_shipment : shipped_qty_for_shipment*1;\n\n    //\u628A total_price \u548C discount_amount \u8A2D\u5B9A\u70BA null, \u5FC5\u9808\u91CD\u7B97\n    this.total_price = null;\n    this.discount_amount = null;\n\n    this.quantity = [undefined, null, \"\"].includes(quantity) ? quantity : quantity*1;\n    this.coupon_type = couponType;\n\n    if ( this.coupon_type == CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] ) {\n      this.price_if_not_gift = price;\n      this.price = 0;\n    } else {\n      this.price = price;\n    }\n    return this;\n  }\n\n\n  // set_coupon_type(type){\n  //   this.coupon_type = type;\n  //   return this;\n  // }\n\n\n  set_message_and_remark(remark = null, sellerMessage = null, buyerMessage = null) {\n    this.remark = remark == null ? this.remark : remark;\n    this.seller_message = sellerMessage == null ? this.seller_message : sellerMessage;\n    this.buyer_message = buyerMessage == null ? this.buyer_message : buyerMessage;\n    return this;\n  }\n\n  set_status(status = null, changeStatusBy = null, canceledReason = null) {\n\n    if ( status && !this.CONSTANTS) {\n      alert('order set_status \u6C92\u6709 this.CONSTANTS');\n      return this;\n    }\n\n    if ( status && !Object.values(this.CONSTANTS.Order.STATUS).includes(status)) {\n      alert(' order set_status \u50B3\u5165\u7684\u53C3\u6578 \u6C92\u6709\u5305\u542B\u5728 CONSTANTS.Order.STATUS ');\n      return this;\n    }\n\n    let nowTime = new Date();\n    this.change_status_by = changeStatusBy == null ? this.change_status_by : changeStatusBy;\n    this.change_status_at = changeStatusBy == null ? this.change_status_at : nowTime;\n\n    this.status = status == null ? this.status : status;\n    this.canceled_reason = canceledReason == null ? this.canceled_reason : canceledReason;\n    return this;\n  }\n\n  set_is_on_site_checkout_order(isOnSiteCheckoutOrder = false) {\n    this.is_on_site_checkout_order = isOnSiteCheckoutOrder;\n    return this;\n  }\n\n  set_buyer_related_information(userId = null, memberLevelId = null, buyerName = null, buyerMobile = null) {\n    this.user_id = userId == null ? this.user_id : userId;\n    this.member_level_id = memberLevelId == null ? this.member_level_id : memberLevelId;\n    this.buyer_name = buyerName == null ? this.buyer_name : buyerName;\n    this.buyer_mobile = buyerMobile == null ? this.buyer_mobile : buyerMobile;\n    return this;\n  }\n\n  set_product_related_information(productId = null, productModelId = null, modelName = null) {\n    this.product_id = productId == null ? this.product_id : productId;\n    this.product_model_id = productModelId == null ? this.product_model_id : productModelId;\n    this.model = modelName == null ? this.model : modelName;\n    return this;\n  }\n\n  set_constants(saleType = null, source = null) {\n    this.sale_type = saleType == null ? this.sale_type : saleType;\n    this.source = source == null ? this.source : source;\n    return this;\n  }\n\n  set_editor(editUserId) {\n    this.created_by = this.created_by ? this.created_by : editUserId;\n    this.updated_by = editUserId;\n    return this;\n  }\n\n  before_save_validate(){\n    if ([undefined, null, \"\"].includes(this.total_price)) {\n      alert(`orderModel save_sql total_price \u6C92\u6709\u8A2D\u5B9A `);\n      return false;\n    }\n    if ([undefined, null, \"\"].includes(this.discount_amount)) {\n      alert(`orderModel save_sql discount_amount \u6C92\u6709\u8A2D\u5B9A `);\n      return false;\n    }\n    return true;\n  }\n\n  validate_coupon_relation_gift_count_match(couponRelationId) {\n    let isDynamic = false;\n    if (typeof couponRelationId == 'function' ) {\n      isDynamic = true;\n    }\n\n    let sqlObj = {\n      sql: `SELECT * FROM orders WHERE id = ${ isDynamic ? \"{@coupon_relation_id}\" : \"$1\" } AND quantity < shipped_qty`,\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length == 0);\n        return success;\n      },\n      errorMessage: \"\u8D08\u54C1\u6578\u76EE\u4E0D\u5C0D\"\n    }\n\n    if (isDynamic) {\n      let saveTableName = this.saveTableName;\n      sqlObj[\"dynamicParams\"] = {\n        coupon_relation_id: couponRelationId\n      }\n    } else {\n      sqlObj[\"params\"] = [ this.id ];\n    }\n\n    return [sqlObj];\n  }\n\n  async save_by_ajax(params) {\n\n    let jsonArray = [];\n    for (let data of params[\"datas\"]) {\n      let dataJson = null;\n      dataJson = data.to_json([\"coupon_relation\",\"tableName\",\"id\",\"site_id\",\"device_id\",\"user_id\",\"product_id\",\"product_model_id\",\"product_source_message_id\",\"member_level_id\",\"sale_type\",\"source\",\"number\",\"status\",\"change_status_by\",\"change_status_at\",\"canceled_reason\",\"remark\",\"seller_message\",\"buyer_message\",\"price\",\"cost\",\"quantity\",\"package_qty\",\"shipped_qty\",\"total_price\",\"model\",\"source_message\",\"created_by\",\"updated_by\",\"created_at\",\"updated_at\",\"buyer_name\",\"buyer_mobile\",\"discount_amount\",\"coupon_type\",\"coupon_relation_id\",\"is_on_site_checkout_order\"]);\n\n      if (dataJson[\"coupon_relation\"]) {\n        dataJson[\"coupon_relation\"] = dataJson[\"coupon_relation\"].to_json([\"gift_orders\",\"tableName\",\"id\",\"shipment_id\",\"coupon_id\",\"shipment_discount_amount\",\"discount_type\",\"discount\",\"limit_amount\",\"name\",\"code\",\"type_code\",\"limited_count\",\"start_time\",\"end_time\",\"used_count\",\"gift\",\"buy_count\",\"gift_count\",\"user_id\",\"limit_user_used_count\",\"coupon_relation_used_count\",\"buy_product_id\",\"gift_product_id\"]);\n\n        if (dataJson[\"coupon_relation\"]?.gift_orders) {\n          for (let i = 0; i < dataJson[\"coupon_relation\"].gift_orders.length; i++) {\n            dataJson[\"coupon_relation\"].gift_orders[i] = dataJson[\"coupon_relation\"].gift_orders[i].to_json([\"tableName\",\"id\",\"site_id\",\"device_id\",\"user_id\",\"product_id\",\"product_model_id\",\"product_source_message_id\",\"member_level_id\",\"sale_type\",\"source\",\"number\",\"status\",\"change_status_by\",\"change_status_at\",\"canceled_reason\",\"remark\",\"seller_message\",\"buyer_message\",\"price\",\"cost\",\"quantity\",\"package_qty\",\"shipped_qty\",\"total_price\",\"model\",\"source_message\",\"created_by\",\"updated_by\",\"created_at\",\"updated_at\",\"buyer_name\",\"buyer_mobile\",\"discount_amount\",\"coupon_type\",\"coupon_relation_id\",\"is_on_site_checkout_order\"]);\n          }\n        }\n      }\n\n      if (dataJson) {\n        jsonArray.push(dataJson);\n      }\n    }\n\n    let result = await super.save_ajax({\n      tablePluralName: \"orders\",\n      tableSingularName: \"order\",\n      data : jsonArray,\n      domain : params[\"domain\"],\n      isNew : params[\"id\"] ? false : true,\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"]\n    });\n\n    return result;\n  }\n\n\n  async destroy(params) {\n    let that = this;\n    let result = await super.destroy_by_ajax({\n      tablePluralName: \"orders\",\n      tableSingularName: \"order\",\n      id: that.id,\n      domain : params[\"domain\"],\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"]\n    });\n\n    return result;\n  }\n\n\n  async save_sql(options = {}){\n    let that = this;\n    // let validate = true;\n    let success = true;\n    let errors = [];\n    let sqlArray = [];\n    let dynamicParams = options[\"dynamicParams\"] ?? {};\n\n    if ( !options.currentUserId ) {\n      errors = ['user_id \u70BA\u7A7A\u503C, \u53EF\u80FD\u6C92\u6709\u767B\u5165'];\n      success = false;\n      return {\n        success: success,\n        errors: errors,\n        sql: sqlArray\n      };\n    }\n\n    if (!this.before_save_validate()) {\n      return;\n    }\n\n    if (!this.id) {\n      this.created_by = options.currentUserId;\n      this.status = this.status == 'on_site_checkout' ? this.status : \"pending\";\n    }\n    this.updated_by = options.currentUserId;\n\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      // \"orders\",\n      this.saveTableName,\n      `id, site_id,coupon_relation_id${ dynamicParams[\"coupon_relation_id\"] ? \"(IsDynamicParam)\" : \"\" }, coupon_type, device_id(NullIfEmpty), user_id, product_id, product_model_id(NullIfEmpty), product_source_message_id(NullIfEmpty), member_level_id(NullIfEmpty), sale_type(NullIfEmpty), source(NullIfEmpty), number(NullIfEmpty), status, change_status_by(NullIfEmpty), change_status_at(NullIfEmpty), canceled_reason, remark, seller_message, buyer_message, price, cost(NullIfEmpty), quantity, package_qty(NullIfEmpty), shipped_qty(ZeroIfBlank), total_price, model, source_message,${ this.id ? \"\" : \"created_by(NullIfEmpty),\" }updated_by(NullIfEmpty), created_at, updated_at, buyer_name, buyer_mobile, discount_amount, is_on_site_checkout_order`,\n      {...options.dynamicParams}\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n      if(options?.afterSaveCallBack){\n        options?.afterSaveCallBack.apply(this,[result, sqlString, sqlParams, datasByTableName]);\n      }\n    }};\n\n    let checkStockResult = {};\n    let addOrdersCountSql = [];\n    if (options[\"saveRelationTable\"]) {\n      checkStockResult = await new ProductModel().check_changes_stock_and_package_qty({\n        order : this,\n        caches : {\n          products : options?.caches?.products,\n          productModels : options?.caches?.productModels,\n        },\n        newQuantity: this.quantity,\n        newProductModelId: this.product_model_id,\n        newProductId: this.product_id,\n        oldProductId: this.product_id_was,\n        orderId: this.id,\n        passStockQtyValidate: options.passStockQtyValidate\n      });\n\n      if (!checkStockResult[\"success\"]) {\n        // alert(checkStockResult[\"errors\"].join(','));\n        success = false;\n        errors = checkStockResult[\"errors\"];\n      }\n      addOrdersCountSql = new ProductModel({id: this.product_id}).increase_orders_count_sql();\n    }\n\n    if (success) {\n\n      let dynamicUpdateNumber = ( this.id ? [] : super.dynamic_update_number() );\n\n      sqlArray = [\n        saveSql,\n        ...dynamicUpdateNumber,\n        ...this.validate_column_logic_sql({ \"isDynamic\": this.id ? false : true }),\n        ...( checkStockResult[\"updateStockAndPackageQtySqlObjs\"] ?? [] ),\n        ...addOrdersCountSql\n      ];\n\n    } else {\n      sqlArray = [];\n    }\n\n    return {\n      success: success,\n      errors: errors,\n      sql: sqlArray\n    }\n  }\n\n  add_shipped_qty_sql(addQty) {\n\n    if ( !this.id ) {\n      alert('add_shipped_qty_sql \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    if ( !addQty ) {\n      alert('\u8ACB\u5148\u5B9A\u7FA9addQty');\n      return [];\n    }\n\n    return [{\n      sql: `\n        UPDATE ${ this.tableName }\n        SET shipped_qty = shipped_qty + $2\n        WHERE id=$1;`,\n      params: [ this.id, addQty ]\n    }];\n  }\n\n  validate_shipped_qty_sql(options = {}){\n\n    if ( !options[\"isDynamic\"] && this[\"id\"] == undefined) {\n      alert('validate_shipped_qty_sql \u8ACB\u5148\u5B9A\u7FA9id');\n      return [];\n    }\n\n    let sqlObj = {\n      sql: `SELECT * FROM orders WHERE id = ${ options[\"isDynamic\"] ? \"{@order_id}\" : \"$1\" } AND quantity < shipped_qty`,\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length == 0);\n        return success;\n      },\n      errorMessage: \"\u8A02\u55AE\u51FA\u8CA8\u6578\u91CF\u8D85\u51FA\u6B63\u5E38\u6578\u91CF\"\n    }\n\n    if (options[\"isDynamic\"]) {\n      let saveTableName = this.saveTableName;\n      sqlObj[\"dynamicParams\"] = {\n        order_id: function(results){\n          return results[saveTableName].rows[0].id;\n        }\n      }\n    } else {\n      sqlObj[\"params\"] = [ this.id ];\n    }\n\n    return [sqlObj];\n  }\n\n  validate_column_logic_sql(options){\n    return [\n      ...this.validate_shipped_qty_sql(options)\n    ];\n  }\n\n  create_coupon_relation(coupon) {\n    let couponModel = [coupon].to_coupons_class()?.first();\n\n    if (!this.total_price) {\n      alert(' create_coupon_relation \u7684 total_price \u662F\u7A7A\u76F4\u6216\u662F0 ');\n      return this;\n    }\n\n    this.coupon_relation = new CouponRelationModel()\n      .set_coupon_relation_columns(couponModel)\n      .set_shipment_discount_amount(couponModel, this.total_price, this.CONSTANTS)\n      .set_whose_buy(this.user_id)\n      .set_buy_and_gift_count(couponModel);\n\n    return this;\n  }\n\n  split_buy_order(CONSTANTS, buyCount, createdBy) {\n    let packageQty = 1;\n    let buyQuantity = buyCount * packageQty;\n\n    if ( this.quantity < buyQuantity) {\n      // alert('split_buy_order \u8A02\u55AE\u6578\u91CF\u4E0D\u53EF\u5C0F\u65BC\u5206\u5272\u6578\u91CF');\n      return null;\n    }\n\n    let splitOrder = new OrderModel().set_import({ CONSTANTS: CONSTANTS });\n\n    splitOrder = splitOrder\n    .set_uuid()\n    .set_site(this.site_id)\n    .set_message_and_remark(this.remark, this.seller_message, this.buyer_message)\n    .set_status(this.status, createdBy)\n    .set_buyer_related_information(this.user_id, this.member_level_id, this.buyer_name, this.buyer_mobile)\n    .set_product_related_information(this.product_id, this.product_model_id, this.model)\n    .set_constants(this.sale_type, this.source)\n    .set_is_on_site_checkout_order(this.is_on_site_checkout_order)\n    .set_editor(createdBy)\n    .set_quantity_and_price(buyQuantity, this.shipped_qty_for_shipment, this.price, CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"], this.cost, this.shipped_qty, CONSTANTS)\n    .set_discount_amount(CONSTANTS, splitOrder.coupon_relation)\n    .set_total_price();\n\n    this.set_quantity_and_price(this.quantity - buyQuantity, this.shipped_qty_for_shipment, this.price, this.coupon_type, this.cost, this.shipped_qty, CONSTANTS)\n    .set_discount_amount(CONSTANTS)\n    .set_total_price();\n\n    return splitOrder;\n  }\n\n  //\u5206\u5272\u51FA\u7B26\u5408\u512A\u60E0\u7684\u6578\u91CF\u7684 \u8D08\u54C1\u8A02\u55AE\n  split_gift_order(CONSTANTS, giftCount, createdBy) {\n    let packageQty = 1;\n    let giftQuantity = giftCount * packageQty;\n\n    if ( this.quantity < giftQuantity) {\n      // alert('split_buy_order \u8A02\u55AE\u6578\u91CF\u4E0D\u53EF\u5C0F\u65BC\u5206\u5272\u6578\u91CF');\n      return null;\n    }\n\n    let splitOrder = new OrderModel().set_import({ CONSTANTS: CONSTANTS });\n\n    splitOrder = splitOrder\n    .set_uuid()\n    .set_site(this.site_id)\n    .set_message_and_remark(this.remark, this.seller_message, this.buyer_message)\n    .set_status(this.status, createdBy)\n    .set_buyer_related_information(this.user_id, this.member_level_id, this.buyer_name, this.buyer_mobile)\n    .set_product_related_information(this.product_id, this.product_model_id, this.model)\n    .set_constants(CONSTANTS.Order.SALE_TYPE[\"\u8D08\u54C1\"], this.source)\n    .set_is_on_site_checkout_order(this.is_on_site_checkout_order)\n    .set_editor(createdBy)\n    .set_quantity_and_price(giftQuantity, this.shipped_qty_for_shipment, this.price, CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"], this.cost, this.shipped_qty, CONSTANTS)\n    .set_discount_amount(CONSTANTS)\n    .set_total_price(true);\n\n    this\n      .set_quantity_and_price(this.quantity - giftQuantity, this.shipped_qty_for_shipment, this.price, this.coupon_type, this.cost, this.shipped_qty, CONSTANTS)\n      .set_discount_amount(CONSTANTS)\n      .set_total_price(false);\n\n    return splitOrder;\n  }\n\n  async save_sql_by_coupon(couponModel, createdBy, giftProductModels, CONSTANTS, currentUserId, couponProductRelations = null, couponBuyAndGiftProducts = null, couponBuyAndGiftProductModels = null){\n    // let couponOrder = null;\n    // let giftOrder = null;\n    // let orderModel = new OrderModel();\n    let remainingOrderSql = [];\n    let allCouponRelationAndBuyAndGiftSql = [];\n    let allCouponRelationAndBuyAndGiftModels = [];\n    let giftInStockAreSufficient = true;\n\n    if (couponModel) {\n      couponModel.load_coupon_product_relations_and_related_product({\n        CONSTANTS : CONSTANTS,\n        coupon_product_relations : couponProductRelations,\n        products : couponBuyAndGiftProducts,\n        productModels : couponBuyAndGiftProductModels\n      });\n    }\n\n    //\u8D08\u54C1\u5EAB\u5B58\u662F\u5426\u8DB3\u5920\n    if (\n        couponModel &&\n        couponModel.id &&\n        couponModel.gift_product &&\n        couponModel.gift_product.stock_qty &&\n        couponModel.gift_product.stock_qty < couponModel.gift_count\n      ) {\n      giftInStockAreSufficient = false;\n    }\n\n    if (\n        ( couponModel && couponModel.id ) &&\n        [CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(couponModel.type_code*1) &&\n        giftInStockAreSufficient\n      ) {\n      // let couponRelationAndBuyAndGiftSql = [];\n      let isFirst = true;\n      let maximumNumberOfTimes = Utility.createNumberArray(1,210);\n      let loopCount = 0;\n\n      for ( let index of maximumNumberOfTimes ) {\n        let couponRelationAndBuyAndGift = await create_coupon_relation_and_buy_and_gift_sql(this, couponModel, createdBy, giftProductModels, CONSTANTS, couponBuyAndGiftProducts, couponBuyAndGiftProductModels);\n        // couponRelationAndBuyAndGiftSql = couponRelationAndBuyAndGift[\"sql\"];\n\n        if ( couponRelationAndBuyAndGift?.models?.couponRelation || couponRelationAndBuyAndGift?.models?.buyOrder ) {\n          // allCouponRelationAndBuyAndGiftSql = [ ...allCouponRelationAndBuyAndGiftSql, ...couponRelationAndBuyAndGiftSql];\n          // allCouponRelationAndBuyAndGiftModels.push(couponRelationAndBuyAndGift[\"models\"][\"couponRelation\"]);\n\n          if ( couponRelationAndBuyAndGift[\"models\"][\"couponRelation\"] && couponRelationAndBuyAndGift[\"models\"][\"giftOrders\"] ) {\n            couponRelationAndBuyAndGift[\"models\"][\"couponRelation\"].gift_orders = couponRelationAndBuyAndGift[\"models\"][\"giftOrders\"];\n          }\n\n          couponRelationAndBuyAndGift[\"models\"][\"buyOrder\"].coupon_relation = couponRelationAndBuyAndGift[\"models\"][\"couponRelation\"];\n\n          allCouponRelationAndBuyAndGiftModels.push(couponRelationAndBuyAndGift[\"models\"][\"buyOrder\"]);\n          // allCouponRelationAndBuyAndGiftModels = [ ...allCouponRelationAndBuyAndGiftModels , ...couponRelationAndBuyAndGift[\"models\"][\"giftOrders\"] ];\n          allCouponRelationAndBuyAndGiftModels = allCouponRelationAndBuyAndGiftModels.filter(o => o);\n          loopCount = index;\n        } else {\n          break;\n        }\n      }\n\n      //\u512A\u60E0\u7684\u5224\u65B7\u6700\u9AD8200\u6B21 \u592A\u9AD8\u6A5F\u5668\u4E5F\u5927\u6982\u627F\u53D7\u4E0D\u4F4F\n      if (loopCount >= 200) {\n        alert('\u512A\u60E0\u5957\u7528\u6B21\u6578\u904E\u591A,\u53EF\u80FD\u9020\u6210\u6A5F\u5668\u7570\u5E38,\u8ACB\u91CD\u65B0\u78BA\u5B9A\u5546\u54C1\u6578\u91CF');\n        return;\n      }\n    } else {\n      this\n        .set_discount_amount(CONSTANTS)\n        .set_total_price();\n    }\n\n    if (this.quantity != 0) {\n      // let orderSaveResult = (await this.save_sql({ saveRelationTable:true, passStockQtyValidate: true, currentUserId: currentUserId }));\n      // remainingOrderSql = orderSaveResult.sql;\n      // allCouponRelationAndBuyAndGiftSql = [...allCouponRelationAndBuyAndGiftSql, ...remainingOrderSql]\n      allCouponRelationAndBuyAndGiftModels = [ ...allCouponRelationAndBuyAndGiftModels, ...[this] ];\n    }\n\n    async function create_coupon_relation_and_buy_and_gift_sql(thisOrder, couponModel, createdBy, giftProductModels, CONSTANTS,\n        couponBuyAndGiftProducts = [],\n        couponBuyAndGiftProductModels = []\n      ){\n      let buyOrder = null;\n      let couponRelation = null;\n      let couponRelationId = null;\n      // let buyOrderSql = [];\n      // let giftOrderSql = [];\n      // let couponRelationSql = [];\n      let buyCouponProductRelation = null;\n      // let buyCouponProductRelationSql = [];\n\n      if (!couponModel.buy_count) {\n        alert('create_coupon_relation_and_buy_and_gift_sql \u6C92\u8A2D\u5B9A couponModel.buy_count');\n        return;\n      }\n\n      //buyOrderSql\n      let quantityWas = thisOrder.quantity;\n      buyOrder = thisOrder.split_buy_order(CONSTANTS, couponModel.buy_count, createdBy);\n\n      thisOrder\n        .set_discount_amount(CONSTANTS)\n        .set_total_price();\n\n      if (!buyOrder) {\n        return [];\n      }\n\n      couponRelation = new CouponRelationModel()\n        .set_coupon_relation_columns(couponModel)\n        .set_shipment_discount_amount(couponModel, buyOrder.total_price, CONSTANTS)\n        .set_whose_buy(thisOrder.user_id)\n        .set_buy_and_gift_count(couponModel);//, giftProductModels, CONSTANTS\n\n      //couponRelationSql\n      // couponRelationSql = couponRelation.save_sql({\n      //   saveRelationTable: true,\n      //   CONSTANTS: CONSTANTS,\n      //   afterSaveCallBack: function(result, sqlString, sqlParams, datasByTableName){\n      //     couponRelationId = result.rows[0].id;\n      //   }\n      // });\n\n      let buyOrderId = null;\n      let giftOrderId = null;\n      let validateSql = [];\n      let giftOrders = [];\n\n      if (couponModel.gift_product_id) {\n\n\n        //\u9019\u4E00\u6BB5\u5224\u65B7 \u662F\u5426\u9700\u8981\u4F7F\u7528 create_gift_order........\n\n        //giftOrderSqls\n        let createGiftResult = couponModel.create_gift_order(buyOrder, createdBy, CONSTANTS);\n\n        if (createGiftResult[\"success\"]) {\n          giftOrders = createGiftResult[\"orders\"];\n          couponRelation.gift_orders = giftOrders;\n        }\n\n        // let productIds = giftOrders.map(o => o.product_id).filter(i => i).unique();\n        let products = couponBuyAndGiftProducts.to_products_class(); //productIds.length == 0 ? [] : (await new ProductModel().where(\"id in ?\",[productIds]).get_datas()).rows.to_products_class();\n        let productModels = couponBuyAndGiftProductModels.to_product_models_class();//productIds.length == 0 ? [] : (await new ProductModelClass().where(\"product_id in ?\",[productIds]).get_datas()).rows.to_product_models_class();\n\n        for ( let product of products) {\n          product.load_product_models(productModels);\n        }\n\n        for (let giftOrder of giftOrders) {\n          giftOrder.load_product(products);\n          // let giftOrderSaveResult = (await giftOrder.save_sql({\n          //   caches: {\n          //     products: products, //\u6279\u6B21\u8655\u7406\n          //     productModels: productModels //\u6279\u6B21\u8655\u7406\n          //   },\n          //   saveRelationTable:true,\n          //   passStockQtyValidate: true,\n          //   dynamicParams: {\n          //     coupon_relation_id: function(results) {\n          //       return results?.coupon_relations?.rows[0]?.id;\n          //     }\n          //   }\n          // }));\n\n          // let sql = giftOrderSaveResult[\"sql\"];\n\n          //\u5982\u679C \u8D08\u54C1\u8207\u8CFC\u8CB7\u7684\u5546\u54C1\u4E00\u6A23 \u8CFC\u8CB7\u7684\u5546\u54C1\u8981\u8ABF\u6574\u6578\u91CF\n          if ( giftOrder &&\n            giftOrder.product_id == thisOrder.product_id &&\n            thisOrder.quantity >= giftOrder.quantity\n            ) {\n            thisOrder.set_quantity_and_price(thisOrder.quantity - giftOrder.quantity, thisOrder.shipped_qty_for_shipment, thisOrder.price, thisOrder.coupon_type, thisOrder.cost, 0, CONSTANTS);\n          }\n\n          // giftOrderSql = [\n          //   ...giftOrderSql,\n          //   ...sql\n          // ];\n        }\n\n        //\u5982\u679C\u7522\u751F\u8D08\u54C1\u5931\u6557(\u61C9\u8A72\u662F\u5EAB\u5B58\u4E0D\u8DB3) \u76F4\u63A5 return;\n        if (!createGiftResult[\"success\"]) {\n          thisOrder.set_quantity_and_price(quantityWas, thisOrder.shipped_qty_for_shipment, thisOrder.price, thisOrder.coupon_type, thisOrder.cost, thisOrder.shipped_qty, CONSTANTS);\n          return {\n            models : null,\n            sql : null\n          }\n        }\n\n        //\u9A57\u8B49\u8D08\u54C1\u662F\u5426\u5EAB\u5B58\u6709\u554F\u984C\n        // if (giftOrders.length > 0) {\n        //   validateSql = [\n        //     ...validateSql,\n        //     ...new ProductModel({id: giftOrders[0].product_id}).validate_product_and_product_model_stock_qty_sql()\n        //   ];\n        // }\n      }\n\n      //\u8A2D\u5B9A buyOrder \u7684 total_price\n      buyOrder.coupon_relation = couponRelation;\n      buyOrder\n        .set_discount_amount(CONSTANTS, couponRelation)\n        .set_total_price();\n\n      // let buyOrderSaveResult = (await buyOrder.save_sql({\n      //   saveRelationTable:true,\n      //   passStockQtyValidate: true,\n      //   afterSaveCallBack: function(result, sqlString, sqlParams, datasByTableName){\n      //     buyOrderId = result.rows[0].id;\n      //   },\n      //   dynamicParams: {\n      //     coupon_relation_id: function(results) {\n      //       return results?.coupon_relations?.rows[0]?.id;\n      //     }\n      //   }\n      // }));\n\n\n      // buyOrderSql = buyOrderSaveResult.sql;\n\n      //\u524D\u9762\u7684\u6B65\u9A5F\u53EF\u80FD\u6703\u8ABF\u6574\u5230 quantity \u518D\u91CD\u7B97\u4E00\u6B21 total_price\n      thisOrder\n        .set_discount_amount(CONSTANTS)\n        .set_total_price();\n\n      couponRelation.gift_product = couponModel.gift_product;\n      couponRelation.buy_product = couponModel.buy_product;\n      buyOrder.product = couponModel.buy_product;\n      buyOrder.coupon_relation = couponRelation;\n\n      if (giftOrders.length > 0 && couponRelation) {\n        for ( let giftOrder of giftOrders ) {\n          giftOrder.coupon_relation = couponRelation;\n        }\n      }\n\n      return {\n        models : { buyOrder : buyOrder, giftOrders: giftOrders, couponRelation: couponRelation }\n        // ,sql : [ ...couponRelationSql, ...buyOrderSql, ...giftOrderSql, ...validateSql]\n      }\n    }\n\n    return {\n      // sql: allCouponRelationAndBuyAndGiftSql,\n      models : allCouponRelationAndBuyAndGiftModels\n    };\n  }\n\n  async batch_update_checked_by_ajax(params){\n    return await this.ajax({\n      method: \"PUT\",\n      body:params,\n      url:`/${ params.domain }/backend/orders/batch_update_checked.json`\n    });\n  }\n\n  async get_excel_count_by_ajax(params={}){\n    return await super.ajax({\n      ...params,\n      method:\"GET\",\n      url: `/${ params.domain }/backend/orders/download_excel.json?isAjax=true`\n    });\n  }\n\n  async download_excel(params={}){\n    let downloadUrl = `/${ params.domain }/backend/orders/download_excel.xls`;\n    downloadUrl = downloadUrl\n                  .updateQueryStringParameter(\"offset\", params[\"offset\"] ?? \"\")\n                  .updateQueryStringParameter(\"excel_size\", params[\"excel_size\"] ?? \"\");\n    window.open(downloadUrl);\n  }\n}\n\n\n\nexport class AdvanceBalanceModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"advance_balances\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 10000),\n      site_id : Math.floor(Math.random() * 100) + 1,\n      user_id : Math.floor(Math.random() * 100) + 1,\n      amount : Math.random() * 100\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  update_balance_sql() {\n    let sql = [];\n\n    return [{\n      tableName: \"advance_balances\",\n      params:[ this.site_id, this.user_id, this.id ],\n      sql: `\n        UPDATE advance_balances\n        SET balance = ( select SUM(amount) FROM advances WHERE site_id = $1 AND user_id = $2 )\n        WHERE id = $3`\n    }];\n  }\n\n  add_balance_sql(addBalance) {\n    return [{\n      params:[this.site_id, this.user_id],\n      sql: `\n        INSERT INTO advance_balances (site_id, user_id, balance, id)\n        SELECT  $1, $2, 0 ,(SELECT COALESCE((SELECT MIN(id) FROM advance_balances WHERE id < 0), 0)-1)\n        WHERE\n        NOT EXISTS (  SELECT 1 FROM advance_balances WHERE site_id = $1 AND user_id = $2 );`\n    },\n    {\n      tableName: \"advance_balances\",\n      params:[this.user_id, this.site_id, addBalance ],\n      sql: `\n        UPDATE advance_balances\n        SET balance = balance + $3\n        WHERE site_id = $2 AND user_id = $1`\n    },{\n      sql: `\n        SELECT *\n        FROM advance_balances\n        WHERE site_id = $2 AND user_id = $1 AND balance < 0\n      `,\n      params: [this.user_id, this.site_id ],\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length == 0);\n        return success;\n      },\n      errorMessage: \"\u9810\u5132\u91D1\u4E0D\u8DB3\"\n    }];\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      that.tableName,\n      \"id,site_id,user_id,amount\"\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    return [\n    saveSql,\n    ...this.validate_column_logic_sql()\n    ]\n  }\n}\n\nexport class ChargedRecordPaymentModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"charged_record_payments\";\n  }\n\n  async save_by_ajax(params) {\n    let chargedRecordPaymentJson = this.to_json([\n      \"id\",\n      \"charged_record_id\",\n      \"site_id\",\n      \"number\",\n      \"charged_plan_id\",\n      \"record_type\",\n      \"amount\",\n      \"pay_info\",\n      \"paid\",\n      \"max_storage_size_in_gb\",\n      \"created_at\",\n      \"updated_at\"\n    ]);\n\n    let result = await super.save_ajax({\n      tablePluralName: \"charged_record_payments\",\n      tableSingularName: \"charged_record_payment\",\n      data : chargedRecordPaymentJson,\n      id : chargedRecordPaymentJson.id,\n      domain : params[\"domain\"],\n      isNew : chargedRecordPaymentJson.id ? false : true,\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"],\n      isAdmin : [undefined, null, \"\"].includes(params[\"isAdmin\"]) ? false : params[\"isAdmin\"]\n    });\n    return result;\n  }\n}\n\n\nexport class ChargedRecordModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"charged_records\";\n  }\n\n  async save_by_ajax(params) {\n    let chargedRecordJson = this.to_json([\n      \"id\",\n      \"site_id\",\n      \"amount\",\n      \"tax\",\n      \"valid_start_date\",\n      \"valid_end_date\",\n      \"remark\",\n      \"created_by\",\n      \"updated_by\",\n      \"received_by\",\n      \"charged_plan_id\",\n      \"other_amount\",\n      \"confirmed\",\n      \"pay_method\",\n      \"invoice_info\",\n      \"invoice_number\",\n      \"invoice_date\",\n      \"invoice_processing_status\",\n      \"invoice_vendor_no\",\n      \"invoice_order_no\",\n      \"pay_info\",\n      \"other_amount_need_tax\",\n      \"other_tax\",\n      \"other_usage_amount\",\n      \"other_usage_tax\",\n      \"max_storage_size_in_gb\",\n      \"record_type\",\n      \"created_at\",\n      \"updated_at\",\n    ]);\n\n    let result = await super.save_ajax({\n      tablePluralName: \"charged_records\",\n      tableSingularName: \"charged_record\",\n      path: \"fee\",\n      data : chargedRecordJson,\n      id : chargedRecordJson.id,\n      domain : params[\"domain\"],\n      isNew : chargedRecordJson.id ? false : true,\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"],\n      isAdmin : [undefined, null, \"\"].includes(params[\"isAdmin\"]) ? false : params[\"isAdmin\"]\n    });\n    return result;\n  }\n}\n\n\n\n\nexport class SiteModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"sites\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      title : Math.random().toString(36).substring(7),\n      pos_data_shared_type : Math.floor(Math.random() * 3),\n      created_at : new Date(),\n      updated_at : new Date(),\n      tax_rate : (Math.random() * 10).toFixed(2),\n      tax_included : Math.random() >= 0.5\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  to_json(whitelist){\n    let data = whitelist ? whitelist : [\"id\",\"title\",\"pos_data_shared_type\",\"created_at\",\"updated_at\",\"tax_rate\",\"tax_included\"]\n    return super.to_json(data);\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  async save_by_ajax(params) {\n\n    let siteJson = this.to_json([\n      \"id\",\n      \"title\",\n      \"user_id\",\n      \"domain\",\n      \"zip\",\n      \"address\",\n      \"tel\",\n      \"email\",\n      \"fax\",\n      \"remark\",\n      \"billing_date\",\n      \"invoice_received_name\",\n      \"invoice_vat\",\n      \"invoice_type\",\n      \"invoice_email\",\n      \"invoice_zip\",\n      \"invoice_address\",\n      \"disabled\",\n      \"disabled_at\",\n      \"disabled_by\",\n      \"published\",\n      \"published_at\",\n      \"published_by\",\n      \"created_at\",\n      \"updated_at\",\n      \"pos_data_shared_type\",\n      \"tax_rate\",\n      \"tax_included\",\n      \"charged_plan_id\",\n      \"invoice_donation_code\",\n      \"invoice_carrier_number\",\n      \"invoice_carrier_type\"\n    ]);\n\n    let result = await super.save_ajax({\n      tablePluralName: \"sites\",\n      tableSingularName: \"site\",\n      data : siteJson,\n      id : siteJson.id,\n      domain : params[\"domain\"],\n      isNew : siteJson.id ? false : true,\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"],\n      isAdmin : [undefined, null, \"\"].includes(params[\"isAdmin\"]) ? false : params[\"isAdmin\"]\n    });\n    return result;\n  }\n\n  async register_by_ajax(params) {\n    return await this.ajax({\n      method: \"POST\",\n      body:params,\n      url:`/sites`\n    });\n  }\n}\n\nexport class UserModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"users\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      name : Math.random().toString(36).substring(7),\n      mobile : \"0911122233\"\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"users\",\n      \"id,name,mobile\"\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    return [\n      saveSql\n    ]\n  }\n\n}\n\n\nexport class ProductCategoryModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"product_categories\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      site_id : Math.floor(Math.random() * 1000000),\n      name : Math.random().toString(36).substring(7),\n      order_index : Math.floor(Math.random() * 100),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  async load_product_tags(productTags = null) {\n    if( productTags ) {\n      this.product_tags = productTags.filter(p=>( p.product_category_id == this.id ));\n      return this;\n    }\n  }\n}\n\nexport class ProductTagModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"product_tags\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      site_id : Math.floor(Math.random() * 1000000),\n      product_category_id : Math.floor(Math.random() * 1000000),\n      name : Math.random().toString(36).substring(7),\n      order_index : Math.floor(Math.random() * 100),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n}\n\nexport class ProductTagRelationModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"product_tag_relations\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      product_id : Math.floor(Math.random() * 1000000),\n      product_tag_id : Math.floor(Math.random() * 1000000)\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n}\n\nexport class MemberLevelModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"member_levels\";\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      site_id : Math.floor(Math.random() * 1000000),\n      product_category_id : Math.floor(Math.random() * 1000000),\n      name : Math.random().toString(36).substring(7),\n      order_index : Math.floor(Math.random() * 100),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n\n  save_sql(options = {}){\n    let that = this;\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"member_levels\",\n      \"id,site_id,name,created_at,updated_at\"\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    if( options[\"saveRelationTable\"] ) {\n\n    }\n\n    return [\n    saveSql\n    ]\n  }\n\n}\n\n\nexport class MembershipModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"memberships\";\n  }\n\n  async get_autocomplete(params={}){\n    return await super.ajax({\n      ...params,\n      method:\"GET\",\n      url:`/${ params.domain }/backend/memberships/autocomplete.json?limit=10&term=${ params.value }&searchOtherData=${ params.searchOtherData }`\n    });\n  }\n\n  async load_advance_balance(advanceBalances) {\n    if( advanceBalances ) {\n      return this.advance_balance = advanceBalances.filter(b=>( b.site_id == this.site_id && b.user_id == this.user_id ));\n    } else {\n      this.advance_balance = (await new AdvanceBalanceModel().where(\"site_id\",this.site_id).where(\"user_id\",this.user_id).get_datas()).rows.to_advance_balances_class().first();\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n\n  async get_datas_by_ajax(params) {\n    let result = await super.get_datas_by_ajax(params);\n\n    if (!result.success && result.errors && result.errors.length > 0 ) {\n      await this.Swal.fire('\u767C\u751F\u932F\u8AA4', result.errors.join(\",\"), 'error');\n    } else {\n      return result?.react_props;\n    }\n  }\n\n  validate_column_logic_sql(){\n    return [];\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"memberships\",\n      \"id,site_id,user_id,member_level_id,disabled,remark,created_at,updated_at\"\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    let userSaveSql = [];\n    let updateMembershipUserIdSaveSql = [];\n    if( options[\"saveRelationTable\"] ) {\n\n      if (!this?.user?.name) {\n        alert(`\u8ACB\u5148\u8A2D\u5B9Athis.user.name`);\n        return [];\n      }\n      if (!this?.user?.mobile) {\n        alert(`\u8ACB\u5148\u8A2D\u5B9Athis.user.mobile`);\n        return [];\n      }\n\n      userSaveSql = new UserModel({\n        id: this?.user_id,\n        name: this?.user?.name,\n        mobile: this?.user?.mobile\n      }).save_sql();\n\n      if (!this?.user_id) {\n\n        updateMembershipUserIdSaveSql = [{\n          id: \"{@id}\",\n          user_id: \"{@user_id}\"\n        }].toSaveSqlObjs(\n          \"memberships\",\n          \"id(IsDynamicParam),site_id,user_id(IsDynamicParam),member_level_id,disabled,remark,created_at,updated_at\"\n        )[0];\n\n        updateMembershipUserIdSaveSql = [{...updateMembershipUserIdSaveSql, dynamicParams: {\n          user_id: function(results){\n            return results.users.rows[0].id;\n          },\n          id: function(results){\n            return results.memberships.rows[0].id;\n          }\n        }}];\n      }\n    }\n\n    return [\n    saveSql,\n    ...this.validate_column_logic_sql(),\n    ...userSaveSql,\n    ...updateMembershipUserIdSaveSql\n    ]\n  }\n}\n\n\nexport class CouponModel extends Model {\n  constructor(that) {\n    super(that)\n    this.limit_amount = this.limit_amount ? this.limit_amount*1 : this.limit_amount;\n    this.limit_amount_was = this.limit_amount_was ? this.limit_amount_was*1 : this.limit_amount_was;\n    this.tableName = \"coupons\";\n  }\n\n  allowed_as_a_gift(productId, productModelId = null){\n    if (!this.coupon_product_relations) {\n      alert(`CouponProductRelationModel \u8981\u5148 load_coupon_product_relations`);\n    }\n    let isGift = this.coupon_product_relations.filter(r => ( r.product_id == productId && ( productModelId ? r.product_model_id == productModelId : true ) ) ).length > 0;\n    return isGift;\n  }\n\n\n  // set_insufficient_gift_products_by_order(order, requestQuantity){\n  //   if (requestQuantity == 0) {\n  //     this.coupon.set_insufficient_gift_products(order.uuid, null);\n  //   } else if( this.coupon.gift_product ) {\n  //     let productModelIds = this.coupon.coupon_product_relations.map(c => c.product_model_id).filter(m => m);\n  //     this.coupon.set_insufficient_gift_products(order.uuid, \"quantity\", requestQuantity);\n  //     this.coupon.set_insufficient_gift_products(order.uuid, \"product_id\", order.product_id);\n  //     this.coupon.set_insufficient_gift_products(order.uuid, \"product_name\", order.product.name);\n  //     this.coupon.set_insufficient_gift_products(order.uuid, \"product_ids\", productModelIds);\n  //   }\n  // }\n\n\n  // \u5206\u5272\u51FA\u8A02\u55AE\u4F5C\u70BA\u8D08\u54C1 \u56E0\u70BA\u8D08\u54C1\u50F9\u683C\u6703\u8B8A\u62100 \u7B49\u65BC\u6703\u6E1B\u5C11\u8A02\u55AE\u7E3D\u91D1\u984D \u53CD\u800C\u5C0E\u81F4\u4E0D\u6EFF\u8DB3\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D\n  // \u9019\u908A\u8981\u505A\u8A08\u7B97\u662F\u5426\u6703\u5C0E\u81F4\u4E0A\u8FF0\u72C0\u6CC1 \u61C9\u8A72\u8981\u6E1B\u5C11\u591A\u5C11\u624D\u4E0D\u6703\u5C0E\u81F4\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D\u4E0D\u6EFF\u8DB3\n  shipmentCouponRequestQuantity(giftCount, giftOrdersQuantitySum, orderPrice, limitAmount, orderAmount){\n    // giftOrdersQuantitySum \u4EE3\u8868\u76EE\u524D shipment.coupon_relation.gift_orders \u7684 quantity \u7684 \u7E3D\u548C\n\n    //\u6B63\u5E38\u7684\u60C5\u6CC1 giftCount - giftOrdersQuantitySum \u5C31\u662F\u76EE\u524D\u9700\u8981\u7684\u6578\u91CF\n    let requestQuantity = ( giftCount - giftOrdersQuantitySum );\n\n    //\u6AA2\u67E5 requestQuantity \u6703\u4E0D\u6703\u5F71\u97FF\u5230\u76EE\u524D\u7684\u8A02\u55AE\u7E3D\u91D1\u984D \u5C0E\u81F4\u4E0D\u6EFF\u8DB3 \u6EFF\u984D\u91D1\u984D\n    if ( (orderAmount - requestQuantity*orderPrice) < limitAmount ) {\n\n      if ( requestQuantity <= 1 ) {\n        return 0;\n      }\n      //\u5982\u679C\u8A08\u7B97\u51FA\u4F86\u7684\u91D1\u984D\u6703\u5C0E\u81F4 \u8A02\u55AE\u7E3D\u91D1\u984D \u4E0D\u6EFF\u8DB3 \u6EFF\u984D\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D \u5C31\u7E7C\u7E8C\u7B97\u51FA\u6700\u5C11\u53EA\u80FD\u591A\u5C11\u6578\u91CF \u624D\u4E0D\u81F3\u65BC\u5F71\u97FF\u512A\u60E0\u7684\u6210\u7ACB\n      return this.shipmentCouponRequestQuantity(giftCount, giftOrdersQuantitySum+1, orderPrice, limitAmount, orderAmount);\n    }\n\n    return requestQuantity;\n  }\n\n\n\n\n\n  // \u5206\u5272\u51FA\u8A02\u55AE\u4F5C\u70BA\u8D08\u54C1 \u56E0\u70BA\u8D08\u54C1\u50F9\u683C\u6703\u8B8A\u62100 \u7B49\u65BC\u6703\u6E1B\u5C11\u8A02\u55AE\u7E3D\u91D1\u984D \u53CD\u800C\u5C0E\u81F4\u4E0D\u6EFF\u8DB3\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D\n  // \u9019\u908A\u8981\u505A\u8A08\u7B97\u662F\u5426\u6703\u5C0E\u81F4\u4E0A\u8FF0\u72C0\u6CC1 \u5982\u679C\u9700\u6C42\u7684\u6578\u91CF\u6703\u5C0E\u81F4\u6EFF\u984D\u512A\u60E0\u4E0D\u6210\u7ACB \u5C31\u56DE\u50B3 false \u53CD\u4E4B true\n  // validateCouponRequestQuantity(giftCount, giftOrdersQuantitySum, orderPrice, limitAmount, orderAmount){\n  //   // giftOrdersQuantitySum \u4EE3\u8868\u76EE\u524D shipment.coupon_relation.gift_orders \u7684 quantity \u7684 \u7E3D\u548C\n\n  //   //\u6B63\u5E38\u7684\u60C5\u6CC1 giftCount - giftOrdersQuantitySum \u5C31\u662F\u76EE\u524D\u9700\u8981\u7684\u6578\u91CF\n  //   let requestQuantity = ( giftCount - giftOrdersQuantitySum );\n\n  //   //\u6AA2\u67E5 requestQuantity \u6703\u4E0D\u6703\u5F71\u97FF\u5230\u76EE\u524D\u7684\u8A02\u55AE\u7E3D\u91D1\u984D \u5C0E\u81F4\u4E0D\u6EFF\u8DB3 \u6EFF\u984D\u91D1\u984D\n  //   if ( (orderAmount - requestQuantity*orderPrice) < limitAmount ) {\n  //     return false;\n  //   }\n  //   return true;\n  // }\n\n\n  // simulate_orders_apply_coupon(ordersQuantityWas, notMatchedOrders);\n  simulate_shipment_apply_coupon(orders, shipment, orderAmount) {\n    let rollbackData = {};\n    let tempSplitOrders = [];\n    let newSplitOrders = [];\n    let couponRelation = null;\n    // shipment.coupon_relation = null;\n\n    let noCouponCheckoutOrders = orders.filter(o => !o.coupon_type && o.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"] );\n\n    //\u5982\u679C\u6709\u6EFF\u984D\u512A\u60E0 \u5148\u9084\u539F \u518D\u91CD\u65B0\u5224\u65B7\u512A\u60E0\n    // if (shipment.coupon_relation && shipment.coupon_relation.gift_orders) {\n\n    //   for ( let giftOrder of shipment.coupon_relation.gift_orders ) {\n    //     giftOrder\n    //       .set_quantity_and_price(giftOrder.quantity, giftOrder.price, null, giftOrder.cost, giftOrder.shipped_qty, false, this.CONSTANTS)\n    //       .set_discount_amount(this.CONSTANTS)\n    //       .set_total_price();\n\n    //     noCouponCheckoutOrders = [ ...noCouponCheckoutOrders, giftOrder ];\n    //   }\n    // }\n\n    //\u5DF2\u6709\u512A\u60E0 \u4E14 \u512A\u60E0\u7684\u6EFF\u984D\u91D1\u984D \u6BD4 \u76EE\u524D\u8981\u5957\u7528\u7684\u512A\u60E0\u6EFF\u984D\u91D1\u984D\u9084\u8981\u9AD8 \u5C31\u4E0D\u7E7C\u7E8C\u57F7\u884C\n    // if (shipment.coupon_relation && (shipment.coupon_relation?.coupon?.limit_amount ?? 0) >= this.limit_amount) {\n\n    //\u5DF2\u6709\u512A\u60E0 \u5C31\u8DF3\u51FA \u4E0D\u7E7C\u7E8C\u57F7\u884C\n    if ( shipment.coupon_relation ) {\n      return shipment;\n    }\n\n    if (!couponRelation) {\n      couponRelation = new CouponRelationModel()\n        .set_import({ \"CONSTANTS\" : this.CONSTANTS })\n        .set_coupon_relation_columns(this)\n        .set_buy_and_gift_count(this);\n    }\n\n    //\u7B26\u5408\u6EFF\u984D\u512A\u60E0\u91D1\u984D\n    if ( this.limit_amount && orderAmount >= this.limit_amount ) {\n\n      //\u7528\u4F86\u8A08\u7B97\u76EE\u524D\u8D08\u54C1\u7684\u50F9\u503C \u4EE5\u65B9\u4FBF\u5224\u65B7\u662F\u5426\u6EFF\u984D\u512A\u60E0\u6700\u4F4E\u91D1\u984D\u6703\u88AB\u5F71\u97FF\n      let sumOfGiftOrdersPrice = 0;\n\n      for ( let order of noCouponCheckoutOrders ) {\n\n        //\u8A02\u55AE\u7B26\u5408\u8D08\u54C1\u8981\u6C42\n        if(\n          couponRelation.coupon.coupon_product_relations\n                .filter(c => c.coupon_type == this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] )\n                .filter(c => c.product_id == order.product_id && c.product_model_id == order.product_model_id ).length > 0\n          )\n        {\n\n          //\u76EE\u524D gift_orders\u7684 quantity \u7E3D\u548C\n          let giftOrdersQuantitySum = couponRelation.gift_orders_quantity_sum();\n\n          // //\u8981\u5206\u5272\u51FA\u591A\u5C11\u6578\u91CF\n          let requestQuantity = ( couponRelation.gift_count - giftOrdersQuantitySum );\n\n\n          // \u5206\u5272\u51FA\u8A02\u55AE\u4F5C\u70BA\u8D08\u54C1 \u56E0\u70BA\u8D08\u54C1\u50F9\u683C\u6703\u8B8A\u62100 \u7B49\u65BC\u6703\u6E1B\u5C11\u8A02\u55AE\u7E3D\u91D1\u984D \u53CD\u800C\u5C0E\u81F4\u4E0D\u6EFF\u8DB3\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D\n          // \u9019\u908A\u8981\u505A\u8A08\u7B97\u662F\u5426\u6703\u5C0E\u81F4\u4E0A\u8FF0\u72C0\u6CC1 \u61C9\u8A72\u8981\u6E1B\u5C11\u591A\u5C11\u624D\u4E0D\u6703\u5C0E\u81F4\u512A\u60E0\u7684\u6700\u4F4E\u91D1\u984D\u4E0D\u6EFF\u8DB3\n          // let requestQuantity = this.shipmentCouponRequestQuantity(couponRelation.gift_count, giftOrdersQuantitySum, order.price_if_not_gift, this.limit_amount, orderAmount);\n\n          if (requestQuantity && order.quantity ) {\n\n            // \u5982\u679C\u6709\u7D00\u9304\u904E\u9084\u539F\u8CC7\u6599 \u5C31\u4E0D\u8986\u84CB \u4FDD\u7559\u6700\u521D\u7684quantity\n            if (!rollbackData[order.uuid]) {\n              rollbackData[order.uuid] = {\n                order: order,\n                quantity_was: order.quantity*1,\n                price_was: order.price*1,\n                cost_was: order.cost,\n                shipped_qty_was: order.shipped_qty,\n              }\n            }\n\n            //\u628Aorder\u7684\u6578\u91CF\u5206\u914D\u7D66 gift_order \u6709\u53EF\u80FD\u525B\u597D\u5206\u5272\u5B8C order.quantity \u6703\u8B8A\u6210 0\n            let giftOrder = order.split_gift_order(this.CONSTANTS, ( requestQuantity > order.quantity ? order.quantity : requestQuantity ) , order.created_by);\n\n            sumOfGiftOrdersPrice = sumOfGiftOrdersPrice + giftOrder.price_if_not_gift*giftOrder.quantity;\n\n            giftOrder.quantity_was = rollbackData[order.uuid].quantity_was;\n            giftOrder.price_was = rollbackData[order.uuid].price_was;\n            giftOrder.cost_was = rollbackData[order.uuid].cost_was;\n            giftOrder.shipped_qty_was = rollbackData[order.uuid].shipped_qty_was;\n\n            //\u5404\u7A2E\u95DC\u806F\u8A2D\u5B9A\n            giftOrder.product = order.product;\n            couponRelation.gift_orders = couponRelation.gift_orders ?? [];\n            couponRelation.gift_orders.push(giftOrder);\n            couponRelation.set_whose_buy(giftOrder.user_id);\n            giftOrder.coupon_relation = couponRelation;\n\n            tempSplitOrders = [...tempSplitOrders, giftOrder];\n            // orderQuantityChanged = true;\n          }\n        }\n      }\n\n      if ( (orderAmount - sumOfGiftOrdersPrice) >= this.limit_amount && couponRelation.coupon_can_be_used()) {\n        shipment.coupon_relation = couponRelation;\n        newSplitOrders = tempSplitOrders;\n      } else {\n        //\u5982\u679C\u6C92\u6E4A\u6210\u512A\u60E0\u689D\u4EF6 \u8981\u9084\u539F\n        for ( let key in rollbackData ) {\n          let data = rollbackData[key];\n\n          // quantity \u9084\u539F\n          data.order\n            .set_quantity_and_price(data.quantity_was, data.shipped_qty_for_shipment_was, data.price_was, null, data.cost_was, data.shipped_qty_was, this.CONSTANTS)\n            .set_discount_amount(this.CONSTANTS)\n            .set_total_price();\n\n          // coupon?.insufficient_buy_products?.[item?.uuid]\n\n\n          // console.log(` ${ Utility.invert(this.CONSTANTS.Coupon.TYPE_CODE)[this.type_code] }(${ this.name }): \u9084\u7F3A\u5C11O\u4EF6\u5546\u54C1 \u53EF\u6EFF\u8DB3\u6B64\u512A\u60E0 `);\n\n        }\n\n        couponRelation.clear_buy_order_and_gift_order_bind();\n        rollbackData = {};\n        couponRelation.buy_order = null;\n        couponRelation.gift_orders = null;\n      }\n    }\n    return newSplitOrders;\n  }\n\n\n  simulate_orders_apply_coupon(ordersQuantityWas, orders, couponRelation = null ,allSplitOrders = [], tempSplitOrders = [], rollbackData = {}, index = 0) {\n    let newSplitOrders = [];\n    let orderQuantityChanged = false;\n\n    if (!couponRelation) {\n      couponRelation = new CouponRelationModel()\n        .set_import({ \"CONSTANTS\" : this.CONSTANTS })\n        .set_coupon_relation_columns(this)\n        .set_buy_and_gift_count(this);\n    }\n\n    let order = orders[index];\n\n    //\u5982\u679C\u6C92\u6709\u8A02\u55AE\u53EF\u4EE5\u8655\u7406\u4E86 \u5C31\u7D00\u9304\u9084\u7F3A\u5C11\u591A\u5C11(\u5982\u679C\u6C92\u6E4A\u9F4A) \u5C31\u6574\u7406\u8CC7\u6599\u56DE\u50B3\n    if (!order) {\n\n      //\u5982\u679C\u6C92\u6E4A\u6210\u512A\u60E0\u689D\u4EF6 \u8981\u9084\u539F\n      if ( !couponRelation.coupon_can_be_used() ) {\n\n        for ( let key in rollbackData ) {\n          let data = rollbackData[key];\n\n          // quantity \u9084\u539F\n          data.order\n            .set_quantity_and_price(data.quantity_was, data.shipped_qty_for_shipment_was, data.order.price, null, data.order.cost, data.order.shipped_qty, this.CONSTANTS)\n            .set_discount_amount(this.CONSTANTS)\n            .set_total_price();\n\n        }\n\n        couponRelation.clear_buy_order_and_gift_order_bind();\n        rollbackData = {};\n        couponRelation.buy_order = null;\n        couponRelation.gift_orders = null;\n      }\n\n      for ( let order of orders ) {\n        // \u6578\u91CF\u6539\u4E86 \u8981\u91CD\u65B0\u8ABF\u6574\u5546\u54C1\u63D0\u9192\n        if (ordersQuantityWas[order.uuid] != order.quantity) {\n          for ( let activeCoupon of order.active_coupons ) {\n            activeCoupon\n              .order_coupon_buy_product_validate(order);\n          }\n        }\n      }\n\n      return allSplitOrders;\n    }\n\n\n    //\u5982\u679Corder quantity \u88AB\u5206\u914D\u5B8C\u4E86 \u6216\u662F \u5DF2\u7D93\u6E4A\u9F4A\u689D\u4EF6 \u5C31\u4E0B\u4E00\u500B\n    if (order.quantity == 0 ) {\n      return this.simulate_orders_apply_coupon(ordersQuantityWas, orders, couponRelation, allSplitOrders, tempSplitOrders, rollbackData, index + 1);\n    }\n\n    // coupon_type \u5982\u679C\u6709\u503C \u5C31\u7B49\u65BC\u512A\u60E0\u5546\u54C1\u6216\u662F\u8D08\u54C1 \u5247\u4E0D\u8655\u7406\u9019\u7A2E\u8A02\u55AE \u8DF3\u4E0B\u4E00\u500B\n    if ( order.coupon_type ) {\n      return this.simulate_orders_apply_coupon(ordersQuantityWas, orders, couponRelation, allSplitOrders, tempSplitOrders, rollbackData, index + 1);\n    }\n\n    if (!order.uuid) {\n      order.set_uuid();\n    }\n\n    if ([this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(couponRelation.type_code*1)) {\n      if (\n          // (!couponRelation.buy_order || couponRelation.buy_order.quantity < couponRelation.buy_count ) &&\n          !couponRelation.buy_order &&\n\n          couponRelation.coupon.coupon_product_relations\n          .filter(c => c.coupon_type == this.CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"] )\n          .filter(c => c.product_id == order.product_id ).length > 0\n         ) {\n\n        //\u8981\u5206\u5272\u51FA\u591A\u5C11\u6578\u91CF\n        let requestQuantity = ( couponRelation.buy_count - ( couponRelation?.buy_order?.quantity ?? 0 ) );\n\n        // \u5982\u679C\u6709\u7D00\u9304\u904E\u9084\u539F\u8CC7\u6599 \u5C31\u4E0D\u8986\u84CB \u4FDD\u7559\u6700\u521D\u7684quantity\n        if (!rollbackData[order.uuid]) {\n          rollbackData[order.uuid] = {\n            order: order,\n            quantity_was: order.quantity,\n          }\n        }\n\n        //\u5982\u679C\u76EE\u524D\u7684\u6578\u91CF \u5927\u65BC \u512A\u60E0\u9700\u8981\u7684\u6578\u91CF \u5C31\u9032\u884C\u914D\u5C0D\n        if ( order.quantity >= requestQuantity ) {\n\n          //\u5982\u679C\u5DF2\u7D93\u6709buy_order \u5C31\u76F4\u63A5\u6539\u6578\u91CF\u5C31\u597D \u6C92\u6709buy_order \u5C31\u8981create\u4E00\u500B\u65B0\u7684\n          if (couponRelation.buy_order) {\n            couponRelation.buy_order\n              .set_quantity_and_price(couponRelation.buy_order.quantity + requestQuantity, couponRelation.buy_order.shipped_qty_for_shipment, couponRelation.buy_order.price, couponRelation.buy_order.coupon_type, couponRelation.buy_order.cost, couponRelation.buy_order.shipped_qty, this.CONSTANTS)\n              .set_discount_amount(this.CONSTANTS, couponRelation)\n              .set_total_price();\n\n            order\n              .set_quantity_and_price(order.quantity - requestQuantity, order.shipped_qty_for_shipment, order.price, order.coupon_type, order.cost, order.shipped_qty, this.CONSTANTS)\n              .set_total_price();\n          } else {\n            //\u628Aorder\u7684\u6578\u91CF\u5206\u914D\u7D66 buy_order \u6709\u53EF\u80FD\u525B\u597D\u5206\u5272\u5B8C order.quantity \u6703\u8B8A\u6210 0\n            let buyOrder = order.split_buy_order(this.CONSTANTS, ( requestQuantity > order.quantity ? order.quantity : requestQuantity ) , order.created_by);\n\n            //\u5404\u7A2E\u95DC\u806F\u8A2D\u5B9A\n            buyOrder.product = order.product;\n            buyOrder.coupon_relation = couponRelation;\n            couponRelation.buy_order = buyOrder;\n\n            // \u56E0\u70BA coupon_relation \u9023\u4E0A\u4E86 \u6240\u8981  buyOrder \u8981\u91CD\u65B0\u7B97\u6298\u6263\n            buyOrder\n              .set_discount_amount(this.CONSTANTS, couponRelation)\n              .set_total_price();\n\n            //\u8A2D\u5B9A coupon_relation\n            buyOrder.coupon_relation\n            .set_shipment_discount_amount(couponRelation.coupon, buyOrder.total_price, this.CONSTANTS)\n            .set_whose_buy(buyOrder.user_id)\n\n            newSplitOrders = [...newSplitOrders, buyOrder];\n          }\n\n          orderQuantityChanged = true;\n        }\n      }\n\n\n      if(\n        couponRelation.coupon.coupon_product_relations\n        .filter(c => c.coupon_type == this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] )\n        .filter(c => c.product_id == order.product_id && c.product_model_id == order.product_model_id ).length > 0\n      ) {\n\n        //\u76EE\u524D gift_orders\u7684 quantity \u7E3D\u548C\n        let giftOrdersQuantitySum = couponRelation.gift_orders_quantity_sum();\n\n        //\u8981\u5206\u5272\u51FA\u591A\u5C11\u6578\u91CF\n        let requestQuantity = ( couponRelation.gift_count - giftOrdersQuantitySum );\n        let meetTheQuantity = ( requestQuantity > order.quantity ? false : true );\n\n        if (requestQuantity && order.quantity ) {\n\n          // \u5982\u679C\u6709\u7D00\u9304\u904E\u9084\u539F\u8CC7\u6599 \u5C31\u4E0D\u8986\u84CB \u4FDD\u7559\u6700\u521D\u7684quantity\n          if (!rollbackData[order.uuid]) {\n            rollbackData[order.uuid] = {\n              order: order,\n              quantity_was: order.quantity,\n            }\n          }\n\n          //\u628Aorder\u7684\u6578\u91CF\u5206\u914D\u7D66 gift_order \u6709\u53EF\u80FD\u525B\u597D\u5206\u5272\u5B8C order.quantity \u6703\u8B8A\u6210 0\n          let giftOrder = order.split_gift_order(this.CONSTANTS, ( requestQuantity > order.quantity ? order.quantity : requestQuantity ) , order.created_by);\n\n\n          //\u5404\u7A2E\u95DC\u806F\u8A2D\u5B9A\n          giftOrder.product = order.product;\n          couponRelation.gift_orders = couponRelation.gift_orders ?? [];\n          couponRelation.gift_orders.push(giftOrder);\n          giftOrder.coupon_relation = couponRelation;\n\n          newSplitOrders = [...newSplitOrders, giftOrder];\n          orderQuantityChanged = true;\n\n        }\n      }\n    }\n\n    if (this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"] == couponRelation.type_code) {\n      let giftOrdersQuantitySum = couponRelation.gift_orders_quantity_sum();\n      let requestQuantity = ( couponRelation.gift_count - giftOrdersQuantitySum );\n\n      if (requestQuantity == 0) {\n        this.set_insufficient_gift_products(order.uuid, null);\n      } else if( this.gift_product ) {\n        let productModelIds = this.coupon_product_relations.map(c => c.product_model_id).filter(m => m);\n        let allCouponProductRelationProductModelNames = {};\n\n        for (let couponProductRelation of this.coupon_product_relations ) {\n          let productModels = ( couponProductRelation?.product?.product_models ?? [] );\n          for (let productModel of productModels ) {\n             allCouponProductRelationProductModelNames[productModel.id] = productModel.name;\n          }\n        }\n\n        let productModelNames = productModelIds.map( id => allCouponProductRelationProductModelNames[id] );\n\n        this.set_insufficient_gift_products(order.uuid, \"quantity\", requestQuantity);\n        this.set_insufficient_gift_products(order.uuid, \"product_id\", order.product_id);\n        this.set_insufficient_gift_products(order.uuid, \"product_name\", order.product.name);\n        this.set_insufficient_gift_products(order.uuid, \"product_model_ids\", productModelIds);\n        this.set_insufficient_gift_products(order.uuid, \"product_model_names\", productModelNames);\n      }\n    }\n\n    tempSplitOrders = [ ...tempSplitOrders, ...newSplitOrders ]\n\n    if ( couponRelation.coupon_can_be_used() ) {\n      allSplitOrders = [ ...allSplitOrders, ...tempSplitOrders ];\n      return this.simulate_orders_apply_coupon(ordersQuantityWas, orders, null, allSplitOrders, [], {}, 0);\n    }\n\n    //\u5982\u679C\u6578\u91CF\u6709\u8B8A\u66F4 \u53EF\u80FD\u662Fbuy_orders \u689D\u4EF6\u5DF2\u6EFF \u5C31\u91CD\u982D\u518D\u8DD1\u6AA2\u67E5\u4E00\u6B21\n    if (orderQuantityChanged) {\n      return this.simulate_orders_apply_coupon(ordersQuantityWas, orders, couponRelation, allSplitOrders, tempSplitOrders, rollbackData, 0);\n    }\n\n    return this.simulate_orders_apply_coupon(ordersQuantityWas, orders, couponRelation, allSplitOrders, tempSplitOrders, rollbackData, index + 1);\n  }\n\n  async load_gift_and_buy_product(productModels = []) {\n    let productIds = [this.buy_product_id, this.gift_product_id];\n    productIds = productIds.filter(p => p);\n    // console.log('load_gift_and_buy_product');\n    if (productIds.length != 0) {\n      // let productModels = productIds.length == 0 ? [] : (await new ProductModel().where(\"id in ?\",[productIds]).get_datas()).rows.to_products_class();\n\n      productModels = productModels.to_products_class();\n\n      if (this.buy_product_id) {\n        this.load_buy_product(productModels);\n      }\n      if (this.gift_product_id) {\n        this.load_gift_product(productModels);\n      }\n    }\n    return this;\n  }\n\n  load_coupon_product_relations(coupon_product_relations) {\n    if( coupon_product_relations ){\n      this.coupon_product_relations = coupon_product_relations.filter(p=>(p.coupon_id == this.id && p.coupon_id ));\n    }\n    return this;\n  }\n\n  batch_load_coupon_product_relations_and_related_product(params) {\n    let {\n      CONSTANTS,\n      coupons,\n      coupon_product_relations,\n      products,\n      product_models\n    } = params;\n\n    let couponModels = coupons.to_coupons_class();\n    // let buyProductIds = couponModels.map(c => c.buy_product_id).unique().filter(i => i );\n    // let giftProductIds = couponModels.map(c => c.gift_product_id).unique().filter(i => i );\n    // let productIds = [...buyProductIds, ...giftProductIds].unique();\n\n    // let couponProductRelationModels = productIds.length == 0 ? [] : (await (new CouponProductRelationModel()).where(\" product_id in ? \",[productIds]).get_datas()).rows.to_coupon_product_relations_class();\n    // let productModels = productIds.length == 0 ? [] : (await (new ProductModel()).where(\" id in ? \",[productIds]).get_datas()).rows.to_products_class();\n    // let productModelClasses = productIds.length == 0 ? [] : (await (new ProductModelClass()).where(\" product_id in ? \",[productIds]).get_datas()).rows.to_product_models_class();\n\n    let couponProductRelationModels = coupon_product_relations?.to_coupon_product_relations_class(); //to_coupon_product_relations_class\n    let productModels = products?.to_products_class(); //to_products_class\n    let productModelClasses = product_models?.to_product_models_class(); //to_product_models_class\n\n    for (let couponModel of couponModels) {\n      couponModel.load_coupon_product_relations_and_related_product({\n        CONSTANTS : CONSTANTS,\n        coupon_product_relations : couponProductRelationModels,\n        products : productModels,\n        productModels : productModelClasses\n      });\n    }\n    return couponModels;\n  }\n\n  load_coupon_product_relations_and_related_product(params) {\n    let { CONSTANTS, coupon_product_relations, products = null, productModels = null } = params;\n\n    this.load_coupon_product_relations(coupon_product_relations);\n\n    if (products) {\n      products = products.to_products_class();\n    }\n\n    if (productModels) {\n      productModels = productModels.to_product_models_class();\n    }\n\n    this.coupon_product_relations.to_coupon_product_relations_class();\n\n    let productIds = [this.buy_product_id, this.gift_product_id].unique().filter(i => i );\n\n    for ( let productModel of productModels ) {\n      productModel.load_coupon_product_relations(this.coupon_product_relations);\n    }\n\n    if (this.buy_product_id) {\n      this.load_buy_product(products);\n    }\n    if (this.gift_product_id) {\n      this.load_gift_product(products);\n    }\n\n    this.coupon_product_relations = this.coupon_product_relations.to_coupon_product_relations_class();\n    for( let couponProductRelationModel of this.coupon_product_relations ) {\n      couponProductRelationModel.load_product(products);\n      couponProductRelationModel.product.load_product_models(productModels);\n    }\n\n    return this;\n  }\n\n  set_insufficient_gift_products(orderUUId, key = null, value = null){\n    if ( orderUUId && key ) {\n      this.insufficient_gift_products = this.insufficient_gift_products ?? {};\n      this.insufficient_gift_products[orderUUId] = this?.insufficient_gift_products?.[orderUUId] ?? {};\n      this.insufficient_gift_products[orderUUId][key] = value;\n    } else if( orderUUId && !key ) {\n      this.insufficient_gift_products = this.insufficient_gift_products ?? {};\n      this.insufficient_gift_products[orderUUId] = {};\n    } else if( !orderUUId && !key ) {\n      this.insufficient_gift_products = {};\n    }\n  }\n\n  set_used_desc(usedDesc){\n    this.used_desc = usedDesc;\n    return this;\n  }\n\n  set_site(siteId){\n    this.site_id = siteId;\n    return this;\n  }\n\n  set_type_code(typeCode){\n    this.type_code = typeCode;\n    return this;\n  }\n\n  set_name(name){\n    this.name = name;\n    return this;\n  }\n\n  set_disabled(disabled){\n    this.disabled = disabled;\n    return this;\n  }\n\n  set_discount(discountType, discount, CONSTANTS){\n    if (CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u56FA\u5B9A\u91D1\u984D\"] == discountType || CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u6BD4\u7387\"] == discountType ) {\n      if (!discount) {\n        alert('set_discount discount \u5FC5\u9808\u6709\u503C');\n        return;\n      }\n      if ( isNaN(discount*1) ) {\n        alert('set_discount discount \u5FC5\u9808\u662F\u6578\u5B57');\n        return;\n      }\n    }\n\n    this.discount = discount;\n    this.discount_type = discountType;\n    return this;\n  }\n\n  set_time_period(startTime, endTime){\n    this.start_time = startTime;\n    this.end_time = endTime;\n    return this;\n  }\n\n  set_limit(limitAmount, limitedCount, limitUserUsedCount){\n    this.limit_amount = limitAmount ? limitAmount : 0;\n    this.limited_count = limitedCount;\n    this.limit_user_used_count = limitUserUsedCount;\n    return this;\n  }\n\n  set_white_list(limitUsed, couponLimits){\n    if (limitUsed && couponLimits.length == 0) {\n      alert('set_white_list \u6C92\u6709\u8A2D\u5B9A couponLimits');\n      return;\n    }\n\n    //\u5982\u679C \u9650\u5236\u4F7F\u7528\u5C0D\u8C61 = false, \u9650\u5236\u689D\u4EF6\u5C31\u8981\u522A\u9664\n    if( !limitUsed ) {\n      couponLimits = couponLimits.filter(c => c.id);\n      for(const couponLimit of couponLimits){\n        couponLimit[\"destroy\"] = true;\n      }\n    }\n\n    this.coupon_limits = couponLimits;\n    this.limit_used = limitUsed;\n    return this;\n  }\n\n  set_buy_product(buyProductId, buyCount, CONSTANTS){\n    let that = this;\n\n    if (buyCount <= 0) {\n      alert(' buyCount \u5FC5\u9808\u5927\u65BC 0');\n      return;\n    }\n\n    this.buy_product_id = buyProductId;\n    this.buy_count = ( buyCount ?? 1 );\n\n    if (buyProductId) {\n      this.coupon_product_relations = this.coupon_product_relations ?? [];\n      let couponProductRelationModel = new CouponProductRelationModel();\n\n      couponProductRelationModel\n        .set_coupon_product_relation(that.id, buyProductId, null, CONSTANTS.CouponProductRelation.TYPE[\"\u512A\u60E0\u5546\u54C1\"]);\n\n      this.coupon_product_relations.push(couponProductRelationModel);\n    }\n\n    return this;\n  }\n\n  set_gift_product(gift, giftProductId, giftProductModelIds, giftCount, CONSTANTS) {\n    let that = this;\n\n    if ( gift && giftProductId ) {\n      alert(` gift \u548C giftProductId \u4E0D\u53EF\u540C\u6642\u5B58\u5728`);\n    }\n\n    if (giftCount <= 0) {\n      alert(' giftCount \u5FC5\u9808\u5927\u65BC 0');\n      return;\n    }\n\n    this.gift = gift;\n    this.gift_product_id = giftProductId;\n    this.gift_count = ( giftCount ?? 1 );\n\n    if (giftProductId) {\n      this.coupon_product_relations = this.coupon_product_relations ?? [];\n      let couponProductRelationModel = new CouponProductRelationModel();\n\n      couponProductRelationModel\n        .set_coupon_product_relation(that.id, giftProductId, null, CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"]);\n\n      this.coupon_product_relations.push(couponProductRelationModel);\n\n      for ( let giftProductModelId of giftProductModelIds ) {\n        let giftCouponProductRelationModel = new CouponProductRelationModel();\n\n        giftCouponProductRelationModel\n          .set_coupon_product_relation(that.id, giftProductId, giftProductModelId, CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"]);\n\n        this.coupon_product_relations.push(giftCouponProductRelationModel);\n      }\n    }\n\n    return this;\n  }\n\n  set_editor(editUserId) {\n    this.created_by = this.created_by ? this.created_by : editUserId;\n    this.updated_by = editUserId;\n    return this;\n  }\n\n  random_data(){\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      site_id : Math.floor(Math.random() * 1000000),\n      type_code : Math.floor(Math.random() * 1000000),\n      name : Math.random().toString(36).substring(7),\n      code : Math.random().toString(36).substring(7),\n      discount_type : Math.floor(Math.random() * 3),\n      discount : (Math.random() * 100).toFixed(2),\n      limit_amount : (Math.random() * 100).toFixed(2),\n      limited_count : Math.floor(Math.random() * 100),\n      start_time : new Date(),\n      end_time : new Date(),\n      disabled : Math.random() >= 0.5,\n      used_count : Math.floor(Math.random() * 100),\n      used_desc : Math.random().toString(36).substring(7),\n      limit_used : Math.random() >= 0.5,\n      gift : Math.random().toString(36).substring(7),\n      limit_user_used_count : 2,\n      created_by : Math.floor(Math.random() * 1000000),\n      updated_by : Math.floor(Math.random() * 1000000),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  to_json(whitelist){\n    let data = whitelist ? whitelist : [\"id\",\"site_id\",\"type_code\",\"name\",\"code\",\"discount_type\",\"discount\",\"limit_amount\",\"limited_count\",\"start_time\",\"end_time\",\"disabled\",\"used_count\",\"used_desc\",\"limit_used\",\"gift\",\"created_by\",\"updated_by\",\"created_at\",\"updated_at\",\"buy_product_id\",\"gift_product_id\",\"buy_count\",\"gift_count\",\"limit_user_used_count\"]\n    return super.to_json(data);\n  }\n\n  active(){\n    let nowTime = new Date();\n    this\n    .where(\"start_time <= ?\",[nowTime.toString().toYYYYMMDD()])\n    .where(\"end_time >= ?\",[nowTime.toString().toYYYYMMDD()])\n    .where(\"disabled\",false);\n\n    return this;\n  }\n\n  product_coupons(CONSTANTS){\n    this.where(\"type_code in ?\",[[CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"], CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"]]])\n    return this;\n  }\n\n  amount_coupons(CONSTANTS){\n    this.where(\"type_code in ?\",[[CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"], CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]]])\n    return this;\n  }\n\n  async destroy(options = {}){\n    let that = this;\n    let destroyCouponLimitSql = [];\n    let destroyCouponProductRelationSql = [];\n    let success = true;\n    let errors = [];\n\n    if (options[\"saveRelationTable\"]) {\n      let destroyIds = (await this.get_datas()).rows.map(d=>d.id);\n      destroyCouponLimitSql = destroyIds.length == 0 ? [] : (new CouponLimitModel().where(\"coupon_id in ?\",[destroyIds]).destroy_sql());\n      destroyCouponProductRelationSql = destroyIds.length == 0 ? [] : (new CouponProductRelationModel().where(\"coupon_id in ?\",[destroyIds]).destroy_sql());\n    }\n\n    let sqlObjs = [{sql: \"BEGIN\"},\n      ...super.destroy_sql(),\n      ...destroyCouponLimitSql,\n      ...destroyCouponProductRelationSql,\n      // {\n      //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n      //   params: [],\n      //   validate: function(currentResult, allResults){\n      //     let success = false;\n      //     return success;\n      //   },\n      //   errorMessage: \"\u5C31\u662F\u932F\"\n      // },\n    {sql: \"END\"}];\n\n    let rowCount = 0;\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      rowCount = results?.datasByTableName[that.tableName]?.rowCount;\n    }).catch(async err => {\n      if( err?.message ) {\n        success = false;\n        errors.push(err?.message);\n        // alert('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n      // throw err;\n    });\n\n    return {\n      success: success,\n      errors: errors,\n      rowCount: rowCount\n    };\n  }\n\n  create_gift_order( buyOrder, createdBy, CONSTANTS){\n    let that = this;\n    let giftCount = this.gift_count ? this.gift_count : 1;\n    let buyQuantity = giftCount;\n    let success = true;\n    let errors = [];\n    let giftOrders = [];\n\n    if ( this.gift_product ) {\n      let result = recursionGiftOrders({\n        giftProduct: this.gift_product,\n        giftOrders: giftOrders,\n        buyOrder: buyOrder,\n        giftCount: giftCount,\n        createdBy: createdBy,\n        CONSTANTS: CONSTANTS\n      });\n\n      giftOrders = result[\"giftOrders\"];\n      giftCount = result[\"giftCount\"];\n    }\n\n    //\u5982\u679C giftCount \u6C92\u6709\u6B780 \u4EE3\u8868\u5EAB\u5B58\u4E0D\u5920\u7528\n    if (giftCount != 0) {\n      giftOrders = [];\n      success = false;\n      errors.push(\"\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3\");\n    }\n\n    //\u7528\u905E\u8FF4\u8655\u7406\u8D08\u54C1\u5224\u65B7\n    function recursionGiftOrders(params){\n      let {\n        giftProduct,\n        giftOrders,\n        buyOrder,\n        giftCount,\n        createdBy,\n        CONSTANTS,\n        modelsIndex = -1\n      } = params;\n\n      let giftProductModel = null;\n      if (giftProduct.product_models.length > 0) {\n        modelsIndex = modelsIndex + 1;\n        giftProductModel = giftProduct.product_models[modelsIndex];\n      }\n\n      if (giftCount == 0) {\n        return {};\n      }\n\n      //\u6C92\u5EAB\u5B58\u5C31\u76F4\u63A5\u8DF3\u904E\n      if( giftProduct.stock_qty === 0 || giftProduct.stock_qty === \"0\" ){\n        return {};\n      }\n      if (giftProductModel) {\n        if ( giftProductModel.stock_qty === 0 || giftProductModel.stock_qty === \"0\"  ) {\n          recursionGiftOrders({\n            ...params,\n            modelsIndex: modelsIndex\n          });\n        }\n\n        if (!that.allowed_as_a_gift(giftProductModel.product_id, giftProductModel.id)) {\n          recursionGiftOrders({\n            ...params,\n            modelsIndex: modelsIndex\n          });\n        }\n      }\n\n      let result = pushToGiftOrders(giftOrders, buyOrder, giftProduct, giftProductModel, giftCount, createdBy, giftProduct.price, giftProduct.cost, CONSTANTS);\n      giftOrders = result[\"giftOrders\"];\n      giftCount = result[\"giftCount\"];\n\n      //\u505A\u5B8C\u5C31return\n      if (modelsIndex = -1 || giftProduct.product_models.length == (modelsIndex + 1) ) {\n        return result;\n      } else {\n        recursionGiftOrders({\n          ...params,\n          modelsIndex: modelsIndex\n        });\n      }\n\n    }\n\n    function pushToGiftOrders(giftOrders, buyOrder, giftProduct, giftProductModel, giftCount, createdBy, giftProductPrice, giftProductCost, CONSTANTS) {\n      let quantity = giftCount;\n      let giftProductId = giftProduct?.id;\n      let giftProductModelId = giftProductModel?.id;\n      let giftProductModelName = giftProductModel?.name;\n\n      //\u5982\u679C\u5EAB\u5B58\u4E0D\u8DB3\u5C31\u5148\u6263\u9664\u90E8\u5206\n      let productOrModel = giftProductModel ? giftProductModel : giftProduct;\n\n      if ( productOrModel.stock_qty && productOrModel.stock_qty < quantity ) {\n        quantity = productOrModel.stock_qty;\n        giftCount = giftCount - quantity;\n      } else {\n        quantity = giftCount;\n        giftCount = 0;\n      }\n\n      let giftOrder = new OrderModel().set_import({ CONSTANTS: CONSTANTS });\n      giftOrder\n        .set_site(buyOrder.site_id)\n        .set_status(buyOrder.status, createdBy)\n        .set_buyer_related_information(buyOrder.user_id, buyOrder.member_level_id, buyOrder.buyer_name, buyOrder.buyer_mobile)\n        .set_product_related_information(giftProductId, giftProductModelId, giftProductModelName)\n        .set_constants(CONSTANTS.Order.SALE_TYPE[\"\u8D08\u54C1\"], CONSTANTS.Order.SOURCE[\"POS\u6A5F\"])\n        .set_editor(createdBy)\n        .set_quantity_and_price(quantity, null, giftProductPrice, CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"], giftProductCost, 0, CONSTANTS)\n        .set_discount_amount(CONSTANTS)\n        .set_total_price(true);\n\n      giftOrders.push(giftOrder);\n      return {\n        giftOrders: giftOrders,\n        giftCount: giftCount\n      };\n    }\n\n    return {\n      success : success,\n      errors : errors,\n      orders : giftOrders\n    };\n  }\n\n  async is_first_use_this_coupon(userId){\n    let isFirstUseThisCoupon = false;\n    if (!this.id) {\n      alert(`\u8ACB\u5148\u8A2D\u5B9Aid`);\n      return false;\n    }\n\n    if (!userId) {\n      alert(`\u6C92\u6709\u50B3\u5165userId`);\n      return false;\n    }\n\n    let sqlObjs = [{sql: \"BEGIN\"},\n      {\n        tableName: \"coupon_relations\",\n        sql: \"SELECT * FROM coupon_relations INNER JOIN shipments ON coupon_relations.shipment_id = shipments.id WHERE shipments.user_id = $1 AND coupon_id = $2\",\n        params: [ userId, this.id ]\n      },\n      {sql: \"END\"}];\n\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      isFirstUseThisCoupon = results?.datasByTableName?.coupon_relations?.rows.length == 0;\n    }).catch(async err => {\n      if( err?.message ){\n        alert(`\u767C\u751F\u932F\u8AA4 ${ err.message }`);\n        await Swal.fire('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n      throw err;\n    });\n\n    return isFirstUseThisCoupon;\n  }\n\n  // async get_validates(options) {\n  //   let that = this;\n\n  //   let { orders, CONSTANTS, userId, checkedCoupons } = options;\n  //   checkedCoupons = checkedCoupons ? checkedCoupons : [];\n\n  //   if (!this.coupon_limits) {\n  //     alert(`\u8ACB\u5148load coupon_limits`);\n  //     return [];\n  //   }\n\n  //   if(!CONSTANTS){\n  //     alert(`\u6C92\u6709\u50B3\u5165 get_validates CONSTANTS\u53C3\u6578`);\n  //     return [];\n  //   }\n\n  //   if (!orders) {\n  //     return [];\n  //   }\n\n  //   if (!this.site_id) {\n  //     alert(`\u6C92\u6709\u8A2D\u5B9Asite_id`);\n  //     return [];\n  //   }\n\n  //   if (!userId) {\n  //     return [];\n  //   }\n\n  //   if ( !Array.isArray(options.allProductTagRelations) ) {\n  //     alert('options.allProductTagRelations \u5C1A\u672A\u5B9A\u7FA9');\n  //     return [];\n  //   }\n\n  //   if ( options.isFirstBuy == undefined ) {\n  //     alert('options.isFirstBuy \u5C1A\u672A\u5B9A\u7FA9');\n  //     return [];\n  //   }\n\n  //   if ( options.currentMembership == undefined ) {\n  //     alert('options.currentMembership \u5C1A\u672A\u5B9A\u7FA9');\n  //     return [];\n  //   }\n\n  //   if( !this.site ){\n  //     await this.load_site();\n  //   }\n\n  //   let productTagCouponLimit = this.coupon_limits.filter(function(v,i){ return v.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u5546\u54C1\u6A19\u7C64\"] });\n  //   let currentMembership = options.currentMembership;\n  //   let memberLevelId = currentMembership[\"member_level_id\"];\n  //   let isFirstBuy = options.isFirstBuy;\n\n  //   // # \u5148\u628A\u5546\u54C1\u6A19\u7C64\u9A57\u8B49\u653E\u5230\u524D\u9762  \u5224\u65B7\u6709\u54EA\u4E9B\u8A02\u55AE\u53EF\u4EE5\u4F7F\u7528\u512A\u60E0\n  //   let couponOrderIds = [];\n  //   let allOrderIds = orders.map(o => o.id );\n  //   let productTagIdsThatCanUseCoupon = [];\n\n  //   for ( const order of orders ) {\n  //     let productTagIds = options.allProductTagRelations.filter(r=> r.product_id == order.product_id).map(o=>o.product_tag_id);\n  //     let couponLimitProductTagIds = productTagCouponLimit.map((limit)=>limit.resource_id);\n\n  //     // \u5546\u54C1\u6A19\u7C64 \u8207 \u9650\u5236\u6A19\u7C64 \u662F\u5426\u6709\u4EA4\u96C6, \u6709\u4EA4\u96C6\u7B97\u662F\u7B26\u5408\u689D\u4EF6\n  //     let intersection = productTagIds.filter(function(n) {\n  //       return couponLimitProductTagIds.indexOf(n) !== -1;\n  //     });\n\n  //     if( intersection.length > 0 ){\n  //       couponOrderIds.push(order.id);\n  //       productTagIdsThatCanUseCoupon = [...productTagIdsThatCanUseCoupon, ...productTagIds ];\n  //     }\n  //   }\n\n  //   // uniq Array\n  //   productTagIdsThatCanUseCoupon = Array.from(new Set(productTagIdsThatCanUseCoupon));\n\n  //   //\u6C92\u6709\u5546\u54C1\u6A19\u7C64\u9650\u5236 \u5247 couponOrderIds \u5C31\u662F allOrderIds\n  //   if( productTagCouponLimit.length == 0 ){\n  //     couponOrderIds = allOrderIds;\n  //   }\n\n  //   // // \u6839\u64DA\u53EF\u4EE5\u4F7F\u7528\u512A\u60E0\u7684\u8A02\u55AE \u7B97\u51FA\u61C9\u4ED8\u7684\u6B3E\u9805 \u518D\u6839\u64DA\u61C9\u4ED8\u7684\u6B3E\u9805\u7B97\u51FA\u6298\u6263\u91D1\u984D\n  //   // let couponOrderAmount = 0;\n\n  //   //\u5F9E couponOrderIds \u9078\u51FA\u50F9\u683C\u6700\u9AD8\u7684\u4F86\u505A\u70BA\u512A\u60E0\u7684\u8A02\u55AE\n  //   // let couponOrderId = null;\n  //   // let maxTotalPriceOrder[\"total_price\"] = 0;\n  //   let maxTotalPriceOrder = { total_price : 0, id: null };\n  //   for (const order of orders.filter(function(o,i){ return couponOrderIds.includes(o[\"id\"]) })) {\n  //     let totalPrice = 0;\n\n  //     if( order.shipped_qty_for_shipment ){\n  //       totalPrice = order.shipped_qty_for_shipment*(order.package_qty || 1)*order.price;\n  //     } else {\n  //       totalPrice = order.quantity*order.price;\n  //     }\n\n  //     // couponOrderAmount = couponOrderAmount + totalPrice;\n  //     if (totalPrice > maxTotalPriceOrder[\"total_price\"]) {\n  //       maxTotalPriceOrder = {\n  //         id: order.id,\n  //         total_price: totalPrice\n  //       };\n  //     }\n  //   }\n\n  //   let totalPriceTax = that.site.tax_included ? Math.round(maxTotalPriceOrder[\"total_price\"] - (maxTotalPriceOrder[\"total_price\"] / (1 + that.site.tax_rate/100))) : Math.round(maxTotalPriceOrder[\"total_price\"] * (that.site.tax_rate / 100));\n  //   let needToPayAmount = maxTotalPriceOrder[\"total_price\"] + ( that.site.tax_included ? 0 : totalPriceTax );\n\n  //   let isFirstUsedCoupon = await this.is_first_use_this_coupon(userId);\n\n  //   let validate1 = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\"]);\n  //   let validate2 = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\u7B49\u7D1A\"], {memberLevelId: memberLevelId});\n  //   let validate3 = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u5546\u54C1\u6A19\u7C64\"], {orders: orders, allProductTagRelations : options.allProductTagRelations});\n\n  //   this.validates = [\n  //     {\n  //       name: `\u540C\u6A23\u985E\u578B\u512A\u60E0\u4E0D\u53EF\u591A\u9078`,\n  //       validate: checkedCoupons.filter((c)=> ( c.id != this.id && c.type_code == this.type_code)).length <= 0,\n  //       needToValidate: true\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u4F7F\u7528\u5C0D\u8C61(\u6703\u54E1)[${ validate1.limitString }]`,\n  //       validate: validate1.validate,\n  //       needToValidate: validate1.needToValidate\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u4F7F\u7528\u5C0D\u8C61(\u6703\u54E1\u7B49\u7D1A)[${ validate2.limitString }]`,\n  //       validate: validate2.validate,\n  //       needToValidate: validate2.needToValidate\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u4F7F\u7528\u5C0D\u8C61(\u5546\u54C1\u6A19\u7C64)[${ validate3.limitString }]`,\n  //       validate: validate3.validate,\n  //       needToValidate: validate3.needToValidate\n  //     },\n  //     {\n  //       name: \"\u7B26\u5408\u6298\u6263\u78BC\",\n  //       validate: this.codeValidate || options.checkedCoupons.filter(c=>c.id == that.id).length > 0,\n  //       needToValidate: CONSTANTS.Coupon.TYPE_CODE[\"\u6298\u6263\u78BC\"] == this.type_code ? true : false,\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u4F7F\u7528\u91D1\u984D\u9650\u5236[ ${ needToPayAmount } >= ${ this.limit_amount } ](${ this.limit_amount ?? \"\"})`,\n  //       validate: needToPayAmount >= this.limit_amount,\n  //       needToValidate: true\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u9650\u5236\u6B21\u6578(${ this.limited_count ? ` ${this.limited_count} - ${ (this.used_count || 0) } ` : \"\u7121\u9650\u5236\"})`,\n  //       validate: this.limited_count ? ( (this.limited_count - (this.used_count || 0))  > 0 ) : true,\n  //       needToValidate: CONSTANTS.Coupon.TYPE_CODE[\"\u9996\u8CFC\u512A\u60E0\"] == this.type_code ? false : true\n  //     },\n  //     {\n  //       name: `\u7B26\u5408\u6642\u9593\u8D77\u8FC4( ${ this.start_time.toString().toYYYYMMDD() }~ ${ this.end_time.toString().toYYYYMMDD() } )`,\n  //       validate: this.start_time.toString().toYYYYMMDD() <= new Date().toString().toYYYYMMDD() && new Date().toString().toYYYYMMDD() <= this.end_time.toString().toYYYYMMDD(),\n  //       needToValidate: true\n  //     },\n  //     {\n  //       name: \"\u7B26\u54081\u500B\u5E33\u865F\u53EA\u80FD\u4F7F\u75281\u6B21\",\n  //       validate: isFirstUsedCoupon, //\u9019\u500B\u53EA\u80FD\u5728\u5F8C\u7AEF\u9A57\u8B49\n  //       needToValidate: this.limit_user_used_once//CONSTANTS.Coupon.TYPE_CODE[\"\u9996\u8CFC\u512A\u60E0\"] == this.type_code ? false : true\n  //     },\n  //     {\n  //       name: \"\u9996\u6B21\u8CFC\u8CB7\",\n  //       validate: isFirstBuy,\n  //       needToValidate: CONSTANTS.Coupon.TYPE_CODE[\"\u9996\u8CFC\u512A\u60E0\"] == this.type_code ? true : false\n  //     }\n  //   ];\n\n  //   let allPass = true;\n\n  //   for (const validate of this.validates) {\n  //     if( validate.needToValidate && !validate.validate ){\n  //       allPass = false;\n  //     }\n  //   }\n\n  //   this.allPass = allPass;\n\n  //   if( CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u8D08\u54C1\"] == this.discount_type ){\n  //     this.discountAmount = 0;\n  //   } else {\n  //     this.discountAmount = ( CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u6BD4\u7387\"] == this.discount_type ? ( Math.round(needToPayAmount * this.discount / 100) ) : this.discount );\n  //   }\n\n  //   return {\n  //     \"validates\": this.validates,\n  //     \"couponOrderIds\": maxTotalPriceOrder.id ? [maxTotalPriceOrder.id] : [],\n  //     \"isFirstBuy\": isFirstBuy,\n  //     \"discountAmount\": this.discountAmount,\n  //     \"allPass\" : allPass\n  //   }\n  // }\n\n\n\n  //======================================================\n\n\n  get_discount_amount(needToPayAmount, CONSTANTS){\n    let discount_amount = null;\n    if( CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u56FA\u5B9A\u91D1\u984D\"] == this.discount_type ){\n      discount_amount = this.discount;\n    } else if(CONSTANTS.Coupon.DISCOUNT_TYPE[\"\u6BD4\u7387\"] == this.discount_type) {\n      discount_amount = Math.round(needToPayAmount * this.discount / 100);\n    } else {\n      alert(`\u767C\u751F\u932F\u8AA4 set_shipment_discount_amount coupon\u6C92\u6709 discount_type \u6216\u662F \u6578\u503C\u4E0D\u6B63\u78BA`);\n      return;\n    }\n\n    if (!discount_amount && discount_amount != 0 ) {\n      alert('couponmodel discount_amount \u91D1\u984D\u8A08\u7B97\u932F\u8AA4');\n    }\n    return discount_amount;\n  }\n\n  cost_of_gift(CONSTANTS) {\n    let cost = null;\n    if( CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"] == this.type_code || CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"] == this.type_code){\n      if (this.gift_product_id) {\n        if (!this.gift_product ) {\n          alert(`coupon cost_of_gift \u8981 load_gift_product `);\n          return;\n        }\n        cost = ( this.gift_product.price ?? 0 ) * this.gift_count;\n      } else if(this.gift) {\n        cost = 0;\n      }\n    } else {\n      alert(`\u767C\u751F\u932F\u8AA4 cost_of_gift \u4E0D\u662F \u8CB7\u591A\u8D08\u54C1 \u6216\u662F \u6EFF\u984D\u8D08\u54C1`);\n      return;\n    }\n    return cost;\n  }\n\n  // validate(params){\n  //   this.errors = [];\n\n  //   switch (this.type_code) {\n  //     case CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]:\n  //       if ( !params.orderModels || !params.memberLevelId ) {\n  //         alert('params.orderModels \u6216\u662F params.memberLevelId \u5C1A\u672A\u5B9A\u7FA9');\n  //         return false;\n  //       } else {\n  //         validate1(params.orderModels, params.memberLevelId);\n  //       }\n  //     \u3000break;\n  //     case CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"]:\n  //       validate2(orderModels, memberLevelId);\n  //     \u3000break;\n  //     case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u7D05\u5229(\u56DE\u994B\u5132\u503C\u91D1)\"]:\n  //       validate3(orderModels, memberLevelId);\n  //     \u3000break;\n  //     case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]:\n  //       validate4(orderModels, memberLevelId);\n  //     \u3000break;\n  //     case CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"]:\n  //       validate5(orderModels, memberLevelId);\n  //     \u3000break;\n  //     default:\n  //   }\n  //   return false;\n  // }\n\n  // validate1(orderModels, memberLevelId){ // \"\u8CB7\u591A\u6298\u6263\" : 1\n  //   let success = true;\n  //   let errors = [];\n  //   let couponAmount = 0;\n  //   let noCouponProduct = {};\n\n\n  //   // // 1\u500B\u5E33\u865F\u80FD\u4F7F\u7528\u5E7E\u6B21\n  //   // if (this.limit_user_used_count) {\n  //   //   //\u5224\u65B7\u662F\u5426\u7528\u904E\u9019\u500Bcoupon\n  //   //   // coupon_relations \u8003\u616E\u52A0\u4E0A user_id\n  //   // }\n\n\n  //   // \u662F\u5426\u505C\u7528\n\n  //   // \u662F\u5426\u7B26\u5408\u9650\u5236\u6B21\u6578\n\n  //   // \u662F\u5426\u7B26\u5408 \u4F7F\u7528\u958B\u59CB\u6642\u9593 ~ \u4F7F\u7528\u7D50\u675F\u6642\u9593\n\n\n\n\n\n\n  //   //\u6839\u64DA orderModels \u7D71\u8A08\u76EE\u524D\u53EF\u4EE5\u88AB\u7528\u65BC\u512A\u60E0\u7684\u5546\u54C1\u6709\u54EA\u4E9B? \u6709\u591A\u5C11?\n  //   for (let orderModel of orderModels) {\n\n  //     // let buyCount = orderModel?.coupon_relation?.buy_count ?? 0;\n  //     // let giftCount = orderModel?.coupon_relation?.gift_count ?? 0;\n  //     noCouponProduct[orderModel.product_id] = orderModel.quantity;\n\n  //     let couponRelation = orderModel.coupon_relation;\n\n  //     if (couponRelation == undefined) {\n  //       alert('orderModel \u8ACB\u5148 load_coupon_relation');\n  //       return false;\n  //     }\n\n  //     if (couponRelation) {\n  //       noCouponProduct[couponRelation.buy_product_id] = noCouponProduct[couponRelation.buy_product_id] ?? 0;\n  //       noCouponProduct[couponRelation.gift_product_id] = noCouponProduct[couponRelation.gift_product_id] ?? 0;\n  //       noCouponProduct[couponRelation.buy_product_id] -= ( couponRelation?.buy_count ?? 0 )*( couponRelation?.coupon_relation_used_count ?? 1 );\n  //       noCouponProduct[couponRelation.gift_product_id] -= ( couponRelation?.gift_count ?? 0 )*( couponRelation?.coupon_relation_used_count ?? 1 );\n  //     }\n  //   }\n\n  //   // \u9078\u64C7\u512A\u60E0\u5546\u54C1 && \u8CB7\u591A\u5C11\u5546\u54C1\u624D\u6709\u512A\u60E0\n  //   // \u7528 noCouponProduct \u4F86\u5224\u65B7 \u662F\u5426\u7B26\u5408 \u512A\u60E0\u5546\u54C1 \u8981\u6C42\n  //   if(!this.auto_create_coupon_relations(orderModels)){\n  //     console.log(this.couponRelationNotices.join(\",\"));\n  //   }\n\n\n  //   // for (let orderModel of orderModels) {\n\n  //   // }\n\n  //   // \u9650\u5236\u4F7F\u7528\u5C0D\u8C61\n  //   let validateMembership = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\"]);\n  //   let validateMemberLevel = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\u7B49\u7D1A\"], {memberLevelId: memberLevelId});\n  //   // let validate3 = this.validate_coupon_limit(CONSTANTS, CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u5546\u54C1\u6A19\u7C64\"], {orders: orders, allProductTagRelations : options.allProductTagRelations});\n\n  //   if (!validateMembership.validate) {\n  //     this.errors = [\"\u6709\u9650\u5236\u6703\u54E1(${ validateMembership.limitString })\"];\n  //     return false;\n  //   }\n  //   if (!validateMemberLevel.validate) {\n  //     this.errors = [\"\u6709\u9650\u5236\u6703\u54E1\u7B49\u7D1A(${ validateMembership.limitString })\"];\n  //     return false;\n  //   }\n\n  //   //\u6298\u6263\u65B9\u5F0F \u6BD4\u7387\u6216\u662F\u56FA\u5B9A\u91D1\u984D (\u7B97\u512A\u60E0\u91D1\u984D)\n\n  //   return true;\n  // }\n  // validate2(orders){ // \"\u8CB7\u591A\u8D08\u54C1\" : 2,\n\n  // }\n  // validate3(orders){ // \"\u6EFF\u984D\u7D05\u5229(\u56DE\u994B\u5132\u503C\u91D1)\" : 3,\n\n  // }\n  // validate4(orders){ // \"\u6EFF\u984D\u8D08\u54C1\" : 4,\n\n  // }\n  // validate5(orders){ // \"\u6EFF\u984D\u6298\u6263\" : 5\n\n  // }\n\n  // auto_create_coupon_relations(orderModels, coupon){\n  //   for(let orderModel of orderModels) {\n  //     let couponRelation = new CouponRelationModel()\n  //       .set_coupon_relation_columns(coupon)\n  //       .set_shipment_discount_amount(coupon, needToPayAmount, CONSTANTS)\n  //       .set_whose_buy(orderModel.user_id)\n  //       .set_buy_order()\n  //       .set_gift_order();\n\n  //   }\n  //   return orderModels;\n  // }\n\n  //\u6839\u64DA\u50B3\u9032\u4F86\u7684\u512A\u60E0\u4EE5\u53CA\u76EE\u524D\u7D50\u5E33\u4E2D\u7684\u8A02\u55AE \u904E\u6FFE\u51FA\u76EE\u524D\u53EF\u4EE5\u88AB\u4F7F\u7528\u7684\u512A\u60E0\n  // filter_coupon(coupons, orders, memberLevelId) {\n  //   let canBeUsedCoupon = [];\n  //   let canNotBeUsedCoupons = [];\n  //   let couponModels = coupons.to_coupons_class();\n  //   for ( let couponModel of couponModels) {\n  //     if (couponModel.validate({ orderModels: orders.to_orders_class(), memberLevelId: memberLevelId })) {\n  //       canBeUsedCoupon.push(couponModel);\n  //     } else {\n  //       canNotBeUsedCoupons.push(couponModel);\n  //     }\n  //   }\n  //   return {\n  //     \"canBeUsedCoupons\": canBeUsedCoupon,\n  //     \"canNotBeUsedCoupons\": canNotBeUsedCoupons,\n  //   };\n  // }\n\n  get_best_coupon(coupons){\n    return {};\n  }\n\n  order_coupon_buy_product_validate(targetOrder) {\n    let success = true;\n    this.errorMessages = [];\n    this.noticeMessages = [];\n    this.insufficient_buy_products = this.insufficient_buy_products ?? {};\n\n    this.insufficient_buy_products[targetOrder.uuid] = null;\n\n    if (!targetOrder.quantity && targetOrder.quantity != 0) {\n      alert('order_coupon_buy_product_validate \u6C92\u6709\u5B9A\u7FA9 targetOrder.quantity');\n      return this;\n    }\n\n    let quantity = targetOrder.quantity ?? 0 ;\n\n    if (!this.CONSTANTS) {\n      alert('order_coupon_buy_product_validate \u6C92\u5B9A\u7FA9 this.CONSTANTS');\n      return false;\n    }\n    if (this.buy_product_id != targetOrder.product_id) {\n      alert('order_coupon_buy_product_validate \u7684 targetOrder \u7684 this.buy_product_id != targetOrder.product_id');\n      return false;\n    }\n\n    if (\n        [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(this.type_code*1) &&\n        !this.buy_product\n      ) {\n      alert('order_coupon_buy_product_validate \u6C92\u6709 load buy_product');\n      return false;\n    }\n    if (this.gift_product_id && !this.gift_product ) {\n      alert('order_coupon_buy_product_validate \u6C92\u6709 load couponModel.gift_product');\n      return false;\n    }\n\n    if (success && this.buy_count > quantity) {\n      success = false;\n      this.errorMessages.push(\"\u6578\u91CF\u672A\u9054\u5230\u512A\u60E0\u6A19\u6E96\");\n      this.noticeMessages.push(`\u518D\u8CFC\u8CB7${ this.buy_count - quantity }\u4EF6\u5546\u54C1\u53EF\u4F7F\u7528\u6B64\u512A\u60E0`);\n\n      this.insufficient_buy_products[targetOrder.uuid] = this.insufficient_buy_products[targetOrder.uuid] ?? {};\n      this.insufficient_buy_products[targetOrder.uuid][\"quantity\"] = this.buy_count - quantity;\n      this.insufficient_buy_products[targetOrder.uuid][\"product_id\"] = this.buy_product_id;\n      this.insufficient_buy_products[targetOrder.uuid][\"product_name\"] = this.buy_product.name;\n    }\n\n    if ( [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]].includes(this.type_code) ) {\n      if ( !this.gift && this.gift_product.stock_qty && this.gift_product.stock_qty < this.gift_count ) {\n        success = false;\n        this.errorMessages.push(\"\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3\");\n        this.noticeMessages.push(`\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3`);\n\n        this.insufficient_buy_products[targetOrder.uuid] = this.insufficient_buy_products[targetOrder.uuid] ?? {};\n        this.insufficient_buy_products[targetOrder.uuid][\"error\"] = \"\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3\";\n      }\n    }\n\n    if (success) {\n      this.can_be_used_to_target_order = this.can_be_used_to_target_order ?? {};\n      this.can_be_used_to_target_order[targetOrder.uuid] = true;\n    }\n\n    return success;\n  }\n\n\n  // order_coupon_gift_product_validate(targetOrder) {\n  //   let success = true;\n  //   // this.errorMessages = [];\n  //   // this.noticeMessages = [];\n  //   this.insufficient_gift_products_of_target_order_with_coupon = [];\n\n  //   if (!targetOrder.quantity) {\n  //     alert('order_coupon_gift_product_validate \u6C92\u6709\u5B9A\u7FA9 targetOrder.quantity');\n  //     return this;\n  //   }\n\n  //   let quantity = targetOrder.quantity ?? 0 ;\n\n  //   if (!this.CONSTANTS) {\n  //     alert('order_coupon_gift_product_validate \u6C92\u5B9A\u7FA9 this.CONSTANTS');\n  //     return false;\n  //   }\n  //   if (this.buy_product_id != targetOrder.product_id) {\n  //     alert('order_coupon_gift_product_validate \u7684 targetOrder \u7684 this.buy_product_id != targetOrder.product_id');\n  //     return false;\n  //   }\n\n  //   if (\n  //       [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(this.type_code*1) &&\n  //       !this.buy_product\n  //     ) {\n  //     alert('order_coupon_gift_product_validate \u6C92\u6709 load buy_product');\n  //     return false;\n  //   }\n  //   if (this.gift_product_id && !this.gift_product ) {\n  //     alert('order_coupon_gift_product_validate \u6C92\u6709 load couponModel.gift_product');\n  //     return false;\n  //   }\n\n  //   if (success && this.buy_count > quantity) {\n  //     success = false;\n  //     this.errorMessages.push(\"\u6578\u91CF\u672A\u9054\u5230\u512A\u60E0\u6A19\u6E96\");\n  //     this.noticeMessages.push(`\u518D\u8CFC\u8CB7${ this.buy_count - quantity }\u4EF6\u5546\u54C1\u53EF\u4F7F\u7528\u6B64\u512A\u60E0`);\n  //     this.insufficient_gift_products_of_target_order_with_coupon = [\n  //       ...this.insufficient_gift_products_of_target_order_with_coupon,\n  //       { quantity: this.buy_count - quantity, product_id : this.buy_product_id, product_name: this.buy_product.name  }\n  //     ]\n  //   }\n\n  //   if ( [this.CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]].includes(this.type_code) ) {\n  //     if (success && !this.gift && this.gift_product.stock_qty && this.gift_product.stock_qty < this.gift_count ) {\n  //       success = false;\n  //       this.errorMessages.push(\"\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3\");\n  //       this.noticeMessages.push(`\u8D08\u54C1\u5EAB\u5B58\u4E0D\u8DB3`);\n  //     }\n  //   }\n\n  //   return success;\n  // }\n\n\n  amount_coupon_validate(amount){\n    let success = true;\n    let canBeUsed = true;\n    this.errorMessages = [];\n    this.noticeMessages = [];\n\n    // if ( success && amount < this.limit_amount ) {\n    //   success = false;\n    //   canBeUsed = false;\n    //   this.errorMessages.push(\"\u512A\u60E0\u975E\u91DD\u5C0D\u6B64\u5546\u54C1\");\n    // }\n    if ( success && amount < this.limit_amount ) {\n      success = false;\n      this.errorMessages.push(\"\u91D1\u984D\u672A\u9054\u5230\u512A\u60E0\u6A19\u6E96\");\n      this.noticeMessages.push(`\u91D1\u984D\u9054\u5230${ this.limit_amount }\u53EF\u4F7F\u7528\u6B64\u512A\u60E0`);\n    }\n\n    return {\n      success: success,\n      canBeUsed: canBeUsed\n    };\n  }\n\n  //======================================================\n\n\n\n\n  // validate_coupon_limit(CONSTANTS, type, options){\n\n  //   if (type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\"]) {\n  //     let memberCouponLimit = this.coupon_limits.filter(function(v,i){ return v.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\"] });\n  //     return {\n  //       limitString: memberCouponLimit.map((limit, index)=>{ return limit?.resource?.name }).join(','),\n  //       validate: ( memberCouponLimit.length == 0 || memberCouponLimit.filter(function(v,i){ return v?.resource?.id == userId }).length > 0),\n  //       needToValidate: memberCouponLimit.length == 0 ? false : true\n  //     }\n  //   }\n\n  //   if (type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\u7B49\u7D1A\"]) {\n  //     let memberLevelCouponLimit = this.coupon_limits.filter(function(v,i){ return v.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\u7B49\u7D1A\"] });\n  //     return {\n  //       limitString: memberLevelCouponLimit.map((limit, index)=>{ return limit?.resource?.name }).join(','),\n  //       validate: ( memberLevelCouponLimit.length == 0 || memberLevelCouponLimit.filter(function(v,i){ return v?.resource?.id == options.memberLevelId }).length > 0),\n  //       needToValidate: memberLevelCouponLimit.length == 0 ? false : true\n  //     }\n  //   }\n  //   if (type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u5546\u54C1\u6A19\u7C64\"]) {\n\n  //     if ( !Array.isArray(options.allProductTagRelations) ) {\n  //       alert('options.allProductTagRelations \u5C1A\u672A\u5B9A\u7FA9');\n  //       return;\n  //     }\n\n  //     let productTagCouponLimit = this.coupon_limits.filter(function(v,i){ return v.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u5546\u54C1\u6A19\u7C64\"] });\n  //     let validate = false;\n  //     let productIds = options.orders.map(o=>o.product_id);\n  //     let productTagRelations = options.allProductTagRelations.filter(r => productIds.includes(r.product_id));\n\n  //     // ( await (new ProductTagRelationModel()\n  //     //   .select('product_tag_relations.*, products.name')\n  //     //   .join(\" INNER JOIN products ON products.id = product_tag_relations.product_id\")\n  //     //   .where(\"product_id in ?\", [productIds])\n  //     //   .get_datas()) ).rows;\n\n  //     let couponLimitProductTagIds = productTagCouponLimit.map((limit)=>limit.resource_id);\n\n  //     // \u5546\u54C1\u6A19\u7C64 \u8207 \u9650\u5236\u6A19\u7C64 \u662F\u5426\u6709\u4EA4\u96C6, \u6709\u4EA4\u96C6\u7B97\u662F\u7B26\u5408\u689D\u4EF6\n  //     let productTagIsValid = false;\n  //     for (let productTagRelation of productTagRelations) {\n  //       if (couponLimitProductTagIds.indexOf(productTagRelation.product_tag_id) !== -1) {\n  //         productTagIsValid = true;\n  //         productTagRelation.valid = true;\n  //       }\n  //     }\n\n  //     return {\n  //       limitString: productTagCouponLimit.map((limit, index)=>{\n  //         let validProductNames = productTagRelations.filter(p=>(p.valid && limit[\"resource_id\"] == p.product_tag_id)).map(o=>o.name);\n  //         let limitString = `${ limit[\"resource\"][\"name\"] }(${ Array.from(new Set(validProductNames)).join(',') })`;\n  //         return limitString;\n  //       }).join(','),\n  //       validate: ( productTagCouponLimit.length == 0 || productTagIsValid ) ,\n  //       needToValidate: productTagCouponLimit.length == 0 ? false : true\n  //     }\n  //   }\n  // }\n\n  // async get_datas(currentPage, pageSize) {\n\n  async get_datas(options = {}) {\n    let result = await super.get_datas();\n\n    if(options[\"loadRelativedTables\"]) {\n      for( let row of result.rows ) {\n        let couponModel = new CouponModel(row);\n        await couponModel.load_coupon_limits();\n        row[\"coupon_limits\"] = couponModel[\"coupon_limits\"];\n      }\n    }\n\n    return result;\n  }\n\n  validate_column_logic_sql(){\n    return [{\n      sql: \"SELECT * FROM coupons WHERE id = {@coupon_id} AND coupons.updated_by IS NOT NULL AND coupons.created_by IS NOT NULL\",\n      dynamicParams: {\n        coupon_id: function(results){\n          return results.coupons.rows[0].id;\n        }\n      },\n      validate: function(currentResult, allResults){\n        let success = (currentResult.rows.length != 0);\n        return success;\n      },\n      errorMessage: \"updated_by \u6216\u662F created_by \u6C92\u6709\u8A2D\u5B9A\"\n    }];\n  }\n\n  async save_by_ajax(params) {\n    let couponJson = this.to_json([\"id\",\"site_id\",\"type_code\",\"name\",\"code\",\"discount_type\",\"discount\",\"limit_amount\",\"limited_count\",\"start_time\",\"end_time\",\"disabled\",\"used_count\",\"used_desc\",\"limit_used\",\"gift\",\"created_by\",\"updated_by\",\"created_at\",\"updated_at\",\"buy_product_id\",\"gift_product_id\",\"buy_count\",\"gift_count\",\"limit_user_used_count\",\"coupon_limits\",\"coupon_product_relations\"]);\n\n    couponJson.coupon_limits = couponJson.coupon_limits ? couponJson.coupon_limits.to_coupon_limits_class() : [];\n    for (let couponLimit of couponJson.coupon_limits ) {\n      couponLimit = couponLimit.to_json([\"id\",\"coupon_id\",\"resource_type\",\"resource_id\",\"used_at\",\"created_at\",\"updated_at\"]);\n    }\n\n    couponJson.coupon_product_relations = couponJson.coupon_product_relations ? couponJson.coupon_product_relations.to_coupon_product_relations_class() : [];\n    for (let couponProductRelation of couponJson.coupon_product_relations ) {\n      couponProductRelation = couponProductRelation.to_json([\"id\",\"coupon_id\",\"product_id\",\"product_model_id\",\"type\",\"created_at\",\"updated_at\"]);\n    }\n\n    let result = await super.save_ajax({\n      tablePluralName: \"coupons\",\n      tableSingularName: \"coupon\",\n      data : couponJson,\n      id : couponJson.id,\n      domain : params[\"domain\"],\n      isNew : couponJson.id ? false : true,\n      isBackend : [undefined, null, \"\"].includes(params[\"isBackend\"]) ? true : params[\"isBackend\"]\n    });\n\n    return result;\n  }\n\n  save_sql(options = {}){\n    let that = this;\n\n\n\n    // this.afterSaveData = {...this};\n    // let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n    //   \"coupons\",\n    //   \"id,site_id,type_code,name,code,discount_type,discount,limit_amount,limited_count,start_time,end_time,disabled(FalseIfBlank),used_count,used_desc,limit_used(FalseIfBlank),gift,created_by,updated_by,created_at,updated_at,buy_product_id(NullIfEmpty),gift_product_id(NullIfEmpty),buy_count,gift_count,limit_user_used_count\",\n    //   {\n    //     shipment_id: function(results){\n    //       return results.shipments.rows?.first()?.id\n    //     }\n    //   }\n    // )[0];\n\n    // saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n    //   that.afterSaveData[\"id\"] = result.rows[0].id;\n    // }};\n\n    // let couponModel = [{...this.afterSaveData}].to_coupons_class().first();\n\n    // let couponLimitSaveSql = [];\n    // let destroyAllCouponProductRelationsSql = [];\n    // let couponProductRelationsSaveSql = [];\n\n    // if( options[\"saveRelationTable\"] ) {\n      // for(const couponLimit of this.coupon_limits){\n      //   if(couponLimit[\"destroy\"]){\n      //     couponLimitSaveSql = [\n      //       ...couponLimitSaveSql,\n      //       ...(new CouponLimitModel(couponLimit)).destroy_sql()\n      //     ];\n      //   } else {\n      //     couponLimitSaveSql = [\n      //       ...couponLimitSaveSql,\n      //       ...(new CouponLimitModel(couponLimit)).save_sql({\n      //         dynamicParams: {\n      //           coupon_id: function(results) {\n      //             return results.coupons.rows[0].id;\n      //           }\n      //         }\n      //       })\n      //     ];\n      //   }\n      // }\n\n      // if (this.id) {\n      //   destroyAllCouponProductRelationsSql = [\n      //     ...destroyAllCouponProductRelationsSql,\n      //     ...(new CouponProductRelationModel().where(\"coupon_id\",this.id).destroy_sql())\n      //   ]\n      // }\n\n      // if (this.coupon_product_relations) {\n      //   for ( let couponProductRelationModel of this.coupon_product_relations) {\n\n      //     if (![this.buy_product_id, this.gift_product_id].includes(couponProductRelationModel.product_id)) {\n      //       alert(' couponmodel save_sql coupon_product_relations \u88E1\u9762\u7684 product_id \u8207 buy_product_id \u6216\u662F gift_product_id \u4E0D\u7B26\u5408');\n      //       return;\n      //     }\n\n      //     couponProductRelationsSaveSql = [\n      //       ...couponProductRelationsSaveSql,\n      //       ...couponProductRelationModel.save_sql({\n      //         dynamicParams: {\n      //           coupon_id: function(results) {\n      //             return results.coupons.rows[0].id;\n      //           }\n      //         }\n      //       })\n      //     ];\n\n      //   }\n      // }\n    // }\n\n    // return [\n    // saveSql,\n    // ...this.validate_column_logic_sql(),\n    // ...couponLimitSaveSql,\n    // ...destroyAllCouponProductRelationsSql,\n    // ...couponProductRelationsSaveSql\n    // ]\n  }\n\n  load_coupon_limits(coupon_limits) {\n    if (coupon_limits) {\n      this[\"coupon_limits\"] = coupon_limits.filter(o => o.coupon_id == this[\"id\"]);\n    }\n    return this;\n  }\n\n  // async batch_load_coupon_limits(coupons){\n  //   let couponIds = coupons.map(c => c.id);\n  //   let couponLimits = (await (new CouponLimitModel()).where(\"coupon_id in ? \",[couponIds]).get_datas()).rows.to_coupon_limits_class();\n\n  //   coupons = coupons.to_coupons_class();\n  //   for ( let coupon of coupons ) {\n  //     coupon.load_coupon_limits(couponLimits);\n  //   }\n\n  //   return coupons;\n  // }\n}\n\nexport class CouponLimitModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"coupon_limits\";\n  }\n\n  random_data() {\n    let data = {\n      id : Math.floor(Math.random() * 1000000),\n      coupon_id : Math.floor(Math.random() * 1000000),\n      resource_type : Math.random().toString(36).substring(7),\n      resource_id : Math.floor(Math.random() * 1000000),\n      used_at : new Date(),\n      created_at : new Date(),\n      updated_at : new Date()\n    }\n\n    for (const key in data) {\n      this[`${key}`] = data[key];\n    }\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  validate_coupon_id_sql(){\n    if (this.id) {\n      return [{\n        sql: `\n          SELECT *\n          FROM coupon_limits\n          INNER JOIN coupons ON coupon_limits.coupon_id = coupons.id\n          WHERE coupon_limits.id = $1\n        `,\n        params: [ this.id ],\n        validate: function(currentResult, allResults){\n          let success = (currentResult.rows.length != 0);\n          return success;\n        },\n        errorMessage: \"\u7121\u76F8\u5C0D\u61C9\u7684\u512A\u60E0\u8CC7\u6599\"\n      }];\n    } else {\n      return [];\n    }\n  }\n\n  validate_column_logic_sql(){\n    return [\n      ...this.validate_coupon_id_sql()\n    ];\n  }\n\n  filter_coupon(params) {\n    let {\n      coupons,\n      CONSTANTS,\n      userId,\n      memberLevelId,\n      couponLimits = null\n    } = params;\n\n    let passCoupon = [];\n    coupons.load_coupon_limits(couponLimits);\n\n    for ( let coupon of coupons ) {\n      let allPass = {};\n\n      //\u6AA2\u67E5\u9650\u5236\n      for ( let limit of coupon.coupon_limits ) {\n        let result = limit.validate_coupon_limit(CONSTANTS, userId, memberLevelId);\n        if (allPass[result[\"type\"]] == undefined) {\n          allPass[result[\"type\"]] = result[\"valid\"];\n        } else {\n          allPass[result[\"type\"]] = allPass[result[\"type\"]] || result[\"valid\"];\n        }\n      }\n\n      //\u5982\u679C\u7B26\u5408\u9650\u5236\u5C31\u7559\u4E0B\n      if (!Object.values(allPass).includes(false)) {\n        passCoupon.push(coupon);\n      }\n    }\n    return passCoupon;\n  }\n\n  validate_coupon_limit(CONSTANTS, userId, memberLevelId) {\n    let valid = false;\n    if (this.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\"]) {\n      valid = (this.resource_id == userId);\n    }\n\n    if (this.resource_type == CONSTANTS.CouponLimit.RESOURCE_TYPE[\"\u6703\u54E1\u7B49\u7D1A\"]) {\n      valid = (this.resource_id == memberLevelId);\n    }\n\n    return {\n      type: this.resource_type,\n      valid: valid\n    };\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    let dynamicParams = options[\"dynamicParams\"] ?? {};\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"coupon_limits\",\n      `id,coupon_id${ dynamicParams[\"coupon_id\"] ? \"(IsDynamicParam)\" : \"\" },resource_type,resource_id,used_at,created_at,updated_at`,\n      {...dynamicParams}\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    return [\n    saveSql,\n    ...this.validate_column_logic_sql()\n    ]\n  }\n\n  async load_resource(resources) {\n    if (![\"ProductTag\",\"MemberLevel\",\"User\"].includes(this.resource_type)) {\n      alert(`\u8ACB\u5148\u5B9A\u7FA9 resource_type \u4E14\u5FC5\u9808\u662F ProductTag, MemberLevel, User \u5176\u4E2D\u4E4B\u4E00`);\n      return null;\n    }\n    if (!this.resource_id) {\n      alert(`\u8ACB\u5148\u5B9A\u7FA9 resource_id`);\n      return null;\n    }\n\n    let row = {};\n    if ( this.resource_type == \"ProductTag\" ) {\n      row = await this.load_one_relation_table_by_foreign_key(resources, \"product_tags\", \"product_tag\", \"resource_id\");\n    } else if( this.resource_type == \"MemberLevel\" ) {\n      row = await this.load_one_relation_table_by_foreign_key(resources, \"member_levels\", \"member_level\", \"resource_id\");\n    } else if( this.resource_type == \"User\" ) {\n      row = await this.load_one_relation_table_by_foreign_key(resources, \"users\", \"user\", \"resource_id\");\n    }\n\n    return row;\n  }\n\n}\n\nexport class ProductPriceModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"product_prices\";\n  }\n\n  async get_datas(options) {\n    let result = await super.get_datas()\n    return result;\n  }\n\n  validate_column_logic_sql(){\n    return [\n    ];\n  }\n\n  save_sql(options = {}){\n    let that = this;\n    let dynamicParams = options[\"dynamicParams\"] ?? {};\n    this.afterSaveData = {...this};\n    let saveSql = [{...this.afterSaveData}].toSaveSqlObjs(\n      \"product_prices\",\n      `id,product_id${ dynamicParams[\"product_id$\"] ? \"(IsDynamicParam)\" : \"\" },member_level_id,product_model_id(NullIfEmpty),price(NullIfEmpty),created_at,updated_at`,\n      {...dynamicParams}\n    )[0];\n\n    saveSql = {...saveSql, afterExcute: function(result, sqlString, sqlParams, datasByTableName){\n      that.afterSaveData[\"id\"] = result.rows[0].id;\n    }};\n\n    return [\n    saveSql,\n    ...this.validate_column_logic_sql()\n    ]\n  }\n}\n\nexport class ProductImageModel extends Model {\n  constructor(that) {\n    super(that)\n    this.tableName = \"product_images\";\n  }\n}\n\n\n//saveSqls = new SqlTest().insert_between(saveSqls);\nexport class SqlTest {\n  insert_between(array) {\n    let index = 0;\n    let testSql = {\n      sql: \"SELECT * FROM member_levels WHERE id=0\",\n      params: [],\n      validate: function(currentResult, allResults){\n        console.log(index++);\n        let success = true;\n        return success;\n      },\n      errorMessage: \"\u5C31\u662F\u932F\"\n    };\n\n    return array.reduce((acc, curr, index) => {\n      if (index !== 0) {\n        acc.push(testSql);\n      }\n      acc.push(curr);\n      return acc;\n    }, []);\n  }\n}\n\n\nexport class InvoiceProduct {\n  constructor() {\n    this.is_gift = null;\n    this.is_last = null;\n    this.product_id = null;\n    this.product_model_id = null;\n    this.product_models = null;\n    this.message_id = null;\n    // this.gift = null;\n    this.quantity = null;\n    this.price = null;\n    this.product_name = null;\n    this.stock_qty = null;\n    this.update_quantity_fn = null;\n    this.success = true;\n    this.errors = [];\n    this.uuid = null;\n    this.type_code = null;\n    // this.coupon_relation = null;\n  }\n\n  set_product(productId, productModelId, product, productModels){\n    this.product_id = productId;\n    this.product_model_id = productModelId;\n    this.product = product;\n    this.product_models = productModels;\n\n    if ( this.product_id ) {\n      if (this.product_model_id) {\n        this.stock_qty = this.product_models?.filter(m => m.id == this.product_model_id)?.first()?.stock_qty;\n      } else {\n        this.stock_qty = this.product?.stock_qty;\n      }\n    }\n\n    return this;\n  }\n\n  set_uuid(uuid){\n    this.uuid = uuid;\n    return this;\n  }\n  set_is_last(is_last){\n    this.is_last = is_last;\n    return this;\n  }\n  set_message_id(message_id){\n    this.message_id = message_id;\n    return this;\n  }\n  set_data(productName, quantity, price, gift, isGift, typeCode) {\n    this.is_gift = isGift;\n    this.type_code = typeCode;\n    this.gift = gift;\n    this.quantity = quantity;\n    this.price = price;\n    this.product_name = productName;\n    return this;\n  }\n\n  set_update_quantity_fn(fn){\n    this.update_quantity_fn = fn;\n    return this;\n  }\n\n  set_quantity(quantity) {\n    this.quantity = (quantity ?? 0)*1;\n    return this;\n  }\n\n  new_update_quantity_fn(giftOrders){\n    // let giftCount = 0;\n    return function(invoice_product_uuid, quantity, invoiceProduct){\n      let targetGiftOrder = giftOrders.filter(o => o.invoice_product_uuid == invoice_product_uuid).first();\n      targetGiftOrder.quantity = quantity;\n\n      let giftCount = targetGiftOrder.coupon_relation.gift_count;\n\n      let sum = 0;\n      for ( let giftOrder of giftOrders ) {\n        sum = sum + giftOrder.quantity;\n      }\n\n      if (invoiceProduct.stock_qty && (invoiceProduct.stock_qty - quantity) < 0 ) {\n        invoiceProduct.success = false;\n        invoiceProduct.errors = [`\u5546\u54C1\u3010${ invoiceProduct.product_name }\u3011\u5EAB\u5B58\u53EA\u6709${ invoiceProduct.stock_qty }\u500B,\u8ACB\u91CD\u65B0\u9078\u64C7`];\n      } else if ( sum > giftCount ) {\n        invoiceProduct.success = false;\n        invoiceProduct.errors = [`\u8D08\u54C1\u6578\u91CF\u904E\u591A\u8ACB\u6E1B\u5C11${ sum - giftCount }\u500B`];\n        // return `\u8D08\u54C1\u6578\u91CF\u904E\u591A\u8ACB\u6E1B\u5C11${ sum - giftCount }\u500B`;\n      } else if( sum < giftCount ) {\n        invoiceProduct.success = false;\n        invoiceProduct.errors = [`\u53EF\u518D\u9078\u64C7${ giftCount - sum }\u500B\u5546\u54C1`];\n        // return `\u53EF\u518D\u9078\u64C7${ giftCount - sum }\u500B\u5546\u54C1`;\n      } else {\n        invoiceProduct.success = true;\n        invoiceProduct.errors = [];\n      }\n    }\n  }\n\n  create_invoice_product_list(shipment, CONSTANTS){\n    let that = this;\n    let invoiceProductList = [];\n    for (let order of shipment.buy_orders) {\n      let thisCouponRelation = order?.coupon_relation;\n\n      invoiceProductList = [...invoiceProductList,\n        (new InvoiceProduct())\n        .set_data(`${ order.product.name }${ order.model ? `(${ order.model })` : `` }`,order.quantity, order.price, null, false, thisCouponRelation?.type_code)\n        .set_product(order.product_id, order.product_model_id, order?.product, order?.product?.product_models)\n      ]\n      if (\n        order.coupon_relation &&\n        [CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"], CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"]].includes(order.coupon_relation.type_code)\n      ) {\n        if (CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u8D08\u54C1\"] == order.coupon_relation.type_code) {\n          if ( thisCouponRelation.gift_product_id ) {\n            let giftOrders = [];\n            let newUpdateQuantityFn = this.new_update_quantity_fn(giftOrders);\n            let messageId = Utility.generateID();\n            for (let giftOrder of order.coupon_relation.gift_orders ) {\n              giftOrder.invoice_product_uuid = \"id\"+Utility.generateID();\n              giftOrders.push(giftOrder);\n              invoiceProductList = [...invoiceProductList,\n                (new InvoiceProduct())\n                .set_message_id(messageId)\n                .set_update_quantity_fn(newUpdateQuantityFn)\n                .set_uuid(giftOrder.invoice_product_uuid)\n                .set_product(giftOrder.product_id, giftOrder.product_model_id, giftOrder.product, giftOrder?.product?.product_models)\n                .set_data(`${ thisCouponRelation.gift_product.name }${ giftOrder.model ? `(${ giftOrder.model })` : `` }`, giftOrder.quantity, giftOrder.price, null, true, thisCouponRelation?.type_code)\n              ]\n            }\n            invoiceProductList[invoiceProductList.length-1].set_is_last(true);\n          } else {\n            invoiceProductList = [...invoiceProductList,\n              (new InvoiceProduct())\n              .set_data(thisCouponRelation.gift, thisCouponRelation.gift_count, null, thisCouponRelation.gift, true, thisCouponRelation?.type_code)\n              .set_product(order.product_id, order.product_model_id, order?.product, order?.product?.product_models)\n            ]\n          }\n        } else if(CONSTANTS.Coupon.TYPE_CODE[\"\u8CB7\u591A\u6298\u6263\"] == order.coupon_relation.type_code){\n          invoiceProductList = [...invoiceProductList,\n            (new InvoiceProduct())\n            .set_data(\"\u6298\u6263\u91D1\u984D\", 1, -1*order.discount_amount, null, true, thisCouponRelation?.type_code)\n\n            // (productName, quantity, price, gift, is_gift)\n            // .set_product(order.product_id, order.product_model_id, order?.product, order?.product?.product_models)\n          ]\n        }\n\n      }\n    }\n    return invoiceProductList;\n  }\n}\n\n\n\n\n\nexport class Cart {\n  constructor() {\n    this.CONSTANTS = null;\n    this.Swal = null;\n    this.membership = null;\n    this.created_by = null;\n    this.site = null;\n    this.orders = [];\n    this.all_active_coupons = null;\n    this.shipment = new ShipmentModel();\n  }\n\n  async get_all_active_coupons(params){\n    let {\n      coupon_product_relations: [],\n      product_models: [],\n      product: []\n    } = params;\n\n    if (this.all_active_coupons) {\n      return this.all_active_coupons;\n    }\n\n    //\u5224\u65B7\u512A\u60E0\n    let activeCoupons = (await (new CouponModel()).active().get_datas()).rows.to_coupons_class();\n\n    for ( let coupon of activeCoupons ) {\n      coupon.set_uuid();\n    }\n\n    //\u6839\u64DA\u512A\u60E0\u9650\u5236 \u904E\u6FFE\u51FA\u53EF\u4EE5\u88AB\u4F7F\u7528\u7684\u512A\u60E0\n    activeCoupons = await (new CouponLimitModel()).filter_coupon({\n      coupons : activeCoupons,\n      CONSTANTS: this.CONSTANTS,\n      userId : this.membership.user.id,\n      memberLevelId : this.membership.member_level.id\n    });\n\n    //\u6279\u6B21\u8B80\u53D6\u8CC7\u6599\n    activeCoupons = (new CouponModel()).batch_load_coupon_product_relations_and_related_product({\n      CONSTANTS : this.CONSTANTS,\n      coupons : activeCoupons,\n      coupon_product_relations : coupon_product_relations,\n      products : products,\n      product_models : product_models\n    });\n\n    this.all_active_coupons = activeCoupons;\n\n    return this.all_active_coupons;\n  }\n\n  async set_active_coupons() {\n    if ( !this?.membership?.user?.id || !this?.membership?.member_level?.id ) {\n      alert('\u8ACB\u5148 set_membership');\n      return this;\n    }\n\n    this.orders = this.orders.to_orders_class();\n\n    if (!this.orders || this.orders.length == 0) {\n      return this;\n    }\n\n    let allActiveCoupons = await this.get_all_active_coupons();\n\n    for ( let order of this.orders ) {\n      order.set_uuid();\n\n      //\u4E0D\u8655\u7406 \u512A\u60E0\u5546\u54C1 \u6216\u662F \u8D08\u54C1\n      if ( !order.coupon_type && order.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"] ) {\n        order\n          .set_import({ \"Swal\" : this.Swal, \"CONSTANTS\" : this.CONSTANTS })\n          .set_active_coupons(allActiveCoupons);\n      }\n    }\n\n    return this;\n  }\n\n  set_site(site) {\n    this.site = site;\n    return this;\n  }\n\n  set_import(params) {\n    for( let key in params ) {\n      this[key] = params[key];\n    }\n    return this;\n  }\n\n  set_editor(createdBy) {\n    this.created_by = createdBy;\n    return this;\n  }\n\n  async set_membership(membershipId, onSiteCheckoutOrders = [], activeCoupons = [], currentSite = null) {\n    //\u512A\u60E0\u9700\u8981\u91CD\u65B0\u8B80\u53D6 \u9019\u88E1\u8A2D\u5B9A\u70BAnull , get_all_active_coupons \u6703\u91CD\u65B0\u8B80\u53D6\n    this.all_active_coupons = null;\n\n    if (!membershipId) {\n      this.membership = null;\n      return this;\n    }\n\n    let result = await new MembershipModel()\n    .set_import({\n      \"Swal\" : this.Swal,\n      \"CONSTANTS\" : this.CONSTANTS\n    })\n    .get_datas_by_ajax({\n      \"id\" : membershipId,\n      \"domain\" : this.site.domain,\n      \"isBackend\" : true,\n    });\n\n    // let membership = new MembershipModel((await new MembershipModel().where(\"id\", membershipId).get_datas()).rows[0]);\n    // await membership.load_user();\n    // await membership.load_member_level();\n    // await membership.load_advance_balance();\n\n    let membership = result?.datas?.to_memberships_class()?.first();\n    if (membership) {\n      await membership.load_user(result?.users ?? []);\n      await membership.load_member_level(result?.member_levels ?? []);\n      await membership.load_advance_balance(result?.advance_balances ?? []);\n    }\n\n    this.membership = membership;\n    this.remove_shipment_coupon_relation();\n\n    this.active_coupons = [];\n    this.shipment = new ShipmentModel({ site_id: this.membership.site_id});\n    this.shipment\n      .set_import({ \"CONSTANTS\" : this.CONSTANTS })\n      .load_site([currentSite]);\n\n    await this.refresh_shipment(activeCoupons, currentSite);\n\n    return this;\n  }\n\n  get_not_on_sale_and_being_checkout_product(ean, productId, productModelId) {\n\n    let orders = this.orders.filter(order => !order.coupon_type && order.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"] );\n\n    if (ean) {\n      orders = orders.filter(order => ( order.product_model_id ? ( order?.product?.product_models?.filter(m => order?.product_model_id == m.id && m.ean == ean ).length > 0 ) : (order?.product?.ean === ean)) );\n    } else if(productId && productModelId) {\n      orders = orders.filter(order => ( order.product_model_id ? ( order?.product?.product_models?.filter(m => order?.product_model_id == m.id && m.id == productModelId ).length > 0 ) : (order?.product?.id === productId)) );\n    }\n\n    let order = orders.first();\n\n    if (order) {\n      return order;\n    }\n    return null;\n  }\n\n  set_orders_coupon_relation() {\n    let that = this;\n    let allCoupons = [];\n    for ( let order of this.orders ) {\n      if (order.active_coupons) {\n        allCoupons = [...allCoupons, ...order.active_coupons ];\n      }\n    }\n\n    function create_coupon_relation(orders, allCoupons, index) {\n\n      let coupon = allCoupons[index];\n\n      if (!coupon) {\n        return orders;\n      }\n\n      let couponModel = [coupon].to_coupons_class()?.first();\n\n      //\u5DF2\u7D93\u5957\u7528\u512A\u60E0\u7684\u8A02\u55AE\u4E0D\u518D\u7E7C\u7E8C\u914D\u5C0D\n      let notMatchedOrders = that.orders\n                            .filter(o => !o.coupon_relation || o.coupon_relation.coupon_can_be_used() ) //\u5254\u9664\u5DF2\u7D93\u63A1\u7528\u512A\u60E0\u7684\u8A02\u55AE\n                            .filter(o => couponModel.gift_product_id == o.product_id || couponModel.buy_product_id == o.product_id ); //\u5254\u9664\u8DDF\u9019\u6B21\u512A\u60E0\u642D\u4E0D\u4E0A\u908A\u5F97\u8A02\u55AE\n\n      let ordersQuantityWas = {};\n      for (let notMatchedOrder of notMatchedOrders ) {\n        ordersQuantityWas[notMatchedOrder.uuid] = notMatchedOrder.quantity;\n      }\n\n      let newSplitOrders = couponModel\n                          .set_import({ \"CONSTANTS\" : that.CONSTANTS })\n                          .simulate_orders_apply_coupon(ordersQuantityWas, notMatchedOrders);\n\n      orders = [ ...orders, ...newSplitOrders ];\n      return create_coupon_relation(orders, allCoupons, index+1);\n    }\n\n    let orders = create_coupon_relation(that.orders.filter(o => o.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"]), allCoupons, 0);\n\n    // create_coupon_relation \u8655\u7406\u7684\u662F \u73FE\u5834\u7D50\u5E33\u4E2D \u7684\u8A02\u55AE , \u8655\u7406\u5B8C\u5F8C\u9700\u8981\u518D\u628A \u975E\u73FE\u5834\u7D50\u5E33\u4E2D \u7684\u8A02\u55AE\u653E\u56DE\u53BB\n    this.orders = [ ...orders, ...this.orders.filter(o => o.status != this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"]) ];\n\n    this.orders = this.orders.filter(o => o.quantity );\n\n    // this.shipment\n    //   .set_order_amount(this.get_shipment_orders_amount())\n    //   .set_tax_and_discount_amount()// \u7D50\u5E33\u512A\u60E0\u9084\u6C92\u505A\n    //   // .set_tax(this.site.tax_included, this.site.tax_rate)\n    //   .set_total_amount();\n\n    return this.orders;\n  }\n\n  get_all_quantity_qty(orders, stockQtyList = {}) {\n    let that = this;\n\n    if (orders.length == 1) {\n      let order = orders.first();\n      stockQtyList[order.product_id] = stockQtyList[order.product_id] ? stockQtyList[order.product_id] : {};\n\n      if (order.product_model_id) {\n        stockQtyList[order.product_id][order.product_model_id] = stockQtyList[order.product_id][order.product_model_id] ? stockQtyList[order.product_id][order.product_model_id] : {};\n        stockQtyList[order.product_id][order.product_model_id].quantity = stockQtyList[order.product_id][order.product_model_id].quantity ? (order.quantity + stockQtyList[order.product_id][order.product_model_id].quantity) : order.quantity;\n        stockQtyList[order.product_id][order.product_model_id].model = order.model;\n        stockQtyList[order.product_id][order.product_model_id].type = 'product_model';\n      } else {\n        stockQtyList[order.product_id].quantity = stockQtyList[order.product_id].quantity ? (order.quantity + stockQtyList[order.product_id].quantity) : order.quantity;\n        stockQtyList[order.product_id].name = order.product.name;\n        stockQtyList[order.product_id].type = 'product';\n      }\n    } else {\n      for ( let order of orders ) {\n        if (order.coupon_relation) {\n          if (order.coupon_relation.buy_order) {\n            that.get_all_quantity_qty([order.coupon_relation.buy_order], stockQtyList);\n          }\n\n          if (order.coupon_relation.gift_orders) {\n            for ( let giftOrder of order.coupon_relation.gift_orders ) {\n              that.get_all_quantity_qty([giftOrder], stockQtyList);\n            }\n          }\n\n        } else {\n          that.get_all_quantity_qty([order], stockQtyList);\n        }\n      }\n    }\n\n    return stockQtyList;\n  }\n\n\n  get_product_ids_and_product_model_ids(orders, currentOrder) {\n    let that = this;\n    let productIds = [];\n    let productModelIds = [];\n\n    if (orders) {\n      for ( let order of orders ) {\n        let { product_ids, product_model_ids } = that.get_product_ids_and_product_model_ids(null, order);\n        productIds = [...productIds, ...product_ids];\n        productModelIds = [...productModelIds, ...product_model_ids];\n      }\n    } else if( currentOrder ) {\n      if (currentOrder.coupon_relation) {\n        if (currentOrder.coupon_relation.buy_order) {\n          let buyOrder = currentOrder.coupon_relation.buy_order;\n          productIds.push(buyOrder.product_id);\n          if (buyOrder.product_model_id) {\n            productModelIds.push(buyOrder.product_model_id);\n          }\n        }\n\n        if (currentOrder.coupon_relation.gift_orders) {\n          for ( let giftOrder of currentOrder.coupon_relation.gift_orders ) {\n            productIds.push(giftOrder.product_id);\n            if (giftOrder.product_model_id) {\n              productModelIds.push(giftOrder.product_model_id);\n            }\n          }\n        }\n\n      } else {\n        productIds.push(currentOrder.product_id);\n        if (currentOrder.product_model_id) {\n          productModelIds.push(currentOrder.product_model_id);\n        }\n      }\n    }\n    return {\n      product_ids: productIds.unique(),\n      product_model_ids: productModelIds.unique()\n    };\n  }\n\n\n  check_stock_qty(stockQtyList, productId = \"\", productName = \"\", productModelId = \"\", productModelName = \"\" , quantity = 0){\n    let that = this;\n    let validateSqls = [];\n    if (stockQtyList) {\n      for ( let key in stockQtyList ) {\n        if (stockQtyList[key][\"type\"] == 'product') {\n          // that.check_stock_qty(null, key, stockQtyList[key][\"name\"], null, null, stockQtyList[key]['quantity'], validateSqls )\n          validateSqls = [ ...validateSqls, ...that.check_stock_qty(null, key, stockQtyList[key][\"name\"], null, null, stockQtyList[key]['quantity']) ];\n\n          //\u8655\u7406 product_models\n          for ( let productModelId in stockQtyList[key] ) {\n            //\u5982\u679C\u662F\u6578\u5B57 \u5C31\u4EE3\u8868\u662F product_model_id\n            if (isNaN(productModelId) == false) {\n              // that.check_stock_qty(null, key, stockQtyList[key][\"name\"], productModelId, stockQtyList[key][productModelId]['model'], stockQtyList[key][productModelId]['quantity'], validateSqls )\n              validateSqls = [ ...validateSqls, ...that.check_stock_qty(null, key, stockQtyList[key][\"name\"], productModelId, stockQtyList[key][productModelId]['model'], stockQtyList[key][productModelId]['quantity']) ];\n            }\n          }\n        }\n      }\n    } else if( productId ) {\n\n      if (!quantity) {\n        return validateSqls;\n      }\n\n      if (productModelId) {\n        validateSqls = [ ...validateSqls, {\n          sql: \"SELECT * FROM product_models WHERE id=$1 AND stock_qty IS NOT NULL AND stock_qty < $2 \",\n          params: [productModelId, quantity],\n          validate: function(currentResult, allResults){\n            let success = false;\n            return success;\n          },\n          errorMessage: `${ productName }(${ productModelName })\u5EAB\u5B58\u4E0D\u8DB3`\n        }];\n      } else {\n        validateSqls = [ ...validateSqls, {\n          sql: \"SELECT * FROM products WHERE id=$1 AND stock_qty IS NOT NULL AND stock_qty < $2 \",\n          params: [productId, quantity],\n          validate: function(currentResult, allResults){\n            let success = false;\n            return success;\n          },\n          errorMessage: `${ productName }\u5EAB\u5B58\u4E0D\u8DB3`\n        }];\n      }\n    }\n\n    return validateSqls;\n  }\n\n  async destroy_old_checkout_orders() {\n    let destroyOrders = (await new OrderModel().where(\"status\", this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"]).get_datas()).rows.to_orders_class();\n    for (let order of destroyOrders ) {\n      await order.destroy({destroyRelationTable:true, CONSTANTS: this.CONSTANTS});\n    }\n  }\n\n  validate_orders() {\n    let that = this;\n    let success = true;\n    let errors = [];\n\n    for ( let order of this.orders ) {\n      if ( success && (order.shipped_qty + ( order.shipped_qty_for_shipment ?? 0 ) ) > order.quantity ) {\n        success = false;\n        errors.push('\u8A02\u55AE\u51FA\u8CA8\u6578\u91CF\u8D85\u51FA\u6B63\u5E38\u6578\u91CF');\n      }\n    }\n\n    if (!success) {\n      setTimeout(function(){\n        that.Swal.fire('\u767C\u751F\u932F\u8AA4', errors.join(','), 'error');\n      });\n    }\n\n    return success;\n  }\n\n  async save_orders() {\n    let that = this;\n\n    if (!that.validate_orders()) {\n      return;\n    }\n\n    //\u6C92\u6709id\u7684\u5132\u5B58\u5230\u8CC7\u6599\u5EAB\n    let orders = this.orders.filter(o => !o.id);\n\n    let { product_ids , product_model_ids } = that.get_product_ids_and_product_model_ids(orders);\n\n    let products = product_ids.length == 0 ? [] : (await (new ProductModel()).where(\" id in ? \",[product_ids]).get_datas()).rows.to_products_class();\n    let productModels = product_model_ids.length == 0 ? [] : (await (new ProductModelClass()).where(\" id in ? \",[product_model_ids]).get_datas()).rows.to_product_models_class();\n    let allSql = [];\n    let allErrors = [];\n    for ( let orderModel of orders.filter(o => o.coupon_type != this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"]) ) {\n      let { sql, errors } = await that.order_to_sql(orderModel, products, productModels);\n      allSql = [ ...allSql, ...sql ];\n      allErrors = [ ...allErrors, ...errors ];\n\n      if (allErrors.length > 0) {\n        break;\n      }\n    }\n\n    if (allErrors.length > 0) {\n      await that.Swal.fire('\u767C\u751F\u932F\u8AA4', allErrors.join(','), 'error');\n    } else if ( allSql.length >= 0 ) {\n      let sqlObjs = [{sql: \"BEGIN\"},\n        ...allSql,\n        // {\n        //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n        //   params: [],\n        //   validate: function(currentResult, allResults){\n        //     let success = false;\n        //     return success;\n        //   },\n        //   errorMessage: \"\u5C31\u662F\u932F\"\n        // },\n        {sql: \"END\"}];\n\n      if ( this.orders.length > 0 ) {\n        await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n          let { success, errors } = await that.check_all_orders_stock_qty();\n\n          if (success) {\n            await that.save_shipment();\n          } else {\n            rollbackOrderData(orders);\n            await that.Swal.fire('\u767C\u751F\u932F\u8AA4', errors.join(','), 'error');\n          }\n        }).catch(async err => {\n          if( err?.message ){\n            await that.Swal.fire('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n            rollbackOrderData(orders);\n          }\n          throw err;\n        });\n      } else {\n        let { success, errors } = await that.check_all_orders_stock_qty();\n\n        if (success) {\n          await that.save_shipment();\n        } else {\n          rollbackOrderData(orders);\n          await that.Swal.fire('\u767C\u751F\u932F\u8AA4', errors.join(','), 'error');\n        }\n      }\n    }\n\n    function rollbackOrderData(orders){\n      for ( let order of orders ) {\n        order.id = null;\n        order.coupon_relation_id = null;\n      }\n    }\n  }\n\n  async check_all_orders_stock_qty() {\n    let that = this;\n    let success = true;\n    let errors = [];\n\n    let { product_ids , product_model_ids } = that.get_product_ids_and_product_model_ids(this.orders);\n\n    //\u518D\u6B21\u8B80\u53D6\u8CC7\u6599 \u7528\u4F86\u5224\u65B7 \u5EAB\u5B58\u662F\u5426\u8DB3\u5920\n    let products = product_ids.length == 0 ? [] : (await (new ProductModel()).where(\" id in ? \",[product_ids]).get_datas()).rows.to_products_class();\n    let productModels = product_model_ids.length == 0 ? [] : (await (new ProductModelClass()).where(\" id in ? \",[product_model_ids]).get_datas()).rows.to_product_models_class();\n\n    for ( let productModel of productModels ) {\n      productModel.load_product(products);\n      if (success && ![undefined, null, \"\"].includes(productModel.stock_qty) && productModel.stock_qty*1 < 0 ) {\n        success = false;\n        errors.push(` ${ productModel.product.name }(${ productModel.name }) \u5EAB\u5B58\u4E0D\u8DB3 \u7F3A\u5C11${ productModel.stock_qty*-1 }\u4EF6 `);\n      }\n    }\n    for ( let product of products ) {\n      if (success && ![undefined, null, \"\"].includes(product.stock_qty) && product.stock_qty*1 < 0 ) {\n        success = false;\n        errors.push(` ${ product.product.name } \u5EAB\u5B58\u4E0D\u8DB3 \u7F3A\u5C11${ product.stock_qty*-1 }\u4EF6 `);\n      }\n    }\n\n    return {\n      success : success,\n      errors : errors\n    };\n  }\n\n  async save_shipment(){\n    let that = this;\n    let shipmentSql = [];\n    let allErrors = [];\n\n    shipmentSql = await that.shipment_sql();\n\n    let sqlObjs = [{sql: \"BEGIN\"},\n      ...shipmentSql,\n      // {\n      //   sql: \"SELECT * FROM member_levels WHERE id=0\",\n      //   params: [],\n      //   validate: function(currentResult, allResults){\n      //     let success = false;\n      //     return success;\n      //   },\n      //   errorMessage: \"\u5C31\u662F\u932F\"\n      // },\n      {sql: \"END\"}];\n\n    await window.db.queryWithPool(sqlObjs, \"ROLLBACK\").then(async (results) => {\n      await that.Swal.fire('\u6210\u529F', '\u5132\u5B58\u6210\u529F', 'success');\n    }).catch(async err => {\n      if( err?.message ){\n        await that.Swal.fire('\u767C\u751F\u932F\u8AA4', err.message, 'error');\n      }\n    });\n\n    // if (allErrors.length > 0) {\n    //   await that.Swal.fire('\u767C\u751F\u932F\u8AA4', allErrors.join(','), 'error');\n    // } else if ( shipmentSql.length > 0 ) {\n\n    // }\n  }\n\n  get_shipment_orders_amount() {\n    let shipmentOrders = this?.orders?.filter(item => item.coupon_type != this.CONSTANTS.CouponProductRelation.TYPE[\"\u8D08\u54C1\"] ) ?? [];\n    let sum = shipmentOrders.reduce((accumulator, currentValue) => {\n      return accumulator + currentValue.total_price;\n    }, 0);\n    return sum;\n  }\n\n  shipment_sql() {\n    let shipmentSql = [];\n    // let shipment = new ShipmentModel();\n\n    if ( this.orders && this.orders.length > 0) {\n      let firstOrder = this.orders[0];\n\n      if (this.membership.user_id != firstOrder.user_id) {\n        alert('shipment_sql user_id \u4E0D\u540C\u6B65');\n        return [];\n      }\n\n      this.shipment\n        .set_import({ \"CONSTANTS\" : this.CONSTANTS })\n        // .set_remark(remark) //\u7D50\u5E33 \u6C92\u6709\u5730\u65B9\u586B\u5BEB\n        .set_buyer(this.membership.user_id)\n        .set_receiver(this.membership.user.name, this.membership.user.mobile)\n        .set_shipped_at(new Date())\n        .set_status(this.CONSTANTS.Shipment.STATUS[\"\u5DF2\u53D6\u8CA8\"]);\n        // .set_order_amount(this.get_shipment_orders_amount())\n        // .set_tax(this.site.tax_included, this.site.tax_rate)\n        // .set_discount_amount(0); //\u7D50\u5E33\u512A\u60E0 \u9084\u6C92\u505A\n        // .set_advance_amount(0) // \u5132\u503C\u91D1\u984D \u9084\u6C92\u505A\n        // .set_total_amount();\n\n      // this.orders \u88E1\u9762\u5305\u542B\u6EFF\u984D\u512A\u60E0\u7684order, \u539F\u56E0\u662F\u70BA\u4E86\u65B9\u4FBF\u5728\u7D50\u5E33\u756B\u9762\u986F\u793A\u8CC7\u8A0A, \u9019\u88E1\u5FC5\u9808\u5148\u66FF\u9664\u6389 \u624D\u80FD\u7B97\u662F shipment\u7684orders\n      this.shipment.orders  = this.orders.filter(o => ![this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]].includes(o?.coupon_relation?.type_code));\n\n      return this.shipment.save_sql({\n        saveRelationTable: true,\n        CONSTANTS: this.CONSTANTS,\n        coupons: null\n      });\n    } else {\n      return [];\n    }\n\n  }\n\n  async order_to_sql(order, products, productModels) {\n    let sql = [];\n    let errors = [];\n\n    if (\n      order.coupon_relation &&\n      ( order.coupon_relation.type_code == this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"] ||\n        order.coupon_relation.type_code == this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"]\n      )\n    ) {\n      return {\n        sql: [],\n        errors : []\n      };\n    }\n\n    //\u6709\u512A\u60E0\n    if (order.coupon_relation) {\n      //coupon_relation sql\n      let couponRelationSql = order.coupon_relation.save_sql({\n        saveRelationTable: true,\n        CONSTANTS: this.CONSTANTS,\n      });\n\n      sql = [ ...sql, ...couponRelationSql ];\n\n      //buy_order sql   ps. buy_order \u57FA\u672C\u4E0A\u5C31\u662F order\u672C\u8EAB\n      let buyOrderSaveResult = (await order.coupon_relation.buy_order.save_sql({\n        saveRelationTable:true,\n        passStockQtyValidate: true,\n        afterSaveCallBack: function(result, sqlString, sqlParams, datasByTableName){\n          order.coupon_relation.buy_order.id = result.rows[0].id;\n        },\n        dynamicParams: {\n          coupon_relation_id: function(results) {\n            return results?.coupon_relations?.rows[0]?.id;\n          }\n        }\n      }));\n\n      if (buyOrderSaveResult[\"errors\"] && buyOrderSaveResult[\"errors\"].length > 0) {\n        errors = [ ...errors, ...buyOrderSaveResult[\"errors\"] ];\n      } else {\n        sql = [ ...sql, ...buyOrderSaveResult[\"sql\"] ];\n      }\n\n      //gift_orders sql\n      for (let giftOrder of ( order.coupon_relation.gift_orders ?? [])) {\n        giftOrder.load_product(products);\n        let giftOrderSaveResult = (await giftOrder.save_sql({\n          caches: {\n            products: products, //\u6279\u6B21\u8655\u7406\n            productModels: productModels //\u6279\u6B21\u8655\u7406\n          },\n          saveRelationTable:true,\n          passStockQtyValidate: true,\n          afterSaveCallBack: function(result, sqlString, sqlParams, datasByTableName){\n            giftOrder.id = result.rows[0].id;\n          },\n          dynamicParams: {\n            coupon_relation_id: function(results) {\n              return results?.coupon_relations?.rows[0]?.id;\n            }\n          }\n        }));\n\n        if (giftOrderSaveResult[\"errors\"] && giftOrderSaveResult[\"errors\"].length > 0) {\n          errors = [ ...errors, ...giftOrderSaveResult[\"errors\"] ];\n        } else {\n          sql = [ ...sql, ...giftOrderSaveResult[\"sql\"] ];\n        }\n\n        if (errors.length > 0) {\n          break;\n        }\n      }\n\n    } else {\n\n      //\u6C92\u6709\u512A\u60E0\n      let orderSaveResult = (await order.save_sql({\n        saveRelationTable:true,\n        passStockQtyValidate: true,\n        caches: {\n          products: products, //\u6279\u6B21\u8655\u7406\n          productModels: productModels //\u6279\u6B21\u8655\u7406\n        },\n        afterSaveCallBack: function(result, sqlString, sqlParams, datasByTableName){\n          order.id = result.rows[0].id;\n        }\n      }));\n\n      if (orderSaveResult[\"errors\"] && orderSaveResult[\"errors\"].length > 0) {\n        errors = [ ...errors, ...orderSaveResult[\"errors\"] ];\n      } else {\n        sql = [ ...sql, ...orderSaveResult[\"sql\"] ];\n      }\n    }\n\n    return {\n      sql: sql,\n      errors : errors\n    };\n  }\n\n  remove_shipment_coupon_relation() {\n    if ( this?.shipment?.coupon_relation ) {\n      if (this.shipment.coupon_relation?.gift_orders) {\n        for ( let giftOrder of this.shipment.coupon_relation.gift_orders ) {\n          giftOrder\n            .set_quantity_and_price(giftOrder.quantity, giftOrder.shipped_qty_for_shipment_was, giftOrder.price_was, null, giftOrder.cost_was, giftOrder.shipped_qty_was, this.CONSTANTS)\n            .set_discount_amount(this.CONSTANTS)\n            .set_total_price();\n\n          giftOrder.coupon_relation = null;\n        }\n      }\n\n      this.shipment.coupon_relation = null;\n    }\n\n    this.orders = this.orders.filter(o => o.quantity*1 );\n  }\n\n  async refresh_shipment(activeCoupons = null, currentSite = null){\n    let allActiveCoupons = activeCoupons ? activeCoupons : (await this.get_all_active_coupons());\n    let shipmentActiveCoupons = allActiveCoupons.filter(c => (c.type_code == this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"] || c.type_code == this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"]))\n\n    shipmentActiveCoupons = shipmentActiveCoupons.sort((item1, item2) => item2.limit_amount - item1.limit_amount);\n\n    //\u5148\u6E05\u9664 shipment \u512A\u60E0 \u512A\u60E0\u7684\u8D08\u54C1 \u52A0\u56DE\u53BB orders\n    // this.remove_shipment_coupon_relation();\n\n    shipmentActiveCoupons = shipmentActiveCoupons.to_coupons_class();\n    for ( let coupon of shipmentActiveCoupons ) {\n      let newSplitOrders = coupon\n                          .set_import({ \"CONSTANTS\" : this.CONSTANTS })\n                          .simulate_shipment_apply_coupon(this.orders, this.shipment, this.get_shipment_orders_amount());\n      if (newSplitOrders.length > 0) {\n        this.orders = [ ...newSplitOrders, ...this.orders ];\n        break;\n      }\n    }\n\n    // this.orders = this.orders.filter(o => o.quantity && ( !o.coupon_relation || ![this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u6298\u6263\"], this.CONSTANTS.Coupon.TYPE_CODE[\"\u6EFF\u984D\u8D08\u54C1\"]].includes(o?.coupon_relation?.type_code) ) );\n\n    this.shipment.active_coupons = shipmentActiveCoupons;\n\n    if (!this.shipment.site) {\n      await this.shipment.load_site([currentSite]);\n    }\n\n    this.shipment\n      .set_order_amount(this.get_shipment_orders_amount())\n      .set_tax_and_discount_amount()// \u7D50\u5E33\u512A\u60E0\u9084\u6C92\u505A\n      // .set_tax(this.site.tax_included, this.site.tax_rate) // tax \u9084\u6C92\u7B97\n      .set_total_amount();\n\n    this.orders = this.combine_orders(this.orders);\n  }\n\n  //\u6709\u6642\u5019\u8A02\u55AE\u5206\u5272\u53C8\u9084\u539F \u5C0E\u81F4\u660E\u660E\u4E00\u6A23\u7684\u8A02\u55AE \u5206\u6210\u597D\u5E7E\u4EFD \u9019\u500Bfunction \u7528\u4F86\u5408\u4F75\u540C\u6A23\u7684\u8A02\u55AE\n  combine_orders(orders, tempOrders = []) {\n    let currentOrder = orders.shift();\n\n    if (currentOrder) {\n      for (let order of orders) {\n        if (\n          !order.coupon_relation &&\n          !currentOrder.coupon_relation &&\n          !order.shipped_qty &&\n          !currentOrder.shipped_qty &&\n          order.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"] &&\n          currentOrder.status == this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"] &&\n          currentOrder.product_id == order.product_id &&\n          currentOrder.product_model_id == order.product_model_id &&\n          currentOrder.price == order.price\n        ) {\n\n          //\u589E\u52A0quantity\n          currentOrder.set_quantity_and_price( currentOrder.quantity*1 + order.quantity*1, currentOrder.shipped_qty_for_shipment, currentOrder.price, null, currentOrder.cost, 0, this.CONSTANTS)\n            .set_discount_amount(this.CONSTANTS)\n            .set_total_price();\n\n          //\u6E1B\u5C11quantity\n          order.set_quantity_and_price( 0, order.shipped_qty_for_shipment, order.price, null, order.cost, 0, this.CONSTANTS)\n            .set_discount_amount(this.CONSTANTS)\n            .set_total_price();\n        }\n      }\n\n      tempOrders.push(currentOrder);\n    } else {\n      return tempOrders;\n    }\n\n    return this.combine_orders(orders.filter(o => o.quantity != 0), tempOrders);\n  }\n\n  async remove_order(uuid){\n    //\u6E05\u9664\u6EFF\u984D\u512A\u60E0 \u5F85\u5F8C\u7E8C\u91CD\u65B0\u8A08\u7B97\n    this.remove_shipment_coupon_relation();\n\n    this.orders = this.orders.filter(o => o.uuid != uuid);\n\n    //\u53D6\u5F97\u76EE\u524D\u53EF\u7528\u7684\u6240\u6709\u512A\u60E0\n    await this.set_active_coupons();\n\n    //\u8A02\u55AE \u4EE5\u53CA \u5546\u54C1\u512A\u60E0 \u8655\u7406\n    this.set_orders_coupon_relation(false);\n\n    //\u51FA\u8CA8\u55AE \u4EE5\u53CA \u6EFF\u984D\u512A\u60E0 \u8655\u7406\n    await this.refresh_shipment();\n\n    this.orders = this.orders.filter(o => o.quantity*1 );\n    return this;\n  }\n\n  async set_shipped_qty_for_shipment(uuid, shippedQtyForShipment){\n    for ( let order of this.orders ) {\n      if (order.uuid == uuid) {\n\n        //\u6E05\u9664\u6EFF\u984D\u512A\u60E0 \u5F85\u5F8C\u7E8C\u91CD\u65B0\u8A08\u7B97\n        this.remove_shipment_coupon_relation();\n\n        if (order.coupon_relation) {\n          await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u512A\u60E0\u5546\u54C1\u4E0D\u53EF\u90E8\u5206\u51FA\u8CA8\", 'error');\n          return this;\n        }\n\n        //\u51FA\u8CA8\u91CF\u4E0D\u80FD\u8D85\u51FA quantity\n        shippedQtyForShipment = shippedQtyForShipment > ( order.quantity - order.shipped_qty ) ? ( order.quantity - order.shipped_qty ) : shippedQtyForShipment;\n\n        order.set_quantity_and_price( order.quantity, shippedQtyForShipment, order.price, order.coupon_type, order.cost, order.shipped_qty, this.CONSTANTS)\n          .set_discount_amount(this.CONSTANTS)\n          .set_total_price();\n\n        //\u53D6\u5F97\u76EE\u524D\u53EF\u7528\u7684\u6240\u6709\u512A\u60E0\n        await this.set_active_coupons();\n\n        //\u8A02\u55AE \u4EE5\u53CA \u5546\u54C1\u512A\u60E0 \u8655\u7406\n        this.set_orders_coupon_relation(false);\n\n        //\u51FA\u8CA8\u55AE \u4EE5\u53CA \u6EFF\u984D\u512A\u60E0 \u8655\u7406\n        await this.refresh_shipment();\n      }\n    }\n    return this;\n  }\n\n  async add_order(orderQty, ean = null, productId = null, productModelId = null) {\n\n    //\u6E05\u9664\u6EFF\u984D\u512A\u60E0 \u5F85\u5F8C\u7E8C\u91CD\u65B0\u8A08\u7B97\n    this.remove_shipment_coupon_relation();\n\n    let order = this.get_not_on_sale_and_being_checkout_product(ean, productId, productModelId);\n    if (order) {\n      order.set_quantity_and_price( order.quantity*1 + orderQty*1, order.shipped_qty_for_shipment, order.price, null, order.cost, 0, this.CONSTANTS)\n        .set_discount_amount(this.CONSTANTS)\n        .set_total_price();\n\n      // await this.refresh_shipment();\n\n    } else {\n\n      if (!ean) {\n        await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u5546\u54C1\u689D\u78BC\u70BA\u7A7A\u503C\", 'error');\n        return this;\n      }\n\n      if (!orderQty) {\n        await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u5546\u54C1\u6578\u91CF\u5C1A\u672A\u8F38\u5165\", 'error');\n        return this;\n      }\n\n      let success = true;\n      let productModelDatas = await new ProductModelClass().where(\"ean\", ean).get_datas();\n      let productData = null;\n      let productModel = null;\n      let user = this.membership.user;\n      let member_level = this.membership.member_level;\n\n      if(!user || !member_level) {\n        await this.Swal.fire('\u5C1A\u672A\u6307\u5B9A\u8CFC\u8CB7\u4EBA', \"\u8ACB\u5148\u9EDE\u9078\u53F3\u5074\u7684\u8F38\u5165\u6703\u54E1\", 'error');\n        return this;\n      }\n\n      let currentPrice = null;\n      let currentProductModelId = null;\n\n      if(productModelDatas.rows.length > 0){\n        //\u5982\u679C \u570B\u969B\u689D\u78BC\u662F\u5C6C\u65BCproduct_model \u7684 \u9700\u8981\u4F7F\u7528\u6B64product_model \u7684 product \u8CC7\u6599\n        // let a = await new ProductModelClass().where(\"id\", -1).get_datas()\n        productModel = new ProductModelClass(productModelDatas.rows[0]);\n        await productModel.load_product();\n        productModel.product = [productModel.product].to_products_class().first();\n        let allProductPrices = (await new ProductPriceModel().where(\"product_id in ?\", [[productModel.product_id]]).get_datas()).rows.to_product_prices_class();\n        productModel.product.load_product_prices(allProductPrices);\n        productModel.load_product_prices(allProductPrices);\n        currentProductModelId = productModel.id;\n        currentPrice = await productModel.get_current_price(member_level.id);\n        productData = productModel.product;\n      } else {\n        //\u5982\u679C \u570B\u969B\u689D\u78BC\u662F\u4E0D\u5C6C\u65BCproduct_model \u5C31\u518D\u7528ean \u53BB\u6293\u53D6 product\u8CC7\u6599\n        // let product = new ProductModel();\n        let productResult = await new ProductModel().where(\"ean\", ean).get_datas();\n        if( productResult && productResult.rows[0]) {\n          productData = productResult.rows.to_products_class().first();\n          await productData.load_product_prices();\n          currentPrice = await productData.get_current_price(member_level.id);\n        } else {\n          await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u67E5\u7121\u6B64\u5546\u54C1\", 'error');\n          return this;\n        }\n      }\n\n      if( currentPrice == null ) {\n        await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u91D1\u984D\u8A08\u7B97\u767C\u751F\u932F\u8AA4\", 'error');\n        return this;\n      }\n\n      success = productData ? true : false;\n\n      if(!success){\n        await this.Swal.fire('\u767C\u751F\u932F\u8AA4', \"\u67E5\u7121\u6B64\u5546\u54C1\", 'error');\n        return this;\n      }\n\n      if(success) {\n\n        order = new OrderModel().set_import({ CONSTANTS: this.CONSTANTS });\n        order\n          .set_uuid()\n          .set_site(this.site.id)\n          .set_status(this.CONSTANTS.Order.STATUS[\"\u73FE\u5834\u7D50\u5E33\u4E2D\"], this.created_by)\n          .set_is_on_site_checkout_order(true)\n          .set_buyer_related_information(this.membership.user.id, this.membership.member_level.id, this.membership.user.name, this.membership.user.mobile)\n          .set_product_related_information(productData.id, currentProductModelId, productModel ? productModel.name : \"\")\n          .set_constants(this.CONSTANTS.Order.SALE_TYPE[\"\u73FE\u8CA8\"], this.CONSTANTS.Order.SOURCE[\"POS\u6A5F\"])\n          .set_editor(this.created_by)\n          .set_quantity_and_price(orderQty, null, currentPrice, null, productData.cost, 0, this.CONSTANTS)\n          .set_discount_amount(this.CONSTANTS)\n          .set_total_price();\n\n        await order.load_product();\n        order.product = [order.product].to_products_class().first();\n        await order.product.load_product_models();\n\n      }\n\n      if (order) {\n        this.orders = [ order, ...this.orders ];\n      }\n\n    }\n\n\n    //\u53D6\u5F97\u76EE\u524D\u53EF\u7528\u7684\u6240\u6709\u512A\u60E0\n    await this.set_active_coupons();\n\n    //\u8A02\u55AE \u4EE5\u53CA \u5546\u54C1\u512A\u60E0 \u8655\u7406\n    this.set_orders_coupon_relation(false);\n\n    //\u51FA\u8CA8\u55AE \u4EE5\u53CA \u6EFF\u984D\u512A\u60E0 \u8655\u7406\n    await this.refresh_shipment();\n\n\n    this.orders = this.orders.filter(o => o.quantity*1);\n    return this;\n  }\n}\n\nexport class AuthorizationModel extends Model {\n  constructor(that) {\n    super(that)\n  }\n\n  async login_by_form(params) {\n    await new SessionModel().set_session({\n      auth: {\n        extension_uuid: location.href.getQueryString(\"uuid\"),\n        is_login: true,\n        is_extension_child_window : ( window.outerWidth <= 300 && window.outerHeight <= 300 ? true : false )\n      }\n    });\n    new FormClass({ action: \"/users/sign_in\", method: \"POST\", data: params }).submit();\n  }\n  async register_by_form(params) {\n    await new SessionModel().set_session({\n      auth: {\n        extension_uuid: location.href.getQueryString(\"uuid\"),\n        is_login: false,\n        is_extension_child_window : ( window.outerWidth <= 300 && window.outerHeight <= 300 ? true : false )\n      }\n    });\n    new FormClass({ action: \"/users\", method: \"POST\", data: params }).submit();\n  }\n}\n\n\nexport class ExtensionModel extends Model {\n  constructor(that) {\n    super(that)\n  }\n\n  async get_user_sites_by_ajax(params = {}) {\n    params[\"isAjax\"] = true;\n    let searchParams = new URLSearchParams(params);\n\n    return await this.ajax({\n      ...params,\n      method: \"GET\",\n      url:`/extensions/get_user_sites.json?${ searchParams.toString() }`\n    });\n  }\n}\n\n\nexport class SessionModel extends Model {\n  constructor(that) {\n    super(that)\n  }\n\n  async set_session(body) {\n    return await super.ajax({\n      method:\"PUT\",\n      body:body,\n      url:'/sessions/set_session'\n    });\n  }\n}\n\nexport class FormClass {\n  constructor(options) {\n    let that = this;\n    this.$form = $('<form>', {\n      action: options.action,\n      method: options.method,\n      style: 'display: none;'\n    });\n\n    $.each(options.data, function(name, value) {\n      $('<input>', {\n        type: 'hidden',\n        name: name,\n        value: value\n      }).appendTo(that.$form);\n    });\n  }\n\n  submit() {\n    this.$form.appendTo('body');\n    this.$form.submit();\n  }\n}\n\n\n", "\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n//# sourceMappingURL=LayoutGroupContext.mjs.map\n", "\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init<T> = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant<T>(init: Init<T>) {\n    const ref = useRef<T | null>(null)\n\n    if (ref.current === null) {\n        ref.current = init()\n    }\n\n    return ref.current\n}\n", "export const isBrowser = typeof window !== \"undefined\"\n", "\"use client\"\n\nimport { useEffect, useLayoutEffect } from \"react\"\nimport { isBrowser } from \"./is-browser\"\n\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect\n", "\"use client\"\n\nimport { createContext } from \"react\"\nimport type { PresenceContextProps } from \"motion-dom\"\n\nexport type { PresenceContextProps }\n\n/**\n * @public\n */\nexport const PresenceContext =\n    /* @__PURE__ */ createContext<PresenceContextProps | null>(null)\n", "export function addUniqueItem<T>(arr: T[], item: T) {\n    if (arr.indexOf(item) === -1) arr.push(item)\n}\n\nexport function removeItem<T>(arr: T[], item: T) {\n    const index = arr.indexOf(item)\n    if (index > -1) arr.splice(index, 1)\n}\n\n// Adapted from array-move\nexport function moveItem<T>([...arr]: T[], fromIndex: number, toIndex: number) {\n    const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex\n\n    if (startIndex >= 0 && startIndex < arr.length) {\n        const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex\n\n        const [item] = arr.splice(fromIndex, 1)\n        arr.splice(endIndex, 0, item)\n    }\n\n    return arr\n}\n", "export const clamp = (min: number, max: number, v: number) => {\n    if (v > max) return max\n    if (v < min) return min\n    return v\n}\n", "export function formatErrorMessage(message: string, errorCode?: string) {\n    return errorCode\n        ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n        : message\n}\n", "import { formatErrorMessage } from \"./format-error-message\"\n\nexport type DevMessage = (\n    check: boolean,\n    message: string,\n    errorCode?: string\n) => void\n\nlet warning: DevMessage = () => {}\nlet invariant: DevMessage = () => {}\n\nif (\n    typeof process !== \"undefined\" &&\n    process.env?.NODE_ENV !== \"production\"\n) {\n    warning = (check, message, errorCode) => {\n        if (!check && typeof console !== \"undefined\") {\n            console.warn(formatErrorMessage(message, errorCode))\n        }\n    }\n\n    invariant = (check, message, errorCode) => {\n        if (!check) {\n            throw new Error(formatErrorMessage(message, errorCode))\n        }\n    }\n}\n\nexport { invariant, warning }\n", "export const MotionGlobalConfig: {\n    skipAnimations?: boolean\n    instantAnimations?: boolean\n    useManualTiming?: boolean\n    WillChange?: any\n    mix?: <T>(a: T, b: T) => (p: number) => T\n} = {}\n", "/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nexport const isNumericalString = (v: string) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v)\n", "export function isObject(value: unknown): value is object {\n    return typeof value === \"object\" && value !== null\n}\n", "/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nexport const isZeroValueString = (v: string) => /^0[^.\\s]+$/u.test(v)\n", "/*#__NO_SIDE_EFFECTS__*/\nexport function memo<T extends any>(callback: () => T) {\n    let result: T | undefined\n\n    return () => {\n        if (result === undefined) result = callback()\n        return result\n    }\n}\n", "/*#__NO_SIDE_EFFECTS__*/\nexport const noop = <T>(any: T): T => any\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: Function, b: Function) => (v: any) => b(a(v))\nexport const pipe = (...transformers: Function[]) =>\n    transformers.reduce(combineFunctions)\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__*/\nexport const progress = (from: number, to: number, value: number) => {\n    const toFromDifference = to - from\n\n    return toFromDifference === 0 ? 1 : (value - from) / toFromDifference\n}\n", "import { addUniqueItem, removeItem } from \"./array\"\n\ntype GenericHandler = (...args: any) => void\n\nexport class SubscriptionManager<Handler extends GenericHandler> {\n    private subscriptions: Handler[] = []\n\n    add(handler: Handler): VoidFunction {\n        addUniqueItem(this.subscriptions, handler)\n        return () => removeItem(this.subscriptions, handler)\n    }\n\n    notify(\n        a?: Parameters<Handler>[0],\n        b?: Parameters<Handler>[1],\n        c?: Parameters<Handler>[2]\n    ) {\n        const numSubscriptions = this.subscriptions.length\n\n        if (!numSubscriptions) return\n\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        } 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\n    getSize() {\n        return this.subscriptions.length\n    }\n\n    clear() {\n        this.subscriptions.length = 0\n    }\n}\n", "/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const secondsToMilliseconds = (seconds: number) => seconds * 1000\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const millisecondsToSeconds = (milliseconds: number) =>\n    milliseconds / 1000\n", "/*\n  Convert velocity into velocity per second\n\n  @param [number]: Unit per frame\n  @param [number]: Frame duration in ms\n*/\nexport function velocityPerSecond(velocity: number, frameDuration: number) {\n    return frameDuration ? velocity * (1000 / frameDuration) : 0\n}\n", "import { formatErrorMessage } from \"./format-error-message\"\n\nconst warned = new Set<string>()\n\nexport function hasWarned(message: string) {\n    return warned.has(message)\n}\n\nexport function warnOnce(\n    condition: boolean,\n    message: string,\n    errorCode?: string\n) {\n    if (condition || warned.has(message)) return\n\n    console.warn(formatErrorMessage(message, errorCode))\n    warned.add(message)\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 noticeably 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\nimport { noop } from \"../noop\"\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t: number, a1: number, a2: number) =>\n    (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n    t\n\nconst subdivisionPrecision = 0.0000001\nconst subdivisionMaxIterations = 12\n\nfunction binarySubdivide(\n    x: number,\n    lowerBound: number,\n    upperBound: number,\n    mX1: number,\n    mX2: number\n) {\n    let currentX: number\n    let currentT: number\n    let i: number = 0\n\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        } else {\n            lowerBound = currentT\n        }\n    } while (\n        Math.abs(currentX) > subdivisionPrecision &&\n        ++i < subdivisionMaxIterations\n    )\n\n    return currentT\n}\n\nexport function cubicBezier(\n    mX1: number,\n    mY1: number,\n    mX2: number,\n    mY2: number\n) {\n    // If this is a linear gradient, return linear easing\n    if (mX1 === mY1 && mX2 === mY2) return noop\n\n    const getTForX = (aX: number) => binarySubdivide(aX, 0, 1, mX1, mX2)\n\n    // If animation is at start/end, return t without easing\n    return (t: number) =>\n        t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2)\n}\n", "// Accepts an easing function and returns a new one that outputs mirrored values for\n\nimport { EasingModifier } from \"../types\"\n\n// the second half of the animation. Turns easeIn into easeInOut.\nexport const mirrorEasing: EasingModifier = (easing) => (p) =>\n    p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2\n", "// Accepts an easing function and returns a new one that outputs reversed values.\n\nimport { EasingModifier } from \"../types\"\n\n// Turns easeIn into easeOut.\nexport const reverseEasing: EasingModifier = (easing) => (p) =>\n    1 - easing(1 - p)\n", "import { cubicBezier } from \"./cubic-bezier\"\nimport { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\n\nexport const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99)\nexport const backIn = /*@__PURE__*/ reverseEasing(backOut)\nexport const backInOut = /*@__PURE__*/ mirrorEasing(backIn)\n", "import { backIn } from \"./back\"\n\nexport const anticipate = (p: number) =>\n    (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)))\n", "import { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\nimport { EasingFunction } from \"./types\"\n\nexport const circIn: EasingFunction = (p) => 1 - Math.sin(Math.acos(p))\nexport const circOut = reverseEasing(circIn)\nexport const circInOut = mirrorEasing(circIn)\n", "import { cubicBezier } from \"./cubic-bezier\"\n\nexport const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1)\nexport const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1)\nexport const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1)\n", "import { Easing } from \"../types\"\n\nexport const isEasingArray = (ease: any): ease is Easing[] => {\n    return Array.isArray(ease) && typeof ease[0] !== \"number\"\n}\n", "import { BezierDefinition, Easing } from \"../types\"\n\nexport const isBezierDefinition = (\n    easing: Easing | Easing[]\n): easing is BezierDefinition =>\n    Array.isArray(easing) && typeof easing[0] === \"number\"\n", "import { invariant } from \"../../errors\"\nimport { noop } from \"../../noop\"\nimport { anticipate } from \"../anticipate\"\nimport { backIn, backInOut, backOut } from \"../back\"\nimport { circIn, circInOut, circOut } from \"../circ\"\nimport { cubicBezier } from \"../cubic-bezier\"\nimport { easeIn, easeInOut, easeOut } from \"../ease\"\nimport { Easing, EasingFunction } from \"../types\"\nimport { isBezierDefinition } from \"./is-bezier-definition\"\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}\n\nconst isValidEasing = (easing: Easing): easing is keyof typeof easingLookup => {\n    return typeof easing === \"string\"\n}\n\nexport const easingDefinitionToFunction = (\n    definition: Easing\n): EasingFunction => {\n    if (isBezierDefinition(definition)) {\n        // If cubic bezier definition, create bezier curve\n        invariant(\n            definition.length === 4,\n            `Cubic bezier arrays must contain four numerical values.`,\n            \"cubic-bezier-length\"\n        )\n\n        const [x1, y1, x2, y2] = definition\n        return cubicBezier(x1, y1, x2, y2)\n    } else if (isValidEasing(definition)) {\n        // Else lookup from table\n        invariant(\n            easingLookup[definition] !== undefined,\n            `Invalid easing type '${definition}'`,\n            \"invalid-easing-type\"\n        )\n        return easingLookup[definition]\n    }\n\n    return definition\n}\n", "import { StepId } from \"./types\"\n\nexport const stepsOrder: StepId[] = [\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] as const\n\nexport type StepNames = (typeof stepsOrder)[number]\n", "import type { StatsRecording } from \"./types\"\n\nexport type InactiveStatsBuffer = {\n    value: null\n    addProjectionMetrics: null\n}\n\nexport type ActiveStatsBuffer = {\n    value: StatsRecording\n    addProjectionMetrics: (metrics: {\n        nodes: number\n        calculatedTargetDeltas: number\n        calculatedProjections: number\n    }) => void\n}\n\nexport const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer = {\n    value: null,\n    addProjectionMetrics: null,\n}\n", "import { statsBuffer } from \"../stats/buffer\"\nimport { StepNames } from \"./order\"\nimport { FrameData, Process, Step } from \"./types\"\n\nexport function createRenderStep(\n    runNextFrame: () => void,\n    stepName?: StepNames\n): Step {\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<Process>()\n    let nextFrame = new Set<Process>()\n\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\n    let flushNextFrame = false\n\n    /**\n     * A set of processes which were marked keepAlive when scheduled.\n     */\n    const toKeepAlive = new WeakSet<Process>()\n\n    let latestFrameData: FrameData = {\n        delta: 0.0,\n        timestamp: 0.0,\n        isProcessing: false,\n    }\n\n    let numCalls = 0\n\n    function triggerCallback(callback: Process) {\n        if (toKeepAlive.has(callback)) {\n            step.schedule(callback)\n            runNextFrame()\n        }\n\n        numCalls++\n        callback(latestFrameData)\n    }\n\n    const step: 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\n            if (keepAlive) toKeepAlive.add(callback)\n\n            if (!queue.has(callback)) queue.add(callback)\n\n            return callback\n        },\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        /**\n         * Execute all schedule callbacks.\n         */\n        process: (frameData) => {\n            latestFrameData = frameData\n\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\n            isProcessing = true\n\n            // Swap this frame and the next to avoid GC\n            ;[thisFrame, nextFrame] = [nextFrame, thisFrame]\n\n            // Execute this frame\n            thisFrame.forEach(triggerCallback)\n\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\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\n            isProcessing = false\n\n            if (flushNextFrame) {\n                flushNextFrame = false\n                step.process(frameData)\n            }\n        },\n    }\n\n    return step\n}\n", "import { MotionGlobalConfig } from \"motion-utils\"\nimport { stepsOrder } from \"./order\"\nimport { createRenderStep } from \"./render-step\"\nimport { Batcher, FrameData, Process, Steps } from \"./types\"\n\nconst maxElapsed = 40\n\nexport function createRenderBatcher(\n    scheduleNextBatch: (callback: Function) => void,\n    allowKeepAlive: boolean\n) {\n    let runNextFrame = false\n    let useDefaultElapsed = true\n\n    const state: FrameData = {\n        delta: 0.0,\n        timestamp: 0.0,\n        isProcessing: false,\n    }\n\n    const flagRunNextFrame = () => (runNextFrame = true)\n\n    const steps = stepsOrder.reduce((acc, key) => {\n        acc[key] = createRenderStep(\n            flagRunNextFrame,\n            allowKeepAlive ? key : undefined\n        )\n        return acc\n    }, {} as Steps)\n\n    const {\n        setup,\n        read,\n        resolveKeyframes,\n        preUpdate,\n        update,\n        preRender,\n        render,\n        postRender,\n    } = steps\n\n    const processBatch = () => {\n        const timestamp = MotionGlobalConfig.useManualTiming\n            ? state.timestamp\n            : performance.now()\n        runNextFrame = false\n\n        if (!MotionGlobalConfig.useManualTiming) {\n            state.delta = useDefaultElapsed\n                ? 1000 / 60\n                : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1)\n        }\n\n        state.timestamp = timestamp\n        state.isProcessing = true\n\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\n        state.isProcessing = false\n\n        if (runNextFrame && allowKeepAlive) {\n            useDefaultElapsed = false\n            scheduleNextBatch(processBatch)\n        }\n    }\n\n    const wake = () => {\n        runNextFrame = true\n        useDefaultElapsed = true\n\n        if (!state.isProcessing) {\n            scheduleNextBatch(processBatch)\n        }\n    }\n\n    const schedule = stepsOrder.reduce((acc, key) => {\n        const step = steps[key]\n        acc[key] = (process: Process, keepAlive = false, immediate = false) => {\n            if (!runNextFrame) wake()\n\n            return step.schedule(process, keepAlive, immediate)\n        }\n        return acc\n    }, {} as Batcher)\n\n    const cancel = (process: Process) => {\n        for (let i = 0; i < stepsOrder.length; i++) {\n            steps[stepsOrder[i]].cancel(process)\n        }\n    }\n\n    return { schedule, cancel, state, steps }\n}\n", "import { noop } from \"motion-utils\"\nimport { createRenderBatcher } from \"./batcher\"\n\nexport const {\n    schedule: frame,\n    cancel: cancelFrame,\n    state: frameData,\n    steps: frameSteps,\n} = /* @__PURE__ */ createRenderBatcher(\n    typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop,\n    true\n)\n", "import { MotionGlobalConfig } from \"motion-utils\"\nimport { frameData } from \"./frame\"\n\nlet now: number | undefined\n\nfunction clearTime() {\n    now = undefined\n}\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 */\nexport const time = {\n    now: (): number => {\n        if (now === undefined) {\n            time.set(\n                frameData.isProcessing || MotionGlobalConfig.useManualTiming\n                    ? frameData.timestamp\n                    : performance.now()\n            )\n        }\n\n        return now!\n    },\n    set: (newTime: number) => {\n        now = newTime\n        queueMicrotask(clearTime)\n    },\n}\n", "export const activeAnimations = {\n    layout: 0,\n    mainThread: 0,\n    waapi: 0,\n}\n", "import { AnyResolvedKeyframe } from \"../types\"\n\nexport type CSSVariableName = `--${string}`\n\nexport type CSSVariableToken = `var(${CSSVariableName})`\n\nconst checkStringStartsWith =\n    <T extends string>(token: string) =>\n    (key?: AnyResolvedKeyframe | null): key is T =>\n        typeof key === \"string\" && key.startsWith(token)\n\nexport const isCSSVariableName =\n    /*@__PURE__*/ checkStringStartsWith<CSSVariableName>(\"--\")\n\nconst startsAsVariableToken =\n    /*@__PURE__*/ checkStringStartsWith<CSSVariableToken>(\"var(--\")\nexport const isCSSVariableToken = (\n    value?: string\n): value is CSSVariableToken => {\n    const startsWithToken = startsAsVariableToken(value)\n\n    if (!startsWithToken) return false\n\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}\n\nconst singleCssVariableRegex =\n    /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu\n\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nexport function containsCSSVariable(\n    value?: AnyResolvedKeyframe | null\n): boolean {\n    if (typeof value !== \"string\") return false\n    // Strip comments to avoid false positives\n    return value.split(\"/*\")[0].includes(\"var(--\")\n}\n", "import { clamp } from \"motion-utils\"\n\nexport const number = {\n    test: (v: number) => typeof v === \"number\",\n    parse: parseFloat,\n    transform: (v: number) => v,\n}\n\nexport const alpha = {\n    ...number,\n    transform: (v: number) => clamp(0, 1, v),\n}\n\nexport const scale = {\n    ...number,\n    default: 1,\n}\n", "// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nexport const sanitize = (v: number) => Math.round(v * 100000) / 100000\n", "export const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu\n", "export function isNullish(v: any): v is null | undefined {\n    return v == null\n}\n", "export const singleColorRegex =\n    /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu\n", "import { Color, HSLA, RGBA } from \"../types\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { isNullish } from \"../utils/is-nullish\"\nimport { singleColorRegex } from \"../utils/single-color-regex\"\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 */\nexport const isColorString = (type: string, testProp?: string) => (v: any) => {\n    return Boolean(\n        (typeof v === \"string\" &&\n            singleColorRegex.test(v) &&\n            v.startsWith(type)) ||\n            (testProp &&\n                !isNullish(v) &&\n                Object.prototype.hasOwnProperty.call(v, testProp))\n    )\n}\n\nexport const splitColor =\n    <V extends RGBA | HSLA>(aName: string, bName: string, cName: string) =>\n    (v: string | Color): V => {\n        if (typeof v !== \"string\") return v as any\n\n        const [a, b, c, alpha] = v.match(floatRegex) as any\n\n        return {\n            [aName]: parseFloat(a),\n            [bName]: parseFloat(b),\n            [cName]: parseFloat(c),\n            alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n        } as V\n    }\n", "import { clamp } from \"motion-utils\"\nimport { alpha as alphaType, number } from \"../numbers\"\nimport { RGBA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nconst clampRgbUnit = (v: number) => clamp(0, 255, v)\nexport const rgbUnit = {\n    ...number,\n    transform: (v: number) => Math.round(clampRgbUnit(v)),\n}\n\nexport const rgba = {\n    test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n    parse: /*@__PURE__*/ splitColor<RGBA>(\"red\", \"green\", \"blue\"),\n    transform: ({ red, green, blue, alpha = 1 }: RGBA) =>\n        \"rgba(\" +\n        rgbUnit.transform(red) +\n        \", \" +\n        rgbUnit.transform(green) +\n        \", \" +\n        rgbUnit.transform(blue) +\n        \", \" +\n        sanitize(alphaType.transform(alpha)) +\n        \")\",\n}\n", "import { RGBA } from \"../types\"\nimport { rgba } from \"./rgba\"\nimport { isColorString } from \"./utils\"\n\nfunction parseHex(v: string): RGBA {\n    let r = \"\"\n    let g = \"\"\n    let b = \"\"\n    let a = \"\"\n\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\n        // Or we have 3 characters, ie #F00\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\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}\n\nexport const hex = {\n    test: /*@__PURE__*/ isColorString(\"#\"),\n    parse: parseHex,\n    transform: rgba.transform,\n}\n", "import { AnyResolvedKeyframe } from \"../../../animation/types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit: string) => ({\n    test: (v: AnyResolvedKeyframe) =>\n        typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n    parse: parseFloat,\n    transform: (v: number | string) => `${v}${unit}`,\n})\n\nexport const degrees = /*@__PURE__*/ createUnitType(\"deg\")\nexport const percent = /*@__PURE__*/ createUnitType(\"%\")\nexport const px = /*@__PURE__*/ createUnitType(\"px\")\nexport const vh = /*@__PURE__*/ createUnitType(\"vh\")\nexport const vw = /*@__PURE__*/ createUnitType(\"vw\")\n\nexport const progressPercentage = /*@__PURE__*/ (() => ({\n    ...percent,\n    parse: (v: string) => percent.parse(v) / 100,\n    transform: (v: number) => percent.transform(v * 100),\n}))()\n", "import { alpha as alphaType } from \"../numbers\"\nimport { percent } from \"../numbers/units\"\nimport { HSLA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nexport const hsla = {\n    test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n    parse: /*@__PURE__*/ splitColor<HSLA>(\"hue\", \"saturation\", \"lightness\"),\n    transform: ({ hue, saturation, lightness, alpha = 1 }: HSLA) => {\n        return (\n            \"hsla(\" +\n            Math.round(hue) +\n            \", \" +\n            percent.transform(sanitize(saturation)) +\n            \", \" +\n            percent.transform(sanitize(lightness)) +\n            \", \" +\n            sanitize(alphaType.transform(alpha)) +\n            \")\"\n        )\n    },\n}\n", "import { HSLA, RGBA } from \"../types\"\nimport { hex } from \"./hex\"\nimport { hsla } from \"./hsla\"\nimport { rgba } from \"./rgba\"\n\nexport const color = {\n    test: (v: any) => rgba.test(v) || hex.test(v) || hsla.test(v),\n    parse: (v: any): RGBA | HSLA => {\n        if (rgba.test(v)) {\n            return rgba.parse(v)\n        } else if (hsla.test(v)) {\n            return hsla.parse(v)\n        } else {\n            return hex.parse(v)\n        }\n    },\n    transform: (v: HSLA | RGBA | string) => {\n        return typeof v === \"string\"\n            ? v\n            : v.hasOwnProperty(\"red\")\n            ? rgba.transform(v as RGBA)\n            : hsla.transform(v as HSLA)\n    },\n    getAnimatableNone: (v: string) => {\n        const parsed = color.parse(v)\n        parsed.alpha = 0\n        return color.transform(parsed)\n    },\n}\n", "export const colorRegex =\n    /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu\n", "import { AnyResolvedKeyframe } from \"../../../animation/types\"\nimport { CSSVariableToken } from \"../../../animation/utils/is-css-variable\"\nimport { color } from \"../color\"\nimport { Color } from \"../types\"\nimport { colorRegex } from \"../utils/color-regex\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { sanitize } from \"../utils/sanitize\"\n\nfunction test(v: any) {\n    return (\n        isNaN(v) &&\n        typeof v === \"string\" &&\n        (v.match(floatRegex)?.length || 0) +\n            (v.match(colorRegex)?.length || 0) >\n            0\n    )\n}\n\nconst NUMBER_TOKEN = \"number\"\nconst COLOR_TOKEN = \"color\"\nconst VAR_TOKEN = \"var\"\nconst VAR_FUNCTION_TOKEN = \"var(\"\nconst SPLIT_TOKEN = \"${}\"\n\nexport type ComplexValues = Array<\n    CSSVariableToken | AnyResolvedKeyframe | Color\n>\n\nexport interface ValueIndexes {\n    color: number[]\n    number: number[]\n    var: number[]\n}\n\nexport interface ComplexValueInfo {\n    values: ComplexValues\n    split: string[]\n    indexes: ValueIndexes\n    types: Array<keyof ValueIndexes>\n}\n\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex =\n    /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\n\nexport function analyseComplexValue(\n    value: AnyResolvedKeyframe\n): ComplexValueInfo {\n    const originalValue = value.toString()\n\n    const values: ComplexValues = []\n    const indexes: ValueIndexes = {\n        color: [],\n        number: [],\n        var: [],\n    }\n    const types: Array<keyof ValueIndexes> = []\n\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        } else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n            indexes.var.push(i)\n            types.push(VAR_TOKEN)\n            values.push(parsedValue)\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\n    return { values, split, indexes, types }\n}\n\nfunction parseComplexValue(v: AnyResolvedKeyframe) {\n    return analyseComplexValue(v).values\n}\n\nfunction createTransformer(source: AnyResolvedKeyframe) {\n    const { split, types } = analyseComplexValue(source)\n\n    const numSections = split.length\n    return (v: Array<CSSVariableToken | Color | number | string>) => {\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] as number)\n                } else if (type === COLOR_TOKEN) {\n                    output += color.transform(v[i] as Color)\n                } else {\n                    output += v[i]\n                }\n            }\n        }\n\n        return output\n    }\n}\n\nconst convertNumbersToZero = (v: number | string) =>\n    typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v\n\nfunction getAnimatableNone(v: AnyResolvedKeyframe) {\n    const parsed = parseComplexValue(v)\n    const transformer = createTransformer(v)\n    return transformer(parsed.map(convertNumbersToZero))\n}\n\nexport const complex = {\n    test,\n    parse: parseComplexValue,\n    createTransformer,\n    getAnimatableNone,\n}\n", "import { HSLA, RGBA } from \"../types\"\n\n// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p: number, q: number, t: number) {\n    if (t < 0) t += 1\n    if (t > 1) t -= 1\n    if (t < 1 / 6) return p + (q - p) * 6 * t\n    if (t < 1 / 2) return q\n    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n    return p\n}\n\nexport function hslaToRgba({ hue, saturation, lightness, alpha }: HSLA): RGBA {\n    hue /= 360\n    saturation /= 100\n    lightness /= 100\n\n    let red = 0\n    let green = 0\n    let blue = 0\n\n    if (!saturation) {\n        red = green = blue = lightness\n    } else {\n        const q =\n            lightness < 0.5\n                ? lightness * (1 + saturation)\n                : lightness + saturation - lightness * saturation\n        const p = 2 * lightness - q\n\n        red = hueToRgb(p, q, hue + 1 / 3)\n        green = hueToRgb(p, q, hue)\n        blue = hueToRgb(p, q, hue - 1 / 3)\n    }\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", "export function mixImmediate<T>(a: T, b: T) {\n    return (p: number) => (p > 0 ? b : a)\n}\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*/\nexport const mixNumber = (from: number, to: number, progress: number) => {\n    return from + (to - from) * progress\n}\n", "import { warning } from \"motion-utils\"\nimport { hex } from \"../../value/types/color/hex\"\nimport { hsla } from \"../../value/types/color/hsla\"\nimport { hslaToRgba } from \"../../value/types/color/hsla-to-rgba\"\nimport { rgba } from \"../../value/types/color/rgba\"\nimport { Color, HSLA, RGBA } from \"../../value/types/types\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber } from \"./number\"\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nexport const mixLinearColor = (from: number, to: number, v: number) => {\n    const fromExpo = from * from\n    const expo = v * (to * to - fromExpo) + fromExpo\n    return expo < 0 ? 0 : Math.sqrt(expo)\n}\n\nconst colorTypes = [hex, rgba, hsla]\nconst getColorType = (v: Color | string) =>\n    colorTypes.find((type) => type.test(v))\n\nfunction asRGBA(color: Color | string) {\n    const type = getColorType(color)\n\n    warning(\n        Boolean(type),\n        `'${color}' is not an animatable color. Use the equivalent color code instead.`,\n        \"color-not-animatable\"\n    )\n\n    if (!Boolean(type)) return false\n\n    let model = type!.parse(color)\n\n    if (type === hsla) {\n        // TODO Remove this cast - needed since Motion's stricter typing\n        model = hslaToRgba(model as HSLA)\n    }\n\n    return model as RGBA\n}\n\nexport const mixColor = (from: Color | string, to: Color | string) => {\n    const fromRGBA = asRGBA(from)\n    const toRGBA = asRGBA(to)\n\n    if (!fromRGBA || !toRGBA) {\n        return mixImmediate(from, to)\n    }\n\n    const blended = { ...fromRGBA }\n\n    return (v: number) => {\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", "export const invisibleValues = new Set([\"none\", \"hidden\"])\n\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 */\nexport function mixVisibility(origin: string, target: string) {\n    if (invisibleValues.has(origin)) {\n        return (p: number) => (p <= 0 ? origin : target)\n    } else {\n        return (p: number) => (p >= 1 ? target : origin)\n    }\n}\n", "import { pipe, warning } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableToken } from \"../../animation/utils/is-css-variable\"\nimport { color } from \"../../value/types/color\"\nimport {\n    analyseComplexValue,\n    complex,\n    ComplexValueInfo,\n    ComplexValues,\n} from \"../../value/types/complex\"\nimport { HSLA, RGBA } from \"../../value/types/types\"\nimport { mixColor } from \"./color\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { invisibleValues, mixVisibility } from \"./visibility\"\n\ntype MixableArray = Array<number | RGBA | HSLA | string>\ninterface MixableObject {\n    [key: string]: AnyResolvedKeyframe | RGBA | HSLA\n}\n\nfunction mixNumber(a: number, b: number) {\n    return (p: number) => mixNumberImmediate(a, b, p)\n}\n\nexport function getMixer<T>(a: T) {\n    if (typeof a === \"number\") {\n        return mixNumber\n    } else if (typeof a === \"string\") {\n        return isCSSVariableToken(a)\n            ? mixImmediate\n            : color.test(a)\n            ? mixColor\n            : mixComplex\n    } else if (Array.isArray(a)) {\n        return mixArray\n    } else if (typeof a === \"object\") {\n        return color.test(a) ? mixColor : mixObject\n    }\n\n    return mixImmediate\n}\n\nexport function mixArray(a: MixableArray, b: MixableArray) {\n    const output = [...a]\n    const numValues = output.length\n\n    const blendValue = a.map((v, i) => getMixer(v)(v as any, b[i] as any))\n\n    return (p: number) => {\n        for (let i = 0; i < numValues; i++) {\n            output[i] = blendValue[i](p) as any\n        }\n        return output\n    }\n}\n\nexport function mixObject(a: MixableObject, b: MixableObject) {\n    const output = { ...a, ...b }\n    const blendValue: { [key: string]: (v: number) => any } = {}\n\n    for (const key in output) {\n        if (a[key] !== undefined && b[key] !== undefined) {\n            blendValue[key] = getMixer(a[key])(\n                a[key] as any,\n                b[key] as any\n            ) as any\n        }\n    }\n\n    return (v: number) => {\n        for (const key in blendValue) {\n            output[key] = blendValue[key](v)\n        }\n        return output\n    }\n}\n\nfunction matchOrder(\n    origin: ComplexValueInfo,\n    target: ComplexValueInfo\n): ComplexValues {\n    const orderedOrigin: ComplexValues = []\n\n    const pointers = { color: 0, var: 0, number: 0 }\n\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\n        orderedOrigin[i] = originValue\n\n        pointers[type]++\n    }\n\n    return orderedOrigin\n}\n\nexport const mixComplex = (\n    origin: AnyResolvedKeyframe,\n    target: AnyResolvedKeyframe\n) => {\n    const template = complex.createTransformer(target)\n    const originStats = analyseComplexValue(origin)\n    const targetStats = analyseComplexValue(target)\n    const canInterpolate =\n        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\n    if (canInterpolate) {\n        if (\n            (invisibleValues.has(origin as string) &&\n                !targetStats.values.length) ||\n            (invisibleValues.has(target as string) &&\n                !originStats.values.length)\n        ) {\n            return mixVisibility(origin as string, target as string)\n        }\n\n        return pipe(\n            mixArray(matchOrder(originStats, targetStats), targetStats.values),\n            template\n        )\n    } else {\n        warning(\n            true,\n            `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            \"complex-values-different\"\n        )\n\n        return mixImmediate(origin, target)\n    }\n}\n", "import { getMixer } from \"./complex\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { Mixer } from \"./types\"\n\nexport function mix<T>(from: T, to: T): Mixer<T>\nexport function mix(from: number, to: number, p: number): number\nexport function mix<T>(from: T, to: T, p?: T): Mixer<T> | number {\n    if (\n        typeof from === \"number\" &&\n        typeof to === \"number\" &&\n        typeof p === \"number\"\n    ) {\n        return mixNumberImmediate(from, to, p)\n    }\n\n    const mixer = getMixer(from)\n    return mixer(from as any, to as any) as Mixer<T>\n}\n", "import { cancelFrame, frame, frameData } from \"../../frameloop\"\nimport { time } from \"../../frameloop/sync-time\"\nimport { FrameData } from \"../../frameloop/types\"\nimport { Driver } from \"./types\"\n\nexport const frameloopDriver: Driver = (update) => {\n    const passTimestamp = ({ timestamp }: FrameData) => update(timestamp)\n\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", "import { EasingFunction } from \"motion-utils\"\n\nexport const generateLinearEasing = (\n    easing: EasingFunction,\n    duration: number, // as milliseconds\n    resolution: number = 10 // as milliseconds\n): string => {\n    let points = \"\"\n    const numPoints = Math.max(Math.round(duration / resolution), 2)\n\n    for (let i = 0; i < numPoints; i++) {\n        points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \"\n    }\n\n    return `linear(${points.substring(0, points.length - 2)})`\n}\n", "import { KeyframeGenerator } from \"../../types\"\n\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nexport const maxGeneratorDuration = 20_000\nexport function calcGeneratorDuration(\n    generator: KeyframeGenerator<unknown>\n): number {\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\n    return duration >= maxGeneratorDuration ? Infinity : duration\n}\n", "import { millisecondsToSeconds } from \"motion-utils\"\nimport { GeneratorFactory, Transition } from \"../../types\"\nimport { calcGeneratorDuration, maxGeneratorDuration } from \"./calc-duration\"\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nexport function createGeneratorEasing(\n    options: Transition,\n    scale = 100,\n    createGenerator: GeneratorFactory\n) {\n    const generator = createGenerator({ ...options, keyframes: [0, scale] })\n    const duration = Math.min(\n        calcGeneratorDuration(generator),\n        maxGeneratorDuration\n    )\n\n    return {\n        type: \"keyframes\",\n        ease: (progress: number) => {\n            return generator.next(duration * progress).value / scale\n        },\n        duration: millisecondsToSeconds(duration),\n    }\n}\n", "import { velocityPerSecond } from \"motion-utils\"\n\nconst velocitySampleDuration = 5 // ms\n\nexport function calcGeneratorVelocity(\n    resolveValue: (v: number) => number,\n    t: number,\n    current: number\n) {\n    const prevT = Math.max(t - velocitySampleDuration, 0)\n    return velocityPerSecond(current - resolveValue(prevT), t - prevT)\n}\n", "export const springDefaults = {\n    // Default spring physics\n    stiffness: 100,\n    damping: 10,\n    mass: 1.0,\n    velocity: 0.0,\n\n    // Default duration/bounce-based options\n    duration: 800, // in ms\n    bounce: 0.3,\n    visualDuration: 0.3, // in seconds\n\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\n    // Limits\n    minDuration: 0.01, // in seconds\n    maxDuration: 10.0, // in seconds\n    minDamping: 0.05,\n    maxDamping: 1,\n}\n", "import {\n    clamp,\n    millisecondsToSeconds,\n    secondsToMilliseconds,\n    warning,\n} from \"motion-utils\"\nimport { SpringOptions } from \"../../types\"\nimport { springDefaults } from \"./defaults\"\n\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\n\ntype Resolver = (num: number) => number\n\nconst safeMin = 0.001\n\nexport function findSpring({\n    duration = springDefaults.duration,\n    bounce = springDefaults.bounce,\n    velocity = springDefaults.velocity,\n    mass = springDefaults.mass,\n}: SpringOptions) {\n    let envelope: Resolver\n    let derivative: Resolver\n\n    warning(\n        duration <= secondsToMilliseconds(springDefaults.maxDuration),\n        \"Spring duration must be 10 seconds or less\",\n        \"spring-duration-limit\"\n    )\n\n    let dampingRatio = 1 - bounce\n\n    /**\n     * Restrict dampingRatio and duration to within acceptable ranges.\n     */\n    dampingRatio = clamp(\n        springDefaults.minDamping,\n        springDefaults.maxDamping,\n        dampingRatio\n    )\n    duration = clamp(\n        springDefaults.minDuration,\n        springDefaults.maxDuration,\n        millisecondsToSeconds(duration)\n    )\n\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\n        derivative = (undampedFreq) => {\n            const exponentialDecay = undampedFreq * dampingRatio\n            const delta = exponentialDecay * duration\n            const d = delta * velocity + velocity\n            const e =\n                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    } 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\n        derivative = (undampedFreq) => {\n            const a = Math.exp(-undampedFreq * duration)\n            const b = (velocity - undampedFreq) * (duration * duration)\n            return a * b\n        }\n    }\n\n    const initialGuess = 5 / duration\n    const undampedFreq = approximateRoot(envelope, derivative, initialGuess)\n\n    duration = secondsToMilliseconds(duration)\n    if (isNaN(undampedFreq)) {\n        return {\n            stiffness: springDefaults.stiffness,\n            damping: springDefaults.damping,\n            duration,\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}\n\nconst rootIterations = 12\nfunction approximateRoot(\n    envelope: Resolver,\n    derivative: Resolver,\n    initialGuess: number\n): number {\n    let result = initialGuess\n    for (let i = 1; i < rootIterations; i++) {\n        result = result - envelope(result) / derivative(result)\n    }\n    return result\n}\n\nexport function calcAngularFreq(undampedFreq: number, dampingRatio: number) {\n    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio)\n}\n", "import {\n    clamp,\n    millisecondsToSeconds,\n    secondsToMilliseconds,\n} from \"motion-utils\"\nimport {\n    AnimationState,\n    KeyframeGenerator,\n    SpringOptions,\n    Transition,\n    ValueAnimationOptions,\n} from \"../../types\"\nimport { generateLinearEasing } from \"../../waapi/utils/linear\"\nimport {\n    calcGeneratorDuration,\n    maxGeneratorDuration,\n} from \"../utils/calc-duration\"\nimport { createGeneratorEasing } from \"../utils/create-generator-easing\"\nimport { calcGeneratorVelocity } from \"../utils/velocity\"\nimport { springDefaults } from \"./defaults\"\nimport { calcAngularFreq, findSpring } from \"./find\"\n\nconst durationKeys = [\"duration\", \"bounce\"]\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"]\n\nfunction isSpringType(options: SpringOptions, keys: string[]) {\n    return keys.some((key) => (options as any)[key] !== undefined)\n}\n\nfunction getSpringOptions(options: SpringOptions) {\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 (\n        !isSpringType(options, physicsKeys) &&\n        isSpringType(options, durationKeys)\n    ) {\n        // Time-defined springs should ignore inherited velocity.\n        // Velocity from interrupted animations can cause findSpring()\n        // to compute wildly different spring parameters, leading to\n        // massive oscillation on small-range animations.\n        springOptions.velocity = 0\n\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 =\n                2 *\n                clamp(0.05, 1, 1 - (options.bounce || 0)) *\n                Math.sqrt(stiffness)\n\n            springOptions = {\n                ...springOptions,\n                mass: springDefaults.mass,\n                stiffness,\n                damping,\n            }\n        } else {\n            const derived = findSpring({ ...options, velocity: 0 })\n\n            springOptions = {\n                ...springOptions,\n                ...derived,\n                mass: springDefaults.mass,\n            }\n            springOptions.isResolvedFromDuration = true\n        }\n    }\n\n    return springOptions\n}\n\nfunction spring(\n    optionsOrVisualDuration:\n        | ValueAnimationOptions<number>\n        | number = springDefaults.visualDuration,\n    bounce = springDefaults.bounce\n): KeyframeGenerator<number> {\n    const options =\n        typeof optionsOrVisualDuration !== \"object\"\n            ? ({\n                  visualDuration: optionsOrVisualDuration,\n                  keyframes: [0, 1],\n                  bounce,\n              } as ValueAnimationOptions<number>)\n            : optionsOrVisualDuration\n\n    let { restSpeed, restDelta } = options\n\n    const origin = options.keyframes[0]\n    const target = options.keyframes[options.keyframes.length - 1]\n\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: AnimationState<number> = { done: false, value: origin }\n\n    const {\n        stiffness,\n        damping,\n        mass,\n        duration,\n        velocity,\n        isResolvedFromDuration,\n    } = getSpringOptions({\n        ...options,\n        velocity: -millisecondsToSeconds(options.velocity || 0),\n    })\n\n    const initialVelocity = velocity || 0.0\n    const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass))\n\n    const initialDelta = target - origin\n    const undampedAngularFreq = millisecondsToSeconds(\n        Math.sqrt(stiffness / mass)\n    )\n\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 ||= isGranularScale\n        ? springDefaults.restSpeed.granular\n        : springDefaults.restSpeed.default\n    restDelta ||= isGranularScale\n        ? springDefaults.restDelta.granular\n        : springDefaults.restDelta.default\n\n    let resolveSpring: (v: number) => number\n    if (dampingRatio < 1) {\n        const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio)\n\n        // Underdamped spring\n        resolveSpring = (t: number) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n            return (\n                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: number) =>\n            target -\n            Math.exp(-undampedAngularFreq * t) *\n                (initialDelta +\n                    (initialVelocity + undampedAngularFreq * initialDelta) * t)\n    } else {\n        // Overdamped spring\n        const dampedAngularFreq =\n            undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1)\n\n        resolveSpring = (t: number) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n            // When performing sinh or cosh values can hit Infinity so we cap them here\n            const freqForT = Math.min(dampedAngularFreq * t, 300)\n\n            return (\n                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    }\n\n    const generator = {\n        calculatedDuration: isResolvedFromDuration ? duration || null : null,\n        next: (t: number) => {\n            const current = resolveSpring(t)\n\n            if (!isResolvedFromDuration) {\n                let currentVelocity = t === 0 ? initialVelocity : 0.0\n\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\n                const isBelowVelocityThreshold =\n                    Math.abs(currentVelocity) <= restSpeed!\n                const isBelowDisplacementThreshold =\n                    Math.abs(target - current) <= restDelta!\n\n                state.done =\n                    isBelowVelocityThreshold && isBelowDisplacementThreshold\n            } else {\n                state.done = t >= duration!\n            }\n\n            state.value = state.done ? target : current\n\n            return state\n        },\n        toString: () => {\n            const calculatedDuration = Math.min(\n                calcGeneratorDuration(generator),\n                maxGeneratorDuration\n            )\n\n            const easing = generateLinearEasing(\n                (progress: number) =>\n                    generator.next(calculatedDuration * progress).value,\n                calculatedDuration,\n                30\n            )\n\n            return calculatedDuration + \"ms \" + easing\n        },\n        toTransition: () => {},\n    }\n\n    return generator\n}\n\nspring.applyToOptions = (options: Transition) => {\n    const generatorOptions = createGeneratorEasing(options as any, 100, spring)\n\n    options.ease = generatorOptions.ease\n    options.duration = secondsToMilliseconds(generatorOptions.duration)\n    options.type = \"keyframes\"\n    return options\n}\n\nexport { spring }\n", "import {\n    AnimationState,\n    KeyframeGenerator,\n    ValueAnimationOptions,\n} from \"../types\"\nimport { spring as createSpring } from \"./spring\"\nimport { calcGeneratorVelocity } from \"./utils/velocity\"\n\nexport function inertia({\n    keyframes,\n    velocity = 0.0,\n    power = 0.8,\n    timeConstant = 325,\n    bounceDamping = 10,\n    bounceStiffness = 500,\n    modifyTarget,\n    min,\n    max,\n    restDelta = 0.5,\n    restSpeed,\n}: ValueAnimationOptions<number>): KeyframeGenerator<number> {\n    const origin = keyframes[0]\n\n    const state: AnimationState<number> = {\n        done: false,\n        value: origin,\n    }\n\n    const isOutOfBounds = (v: number) =>\n        (min !== undefined && v < min) || (max !== undefined && v > max)\n\n    const nearestBoundary = (v: number) => {\n        if (min === undefined) return max\n        if (max === undefined) return min\n\n        return Math.abs(min - v) < Math.abs(max - v) ? min : max\n    }\n\n    let amplitude = power * velocity\n    const ideal = origin + amplitude\n    const target = modifyTarget === undefined ? ideal : modifyTarget(ideal)\n\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) amplitude = target - origin\n\n    const calcDelta = (t: number) => -amplitude * Math.exp(-t / timeConstant)\n\n    const calcLatest = (t: number) => target + calcDelta(t)\n\n    const applyFriction = (t: number) => {\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    /**\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: number | undefined\n    let spring: KeyframeGenerator<number> | undefined\n\n    const checkCatchBoundary = (t: number) => {\n        if (!isOutOfBounds(state.value)) return\n\n        timeReachedBoundary = t\n\n        spring = createSpring({\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\n    checkCatchBoundary(0)\n\n    return {\n        calculatedDuration: null,\n        next: (t: number) => {\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 && timeReachedBoundary === undefined) {\n                hasUpdatedFrame = true\n                applyFriction(t)\n                checkCatchBoundary(t)\n            }\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!.next(t - timeReachedBoundary)\n            } else {\n                !hasUpdatedFrame && applyFriction(t)\n                return state\n            }\n        },\n    }\n}\n", "import {\n    clamp,\n    EasingFunction,\n    invariant,\n    MotionGlobalConfig,\n    noop,\n    pipe,\n    progress,\n} from \"motion-utils\"\nimport { mix } from \"./mix\"\nimport { Mixer, MixerFactory } from \"./mix/types\"\n\nexport interface InterpolateOptions<T> {\n    clamp?: boolean\n    ease?: EasingFunction | EasingFunction[]\n    mixer?: MixerFactory<T>\n}\n\nfunction createMixers<T>(\n    output: T[],\n    ease?: EasingFunction | EasingFunction[],\n    customMixer?: MixerFactory<T>\n) {\n    const mixers: Array<Mixer<T>> = []\n    const mixerFactory: MixerFactory<T> =\n        customMixer || MotionGlobalConfig.mix || mix\n    const numMixers = output.length - 1\n\n    for (let i = 0; i < numMixers; i++) {\n        let mixer = mixerFactory(output[i], output[i + 1])\n\n        if (ease) {\n            const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease\n            mixer = pipe(easingFunction, mixer) as Mixer<T>\n        }\n\n        mixers.push(mixer)\n    }\n\n    return mixers\n}\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 */\nexport function interpolate<T>(\n    input: number[],\n    output: T[],\n    { clamp: isClamp = true, ease, mixer }: InterpolateOptions<T> = {}\n): (v: number) => T {\n    const inputLength = input.length\n\n    invariant(\n        inputLength === output.length,\n        \"Both input and output ranges must be the same length\",\n        \"range-length\"\n    )\n\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) return () => output[0]\n    if (inputLength === 2 && output[0] === output[1]) return () => output[1]\n\n    const isZeroDeltaRange = input[0] === input[1]\n\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\n    const mixers = createMixers(output, ease, mixer)\n    const numMixers = mixers.length\n\n    const interpolator = (v: number): T => {\n        if (isZeroDeltaRange && v < input[0]) return output[0]\n\n        let i = 0\n\n        if (numMixers > 1) {\n            for (; i < input.length - 2; i++) {\n                if (v < input[i + 1]) break\n            }\n        }\n\n        const progressInRange = progress(input[i], input[i + 1], v)\n\n        return mixers[i](progressInRange)\n    }\n\n    return isClamp\n        ? (v: number) =>\n              interpolator(clamp(input[0], input[inputLength - 1], v))\n        : interpolator\n}\n", "import { progress } from \"motion-utils\"\nimport { mixNumber } from \"../../../utils/mix/number\"\n\nexport function fillOffset(offset: number[], remaining: number): void {\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", "import { fillOffset } from \"./fill\"\n\nexport function defaultOffset(arr: any[]): number[] {\n    const offset = [0]\n    fillOffset(offset, arr.length - 1)\n    return offset\n}\n", "export function convertOffsetToTimes(offset: number[], duration: number) {\n    return offset.map((o) => o * duration)\n}\n", "import {\n    easeInOut,\n    easingDefinitionToFunction,\n    EasingFunction,\n    isEasingArray,\n} from \"motion-utils\"\nimport { interpolate } from \"../../utils/interpolate\"\nimport { defaultOffset } from \"../keyframes/offsets/default\"\nimport { convertOffsetToTimes } from \"../keyframes/offsets/time\"\nimport {\n    AnimationState,\n    AnyResolvedKeyframe,\n    KeyframeGenerator,\n    ValueAnimationOptions,\n} from \"../types\"\n\nexport function defaultEasing(\n    values: any[],\n    easing?: EasingFunction\n): EasingFunction[] {\n    return values.map(() => easing || easeInOut).splice(0, values.length - 1)\n}\n\nexport function keyframes<T extends AnyResolvedKeyframe>({\n    duration = 300,\n    keyframes: keyframeValues,\n    times,\n    ease = \"easeInOut\",\n}: ValueAnimationOptions<T>): KeyframeGenerator<T> {\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    /**\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: AnimationState<T> = {\n        done: false,\n        value: keyframeValues[0],\n    }\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),\n        duration\n    )\n\n    const mapTimeToKeyframe = interpolate<T>(absoluteTimes, keyframeValues, {\n        ease: Array.isArray(easingFunctions)\n            ? easingFunctions\n            : defaultEasing(keyframeValues, easingFunctions),\n    })\n\n    return {\n        calculatedDuration: duration,\n        next: (t: number) => {\n            state.value = mapTimeToKeyframe(t)\n            state.done = t >= duration\n            return state\n        },\n    }\n}\n", "import { AnimationPlaybackOptions } from \"../types\"\n\nconst isNotNull = (value: unknown) => value !== null\n\nexport function getFinalKeyframe<T>(\n    keyframes: T[],\n    { repeat, repeatType = \"loop\" }: AnimationPlaybackOptions,\n    finalKeyframe?: T,\n    speed: number = 1\n): T {\n    const resolvedKeyframes = keyframes.filter(isNotNull)\n    const useFirstKeyframe =\n        speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1)\n    const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1\n\n    return !index || finalKeyframe === undefined\n        ? resolvedKeyframes[index]\n        : finalKeyframe\n}\n", "import { inertia } from \"../generators/inertia\"\nimport { keyframes } from \"../generators/keyframes\"\nimport { spring } from \"../generators/spring\"\nimport { GeneratorFactory, ValueAnimationTransition } from \"../types\"\n\nconst transitionTypeMap: { [key: string]: GeneratorFactory } = {\n    decay: inertia,\n    inertia,\n    tween: keyframes,\n    keyframes: keyframes,\n    spring,\n}\n\nexport function replaceTransitionType(transition: ValueAnimationTransition) {\n    if (typeof transition.type === \"string\") {\n        transition.type = transitionTypeMap[transition.type]\n    }\n}\n", "export class WithPromise {\n    protected _finished: Promise<void>\n\n    resolve: VoidFunction\n\n    constructor() {\n        this.updateFinished()\n    }\n\n    get finished() {\n        return this._finished\n    }\n\n    protected updateFinished() {\n        this._finished = new Promise<void>((resolve) => {\n            this.resolve = resolve\n        })\n    }\n\n    protected notifyFinished() {\n        this.resolve()\n    }\n\n    /**\n     * Allows the animation to be awaited.\n     *\n     * @deprecated Use `finished` instead.\n     */\n    then(onResolve: VoidFunction, onReject?: VoidFunction) {\n        return this.finished.then(onResolve, onReject)\n    }\n}\n", "import {\n    clamp,\n    invariant,\n    millisecondsToSeconds,\n    pipe,\n    secondsToMilliseconds,\n} from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { activeAnimations } from \"../stats/animation-count\"\nimport { mix } from \"../utils/mix\"\nimport { Mixer } from \"../utils/mix/types\"\nimport { frameloopDriver } from \"./drivers/frame\"\nimport { DriverControls } from \"./drivers/types\"\nimport { inertia } from \"./generators/inertia\"\nimport { keyframes as keyframesGenerator } from \"./generators/keyframes\"\nimport { calcGeneratorDuration } from \"./generators/utils/calc-duration\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n    AnimationPlaybackControlsWithThen,\n    AnimationState,\n    GeneratorFactory,\n    KeyframeGenerator,\n    TimelineWithFallback,\n    ValueAnimationOptions,\n} from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { WithPromise } from \"./utils/WithPromise\"\n\nconst percentToProgress = (percent: number) => percent / 100\n\nexport class JSAnimation<T extends number | string>\n    extends WithPromise\n    implements AnimationPlaybackControlsWithThen\n{\n    state: AnimationPlayState = \"idle\"\n\n    startTime: number | null = null\n\n    /**\n     * The driver that's controlling the animation loop. Normally this is a requestAnimationFrame loop\n     * but in tests we can pass in a synchronous loop.\n     */\n    private driver?: DriverControls\n\n    private isStopped = false\n\n    private generator: KeyframeGenerator<T>\n\n    private calculatedDuration: number\n\n    private resolvedDuration: number\n\n    private totalDuration: number\n\n    private options: ValueAnimationOptions<T>\n\n    /**\n     * The current time of the animation.\n     */\n    private currentTime: number = 0\n\n    /**\n     * The time at which the animation was paused.\n     */\n    private holdTime: number | null = null\n\n    /**\n     * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n     */\n    private playbackSpeed = 1\n\n    /*\n     * If our generator doesn't support mixing numbers, we need to replace keyframes with\n     * [0, 100] and then make a function that maps that to the actual keyframes.\n     *\n     * 100 is chosen instead of 1 as it works nicer with spring animations.\n     */\n    private mixKeyframes: Mixer<T> | undefined\n\n    private mirroredGenerator: KeyframeGenerator<T> | undefined\n\n    constructor(options: ValueAnimationOptions<T>) {\n        super()\n        activeAnimations.mainThread++\n\n        this.options = options\n        this.initAnimation()\n        this.play()\n\n        if (options.autoplay === false) this.pause()\n    }\n\n    initAnimation() {\n        const { options } = this\n\n        replaceTransitionType(options)\n\n        const {\n            type = keyframesGenerator,\n            repeat = 0,\n            repeatDelay = 0,\n            repeatType,\n            velocity = 0,\n        } = options\n        let { keyframes } = options\n\n        const generatorFactory =\n            (type as GeneratorFactory) || keyframesGenerator\n\n        if (\n            process.env.NODE_ENV !== \"production\" &&\n            generatorFactory !== keyframesGenerator\n        ) {\n            invariant(\n                keyframes.length <= 2,\n                `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes}`,\n                \"spring-two-frames\"\n            )\n        }\n\n        if (\n            generatorFactory !== keyframesGenerator &&\n            typeof keyframes[0] !== \"number\"\n        ) {\n            this.mixKeyframes = pipe(\n                percentToProgress,\n                mix(keyframes[0], keyframes[1])\n            ) as (t: number) => T\n\n            keyframes = [0 as T, 100 as T]\n        }\n\n        const generator = generatorFactory({ ...options, keyframes })\n\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].reverse(),\n                velocity: -velocity,\n            })\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\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\n    updateTime(timestamp: number) {\n        const animationTime =\n            Math.round(timestamp - this.startTime!) * this.playbackSpeed\n\n        // Update currentTime\n        if (this.holdTime !== null) {\n            this.currentTime = this.holdTime\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\n    tick(timestamp: number, sample = false) {\n        const {\n            generator,\n            totalDuration,\n            mixKeyframes,\n            mirroredGenerator,\n            resolvedDuration,\n            calculatedDuration,\n        } = this\n\n        if (this.startTime === null) return generator.next(0)\n\n        const {\n            delay = 0,\n            keyframes,\n            repeat,\n            repeatType,\n            repeatDelay,\n            type,\n            onUpdate,\n            finalKeyframe,\n        } = this.options\n\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        } else if (this.speed < 0) {\n            this.startTime = Math.min(\n                timestamp - totalDuration / this.speed,\n                this.startTime\n            )\n        }\n\n        if (sample) {\n            this.currentTime = timestamp\n        } else {\n            this.updateTime(timestamp)\n        }\n\n        // Rebase on delay\n        const timeWithoutDelay =\n            this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1)\n        const isInDelayPhase =\n            this.playbackSpeed >= 0\n                ? timeWithoutDelay < 0\n                : timeWithoutDelay > totalDuration\n        this.currentTime = Math.max(timeWithoutDelay, 0)\n\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\n        let elapsed = this.currentTime\n        let frameGenerator = generator\n\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 =\n                Math.min(this.currentTime, totalDuration) / resolvedDuration\n\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            /**\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            /**\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\n            iterationProgress === 1 && currentIteration--\n\n            currentIteration = Math.min(currentIteration, repeat + 1)\n\n            /**\n             * Reverse progress if we're not running in \"normal\" direction\n             */\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                } else if (repeatType === \"mirror\") {\n                    frameGenerator = mirroredGenerator!\n                }\n            }\n\n            elapsed = clamp(0, 1, iterationProgress) * resolvedDuration\n        }\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\n        if (mixKeyframes) {\n            state.value = mixKeyframes(state.value as number)\n        }\n\n        let { done } = state\n\n        if (!isInDelayPhase && calculatedDuration !== null) {\n            done =\n                this.playbackSpeed >= 0\n                    ? this.currentTime >= totalDuration\n                    : this.currentTime <= 0\n        }\n\n        const isAnimationFinished =\n            this.holdTime === null &&\n            (this.state === \"finished\" || (this.state === \"running\" && done))\n\n        // TODO: The exception for inertia could be cleaner here\n        if (isAnimationFinished && type !== inertia) {\n            state.value = getFinalKeyframe(\n                keyframes,\n                this.options,\n                finalKeyframe,\n                this.speed\n            )\n        }\n\n        if (onUpdate) {\n            onUpdate(state.value)\n        }\n\n        if (isAnimationFinished) {\n            this.finish()\n        }\n\n        return state\n    }\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: VoidFunction, reject?: VoidFunction) {\n        return this.finished.then(resolve, reject)\n    }\n\n    get duration() {\n        return millisecondsToSeconds(this.calculatedDuration)\n    }\n\n    get iterationDuration() {\n        const { delay = 0 } = this.options || {}\n        return this.duration + millisecondsToSeconds(delay)\n    }\n\n    get time() {\n        return millisecondsToSeconds(this.currentTime)\n    }\n\n    set time(newTime: number) {\n        newTime = secondsToMilliseconds(newTime)\n        this.currentTime = newTime\n\n        if (\n            this.startTime === null ||\n            this.holdTime !== null ||\n            this.playbackSpeed === 0\n        ) {\n            this.holdTime = newTime\n        } else if (this.driver) {\n            this.startTime = this.driver.now() - newTime / this.playbackSpeed\n        }\n\n        this.driver?.start(false)\n    }\n\n    get speed() {\n        return this.playbackSpeed\n    }\n\n    set speed(newSpeed: number) {\n        this.updateTime(time.now())\n        const hasChanged = this.playbackSpeed !== newSpeed\n        this.playbackSpeed = newSpeed\n\n        if (hasChanged) {\n            this.time = millisecondsToSeconds(this.currentTime)\n        }\n    }\n\n    play() {\n        if (this.isStopped) return\n\n        const { driver = frameloopDriver, startTime } = this.options\n\n        if (!this.driver) {\n            this.driver = driver((timestamp) => this.tick(timestamp))\n        }\n\n        this.options.onPlay?.()\n\n        const now = this.driver.now()\n\n        if (this.state === \"finished\") {\n            this.updateFinished()\n            this.startTime = now\n        } else if (this.holdTime !== null) {\n            this.startTime = now - this.holdTime\n        } else if (!this.startTime) {\n            this.startTime = startTime ?? now\n        }\n\n        if (this.state === \"finished\" && this.speed < 0) {\n            this.startTime += this.calculatedDuration\n        }\n\n        this.holdTime = null\n\n        /**\n         * Set playState to running only after we've used it in\n         * the previous logic.\n         */\n        this.state = \"running\"\n\n        this.driver.start()\n    }\n\n    pause() {\n        this.state = \"paused\"\n        this.updateTime(time.now())\n        this.holdTime = this.currentTime\n    }\n\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    stop = () => {\n        const { motionValue } = this.options\n        if (motionValue && motionValue.updatedAt !== time.now()) {\n            this.tick(time.now())\n        }\n\n        this.isStopped = true\n        if (this.state === \"idle\") return\n        this.teardown()\n        this.options.onStop?.()\n    }\n\n    complete() {\n        if (this.state !== \"running\") {\n            this.play()\n        }\n\n        this.state = \"finished\"\n        this.holdTime = null\n    }\n\n    finish() {\n        this.notifyFinished()\n        this.teardown()\n        this.state = \"finished\"\n\n        this.options.onComplete?.()\n    }\n\n    cancel() {\n        this.holdTime = null\n        this.startTime = 0\n        this.tick(0)\n        this.teardown()\n        this.options.onCancel?.()\n    }\n\n    private teardown() {\n        this.state = \"idle\"\n        this.stopDriver()\n        this.startTime = this.holdTime = null\n        activeAnimations.mainThread--\n    }\n\n    private stopDriver() {\n        if (!this.driver) return\n        this.driver.stop()\n        this.driver = undefined\n    }\n\n    sample(sampleTime: number): AnimationState<T> {\n        this.startTime = 0\n        return this.tick(sampleTime, true)\n    }\n\n    attachTimeline(timeline: TimelineWithFallback): VoidFunction {\n        if (this.options.allowFlatten) {\n            this.options.type = \"keyframes\"\n            this.options.ease = \"linear\"\n            this.initAnimation()\n        }\n\n        this.driver?.stop()\n        return timeline.observe(this)\n    }\n}\n\n// Legacy function support\nexport function animateValue<T extends number | string>(\n    options: ValueAnimationOptions<T>\n) {\n    return new JSAnimation(options)\n}\n", "import { UnresolvedValueKeyframe, ValueKeyframe } from \"../../types\"\n\nexport function fillWildcards(\n    keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[]\n) {\n    for (let i = 1; i < keyframes.length; i++) {\n        keyframes[i] ??= keyframes[i - 1]\n    }\n}\n", "import { transformPropOrder } from \"../utils/keys-transform\"\n\nconst radToDeg = (rad: number) => (rad * 180) / Math.PI\n\ntype MatrixParser = (values: number[]) => number\n\ntype MatrixParsers = Record<\n    (typeof transformPropOrder)[number],\n    number | MatrixParser\n>\n\nconst rotate = (v: number[]) => {\n    const angle = radToDeg(Math.atan2(v[1], v[0]))\n    return rebaseAngle(angle)\n}\n\nconst matrix2dParsers: MatrixParsers = {\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} as const\n\nconst rebaseAngle = (angle: number) => {\n    angle = angle % 360\n    if (angle < 0) angle += 360\n    return angle\n}\n\nconst rotateZ = rotate\n\nconst scaleX = (v: number[]) => Math.sqrt(v[0] * v[0] + v[1] * v[1])\nconst scaleY = (v: number[]) => Math.sqrt(v[4] * v[4] + v[5] * v[5])\n\nconst matrix3dParsers: MatrixParsers = {\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} as const\n\nexport function defaultTransformValue(name: string): number {\n    return name.includes(\"scale\") ? 1 : 0\n}\n\nexport function parseValueFromTransform(\n    transform: string | undefined,\n    name: string\n): number {\n    if (!transform || transform === \"none\") {\n        return defaultTransformValue(name)\n    }\n\n    const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u)\n\n    let parsers: MatrixParsers\n    let match: RegExpMatchArray | null\n\n    if (matrix3dMatch) {\n        parsers = matrix3dParsers\n        match = matrix3dMatch\n    } else {\n        const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u)\n\n        parsers = matrix2dParsers\n        match = matrix2dMatch\n    }\n\n    if (!match) {\n        return defaultTransformValue(name)\n    }\n\n    const valueParser = parsers[name]\n    const values = match[1].split(\",\").map(convertTransformToNumber)\n\n    return typeof valueParser === \"function\"\n        ? valueParser(values)\n        : values[valueParser]\n}\n\nexport const readTransformValue = (instance: HTMLElement, name: string) => {\n    const { transform = \"none\" } = getComputedStyle(instance)\n    return parseValueFromTransform(transform, name)\n}\n\nfunction convertTransformToNumber(value: string): number {\n    return parseFloat(value.trim())\n}\n", "/**\n * Generate a list of every possible transform key.\n */\nexport const 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/**\n * A quick lookup for transform props.\n */\nexport const transformProps = /*@__PURE__*/ (() =>\n    new Set(transformPropOrder))()\n", "import type { Box } from \"motion-utils\"\nimport { parseValueFromTransform } from \"../../../render/dom/parse-transform\"\nimport { transformPropOrder } from \"../../../render/utils/keys-transform\"\nimport { MotionValue } from \"../../../value\"\nimport { number } from \"../../../value/types/numbers\"\nimport { px } from \"../../../value/types/numbers/units\"\nimport { ValueType } from \"../../../value/types/types\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { WithRender } from \"../types\"\n\nexport const isNumOrPxType = (v?: ValueType): v is ValueType =>\n    v === number || v === px\n\ntype GetActualMeasurementInPixels = (\n    bbox: Box,\n    computedStyle: Partial<CSSStyleDeclaration>\n) => number\n\nconst transformKeys = new Set([\"x\", \"y\", \"z\"])\nconst nonTranslationalTransformKeys = transformPropOrder.filter(\n    (key) => !transformKeys.has(key)\n)\n\ntype RemovedTransforms = [string, AnyResolvedKeyframe][]\nexport function removeNonTranslationalTransform(visualElement: WithRender) {\n    const removedTransforms: RemovedTransforms = []\n\n    nonTranslationalTransformKeys.forEach((key) => {\n        const value: MotionValue<AnyResolvedKeyframe> | undefined =\n            visualElement.getValue(key)\n        if (value !== undefined) {\n            removedTransforms.push([key, value.get()])\n            value.set(key.startsWith(\"scale\") ? 1 : 0)\n        }\n    })\n\n    return removedTransforms\n}\n\nexport const positionalValues: { [key: string]: GetActualMeasurementInPixels } =\n    {\n        // Dimensions\n        width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) =>\n            x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n        height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) =>\n            y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n\n        top: (_bbox, { top }) => parseFloat(top as string),\n        left: (_bbox, { left }) => parseFloat(left as string),\n        bottom: ({ y }, { top }) => parseFloat(top as string) + (y.max - y.min),\n        right: ({ x }, { left }) =>\n            parseFloat(left as string) + (x.max - x.min),\n\n        // Transform\n        x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n        y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n    }\n\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x\npositionalValues.translateY = positionalValues.y\n", "import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { WithRender } from \"./types\"\nimport { fillWildcards } from \"./utils/fill-wildcards\"\nimport { removeNonTranslationalTransform } from \"./utils/unit-conversion\"\n\nexport type UnresolvedKeyframes<T extends AnyResolvedKeyframe> = Array<T | null>\n\nexport type ResolvedKeyframes<T extends AnyResolvedKeyframe> = Array<T>\n\nconst toResolve = new Set<KeyframeResolver>()\nlet isScheduled = false\nlet anyNeedsMeasurement = false\nlet isForced = false\n\nfunction measureAllKeyframes() {\n    if (anyNeedsMeasurement) {\n        const resolversToMeasure = Array.from(toResolve).filter(\n            (resolver: KeyframeResolver) => resolver.needsMeasurement\n        )\n        const elementsToMeasure = new Set(\n            resolversToMeasure.map((resolver) => resolver.element)\n        )\n        const transformsToRestore = new Map<\n            WithRender,\n            [string, AnyResolvedKeyframe][]\n        >()\n\n        /**\n         * Write pass\n         * If we're measuring elements we want to remove bounding box-changing transforms.\n         */\n        elementsToMeasure.forEach((element: WithRender) => {\n            const removedTransforms = removeNonTranslationalTransform(\n                element as any\n            )\n\n            if (!removedTransforms.length) return\n\n            transformsToRestore.set(element, removedTransforms)\n\n            element.render()\n        })\n\n        // Read\n        resolversToMeasure.forEach((resolver) => resolver.measureInitialState())\n\n        // Write\n        elementsToMeasure.forEach((element: WithRender) => {\n            element.render()\n\n            const restore = transformsToRestore.get(element)\n            if (restore) {\n                restore.forEach(([key, value]) => {\n                    element.getValue(key)?.set(value)\n                })\n            }\n        })\n\n        // Read\n        resolversToMeasure.forEach((resolver) => resolver.measureEndState())\n\n        // Write\n        resolversToMeasure.forEach((resolver) => {\n            if (resolver.suspendedScrollY !== undefined) {\n                window.scrollTo(0, resolver.suspendedScrollY)\n            }\n        })\n    }\n\n    anyNeedsMeasurement = false\n    isScheduled = false\n\n    toResolve.forEach((resolver) => resolver.complete(isForced))\n    toResolve.clear()\n}\n\nfunction readAllKeyframes() {\n    toResolve.forEach((resolver) => {\n        resolver.readKeyframes()\n\n        if (resolver.needsMeasurement) {\n            anyNeedsMeasurement = true\n        }\n    })\n}\n\nexport function flushKeyframeResolvers() {\n    isForced = true\n    readAllKeyframes()\n    measureAllKeyframes()\n    isForced = false\n}\n\nexport type OnKeyframesResolved<T extends AnyResolvedKeyframe> = (\n    resolvedKeyframes: ResolvedKeyframes<T>,\n    finalKeyframe: T,\n    forced: boolean\n) => void\n\nexport class KeyframeResolver<T extends AnyResolvedKeyframe = any> {\n    name?: string\n    element?: WithRender\n    finalKeyframe?: T\n    suspendedScrollY?: number\n\n    protected unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>\n\n    private motionValue?: MotionValue<T>\n    private onComplete: OnKeyframesResolved<T>\n\n    state: \"pending\" | \"scheduled\" | \"complete\" = \"pending\"\n\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    private isAsync = false\n\n    /**\n     * Track whether this resolver needs to perform a measurement\n     * to resolve its keyframes.\n     */\n    needsMeasurement = false\n\n    constructor(\n        unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>,\n        onComplete: OnKeyframesResolved<T>,\n        name?: string,\n        motionValue?: MotionValue<T>,\n        element?: WithRender,\n        isAsync = false\n    ) {\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\n    scheduleResolve() {\n        this.state = \"scheduled\"\n\n        if (this.isAsync) {\n            toResolve.add(this)\n\n            if (!isScheduled) {\n                isScheduled = true\n                frame.read(readAllKeyframes)\n                frame.resolveKeyframes(measureAllKeyframes)\n            }\n        } else {\n            this.readKeyframes()\n            this.complete()\n        }\n    }\n\n    readKeyframes() {\n        const { unresolvedKeyframes, name, element, motionValue } = this\n\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\n            // TODO: This doesn't work if the final keyframe is a wildcard\n            const finalKeyframe =\n                unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n            if (currentValue !== undefined) {\n                unresolvedKeyframes[0] = currentValue\n            } else if (element && name) {\n                const valueAsRead = element.readValue(name, finalKeyframe)\n\n                if (valueAsRead !== undefined && valueAsRead !== null) {\n                    unresolvedKeyframes[0] = valueAsRead\n                }\n            }\n\n            if (unresolvedKeyframes[0] === undefined) {\n                unresolvedKeyframes[0] = finalKeyframe\n            }\n\n            if (motionValue && currentValue === undefined) {\n                motionValue.set(unresolvedKeyframes[0] as T)\n            }\n        }\n\n        fillWildcards(unresolvedKeyframes)\n    }\n\n    setFinalKeyframe() {}\n    measureInitialState() {}\n    renderEndStyles() {}\n    measureEndState() {}\n\n    complete(isForcedComplete = false) {\n        this.state = \"complete\"\n\n        this.onComplete(\n            this.unresolvedKeyframes as ResolvedKeyframes<T>,\n            this.finalKeyframe as T,\n            isForcedComplete\n        )\n\n        toResolve.delete(this)\n    }\n\n    cancel() {\n        if (this.state === \"scheduled\") {\n            toResolve.delete(this)\n            this.state = \"pending\"\n        }\n    }\n\n    resume() {\n        if (this.state === \"pending\") this.scheduleResolve()\n    }\n}\n", "export const isCSSVar = (name: string) => name.startsWith(\"--\")\n", "import { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVar } from \"./is-css-var\"\n\nexport function setStyle(\n    element: HTMLElement | SVGElement,\n    name: string,\n    value: AnyResolvedKeyframe\n) {\n    isCSSVar(name)\n        ? element.style.setProperty(name, value as string)\n        : (element.style[name as any] = value as string)\n}\n", "/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nexport const supportsFlags: Record<string, boolean | undefined> = {}\n", "import { memo } from \"motion-utils\"\nimport { supportsFlags } from \"./flags\"\n\nexport function memoSupports<T extends any>(\n    callback: () => T,\n    supportsFlag: keyof typeof supportsFlags\n) {\n    const memoized = memo(callback)\n    return () => supportsFlags[supportsFlag] ?? memoized()\n}\n", "import { ProgressTimeline } from \"../..\"\nimport { memoSupports } from \"./memo\"\n\ndeclare global {\n    interface Window {\n        ScrollTimeline: ScrollTimeline\n    }\n}\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n    constructor(options: ScrollOptions)\n\n    currentTime: null | { value: number }\n\n    cancel?: VoidFunction\n}\n\nexport const supportsScrollTimeline = /* @__PURE__ */ memoSupports(\n    () => window.ScrollTimeline !== undefined,\n    \"scrollTimeline\"\n)\n", "import { memoSupports } from \"./memo\"\n\nexport const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n    try {\n        document\n            .createElement(\"div\")\n            .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" })\n    } catch (e) {\n        return false\n    }\n    return true\n}, \"linearEasing\")\n", "import { BezierDefinition } from \"motion-utils\"\n\nexport const cubicBezierAsString = ([a, b, c, d]: BezierDefinition) =>\n    `cubic-bezier(${a}, ${b}, ${c}, ${d})`\n", "import { cubicBezierAsString } from \"./cubic-bezier\"\n\nexport const 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", "import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { generateLinearEasing } from \"../utils/linear\"\nimport { cubicBezierAsString } from \"./cubic-bezier\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function mapEasingToNativeEasing(\n    easing: Easing | Easing[] | undefined,\n    duration: number\n): undefined | string | string[] {\n    if (!easing) {\n        return undefined\n    } else if (typeof easing === \"function\") {\n        return supportsLinearEasing()\n            ? generateLinearEasing(easing, duration)\n            : \"ease-out\"\n    } else if (isBezierDefinition(easing)) {\n        return cubicBezierAsString(easing)\n    } else if (Array.isArray(easing)) {\n        return easing.map(\n            (segmentEasing) =>\n                (mapEasingToNativeEasing(segmentEasing, duration) as string) ||\n                supportedWaapiEasing.easeOut\n        )\n    } else {\n        return supportedWaapiEasing[easing as keyof typeof supportedWaapiEasing]\n    }\n}\n", "import { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { ValueKeyframesDefinition, ValueTransition } from \"../types\"\nimport { mapEasingToNativeEasing } from \"./easing/map-easing\"\n\nexport function startWaapiAnimation(\n    element: Element,\n    valueName: string,\n    keyframes: ValueKeyframesDefinition,\n    {\n        delay = 0,\n        duration = 300,\n        repeat = 0,\n        repeatType = \"loop\",\n        ease = \"easeOut\",\n        times,\n    }: ValueTransition = {},\n    pseudoElement: string | undefined = undefined\n) {\n    const keyframeOptions: PropertyIndexedKeyframes = {\n        [valueName]: keyframes as string[],\n    }\n    if (times) keyframeOptions.offset = times\n\n    const easing = mapEasingToNativeEasing(ease, duration)\n\n    /**\n     * If this is an easing array, apply to keyframes, not animation as a whole\n     */\n    if (Array.isArray(easing)) keyframeOptions.easing = easing\n\n    if (statsBuffer.value) {\n        activeAnimations.waapi++\n    }\n\n    const options: KeyframeAnimationOptions = {\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\n    if (pseudoElement) options.pseudoElement = pseudoElement\n\n    const animation = element.animate(keyframeOptions, options)\n\n    if (statsBuffer.value) {\n        animation.finished.finally(() => {\n            activeAnimations.waapi--\n        })\n    }\n\n    return animation\n}\n", "import { AnimationGeneratorType, GeneratorFactory } from \"../../types\"\n\nexport function isGenerator(\n    type?: AnimationGeneratorType\n): type is GeneratorFactory {\n    return typeof type === \"function\" && \"applyToOptions\" in type\n}\n", "import { ValueTransition } from \"../../../animation/types\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { isGenerator } from \"../../generators/utils/is-generator\"\n\nexport function applyGeneratorOptions({\n    type,\n    ...options\n}: ValueTransition): ValueTransition {\n    if (isGenerator(type) && supportsLinearEasing()) {\n        return type.applyToOptions!(options)\n    } else {\n        options.duration ??= 300\n        options.ease ??= \"easeOut\"\n    }\n\n    return options\n}\n", "import {\n    invariant,\n    millisecondsToSeconds,\n    noop,\n    secondsToMilliseconds,\n} from \"motion-utils\"\nimport { setStyle } from \"../render/dom/style-set\"\nimport { supportsScrollTimeline } from \"../utils/supports/scroll-timeline\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n    AnimationPlaybackControlsWithThen,\n    AnyResolvedKeyframe,\n    DOMValueAnimationOptions,\n    TimelineWithFallback,\n} from \"./types\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { startWaapiAnimation } from \"./waapi/start-waapi-animation\"\nimport { applyGeneratorOptions } from \"./waapi/utils/apply-generator\"\n\nexport interface NativeAnimationOptions<V extends AnyResolvedKeyframe = number>\n    extends DOMValueAnimationOptions<V> {\n    pseudoElement?: string\n    startTime?: number\n}\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nexport class NativeAnimation<T extends AnyResolvedKeyframe>\n    extends WithPromise\n    implements AnimationPlaybackControlsWithThen\n{\n    /**\n     * The interfaced Web Animation API animation\n     */\n    protected animation: Animation\n\n    protected finishedTime: number | null = null\n\n    protected options: NativeAnimationOptions\n\n    private allowFlatten: boolean\n\n    private isStopped = false\n\n    private isPseudoElement: boolean\n\n    /**\n     * Tracks a manually-set start time that takes precedence over WAAPI's\n     * dynamic startTime. This is cleared when play() or time setter is called,\n     * allowing WAAPI to take over timing.\n     */\n    protected manualStartTime: number | null = null\n\n    constructor(options?: NativeAnimationOptions) {\n        super()\n\n        if (!options) return\n\n        const {\n            element,\n            name,\n            keyframes,\n            pseudoElement,\n            allowFlatten = false,\n            finalKeyframe,\n            onComplete,\n        } = options as any\n\n        this.isPseudoElement = Boolean(pseudoElement)\n\n        this.allowFlatten = allowFlatten\n        this.options = options\n\n        invariant(\n            typeof options.type !== \"string\",\n            `Mini animate() doesn't support \"type\" as a string.`,\n            \"mini-spring\"\n        )\n\n        const transition = applyGeneratorOptions(options)\n\n        this.animation = startWaapiAnimation(\n            element,\n            name,\n            keyframes,\n            transition,\n            pseudoElement\n        )\n\n        if (transition.autoplay === false) {\n            this.animation.pause()\n        }\n\n        this.animation.onfinish = () => {\n            this.finishedTime = this.time\n\n            if (!pseudoElement) {\n                const keyframe = getFinalKeyframe(\n                    keyframes as any,\n                    this.options as any,\n                    finalKeyframe,\n                    this.speed\n                )\n                if (this.updateMotionValue) {\n                    this.updateMotionValue(keyframe)\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\n                this.animation.cancel()\n            }\n\n            onComplete?.()\n            this.notifyFinished()\n        }\n    }\n\n    updateMotionValue?(value?: T): void\n\n    play() {\n        if (this.isStopped) return\n\n        this.manualStartTime = null\n        this.animation.play()\n\n        if (this.state === \"finished\") {\n            this.updateFinished()\n        }\n    }\n\n    pause() {\n        this.animation.pause()\n    }\n\n    complete() {\n        this.animation.finish?.()\n    }\n\n    cancel() {\n        try {\n            this.animation.cancel()\n        } catch (e) {}\n    }\n\n    stop() {\n        if (this.isStopped) return\n        this.isStopped = true\n        const { state } = this\n\n        if (state === \"idle\" || state === \"finished\") {\n            return\n        }\n\n        if (this.updateMotionValue) {\n            this.updateMotionValue()\n        } else {\n            this.commitStyles()\n        }\n\n        if (!this.isPseudoElement) this.cancel()\n    }\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    protected commitStyles() {\n        const element = this.options?.element\n        if (!this.isPseudoElement && element?.isConnected) {\n            this.animation.commitStyles?.()\n        }\n    }\n\n    get duration() {\n        const duration =\n            this.animation.effect?.getComputedTiming?.().duration || 0\n\n        return millisecondsToSeconds(Number(duration))\n    }\n\n    get iterationDuration() {\n        const { delay = 0 } = this.options || {}\n        return this.duration + millisecondsToSeconds(delay)\n    }\n\n    get time() {\n        return millisecondsToSeconds(Number(this.animation.currentTime) || 0)\n    }\n\n    set time(newTime: number) {\n        this.manualStartTime = null\n        this.finishedTime = null\n        this.animation.currentTime = secondsToMilliseconds(newTime)\n    }\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\n    set speed(newSpeed: number) {\n        // Allow backwards playback after finishing\n        if (newSpeed < 0) this.finishedTime = null\n\n        this.animation.playbackRate = newSpeed\n    }\n\n    get state() {\n        return this.finishedTime !== null\n            ? \"finished\"\n            : this.animation.playState\n    }\n\n    get startTime() {\n        return this.manualStartTime ?? Number(this.animation.startTime)\n    }\n\n    set startTime(newStartTime: number) {\n        this.manualStartTime = this.animation.startTime = newStartTime\n    }\n\n    /**\n     * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n     */\n    attachTimeline({ timeline, observe }: TimelineWithFallback): VoidFunction {\n        if (this.allowFlatten) {\n            this.animation.effect?.updateTiming({ easing: \"linear\" })\n        }\n\n        this.animation.onfinish = null\n\n        if (timeline && supportsScrollTimeline()) {\n            this.animation.timeline = timeline as any\n\n            return noop<void>\n        } else {\n            return observe(this)\n        }\n    }\n}\n", "import { anticipate, backInOut, circInOut } from \"motion-utils\"\nimport { ValueAnimationTransition } from \"../../types\"\n\nconst unsupportedEasingFunctions = {\n    anticipate,\n    backInOut,\n    circInOut,\n}\n\nfunction isUnsupportedEase(\n    key: string\n): key is keyof typeof unsupportedEasingFunctions {\n    return key in unsupportedEasingFunctions\n}\n\nexport function replaceStringEasing(transition: ValueAnimationTransition) {\n    if (\n        typeof transition.ease === \"string\" &&\n        isUnsupportedEase(transition.ease)\n    ) {\n        transition.ease = unsupportedEasingFunctions[transition.ease]\n    }\n}\n", "import { clamp } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { NativeAnimation, NativeAnimationOptions } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe, ValueAnimationOptions } from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { replaceStringEasing } from \"./waapi/utils/unsupported-easing\"\n\nexport type NativeAnimationOptionsExtended<T extends AnyResolvedKeyframe> =\n    NativeAnimationOptions & ValueAnimationOptions<T> & NativeAnimationOptions\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\n\nexport class NativeAnimationExtended<\n    T extends AnyResolvedKeyframe\n> extends NativeAnimation<T> {\n    options: NativeAnimationOptionsExtended<T>\n\n    constructor(options: NativeAnimationOptionsExtended<T>) {\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        /**\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\n        super(options)\n\n        if (options.startTime !== undefined) {\n            this.startTime = options.startTime\n        }\n\n        this.options = options\n    }\n\n    /**\n     * WAAPI doesn't natively have any interruption capabilities.\n     *\n     * Rather than read committed 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?: T) {\n        const { motionValue, onUpdate, onComplete, element, ...options } =\n            this.options\n\n        if (!motionValue) return\n\n        if (value !== undefined) {\n            motionValue.set(value)\n            return\n        }\n\n        const sampleAnimation = new JSAnimation({\n            ...options,\n            autoplay: false,\n        })\n\n        /**\n         * Use wall-clock elapsed time for sampling.\n         * Under CPU load, WAAPI's currentTime may not reflect actual\n         * elapsed time, causing incorrect sampling and visual jumps.\n         */\n        const sampleTime = Math.max(sampleDelta, time.now() - this.startTime)\n        const delta = clamp(0, sampleDelta, sampleTime - sampleDelta)\n\n        motionValue.setWithVelocity(\n            sampleAnimation.sample(Math.max(0, sampleTime - delta)).value,\n            sampleAnimation.sample(sampleTime).value,\n            delta\n        )\n\n        sampleAnimation.stop()\n    }\n}\n", "import { complex } from \"../../value/types/complex\"\nimport { ValueKeyframesDefinition } from \"../types\"\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 */\nexport const isAnimatable = (\n    value: ValueKeyframesDefinition,\n    name?: string\n) => {\n    // If the list of keys that might be non-animatable grows, replace with Set\n    if (name === \"zIndex\") return false\n\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)) return true\n\n    if (\n        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\n    return false\n}\n", "import { warning } from \"motion-utils\"\nimport { isGenerator } from \"../generators/utils/is-generator\"\nimport { ResolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { AnimationGeneratorType } from \"../types\"\nimport { isAnimatable } from \"./is-animatable\"\n\nfunction hasKeyframesChanged(keyframes: ResolvedKeyframes<any>) {\n    const current = keyframes[0]\n    if (keyframes.length === 1) return true\n    for (let i = 0; i < keyframes.length; i++) {\n        if (keyframes[i] !== current) return true\n    }\n}\n\nexport function canAnimate(\n    keyframes: ResolvedKeyframes<any>,\n    name?: string,\n    type?: AnimationGeneratorType,\n    velocity?: number\n) {\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\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\") return true\n\n    const targetKeyframe = keyframes[keyframes.length - 1]\n    const isOriginAnimatable = isAnimatable(originKeyframe, name)\n    const isTargetAnimatable = isAnimatable(targetKeyframe, name)\n\n    warning(\n        isOriginAnimatable === isTargetAnimatable,\n        `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${\n            isOriginAnimatable ? targetKeyframe : originKeyframe\n        }\" is not an animatable value.`,\n        \"value-not-animatable\"\n    )\n\n    // Always skip if any of these are true\n    if (!isOriginAnimatable || !isTargetAnimatable) {\n        return false\n    }\n\n    return (\n        hasKeyframesChanged(keyframes) ||\n        ((type === \"spring\" || isGenerator(type)) && velocity)\n    )\n}\n", "import { ValueAnimationOptions } from \"../types\"\n\nexport function makeAnimationInstant(\n    options: Partial<{\n        duration: ValueAnimationOptions[\"duration\"]\n        type: ValueAnimationOptions[\"type\"]\n    }>\n): void {\n    options.duration = 0\n    options.type = \"keyframes\"\n}\n", "import { memo } from \"motion-utils\"\nimport {\n    AnyResolvedKeyframe,\n    ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\n\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set<string>([\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])\n\nconst supportsWaapi = /*@__PURE__*/ memo(() =>\n    Object.hasOwnProperty.call(Element.prototype, \"animate\")\n)\n\nexport function supportsBrowserAnimation<T extends AnyResolvedKeyframe>(\n    options: ValueAnimationOptionsWithRenderContext<T>\n) {\n    const { motionValue, name, repeatDelay, repeatType, damping, type } =\n        options\n\n    const subject = motionValue?.owner?.current\n\n    /**\n     * We use this check instead of isHTMLElement() because we explicitly\n     * **don't** want elements in different timing contexts (i.e. popups)\n     * to be accelerated, as it's not possible to sync these animations\n     * properly with those driven from the main window frameloop.\n     */\n    if (!(subject instanceof HTMLElement)) {\n        return false\n    }\n\n    const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n    return (\n        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}\n", "import { MotionGlobalConfig, noop } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n    KeyframeResolver as DefaultKeyframeResolver,\n    flushKeyframeResolvers,\n    ResolvedKeyframes,\n} from \"./keyframes/KeyframesResolver\"\nimport { NativeAnimationExtended } from \"./NativeAnimationExtended\"\nimport {\n    AnimationPlaybackControls,\n    AnyResolvedKeyframe,\n    TimelineWithFallback,\n    ValueAnimationOptions,\n} from \"./types\"\nimport { canAnimate } from \"./utils/can-animate\"\nimport { makeAnimationInstant } from \"./utils/make-animation-instant\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { supportsBrowserAnimation } from \"./waapi/supports/waapi\"\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\n\ntype OptionsWithoutKeyframes<T extends AnyResolvedKeyframe> = Omit<\n    ValueAnimationOptions<T>,\n    \"keyframes\"\n>\n\nexport class AsyncMotionValueAnimation<T extends AnyResolvedKeyframe>\n    extends WithPromise\n    implements AnimationPlaybackControls\n{\n    private createdAt: number\n\n    private resolvedAt: number | undefined\n\n    private _animation: AnimationPlaybackControls | undefined\n\n    private pendingTimeline: TimelineWithFallback | undefined\n\n    private keyframeResolver: DefaultKeyframeResolver | undefined\n\n    private stopTimeline: VoidFunction | undefined\n\n    constructor({\n        autoplay = true,\n        delay = 0,\n        type = \"keyframes\",\n        repeat = 0,\n        repeatDelay = 0,\n        repeatType = \"loop\",\n        keyframes,\n        name,\n        motionValue,\n        element,\n        ...options\n    }: ValueAnimationOptions<T>) {\n        super()\n\n        this.createdAt = time.now()\n\n        const optionsWithDefaults: OptionsWithoutKeyframes<T> = {\n            autoplay,\n            delay,\n            type,\n            repeat,\n            repeatDelay,\n            repeatType,\n            name,\n            motionValue,\n            element,\n            ...options,\n        }\n\n        const KeyframeResolver =\n            element?.KeyframeResolver || DefaultKeyframeResolver\n\n        this.keyframeResolver = new KeyframeResolver(\n            keyframes,\n            (\n                resolvedKeyframes: ResolvedKeyframes<T>,\n                finalKeyframe: T,\n                forced: boolean\n            ) =>\n                this.onKeyframesResolved(\n                    resolvedKeyframes,\n                    finalKeyframe,\n                    optionsWithDefaults,\n                    !forced\n                ),\n            name,\n            motionValue,\n            element\n        )\n        this.keyframeResolver?.scheduleResolve()\n    }\n\n    onKeyframesResolved(\n        keyframes: ResolvedKeyframes<T>,\n        finalKeyframe: T,\n        options: OptionsWithoutKeyframes<T>,\n        sync: boolean\n    ) {\n        this.keyframeResolver = undefined\n\n        const { name, type, velocity, delay, isHandoff, onUpdate } = options\n        this.resolvedAt = time.now()\n\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\n            keyframes[0] = keyframes[keyframes.length - 1]\n\n            makeAnimationInstant(options)\n            options.repeat = 0\n        }\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 committed 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\n        const resolvedOptions = {\n            startTime,\n            finalKeyframe,\n            ...options,\n            keyframes,\n        }\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 useWaapi = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n        const element = resolvedOptions.motionValue?.owner?.current\n\n        const animation = useWaapi\n                ? new NativeAnimationExtended({\n                      ...resolvedOptions,\n                      element,\n                  } as any)\n                : new JSAnimation(resolvedOptions)\n\n        animation.finished.then(() => {\n            this.notifyFinished()\n        }).catch(noop)\n\n        if (this.pendingTimeline) {\n            this.stopTimeline = animation.attachTimeline(this.pendingTimeline)\n            this.pendingTimeline = undefined\n        }\n\n        this._animation = animation\n    }\n\n    get finished() {\n        if (!this._animation) {\n            return this._finished\n        } else {\n            return this.animation.finished\n        }\n    }\n\n    then(onResolve: VoidFunction, _onReject?: VoidFunction) {\n        return this.finished.finally(onResolve).then(() => {})\n    }\n\n    get animation(): AnimationPlaybackControls {\n        if (!this._animation) {\n            this.keyframeResolver?.resume()\n            flushKeyframeResolvers()\n        }\n\n        return this._animation!\n    }\n\n    get duration() {\n        return this.animation.duration\n    }\n\n    get iterationDuration() {\n        return this.animation.iterationDuration\n    }\n\n    get time() {\n        return this.animation.time\n    }\n\n    set time(newTime: number) {\n        this.animation.time = newTime\n    }\n\n    get speed() {\n        return this.animation.speed\n    }\n\n    get state() {\n        return this.animation.state\n    }\n\n    set speed(newSpeed: number) {\n        this.animation.speed = newSpeed\n    }\n\n    get startTime() {\n        return this.animation.startTime\n    }\n\n    attachTimeline(timeline: TimelineWithFallback) {\n        if (this._animation) {\n            this.stopTimeline = this.animation.attachTimeline(timeline)\n        } else {\n            this.pendingTimeline = timeline\n        }\n\n        return () => this.stop()\n    }\n\n    play() {\n        this.animation.play()\n    }\n\n    pause() {\n        this.animation.pause()\n    }\n\n    complete() {\n        this.animation.complete()\n    }\n\n    cancel() {\n        if (this._animation) {\n            this.animation.cancel()\n        }\n\n        this.keyframeResolver?.cancel()\n    }\n\n    /**\n     * Bound to support return animation.stop pattern\n     */\n    stop = () => {\n        if (this._animation) {\n            this._animation.stop()\n            this.stopTimeline?.()\n        }\n\n        this.keyframeResolver?.cancel()\n    }\n}\n", "import type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function calcChildStagger(\n    children: Set<VisualElement>,\n    child: VisualElement,\n    delayChildren?: number | DynamicOption<number>,\n    staggerChildren: number = 0,\n    staggerDirection: number = 1\n): number {\n    const index = Array.from(children)\n        .sort((a, b) => a.sortNodePosition(b))\n        .indexOf(child)\n    const numChildren = children.size\n    const maxStaggerDuration = (numChildren - 1) * staggerChildren\n    const delayIsFunction = typeof delayChildren === \"function\"\n\n    return delayIsFunction\n        ? delayChildren(index, numChildren)\n        : staggerDirection === 1\n        ? index * staggerChildren\n        : maxStaggerDuration - index * staggerChildren\n}\n", "import { invariant, isNumericalString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { CSSVariableToken, isCSSVariableToken } from \"./is-css-variable\"\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 */\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\nexport function parseCSSVariable(current: string) {\n    const match = splitCSSVariableRegex.exec(current)\n    if (!match) return [,]\n\n    const [, token1, token2, fallback] = match\n    return [`--${token1 ?? token2}`, fallback]\n}\n\nconst maxDepth = 4\nexport function getVariableValue(\n    current: CSSVariableToken,\n    element: Element,\n    depth = 1\n): AnyResolvedKeyframe | undefined {\n    invariant(\n        depth <= maxDepth,\n        `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`,\n        \"max-css-var-depth\"\n    )\n\n    const [token, fallback] = parseCSSVariable(current)\n\n    // No CSS variable detected\n    if (!token) return\n\n    // Attempt to read this CSS variable off the element\n    const resolved = window.getComputedStyle(element).getPropertyValue(token)\n\n    if (resolved) {\n        const trimmed = resolved.trim()\n        return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed\n    }\n\n    return isCSSVariableToken(fallback)\n        ? getVariableValue(fallback, element, depth + 1)\n        : fallback\n}\n", "import { transformProps } from \"../../render/utils/keys-transform\"\nimport type { ValueAnimationOptions } from \"../types\"\n\nconst underDampedSpring: Partial<ValueAnimationOptions> = {\n    type: \"spring\",\n    stiffness: 500,\n    damping: 25,\n    restSpeed: 10,\n}\n\nconst criticallyDampedSpring = (\n    target: unknown\n): Partial<ValueAnimationOptions> => ({\n    type: \"spring\",\n    stiffness: 550,\n    damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n    restSpeed: 10,\n})\n\nconst keyframesTransition: Partial<ValueAnimationOptions> = {\n    type: \"keyframes\",\n    duration: 0.8,\n}\n\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease: Partial<ValueAnimationOptions> = {\n    type: \"keyframes\",\n    ease: [0.25, 0.1, 0.35, 1],\n    duration: 0.3,\n}\n\nexport const getDefaultTransition = (\n    valueKey: string,\n    { keyframes }: ValueAnimationOptions\n): Partial<ValueAnimationOptions> => {\n    if (keyframes.length > 2) {\n        return keyframesTransition\n    } else if (transformProps.has(valueKey)) {\n        return valueKey.startsWith(\"scale\")\n            ? criticallyDampedSpring(keyframes[1])\n            : underDampedSpring\n    }\n\n    return ease\n}\n", "import type { AnimationPlaybackOptions } from \"../types\"\n\nconst isNotNull = (value: unknown) => value !== null\n\nexport function getFinalKeyframe<T>(\n    keyframes: T[],\n    { repeat, repeatType = \"loop\" }: AnimationPlaybackOptions,\n    finalKeyframe?: T\n): T {\n    const resolvedKeyframes = keyframes.filter(isNotNull)\n    const index =\n        repeat && repeatType !== \"loop\" && repeat % 2 === 1\n            ? 0\n            : resolvedKeyframes.length - 1\n\n    return !index || finalKeyframe === undefined\n        ? resolvedKeyframes[index]\n        : finalKeyframe\n}\n", "/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nexport function resolveTransition(\n    transition: any,\n    parentTransition?: any\n) {\n    if (transition?.inherit && parentTransition) {\n        const { inherit: _, ...rest } = transition\n        return { ...parentTransition, ...rest }\n    }\n\n    return transition\n}\n", "import { resolveTransition } from \"./resolve-transition\"\n\nexport function getValueTransition(transition: any, key: string) {\n    const valueTransition =\n        transition?.[key as keyof typeof transition] ??\n        transition?.[\"default\"] ??\n        transition\n\n    if (valueTransition !== transition) {\n        return resolveTransition(valueTransition, transition)\n    }\n\n    return valueTransition\n}\n", "import type { AnyResolvedKeyframe } from \"../types\"\nimport type { Transition } from \"../types\"\n\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 */\nexport function isTransitionDefined({\n    when,\n    delay: _delay,\n    delayChildren,\n    staggerChildren,\n    staggerDirection,\n    repeat,\n    repeatType,\n    repeatDelay,\n    from,\n    elapsed,\n    ...transition\n}: Transition & { elapsed?: number; from?: AnyResolvedKeyframe }) {\n    return !!Object.keys(transition).length\n}\n", "import { MotionGlobalConfig, secondsToMilliseconds } from \"motion-utils\"\nimport { AsyncMotionValueAnimation } from \"../AsyncMotionValueAnimation\"\nimport { JSAnimation } from \"../JSAnimation\"\nimport type {\n    AnyResolvedKeyframe,\n    ValueAnimationOptions,\n    ValueTransition,\n} from \"../types\"\nimport type { UnresolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { makeAnimationInstant } from \"../utils/make-animation-instant\"\nimport { getDefaultTransition } from \"../utils/default-transitions\"\nimport { getFinalKeyframe } from \"../utils/get-final-keyframe\"\nimport { isTransitionDefined } from \"../utils/is-transition-defined\"\nimport { frame } from \"../../frameloop\"\nimport type { MotionValue, StartAnimation } from \"../../value\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport const animateMotionValue =\n    <V extends AnyResolvedKeyframe>(\n        name: string,\n        value: MotionValue<V>,\n        target: V | UnresolvedKeyframes<V>,\n        transition: ValueTransition & { elapsed?: number } = {},\n        element?: VisualElement<any>,\n        isHandoff?: boolean\n    ): StartAnimation =>\n    (onComplete) => {\n        const valueTransition = getValueTransition(transition, name) || {}\n\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        /**\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\n        const options: ValueAnimationOptions = {\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        /**\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        /**\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 &&= secondsToMilliseconds(options.duration)\n        options.repeatDelay &&= secondsToMilliseconds(options.repeatDelay)\n\n        /**\n         * Support deprecated way to set initial value. Prefer keyframe syntax.\n         */\n        if (options.from !== undefined) {\n            options.keyframes[0] = options.from as any\n        }\n\n        let shouldSkip = false\n\n        if (\n            (options as any).type === false ||\n            (options.duration === 0 && !options.repeatDelay)\n        ) {\n            makeAnimationInstant(options)\n\n            if (options.delay === 0) {\n                shouldSkip = true\n            }\n        }\n\n        if (\n            MotionGlobalConfig.instantAnimations ||\n            MotionGlobalConfig.skipAnimations ||\n            element?.shouldSkipAnimations\n        ) {\n            shouldSkip = true\n            makeAnimationInstant(options)\n            options.delay = 0\n        }\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        /**\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<V>(\n                options.keyframes as V[],\n                valueTransition\n            )\n\n            if (finalKeyframe !== undefined) {\n                frame.update(() => {\n                    options.onUpdate!(finalKeyframe)\n                    options.onComplete!()\n                })\n\n                return\n            }\n        }\n\n        return valueTransition.isSync\n            ? new JSAnimation(options)\n            : new AsyncMotionValueAnimation(options)\n    }\n", "import type {\n    AnimationDefinition,\n    MotionNodeOptions,\n    TargetAndTransition,\n    TargetResolver,\n} from \"../../node/types\"\nimport type { ResolvedValues } from \"../types\"\n\nfunction getValueState(visualElement?: any): [ResolvedValues, ResolvedValues] {\n    const state: [ResolvedValues, ResolvedValues] = [{}, {}]\n\n    visualElement?.values.forEach((value: any, key: string) => {\n        state[0][key] = value.get()\n        state[1][key] = value.getVelocity()\n    })\n\n    return state\n}\n\nexport function resolveVariantFromProps(\n    props: MotionNodeOptions,\n    definition: TargetAndTransition | TargetResolver,\n    custom?: any,\n    visualElement?: any\n): TargetAndTransition\nexport function resolveVariantFromProps(\n    props: MotionNodeOptions,\n    definition?: AnimationDefinition,\n    custom?: any,\n    visualElement?: any\n): undefined | TargetAndTransition\nexport function resolveVariantFromProps(\n    props: MotionNodeOptions,\n    definition?: AnimationDefinition,\n    custom?: any,\n    visualElement?: any\n) {\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(\n            custom !== undefined ? custom : props.custom,\n            current,\n            velocity\n        )\n    }\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    /**\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(\n            custom !== undefined ? custom : props.custom,\n            current,\n            velocity\n        )\n    }\n\n    return definition\n}\n", "import type {\n    AnimationDefinition,\n    TargetAndTransition,\n    TargetResolver,\n} from \"../../node/types\"\nimport { resolveVariantFromProps } from \"./resolve-variants\"\n\n/**\n * Resolves a variant if it's a variant resolver.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function resolveVariant(\n    visualElement: any,\n    definition?: TargetAndTransition | TargetResolver,\n    custom?: any\n): TargetAndTransition\nexport function resolveVariant(\n    visualElement: any,\n    definition?: AnimationDefinition,\n    custom?: any\n): TargetAndTransition | undefined\nexport function resolveVariant(\n    visualElement: any,\n    definition?: AnimationDefinition,\n    custom?: any\n) {\n    const props = visualElement.getProps()\n    return resolveVariantFromProps(\n        props,\n        definition,\n        custom !== undefined ? custom : props.custom,\n        visualElement\n    )\n}\n", "import { transformPropOrder } from \"./keys-transform\"\n\nexport const positionalKeys = new Set([\n    \"width\",\n    \"height\",\n    \"top\",\n    \"left\",\n    \"right\",\n    \"bottom\",\n    ...transformPropOrder,\n])\n", "import {\n    EasingFunction,\n    SubscriptionManager,\n    velocityPerSecond,\n    warnOnce,\n} from \"motion-utils\"\nimport {\n    AnimationPlaybackControlsWithThen,\n    AnyResolvedKeyframe,\n    TransformProperties,\n} from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\n\n/**\n * @public\n */\nexport type Subscriber<T> = (v: T) => void\n\n/**\n * @public\n */\nexport type PassiveEffect<T> = (v: T, safeSetter: (v: T) => void) => void\n\nexport type StartAnimation = (\n    complete: () => void\n) => AnimationPlaybackControlsWithThen | undefined\n\nexport interface MotionValueEventCallbacks<V> {\n    animationStart: () => void\n    animationComplete: () => void\n    animationCancel: () => void\n    change: (latestValue: V) => void\n    destroy: () => void\n}\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\n\nconst isFloat = (value: any): value is string => {\n    return !isNaN(parseFloat(value))\n}\n\ninterface ResolvedValues {\n    [key: string]: AnyResolvedKeyframe\n}\n\nexport interface Owner {\n    current: HTMLElement | unknown\n    getProps: () => {\n        onUpdate?: (latest: ResolvedValues) => void\n        transformTemplate?: (\n            transform: TransformProperties,\n            generatedTransform: string\n        ) => string\n    }\n}\n\nexport interface AccelerateConfig {\n    factory: (animation: AnimationPlaybackControlsWithThen) => VoidFunction\n    times: number[]\n    keyframes: any[]\n    ease?: EasingFunction | EasingFunction[]\n    duration: number\n    isTransformed?: boolean\n}\n\nexport interface MotionValueOptions {\n    owner?: Owner\n}\n\nexport const collectMotionValues: { current: MotionValue[] | undefined } = {\n    current: undefined,\n}\n\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nexport class MotionValue<V = any> {\n    /**\n     * If a MotionValue has an owner, it was created internally within Motion\n     * and therefore has no external listeners. It is therefore safe to animate via WAAPI.\n     */\n    owner?: Owner\n\n    /**\n     * The current state of the `MotionValue`.\n     */\n    private current: V | undefined\n\n    /**\n     * The previous state of the `MotionValue`.\n     */\n    private prev: V | undefined\n\n    /**\n     * The previous state of the `MotionValue` at the end of the previous frame.\n     */\n    private prevFrameValue: V | undefined\n\n    /**\n     * The last time the `MotionValue` was updated.\n     */\n    updatedAt: number\n\n    /**\n     * The time `prevFrameValue` was updated.\n     */\n    prevUpdatedAt: number | undefined\n\n    /**\n     * Add a passive effect to this `MotionValue`.\n     *\n     * A passive effect intercepts calls to `set`. For instance, `useSpring` adds\n     * a passive effect that attaches a `spring` to the latest\n     * set value. Hypothetically there could be a `useSmooth` that attaches an input smoothing effect.\n     *\n     * @internal\n     */\n    private passiveEffect?: PassiveEffect<V>\n    private stopPassiveEffect?: VoidFunction\n\n    /**\n     * Whether the passive effect is active.\n     */\n    isEffectActive?: boolean\n\n    /**\n     * A reference to the currently-controlling animation.\n     */\n    animation?: AnimationPlaybackControlsWithThen\n\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    private canTrackVelocity: boolean | null = null\n\n    /**\n     * A list of MotionValues whose values are computed from this one.\n     * This is a rough start to a proper signal-like dirtying system.\n     */\n    private dependents: Set<MotionValue> | undefined\n\n    /**\n     * Tracks whether this value should be removed\n     */\n    liveStyle?: boolean\n\n    /**\n     * Scroll timeline acceleration metadata. When set, VisualElement\n     * can create a native WAAPI animation attached to a scroll timeline\n     * instead of driving updates through JS.\n     */\n    accelerate?: AccelerateConfig\n\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: V, options: MotionValueOptions = {}) {\n        this.setCurrent(init)\n        this.owner = options.owner\n    }\n\n    setCurrent(current: V) {\n        this.current = current\n        this.updatedAt = time.now()\n\n        if (this.canTrackVelocity === null && current !== undefined) {\n            this.canTrackVelocity = isFloat(this.current)\n        }\n    }\n\n    setPrevFrameValue(prevFrameValue: V | undefined = this.current) {\n        this.prevFrameValue = prevFrameValue\n        this.prevUpdatedAt = this.updatedAt\n    }\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: Subscriber<V>): () => void {\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(\n                false,\n                `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`\n            )\n        }\n        return this.on(\"change\", subscription)\n    }\n\n    /**\n     * An object containing a SubscriptionManager for each active event.\n     */\n    private events: {\n        [key: string]: SubscriptionManager<any>\n    } = {}\n\n    on<EventName extends keyof MotionValueEventCallbacks<V>>(\n        eventName: EventName,\n        callback: MotionValueEventCallbacks<V>[EventName]\n    ) {\n        if (!this.events[eventName]) {\n            this.events[eventName] = new SubscriptionManager()\n        }\n\n        const unsubscribe = this.events[eventName].add(callback)\n\n        if (eventName === \"change\") {\n            return () => {\n                unsubscribe()\n\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\n        return unsubscribe\n    }\n\n    clearListeners() {\n        for (const eventManagers in this.events) {\n            this.events[eventManagers].clear()\n        }\n    }\n\n    /**\n     * Attaches a passive effect to the `MotionValue`.\n     */\n    attach(passiveEffect: PassiveEffect<V>, stopPassiveEffect: VoidFunction) {\n        this.passiveEffect = passiveEffect\n        this.stopPassiveEffect = stopPassiveEffect\n    }\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: V) {\n        if (!this.passiveEffect) {\n            this.updateAndNotify(v)\n        } else {\n            this.passiveEffect(v, this.updateAndNotify)\n        }\n    }\n\n    setWithVelocity(prev: V, current: V, delta: number) {\n        this.set(current)\n        this.prev = undefined\n        this.prevFrameValue = prev\n        this.prevUpdatedAt = this.updatedAt - delta\n    }\n\n    /**\n     * Set the state of the `MotionValue`, stopping any active animations,\n     * effects, and resets velocity to `0`.\n     */\n    jump(v: 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) this.stopPassiveEffect()\n    }\n\n    dirty() {\n        this.events.change?.notify(this.current)\n    }\n\n    addDependent(dependent: MotionValue) {\n        if (!this.dependents) {\n            this.dependents = new Set()\n        }\n        this.dependents.add(dependent)\n    }\n\n    removeDependent(dependent: MotionValue) {\n        if (this.dependents) {\n            this.dependents.delete(dependent)\n        }\n    }\n\n    updateAndNotify = (v: V) => {\n        const currentTime = time.now()\n\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\n        this.prev = this.current\n\n        this.setCurrent(v)\n\n        // Update update subscribers\n        if (this.current !== this.prev) {\n            this.events.change?.notify(this.current)\n\n            if (this.dependents) {\n                for (const dependent of this.dependents) {\n                    dependent.dirty()\n                }\n            }\n        }\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\n        return this.current!\n    }\n\n    /**\n     * @public\n     */\n    getPrevious() {\n        return this.prev\n    }\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\n        if (\n            !this.canTrackVelocity ||\n            this.prevFrameValue === undefined ||\n            currentTime - this.updatedAt > MAX_VELOCITY_DELTA\n        ) {\n            return 0\n        }\n\n        const delta = Math.min(\n            this.updatedAt - this.prevUpdatedAt!,\n            MAX_VELOCITY_DELTA\n        )\n\n        // Casts because of parseFloat's poor typing\n        return velocityPerSecond(\n            parseFloat(this.current as any) -\n                parseFloat(this.prevFrameValue as any),\n            delta\n        )\n    }\n\n    hasAnimated = false\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: StartAnimation) {\n        this.stop()\n\n        return new Promise<void>((resolve) => {\n            this.hasAnimated = true\n            this.animation = startAnimation(resolve)\n\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    /**\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    /**\n     * Returns `true` if this value is currently animating.\n     *\n     * @public\n     */\n    isAnimating() {\n        return !!this.animation\n    }\n\n    private clearAnimation() {\n        delete this.animation\n    }\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\n        if (this.stopPassiveEffect) {\n            this.stopPassiveEffect()\n        }\n    }\n}\n\nexport function motionValue<V>(init: V, options?: MotionValueOptions) {\n    return new MotionValue<V>(init, options)\n}\n", "import type { UnresolvedValueKeyframe, ValueKeyframesDefinition } from \"../../animation/types\"\n\nexport const isKeyframesTarget = (\n    v: ValueKeyframesDefinition\n): v is UnresolvedValueKeyframe[] => {\n    return Array.isArray(v)\n}\n", "import { motionValue } from \"../../value\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type {\n    AnyResolvedKeyframe,\n    UnresolvedValueKeyframe,\n    ValueKeyframesDefinition,\n} from \"../../animation/types\"\nimport type { VisualElement } from \"../VisualElement\"\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(\n    visualElement: VisualElement,\n    key: string,\n    value: AnyResolvedKeyframe\n) {\n    if (visualElement.hasValue(key)) {\n        visualElement.getValue(key)!.set(value)\n    } else {\n        visualElement.addValue(key, motionValue(value))\n    }\n}\n\nfunction resolveFinalValueInKeyframes(\n    v: ValueKeyframesDefinition\n): UnresolvedValueKeyframe {\n    // TODO maybe throw if v.length - 1 is placeholder token?\n    return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v\n}\n\nexport function setTarget(\n    visualElement: VisualElement,\n    definition: AnimationDefinition\n) {\n    const resolved = resolveVariant(visualElement, definition)\n    let { transitionEnd = {}, transition = {}, ...target } = resolved || {}\n\n    target = { ...target, ...transitionEnd }\n\n    for (const key in target) {\n        const value = resolveFinalValueInKeyframes(\n            target[key as keyof typeof target] as any\n        )\n        setMotionValue(visualElement, key, value as AnyResolvedKeyframe)\n    }\n}\n", "import type { MotionValue } from \"..\"\n\nexport const isMotionValue = (value: any): value is MotionValue =>\n    Boolean(value && value.getVelocity)\n", "import { isMotionValue } from \"../utils/is-motion-value\"\nimport type { WillChange } from \"./types\"\n\nexport function isWillChangeMotionValue(value: any): value is WillChange {\n    return Boolean(isMotionValue(value) && (value as WillChange).add)\n}\n", "import { MotionGlobalConfig } from \"motion-utils\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport { isWillChangeMotionValue } from \"./is\"\n\nexport function addValueToWillChange(\n    visualElement: VisualElement,\n    key: string\n) {\n    const willChange = visualElement.getValue(\"willChange\")\n\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    } else if (!willChange && MotionGlobalConfig.WillChange) {\n        const newWillChange = new MotionGlobalConfig.WillChange(\"auto\")\n\n        visualElement.addValue(\"willChange\", newWillChange)\n        newWillChange.add(key)\n    }\n}\n", "export function camelToDash(str: string): string {\n    return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`)\n}\n", "import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\n\nexport const optimizedAppearDataId = \"framerAppearId\"\n\nexport const optimizedAppearDataAttribute =\n    \"data-\" + camelToDash(optimizedAppearDataId) as \"data-framer-appear-id\"\n", "import { optimizedAppearDataAttribute } from \"./data-id\"\nimport type { WithAppearProps } from \"./types\"\n\nexport function getOptimisedAppearId(\n    visualElement: WithAppearProps\n): string | undefined {\n    return visualElement.props[optimizedAppearDataAttribute]\n}\n", "import { frame } from \"../../frameloop\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { resolveTransition } from \"../utils/resolve-transition\"\nimport { positionalKeys } from \"../../render/utils/keys-position\"\nimport { setTarget } from \"../../render/utils/setters\"\nimport { addValueToWillChange } from \"../../value/will-change/add-will-change\"\nimport { getOptimisedAppearId } from \"../optimized-appear/get-appear-id\"\nimport { animateMotionValue } from \"./motion-value\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport type { AnimationPlaybackControlsWithThen } from \"../types\"\nimport type { TargetAndTransition } from \"../../node/types\"\nimport type { AnimationTypeState } from \"../../render/utils/animation-state\"\nimport type { VisualElement } from \"../../render/VisualElement\"\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(\n    { protectedKeys, needsAnimating }: AnimationTypeState,\n    key: string\n) {\n    const shouldBlock =\n        protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true\n\n    needsAnimating[key] = false\n    return shouldBlock\n}\n\nexport function animateTarget(\n    visualElement: VisualElement,\n    targetAndTransition: TargetAndTransition,\n    { delay = 0, transitionOverride, type }: VisualElementAnimationOptions = {}\n): AnimationPlaybackControlsWithThen[] {\n    let {\n        transition,\n        transitionEnd,\n        ...target\n    } = targetAndTransition\n\n    const defaultTransition = visualElement.getDefaultTransition()\n    transition = transition\n        ? resolveTransition(transition, defaultTransition)\n        : defaultTransition\n\n    const reduceMotion = (transition as { reduceMotion?: boolean })?.reduceMotion\n\n    if (transitionOverride) transition = transitionOverride\n\n    const animations: AnimationPlaybackControlsWithThen[] = []\n\n    const animationTypeState =\n        type &&\n        visualElement.animationState &&\n        visualElement.animationState.getState()[type]\n\n    for (const key in target) {\n        const value = visualElement.getValue(\n            key,\n            visualElement.latestValues[key] ?? null\n        )\n        const valueTarget = target[key as keyof typeof target]\n\n        if (\n            valueTarget === undefined ||\n            (animationTypeState &&\n                shouldBlockAnimation(animationTypeState, key))\n        ) {\n            continue\n        }\n\n        const valueTransition = {\n            delay,\n            ...getValueTransition(transition || {}, key),\n        }\n\n        /**\n         * If the value is already at the defined target, skip the animation.\n         */\n        const currentValue = value.get()\n        if (\n            currentValue !== undefined &&\n            !value.isAnimating &&\n            !Array.isArray(valueTarget) &&\n            valueTarget === currentValue &&\n            !valueTransition.velocity\n        ) {\n            continue\n        }\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\n            if (appearId) {\n                const startTime = window.MotionHandoffAnimation(\n                    appearId,\n                    key,\n                    frame\n                )\n\n                if (startTime !== null) {\n                    valueTransition.startTime = startTime\n                    isHandoff = true\n                }\n            }\n        }\n\n        addValueToWillChange(visualElement, key)\n\n        const shouldReduceMotion =\n            reduceMotion ?? visualElement.shouldReduceMotion\n\n        value.start(\n            animateMotionValue(\n                key,\n                value,\n                valueTarget,\n                shouldReduceMotion && positionalKeys.has(key)\n                    ? { type: false }\n                    : valueTransition,\n                visualElement,\n                isHandoff\n            )\n        )\n\n        const animation = value.animation\n\n        if (animation) {\n            animations.push(animation)\n        }\n    }\n\n    if (transitionEnd) {\n        const applyTransitionEnd = () =>\n            frame.update(() => {\n                transitionEnd && setTarget(visualElement, transitionEnd)\n            })\n\n        if (animations.length) {\n            Promise.all(animations).then(applyTransitionEnd)\n        } else {\n            applyTransitionEnd()\n        }\n    }\n\n    return animations\n}\n", "import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport { calcChildStagger } from \"../utils/calc-child-stagger\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function animateVariant(\n    visualElement: VisualElement,\n    variant: string,\n    options: VisualElementAnimationOptions = {}\n): Promise<any> {\n    const resolved = resolveVariant(\n        visualElement,\n        variant,\n        options.type === \"exit\"\n            ? visualElement.presenceContext?.custom\n            : undefined\n    )\n\n    let { transition = visualElement.getDefaultTransition() || {} } =\n        resolved || {}\n\n    if (options.transitionOverride) {\n        transition = options.transitionOverride\n    }\n\n    /**\n     * If we have a variant, create a callback that runs it as an animation.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    const getAnimation: () => Promise<any> = resolved\n        ? () => Promise.all(animateTarget(visualElement, resolved, options))\n        : () => Promise.resolve()\n\n    /**\n     * If we have children, create a callback that runs all their animations.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    const getChildAnimations =\n        visualElement.variantChildren && visualElement.variantChildren.size\n            ? (forwardDelay = 0) => {\n                  const {\n                      delayChildren = 0,\n                      staggerChildren,\n                      staggerDirection,\n                  } = transition\n\n                  return animateChildren(\n                      visualElement,\n                      variant,\n                      forwardDelay,\n                      delayChildren,\n                      staggerChildren,\n                      staggerDirection,\n                      options\n                  )\n              }\n            : () => Promise.resolve()\n\n    /**\n     * If the transition explicitly defines a \"when\" option, we need to resolve either\n     * this animation or all children animations before playing the other.\n     */\n    const { when } = transition\n    if (when) {\n        const [first, last] =\n            when === \"beforeChildren\"\n                ? [getAnimation, getChildAnimations]\n                : [getChildAnimations, getAnimation]\n\n        return first().then(() => last())\n    } else {\n        return Promise.all([getAnimation(), getChildAnimations(options.delay)])\n    }\n}\n\nfunction animateChildren(\n    visualElement: VisualElement,\n    variant: string,\n    delay: number = 0,\n    delayChildren: number | DynamicOption<number> = 0,\n    staggerChildren = 0,\n    staggerDirection = 1,\n    options: VisualElementAnimationOptions\n) {\n    const animations: Promise<any>[] = []\n\n    for (const child of visualElement.variantChildren!) {\n        child.notify(\"AnimationStart\", variant)\n        animations.push(\n            animateVariant(child, variant, {\n                ...options,\n                delay:\n                    delay +\n                    (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n                    calcChildStagger(\n                        visualElement.variantChildren!,\n                        child,\n                        delayChildren,\n                        staggerChildren,\n                        staggerDirection\n                    ),\n            }).then(() => child.notify(\"AnimationComplete\", variant))\n        )\n    }\n\n    return Promise.all(animations)\n}\n", "import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport { animateVariant } from \"./visual-element-variant\"\n\nexport function animateVisualElement(\n    visualElement: VisualElement,\n    definition: AnimationDefinition,\n    options: VisualElementAnimationOptions = {}\n) {\n    visualElement.notify(\"AnimationStart\", definition)\n    let animation: Promise<any>\n\n    if (Array.isArray(definition)) {\n        const animations = definition.map((variant) =>\n            animateVariant(visualElement, variant, options)\n        )\n        animation = Promise.all(animations)\n    } else if (typeof definition === \"string\") {\n        animation = animateVariant(visualElement, definition, options)\n    } else {\n        const resolvedDefinition =\n            typeof definition === \"function\"\n                ? resolveVariant(visualElement, definition, options.custom)\n                : definition\n\n        animation = Promise.all(\n            animateTarget(visualElement, resolvedDefinition, options)\n        )\n    }\n\n    return animation.then(() => {\n        visualElement.notify(\"AnimationComplete\", definition)\n    })\n}\n", "import { ValueType } from \"./types\"\n\n/**\n * ValueType for \"auto\"\n */\nexport const auto: ValueType = {\n    test: (v: any) => v === \"auto\",\n    parse: (v) => v,\n}\n", "import { ValueType } from \"./types\"\n\n/**\n * Tests a provided value against a ValueType\n */\nexport const testValueType = (v: any) => (type: ValueType) => type.test(v)\n", "import { auto } from \"./auto\"\nimport { number } from \"./numbers\"\nimport { degrees, percent, px, vh, vw } from \"./numbers/units\"\nimport { testValueType } from \"./test\"\n\n/**\n * A list of value types commonly used for dimensions\n */\nexport const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]\n\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nexport const findDimensionValueType = (v: any) =>\n    dimensionValueTypes.find(testValueType(v))\n", "import { isZeroValueString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../types\"\n\nexport function isNone(value: AnyResolvedKeyframe | null) {\n    if (typeof value === \"number\") {\n        return value === 0\n    } else if (value !== null) {\n        return value === \"none\" || value === \"0\" || isZeroValueString(value)\n    } else {\n        return true\n    }\n}\n", "import { complex } from \".\"\nimport { floatRegex } from \"../utils/float-regex\"\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"])\n\nfunction applyDefaultFilter(v: string) {\n    const [name, value] = v.slice(0, -1).split(\"(\")\n\n    if (name === \"drop-shadow\") return v\n\n    const [number] = value.match(floatRegex) || []\n    if (!number) return v\n\n    const unit = value.replace(number, \"\")\n    let defaultValue = maxDefaults.has(name) ? 1 : 0\n    if (number !== value) defaultValue *= 100\n\n    return name + \"(\" + defaultValue + unit + \")\"\n}\n\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu\n\nexport const filter = {\n    ...complex,\n    getAnimatableNone: (v: string) => {\n        const functions = v.match(functionRegex)\n        return functions ? functions.map(applyDefaultFilter).join(\" \") : v\n    },\n}\n", "import { complex } from \".\"\nimport { AnyResolvedKeyframe } from \"../../../animation/types\"\n\nexport const mask = {\n    ...complex,\n    getAnimatableNone: (v: AnyResolvedKeyframe) => {\n        const parsed = complex.parse(v)\n        const transformer = complex.createTransformer(v)\n        return transformer(\n            parsed.map((v) =>\n                typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v\n            )\n        )\n    },\n}\n", "import { number } from \"./numbers\"\n\nexport const int = {\n    ...number,\n    transform: Math.round,\n}\n", "import { alpha, scale } from \"../numbers\"\nimport { degrees, progressPercentage, px } from \"../numbers/units\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const transformValueTypes: ValueTypeMap = {\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", "import { int } from \"../int\"\nimport { alpha } from \"../numbers\"\nimport { px } from \"../numbers/units\"\nimport { transformValueTypes } from \"./transform\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const numberValueTypes: ValueTypeMap = {\n    // Border props\n    borderWidth: px,\n    borderTopWidth: px,\n    borderRightWidth: px,\n    borderBottomWidth: px,\n    borderLeftWidth: px,\n    borderRadius: px,\n    borderTopLeftRadius: px,\n    borderTopRightRadius: px,\n    borderBottomRightRadius: px,\n    borderBottomLeftRadius: px,\n\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    inset: px,\n    insetBlock: px,\n    insetBlockStart: px,\n    insetBlockEnd: px,\n    insetInline: px,\n    insetInlineStart: px,\n    insetInlineEnd: px,\n\n    // Spacing props\n    padding: px,\n    paddingTop: px,\n    paddingRight: px,\n    paddingBottom: px,\n    paddingLeft: px,\n    paddingBlock: px,\n    paddingBlockStart: px,\n    paddingBlockEnd: px,\n    paddingInline: px,\n    paddingInlineStart: px,\n    paddingInlineEnd: px,\n    margin: px,\n    marginTop: px,\n    marginRight: px,\n    marginBottom: px,\n    marginLeft: px,\n    marginBlock: px,\n    marginBlockStart: px,\n    marginBlockEnd: px,\n    marginInline: px,\n    marginInlineStart: px,\n    marginInlineEnd: px,\n\n    // Typography\n    fontSize: px,\n\n    // Misc\n    backgroundPositionX: px,\n    backgroundPositionY: px,\n\n    ...transformValueTypes,\n    zIndex: int,\n\n    // SVG\n    fillOpacity: alpha,\n    strokeOpacity: alpha,\n    numOctaves: int,\n}\n", "import { color } from \"../color\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { numberValueTypes } from \"./number\"\nimport { ValueTypeMap } from \"./types\"\n\n/**\n * A map of default value types for common values\n */\nexport const defaultValueTypes: ValueTypeMap = {\n    ...numberValueTypes,\n\n    // Color props\n    color,\n    backgroundColor: color,\n    outlineColor: color,\n    fill: color,\n    stroke: color,\n\n    // Border props\n    borderColor: color,\n    borderTopColor: color,\n    borderRightColor: color,\n    borderBottomColor: color,\n    borderLeftColor: color,\n    filter,\n    WebkitFilter: filter,\n    mask,\n    WebkitMask: mask,\n}\n\n/**\n * Gets the default ValueType for the provided value key\n */\nexport const getDefaultValueType = (key: string) => defaultValueTypes[key]\n", "import { complex } from \"../complex\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { getDefaultValueType } from \"../maps/defaults\"\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask])\n\nexport function getAnimatableNone(key: string, value: string) {\n    let defaultValueType = getDefaultValueType(key)\n    if (!customTypes.has(defaultValueType as any)) 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", "import { analyseComplexValue } from \"../../../value/types/complex\"\nimport { getAnimatableNone } from \"../../../value/types/utils/animatable-none\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { UnresolvedKeyframes } from \"../KeyframesResolver\"\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\"])\n\nexport function makeNoneKeyframesAnimatable(\n    unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>,\n    noneKeyframeIndexes: number[],\n    name?: string\n) {\n    let i = 0\n    let animatableTemplate: string | undefined = undefined\n    while (i < unresolvedKeyframes.length && !animatableTemplate) {\n        const keyframe = unresolvedKeyframes[i]\n        if (\n            typeof keyframe === \"string\" &&\n            !invalidTemplates.has(keyframe) &&\n            analyseComplexValue(keyframe).values.length\n        ) {\n            animatableTemplate = unresolvedKeyframes[i] as string\n        }\n        i++\n    }\n\n    if (animatableTemplate && name) {\n        for (const noneIndex of noneKeyframeIndexes) {\n            unresolvedKeyframes[noneIndex] = getAnimatableNone(\n                name,\n                animatableTemplate\n            )\n        }\n    }\n}\n", "import { positionalKeys } from \"../../render/utils/keys-position\"\nimport { MotionValue } from \"../../value\"\nimport { findDimensionValueType } from \"../../value/types/dimensions\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { getVariableValue } from \"../utils/css-variables-conversion\"\nimport {\n    containsCSSVariable,\n    isCSSVariableToken,\n} from \"../utils/is-css-variable\"\nimport {\n    KeyframeResolver,\n    OnKeyframesResolved,\n    UnresolvedKeyframes,\n} from \"./KeyframesResolver\"\nimport { WithRender } from \"./types\"\nimport { isNone } from \"./utils/is-none\"\nimport { makeNoneKeyframesAnimatable } from \"./utils/make-none-animatable\"\nimport { isNumOrPxType, positionalValues } from \"./utils/unit-conversion\"\n\nexport class DOMKeyframesResolver<\n    T extends AnyResolvedKeyframe\n> extends KeyframeResolver<T> {\n    name: string\n    element?: WithRender\n\n    private removedTransforms?: [string, AnyResolvedKeyframe][]\n    private measuredOrigin?: AnyResolvedKeyframe\n\n    constructor(\n        unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>,\n        onComplete: OnKeyframesResolved<T>,\n        name?: string,\n        motionValue?: MotionValue<T>,\n        element?: WithRender\n    ) {\n        super(unresolvedKeyframes, onComplete, name, motionValue, element, true)\n    }\n\n    readKeyframes() {\n        const { unresolvedKeyframes, element, name } = this\n\n        if (!element || !element.current) return\n\n        super.readKeyframes()\n\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\n            if (typeof keyframe === \"string\") {\n                keyframe = keyframe.trim()\n\n                if (isCSSVariableToken(keyframe)) {\n                    const resolved = getVariableValue(keyframe, element.current)\n\n                    if (resolved !== undefined) {\n                        unresolvedKeyframes[i] = resolved as T\n                    }\n\n                    if (i === unresolvedKeyframes.length - 1) {\n                        this.finalKeyframe = keyframe as T\n                    }\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        /**\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\n        const [origin, target] = unresolvedKeyframes\n        const originType = findDimensionValueType(origin)\n        const targetType = findDimensionValueType(target)\n\n        /**\n         * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n         * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n         */\n        const originHasVar = containsCSSVariable(origin)\n        const targetHasVar = containsCSSVariable(target)\n\n        if (originHasVar !== targetHasVar && positionalValues[name]) {\n            this.needsMeasurement = true\n            return\n        }\n\n        /**\n         * Either we don't recognise these value types or we can animate between them.\n         */\n        if (originType === targetType) return\n\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 as string)\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\n    resolveNoneKeyframes() {\n        const { unresolvedKeyframes, name } = this\n\n        const noneKeyframeIndexes: number[] = []\n        for (let i = 0; i < unresolvedKeyframes.length; i++) {\n            if (\n                unresolvedKeyframes[i] === null ||\n                isNone(unresolvedKeyframes[i])\n            ) {\n                noneKeyframeIndexes.push(i)\n            }\n        }\n\n        if (noneKeyframeIndexes.length) {\n            makeNoneKeyframesAnimatable(\n                unresolvedKeyframes,\n                noneKeyframeIndexes,\n                name\n            )\n        }\n    }\n\n    measureInitialState() {\n        const { element, unresolvedKeyframes, name } = this\n\n        if (!element || !element.current) return\n\n        if (name === \"height\") {\n            this.suspendedScrollY = window.pageYOffset\n        }\n\n        this.measuredOrigin = positionalValues[name](\n            element.measureViewportBox(),\n            window.getComputedStyle(element.current)\n        )\n\n        unresolvedKeyframes[0] = this.measuredOrigin\n\n        // Set final key frame to measure after next render\n        const measureKeyframe =\n            unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n        if (measureKeyframe !== undefined) {\n            element.getValue(name, measureKeyframe).jump(measureKeyframe, false)\n        }\n    }\n\n    measureEndState() {\n        const { element, name, unresolvedKeyframes } = this\n\n        if (!element || !element.current) return\n\n        const value = element.getValue(name)\n        value && value.jump(this.measuredOrigin, false)\n\n        const finalKeyframeIndex = unresolvedKeyframes.length - 1\n        const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]\n\n        unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](\n            element.measureViewportBox(),\n            window.getComputedStyle(element.current)\n        ) as any\n\n        if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n            this.finalKeyframe = finalKeyframe as T\n        }\n\n        // If we removed transform values, reapply them before the next render\n        if (this.removedTransforms?.length) {\n            this.removedTransforms.forEach(\n                ([unsetTransformName, unsetTransformValue]) => {\n                    element\n                        .getValue(unsetTransformName)!\n                        .set(unsetTransformValue)\n                }\n            )\n        }\n\n        this.resolveNoneKeyframes()\n    }\n}\n", "/**\n * A list of values that can be hardware-accelerated.\n */\nexport const acceleratedValues = new Set<string>([\n    \"opacity\",\n    \"clipPath\",\n    \"filter\",\n    \"transform\",\n    // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n    // or until we implement support for linear() easing.\n    // \"background-color\"\n])\n", "export type ElementOrSelector =\n    | Element\n    | Element[]\n    | NodeListOf<Element>\n    | string\n    | null\n    | undefined\n\nexport interface WithQuerySelectorAll {\n    querySelectorAll: Element[\"querySelectorAll\"]\n}\n\nexport interface AnimationScope<T = any> {\n    readonly current: T\n    animations: any[] // TODO: Refactor to types package AnimationPlaybackControls[]\n}\n\nexport interface SelectorCache {\n    [key: string]: NodeListOf<Element>\n}\n\nexport function resolveElements(\n    elementOrSelector: ElementOrSelector,\n    scope?: AnimationScope,\n    selectorCache?: SelectorCache\n): Element[] {\n    if (elementOrSelector == null) {\n        return []\n    }\n\n    if (elementOrSelector instanceof EventTarget) {\n        return [elementOrSelector]\n    } else if (typeof elementOrSelector === \"string\") {\n        let root: WithQuerySelectorAll = document\n\n        if (scope) {\n            root = scope.current\n        }\n\n        const elements =\n            selectorCache?.[elementOrSelector] ??\n            root.querySelectorAll(elementOrSelector)\n\n        return elements ? Array.from(elements) : []\n    }\n\n    return Array.from(elementOrSelector).filter(\n        (element): element is Element => element != null\n    )\n}\n", "import { ValueType } from \"../types\"\n\n/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nexport const getValueAsType = (value: any, type?: ValueType) => {\n    return type && typeof value === \"number\"\n        ? (type as any).transform(value)\n        : value\n}\n", "import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nexport function isHTMLElement(element: unknown): element is HTMLElement {\n    return isObject(element) && \"offsetHeight\" in element\n}\n", "import { createRenderBatcher } from \"./batcher\"\n\nexport const { schedule: microtask, cancel: cancelMicrotask } =\n    /* @__PURE__ */ createRenderBatcher(queueMicrotask, false)\n", "export const isDragging = {\n    x: false,\n    y: false,\n}\n\nexport function isDragActive() {\n    return isDragging.x || isDragging.y\n}\n", "import { isDragging } from \"./is-active\"\n\nexport function setDragLock(axis: boolean | \"x\" | \"y\" | \"lockDirection\") {\n    if (axis === \"x\" || axis === \"y\") {\n        if (isDragging[axis]) {\n            return null\n        } else {\n            isDragging[axis] = true\n            return () => {\n                isDragging[axis] = false\n            }\n        }\n    } else {\n        if (isDragging.x || isDragging.y) {\n            return null\n        } else {\n            isDragging.x = isDragging.y = true\n            return () => {\n                isDragging.x = isDragging.y = false\n            }\n        }\n    }\n}\n", "import {\n    ElementOrSelector,\n    resolveElements,\n} from \"../../utils/resolve-elements\"\nimport { EventOptions } from \"../types\"\n\nexport function setupGesture(\n    elementOrSelector: ElementOrSelector,\n    options: EventOptions\n): [Element[], AddEventListenerOptions, VoidFunction] {\n    const elements = resolveElements(elementOrSelector)\n\n    const gestureAbortController = new AbortController()\n\n    const eventOptions = {\n        passive: true,\n        ...options,\n        signal: gestureAbortController.signal,\n    }\n\n    const cancel = () => gestureAbortController.abort()\n\n    return [elements, eventOptions, cancel]\n}\n", "import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { isDragActive } from \"./drag/state/is-active\"\nimport { EventOptions } from \"./types\"\nimport { setupGesture } from \"./utils/setup\"\n\n/**\n * A function to be called when a hover gesture starts.\n *\n * This function can optionally return a function that will be called\n * when the hover gesture ends.\n *\n * @public\n */\nexport type OnHoverStartEvent = (\n    element: Element,\n    event: PointerEvent\n) => void | OnHoverEndEvent\n\n/**\n * A function to be called when a hover gesture ends.\n *\n * @public\n */\nexport type OnHoverEndEvent = (event: PointerEvent) => void\n\nfunction isValidHover(event: PointerEvent) {\n    return !(event.pointerType === \"touch\" || isDragActive())\n}\n\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nexport function hover(\n    elementOrSelector: ElementOrSelector,\n    onHoverStart: OnHoverStartEvent,\n    options: EventOptions = {}\n): VoidFunction {\n    const [elements, eventOptions, cancel] = setupGesture(\n        elementOrSelector,\n        options\n    )\n\n    elements.forEach((element) => {\n        let isPressed = false\n        let deferredHoverEnd = false\n        let hoverEndCallback: OnHoverEndEvent | undefined\n\n        const removePointerLeave = () => {\n            element.removeEventListener(\n                \"pointerleave\",\n                onPointerLeave as EventListener\n            )\n        }\n\n        const endHover = (event: PointerEvent) => {\n            if (hoverEndCallback) {\n                hoverEndCallback(event)\n                hoverEndCallback = undefined\n            }\n            removePointerLeave()\n        }\n\n        const onPointerUp = (event: Event) => {\n            isPressed = false\n            window.removeEventListener(\n                \"pointerup\",\n                onPointerUp as EventListener\n            )\n            window.removeEventListener(\n                \"pointercancel\",\n                onPointerUp as EventListener\n            )\n\n            if (deferredHoverEnd) {\n                deferredHoverEnd = false\n                endHover(event as PointerEvent)\n            }\n        }\n\n        const onPointerDown = () => {\n            isPressed = true\n            window.addEventListener(\n                \"pointerup\",\n                onPointerUp as EventListener,\n                eventOptions\n            )\n            window.addEventListener(\n                \"pointercancel\",\n                onPointerUp as EventListener,\n                eventOptions\n            )\n        }\n\n        const onPointerLeave = (leaveEvent: PointerEvent) => {\n            if (leaveEvent.pointerType === \"touch\") return\n\n            if (isPressed) {\n                deferredHoverEnd = true\n                return\n            }\n\n            endHover(leaveEvent)\n        }\n\n        const onPointerEnter = (enterEvent: PointerEvent) => {\n            if (!isValidHover(enterEvent)) return\n\n            deferredHoverEnd = false\n\n            const onHoverEnd = onHoverStart(\n                element as Element,\n                enterEvent\n            )\n\n            if (typeof onHoverEnd !== \"function\") return\n\n            hoverEndCallback = onHoverEnd\n\n            element.addEventListener(\n                \"pointerleave\",\n                onPointerLeave as EventListener,\n                eventOptions\n            )\n        }\n\n        element.addEventListener(\n            \"pointerenter\",\n            onPointerEnter as EventListener,\n            eventOptions\n        )\n        element.addEventListener(\n            \"pointerdown\",\n            onPointerDown as EventListener,\n            eventOptions\n        )\n    })\n\n    return cancel\n}\n", "/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nexport const isNodeOrChild = (\n    parent: Element | null,\n    child?: Element | null\n): boolean => {\n    if (!child) {\n        return false\n    } else if (parent === child) {\n        return true\n    } else {\n        return isNodeOrChild(parent, child.parentElement)\n    }\n}\n", "export const isPrimaryPointer = (event: PointerEvent) => {\n    if (event.pointerType === \"mouse\") {\n        return typeof event.button !== \"number\" || event.button <= 0\n    } else {\n        /**\n         * isPrimary is true for all mice buttons, whereas every touch point\n         * is regarded as its own input. So subsequent concurrent touch points\n         * will be false.\n         *\n         * Specifically match against false here as incomplete versions of\n         * PointerEvents in very old browser might have it set as undefined.\n         */\n        return event.isPrimary !== false\n    }\n}\n", "const keyboardAccessibleElements = new Set([\n    \"BUTTON\",\n    \"INPUT\",\n    \"SELECT\",\n    \"TEXTAREA\",\n    \"A\",\n])\n\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nexport function isElementKeyboardAccessible(element: Element) {\n    return (\n        keyboardAccessibleElements.has(element.tagName) ||\n        (element as HTMLElement).isContentEditable === true\n    )\n}\n\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"])\n\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nexport function isElementTextInput(element: Element) {\n    return (\n        textInputElements.has(element.tagName) ||\n        (element as HTMLElement).isContentEditable === true\n    )\n}\n", "export const isPressing = new WeakSet<EventTarget>()\n", "import { isPressing } from \"./state\"\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback: (event: KeyboardEvent) => void) {\n    return (event: KeyboardEvent) => {\n        if (event.key !== \"Enter\") return\n        callback(event)\n    }\n}\n\nfunction firePointerEvent(target: EventTarget, type: \"down\" | \"up\" | \"cancel\") {\n    target.dispatchEvent(\n        new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true })\n    )\n}\n\nexport const enableKeyboardPress = (\n    focusEvent: FocusEvent,\n    eventOptions: AddEventListenerOptions\n) => {\n    const element = focusEvent.currentTarget as HTMLElement\n    if (!element) return\n\n    const handleKeydown = filterEvents(() => {\n        if (isPressing.has(element)) return\n\n        firePointerEvent(element, \"down\")\n\n        const handleKeyup = filterEvents(() => {\n            firePointerEvent(element, \"up\")\n        })\n\n        const handleBlur = () => firePointerEvent(element, \"cancel\")\n\n        element.addEventListener(\"keyup\", handleKeyup, eventOptions)\n        element.addEventListener(\"blur\", handleBlur, eventOptions)\n    })\n\n    element.addEventListener(\"keydown\", handleKeydown, eventOptions)\n\n    /**\n     * Add an event listener that fires on blur to remove the keydown events.\n     */\n    element.addEventListener(\n        \"blur\",\n        () => element.removeEventListener(\"keydown\", handleKeydown),\n        eventOptions\n    )\n}\n", "import { isHTMLElement } from \"../../utils/is-html-element\"\nimport { ElementOrSelector } from \"../../utils/resolve-elements\"\nimport { isDragActive } from \"../drag/state/is-active\"\nimport { EventOptions } from \"../types\"\nimport { isNodeOrChild } from \"../utils/is-node-or-child\"\nimport { isPrimaryPointer } from \"../utils/is-primary-pointer\"\nimport { setupGesture } from \"../utils/setup\"\nimport { OnPressStartEvent } from \"./types\"\nimport { isElementKeyboardAccessible } from \"./utils/is-keyboard-accessible\"\nimport { enableKeyboardPress } from \"./utils/keyboard\"\nimport { isPressing } from \"./utils/state\"\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event: PointerEvent) {\n    return isPrimaryPointer(event) && !isDragActive()\n}\n\nconst claimedPointerDownEvents = new WeakSet<Event>()\n\nexport interface PointerEventOptions extends EventOptions {\n    useGlobalTarget?: boolean\n    stopPropagation?: boolean\n}\n\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n *  trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nexport function press(\n    targetOrSelector: ElementOrSelector,\n    onPressStart: OnPressStartEvent,\n    options: PointerEventOptions = {}\n): VoidFunction {\n    const [targets, eventOptions, cancelEvents] = setupGesture(\n        targetOrSelector,\n        options\n    )\n\n    const startPress = (startEvent: PointerEvent) => {\n        const target = startEvent.currentTarget as Element\n\n        if (!isValidPressEvent(startEvent)) return\n        if (claimedPointerDownEvents.has(startEvent)) return\n\n        isPressing.add(target)\n\n        if (options.stopPropagation) {\n            claimedPointerDownEvents.add(startEvent)\n        }\n\n        const onPressEnd = onPressStart(target, startEvent)\n\n        const onPointerEnd = (endEvent: PointerEvent, success: boolean) => {\n            window.removeEventListener(\"pointerup\", onPointerUp)\n            window.removeEventListener(\"pointercancel\", onPointerCancel)\n\n            if (isPressing.has(target)) {\n                isPressing.delete(target)\n            }\n\n            if (!isValidPressEvent(endEvent)) {\n                return\n            }\n\n            if (typeof onPressEnd === \"function\") {\n                onPressEnd(endEvent, { success })\n            }\n        }\n\n        const onPointerUp = (upEvent: PointerEvent) => {\n            onPointerEnd(\n                upEvent,\n                (target as any) === window ||\n                    (target as any) === document ||\n                    options.useGlobalTarget ||\n                    isNodeOrChild(target, upEvent.target as Element)\n            )\n        }\n\n        const onPointerCancel = (cancelEvent: PointerEvent) => {\n            onPointerEnd(cancelEvent, false)\n        }\n\n        window.addEventListener(\"pointerup\", onPointerUp, eventOptions)\n        window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions)\n    }\n\n    targets.forEach((target: EventTarget) => {\n        const pointerDownTarget = options.useGlobalTarget ? window : target\n        pointerDownTarget.addEventListener(\n            \"pointerdown\",\n            startPress as EventListener,\n            eventOptions\n        )\n\n        if (isHTMLElement(target)) {\n            target.addEventListener(\"focus\", (event) =>\n                enableKeyboardPress(event as FocusEvent, eventOptions)\n            )\n\n            if (\n                !isElementKeyboardAccessible(target) &&\n                !target.hasAttribute(\"tabindex\")\n            ) {\n                target.tabIndex = 0\n            }\n        }\n    })\n\n    return cancelEvents\n}\n", "import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nexport function isSVGElement(element: unknown): element is SVGElement {\n    return isObject(element) && \"ownerSVGElement\" in element\n}\n", "import { isSVGElement } from \"../utils/is-svg-element\"\nimport { ElementOrSelector, resolveElements } from \"../utils/resolve-elements\"\nimport { ResizeHandler } from \"./types\"\n\nconst resizeHandlers = new WeakMap<Element, Set<ResizeHandler<Element>>>()\n\nlet observer: ResizeObserver | undefined\n\nconst getSize =\n    (\n        borderBoxAxis: \"inline\" | \"block\",\n        svgAxis: \"width\" | \"height\",\n        htmlAxis: \"offsetWidth\" | \"offsetHeight\"\n    ) =>\n    (target: Element, borderBoxSize?: ReadonlyArray<ResizeObserverSize>) => {\n        if (borderBoxSize && borderBoxSize[0]) {\n            return borderBoxSize[0][\n                (borderBoxAxis + \"Size\") as keyof ResizeObserverSize\n            ]\n        } else if (isSVGElement(target) && \"getBBox\" in target) {\n            return (target as SVGGraphicsElement).getBBox()[svgAxis]\n        } else {\n            return (target as HTMLElement)[htmlAxis]\n        }\n    }\n\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\")\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\")\n\nfunction notifyTarget({ target, borderBoxSize }: ResizeObserverEntry) {\n    resizeHandlers.get(target)?.forEach((handler) => {\n        handler(target, {\n            get width() {\n                return getWidth(target, borderBoxSize)\n            },\n            get height() {\n                return getHeight(target, borderBoxSize)\n            },\n        })\n    })\n}\n\nfunction notifyAll(entries: ResizeObserverEntry[]) {\n    entries.forEach(notifyTarget)\n}\n\nfunction createResizeObserver() {\n    if (typeof ResizeObserver === \"undefined\") return\n\n    observer = new ResizeObserver(notifyAll)\n}\n\nexport function resizeElement(\n    target: ElementOrSelector,\n    handler: ResizeHandler<Element>\n) {\n    if (!observer) createResizeObserver()\n\n    const elements = resolveElements(target)\n\n    elements.forEach((element) => {\n        let elementHandlers = resizeHandlers.get(element)\n\n        if (!elementHandlers) {\n            elementHandlers = new Set()\n            resizeHandlers.set(element, elementHandlers)\n        }\n\n        elementHandlers.add(handler)\n        observer?.observe(element)\n    })\n\n    return () => {\n        elements.forEach((element) => {\n            const elementHandlers = resizeHandlers.get(element)\n\n            elementHandlers?.delete(handler)\n\n            if (!elementHandlers?.size) {\n                observer?.unobserve(element)\n            }\n        })\n    }\n}\n", "import { WindowResizeHandler } from \"./types\"\n\nconst windowCallbacks = new Set<WindowResizeHandler>()\n\nlet windowResizeHandler: VoidFunction | undefined\n\nfunction createWindowResizeHandler() {\n    windowResizeHandler = () => {\n        const info = {\n            get width() {\n                return window.innerWidth\n            },\n            get height() {\n                return window.innerHeight\n            },\n        }\n\n        windowCallbacks.forEach((callback) => callback(info))\n    }\n\n    window.addEventListener(\"resize\", windowResizeHandler)\n}\n\nexport function resizeWindow(callback: WindowResizeHandler) {\n    windowCallbacks.add(callback)\n\n    if (!windowResizeHandler) createWindowResizeHandler()\n\n    return () => {\n        windowCallbacks.delete(callback)\n\n        if (\n            !windowCallbacks.size &&\n            typeof windowResizeHandler === \"function\"\n        ) {\n            window.removeEventListener(\"resize\", windowResizeHandler)\n            windowResizeHandler = undefined\n        }\n    }\n}\n", "import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { resizeElement } from \"./handle-element\"\nimport { resizeWindow } from \"./handle-window\"\nimport { ResizeHandler, WindowResizeHandler } from \"./types\"\n\nexport function resize(onResize: WindowResizeHandler): VoidFunction\nexport function resize(\n    target: ElementOrSelector,\n    onResize: ResizeHandler<Element>\n): VoidFunction\nexport function resize(\n    a: WindowResizeHandler | ElementOrSelector,\n    b?: ResizeHandler<Element>\n) {\n    return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b!)\n}\n", "import { isSVGElement } from \"./is-svg-element\"\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nexport function isSVGSVGElement(element: unknown): element is SVGSVGElement {\n    return isSVGElement(element) && element.tagName === \"svg\"\n}\n", "import { color } from \"../color\"\nimport { complex } from \"../complex\"\nimport { dimensionValueTypes } from \"../dimensions\"\nimport { testValueType } from \"../test\"\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex]\n\n/**\n * Tests a value against the list of ValueTypes\n */\nexport const findValueType = (v: any) => valueTypes.find(testValueType(v))\n", "import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\n\nexport const createAxisDelta = (): AxisDelta => ({\n    translate: 0,\n    scale: 1,\n    origin: 0,\n    originPoint: 0,\n})\n\nexport const createDelta = (): Delta => ({\n    x: createAxisDelta(),\n    y: createAxisDelta(),\n})\n\nexport const createAxis = (): Axis => ({ min: 0, max: 0 })\n\nexport const createBox = (): Box => ({\n    x: createAxis(),\n    y: createAxis(),\n})\n", "import type { VisualElement } from \"./VisualElement\"\n\nexport const visualElementStore = new WeakMap<any, VisualElement>()\n", "import type { LegacyAnimationControls } from \"../../node/types\"\n\nexport function isAnimationControls(v?: unknown): v is LegacyAnimationControls {\n    return (\n        v !== null &&\n        typeof v === \"object\" &&\n        typeof (v as LegacyAnimationControls).start === \"function\"\n    )\n}\n", "/**\n * Decides if the supplied variable is variant label\n */\nexport function isVariantLabel(v: unknown): v is string | string[] {\n    return typeof v === \"string\" || Array.isArray(v)\n}\n", "import type { AnimationType } from \"../types\"\n\nexport const variantPriorityOrder: AnimationType[] = [\n    \"animate\",\n    \"whileInView\",\n    \"whileFocus\",\n    \"whileHover\",\n    \"whileTap\",\n    \"whileDrag\",\n    \"exit\",\n]\n\nexport const variantProps = [\"initial\", ...variantPriorityOrder]\n", "import type { MotionNodeOptions } from \"../../node/types\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nexport function isControllingVariants(props: MotionNodeOptions) {\n    return (\n        isAnimationControls(props.animate) ||\n        variantProps.some((name) =>\n            isVariantLabel(props[name as keyof typeof props])\n        )\n    )\n}\n\nexport function isVariantNode(props: MotionNodeOptions) {\n    return Boolean(isControllingVariants(props) || props.variants)\n}\n", "import { motionValue } from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\ntype MotionStyleLike = Record<string, any>\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nexport function updateMotionValuesFromProps(\n    element: any,\n    next: MotionStyleLike,\n    prev: MotionStyleLike\n) {\n    for (const key in next) {\n        const nextValue = next[key]\n        const prevValue = prev[key]\n\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        } 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        } 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\n                if (existingValue.liveStyle === true) {\n                    existingValue.jump(nextValue)\n                } else if (!existingValue.hasAnimated) {\n                    existingValue.set(nextValue)\n                }\n            } else {\n                const latestValue = element.getStaticValue(key)\n                element.addValue(\n                    key,\n                    motionValue(\n                        latestValue !== undefined ? latestValue : nextValue,\n                        { owner: element }\n                    )\n                )\n            }\n        }\n    }\n\n    // Handle removed values\n    for (const key in prev) {\n        if (next[key] === undefined) element.removeValue(key)\n    }\n\n    return next\n}\n", "interface ReducedMotionState {\n    current: boolean | null\n}\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nexport const prefersReducedMotion: ReducedMotionState = { current: null }\n\nexport const hasReducedMotionListener = { current: false }\n", "import { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nconst isBrowser = typeof window !== \"undefined\"\n\nexport function initPrefersReducedMotion() {\n    hasReducedMotionListener.current = true\n    if (!isBrowser) return\n\n    if (window.matchMedia) {\n        const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n        const setReducedMotionPreferences = () =>\n            (prefersReducedMotion.current = motionMediaQuery.matches)\n\n        motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n        setReducedMotionPreferences()\n    } else {\n        prefersReducedMotion.current = false\n    }\n}\n\nexport { prefersReducedMotion, hasReducedMotionListener }\n", "import {\n    Box,\n    isNumericalString,\n    isZeroValueString,\n    secondsToMilliseconds,\n    SubscriptionManager,\n    warnOnce,\n} from \"motion-utils\"\nimport { KeyframeResolver } from \"../animation/keyframes/KeyframesResolver\"\nimport { NativeAnimation } from \"../animation/NativeAnimation\"\nimport type { AnyResolvedKeyframe } from \"../animation/types\"\nimport { acceleratedValues } from \"../animation/waapi/utils/accelerated-values\"\nimport { cancelFrame, frame } from \"../frameloop\"\nimport { microtask } from \"../frameloop/microtask\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { MotionNodeOptions } from \"../node/types\"\nimport { createBox } from \"../projection/geometry/models\"\nimport { motionValue, MotionValue } from \"../value\"\nimport { complex } from \"../value/types/complex\"\nimport { getAnimatableNone } from \"../value/types/utils/animatable-none\"\nimport { findValueType } from \"../value/types/utils/find\"\nimport { isMotionValue } from \"../value/utils/is-motion-value\"\nimport { Feature } from \"./Feature\"\nimport { visualElementStore } from \"./store\"\nimport {\n    FeatureDefinitions,\n    MotionConfigContextProps,\n    PresenceContextProps,\n    ReducedMotionConfig,\n    ResolvedValues,\n    VisualElementEventCallbacks,\n    VisualElementOptions,\n} from \"./types\"\nimport { AnimationState } from \"./utils/animation-state\"\nimport {\n    isControllingVariants as checkIsControllingVariants,\n    isVariantNode as checkIsVariantNode,\n} from \"./utils/is-controlling-variants\"\nimport { transformProps } from \"./utils/keys-transform\"\nimport { updateMotionValuesFromProps } from \"./utils/motion-values\"\nimport {\n    hasReducedMotionListener,\n    initPrefersReducedMotion,\n    prefersReducedMotion,\n} from \"./utils/reduced-motion\"\nimport { resolveVariantFromProps } from \"./utils/resolve-variants\"\n\nconst propEventHandlers = [\n    \"AnimationStart\",\n    \"AnimationComplete\",\n    \"Update\",\n    \"BeforeLayoutMeasure\",\n    \"LayoutMeasure\",\n    \"LayoutAnimationStart\",\n    \"LayoutAnimationComplete\",\n] as const\n\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions: Partial<FeatureDefinitions> = {}\n\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nexport function setFeatureDefinitions(\n    definitions: Partial<FeatureDefinitions>\n) {\n    featureDefinitions = definitions\n}\n\n/**\n * Get the current feature definitions\n */\nexport function getFeatureDefinitions(): Partial<FeatureDefinitions> {\n    return featureDefinitions\n}\n\n/**\n * Motion style type - a subset of CSS properties that can contain motion values\n */\nexport type MotionStyle = {\n    [K: string]: AnyResolvedKeyframe | MotionValue | undefined\n}\n\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nexport abstract class VisualElement<\n    Instance = unknown,\n    RenderState = unknown,\n    Options extends {} = {}\n> {\n    /**\n     * VisualElements are arranged in trees mirroring that of the React tree.\n     * Each type of VisualElement has a unique name, to detect when we're crossing\n     * type boundaries within that tree.\n     */\n    abstract type: string\n\n    /**\n     * An `Array.sort` compatible function that will compare two Instances and\n     * compare their respective positions within the tree.\n     */\n    abstract sortInstanceNodePosition(a: Instance, b: Instance): number\n\n    /**\n     * Measure the viewport-relative bounding box of the Instance.\n     */\n    abstract measureInstanceViewportBox(\n        instance: Instance,\n        props: MotionNodeOptions & Partial<MotionConfigContextProps>\n    ): Box\n\n    /**\n     * When a value has been removed from all animation props we need to\n     * pick a target to animate back to. For instance, for HTMLElements\n     * we can look in the style prop.\n     */\n    abstract getBaseTargetFromProps(\n        props: MotionNodeOptions,\n        key: string\n    ): AnyResolvedKeyframe | undefined | MotionValue\n\n    /**\n     * When we first animate to a value we need to animate it *from* a value.\n     * Often this have been specified via the initial prop but it might be\n     * that the value needs to be read from the Instance.\n     */\n    abstract readValueFromInstance(\n        instance: Instance,\n        key: string,\n        options: Options\n    ): AnyResolvedKeyframe | null | undefined\n\n    /**\n     * When a value has been removed from the VisualElement we use this to remove\n     * it from the inherting class' unique render state.\n     */\n    abstract removeValueFromRenderState(\n        key: string,\n        renderState: RenderState\n    ): void\n\n    /**\n     * Run before a React or VisualElement render, builds the latest motion\n     * values into an Instance-specific format. For example, HTMLVisualElement\n     * will use this step to build `style` and `var` values.\n     */\n    abstract build(\n        renderState: RenderState,\n        latestValues: ResolvedValues,\n        props: MotionNodeOptions\n    ): void\n\n    /**\n     * Apply the built values to the Instance. For example, HTMLElements will have\n     * styles applied via `setProperty` and the style attribute, whereas SVGElements\n     * will have values applied to attributes.\n     */\n    abstract renderInstance(\n        instance: Instance,\n        renderState: RenderState,\n        styleProp?: MotionStyle,\n        projection?: any\n    ): void\n\n    /**\n     * This method is called when a transform property is bound to a motion value.\n     * It's currently used to measure SVG elements when a new transform property is bound.\n     */\n    onBindTransform?(): void\n\n    /**\n     * If the component child is provided as a motion value, handle subscriptions\n     * with the renderer-specific VisualElement.\n     */\n    handleChildMotionValue?(): void\n\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(\n        _props: MotionNodeOptions,\n        _prevProps: MotionNodeOptions,\n        _visualElement: VisualElement\n    ): {\n        [key: string]: MotionValue | AnyResolvedKeyframe\n    } {\n        return {}\n    }\n\n    /**\n     * A reference to the current underlying Instance, e.g. a HTMLElement\n     * or Three.Mesh etc.\n     */\n    current: Instance | null = null\n\n    /**\n     * A reference to the parent VisualElement (if exists).\n     */\n    parent: VisualElement | undefined\n\n    /**\n     * A set containing references to this VisualElement's children.\n     */\n    children = new Set<VisualElement>()\n\n    /**\n     * A set containing the latest children of this VisualElement. This is flushed\n     * at the start of every commit. We use it to calculate the stagger delay\n     * for newly-added children.\n     */\n    enteringChildren?: Set<VisualElement>\n\n    /**\n     * The depth of this VisualElement within the overall VisualElement tree.\n     */\n    depth: number\n\n    /**\n     * The current render state of this VisualElement. Defined by inherting VisualElements.\n     */\n    renderState: RenderState\n\n    /**\n     * An object containing the latest static values for each of this VisualElement's\n     * MotionValues.\n     */\n    latestValues: ResolvedValues\n\n    /**\n     * Determine what role this visual element should take in the variant tree.\n     */\n    isVariantNode: boolean = false\n    isControllingVariants: boolean = false\n\n    /**\n     * If this component is part of the variant tree, it should track\n     * any children that are also part of the tree. This is essentially\n     * a shadow tree to simplify logic around how to stagger over children.\n     */\n    variantChildren?: Set<VisualElement>\n\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    shouldReduceMotion: boolean | null = null\n\n    /**\n     * Decides whether animations should be skipped for this VisualElement.\n     * Useful for E2E tests and visual regression testing.\n     */\n    shouldSkipAnimations: boolean = false\n\n    /**\n     * Normally, if a component is controlled by a parent's variants, it can\n     * rely on that ancestor to trigger animations further down the tree.\n     * However, if a component is created after its parent is mounted, the parent\n     * won't trigger that mount animation so the child needs to.\n     *\n     * TODO: This might be better replaced with a method isParentMounted\n     */\n    manuallyAnimateOnMount: boolean\n\n    /**\n     * This can be set by AnimatePresence to force components that mount\n     * at the same time as it to mount as if they have initial={false} set.\n     */\n    blockInitialAnimation: boolean\n\n    /**\n     * A reference to this VisualElement's projection node, used in layout animations.\n     */\n    projection?: any\n\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    values = new Map<string, MotionValue>()\n\n    /**\n     * The AnimationState, this is hydrated by the animation Feature.\n     */\n    animationState?: AnimationState\n\n    KeyframeResolver = KeyframeResolver\n\n    /**\n     * The options used to create this VisualElement. The Options type is defined\n     * by the inheriting VisualElement and is passed straight through to the render functions.\n     */\n    readonly options: Options\n\n    /**\n     * A reference to the latest props provided to the VisualElement's host React component.\n     */\n    props: MotionNodeOptions\n    prevProps?: MotionNodeOptions\n\n    presenceContext: PresenceContextProps | null\n    prevPresenceContext?: PresenceContextProps | null\n\n    /**\n     * Cleanup functions for active features (hover/tap/exit etc)\n     */\n    private features: {\n        [K in keyof FeatureDefinitions]?: Feature<Instance>\n    } = {}\n\n    /**\n     * A map of every subscription that binds the provided or generated\n     * motion values onChange listeners to this visual element.\n     */\n    private valueSubscriptions = new Map<string, VoidFunction>()\n\n    /**\n     * A reference to the ReducedMotionConfig passed to the VisualElement's host React component.\n     */\n    private reducedMotionConfig: ReducedMotionConfig | undefined\n\n    /**\n     * A reference to the skipAnimations config passed to the VisualElement's host React component.\n     */\n    private skipAnimationsConfig: boolean | undefined\n\n    /**\n     * On mount, this will be hydrated with a callback to disconnect\n     * this visual element from its parent on unmount.\n     */\n    private removeFromVariantTree: undefined | VoidFunction\n\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    private prevMotionValues: MotionStyle = {}\n\n    /**\n     * When values are removed from all animation props we need to search\n     * for a fallback value to animate to. These values are tracked in baseTarget.\n     */\n    private baseTarget: ResolvedValues\n\n    /**\n     * Create an object of the values we initially animated from (if initial prop present).\n     */\n    private initialValues: ResolvedValues\n\n    /**\n     * Track whether this element has been mounted before, to detect\n     * remounts after Suspense unmount/remount cycles.\n     */\n    private hasBeenMounted = false\n\n    /**\n     * An object containing a SubscriptionManager for each active event.\n     */\n    private events: {\n        [key: string]: SubscriptionManager<any>\n    } = {}\n\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    private propEventSubscriptions: {\n        [key: string]: VoidFunction\n    } = {}\n\n    constructor(\n        {\n            parent,\n            props,\n            presenceContext,\n            reducedMotionConfig,\n            skipAnimations,\n            blockInitialAnimation,\n            visualState,\n        }: VisualElementOptions<Instance, RenderState>,\n        options: Options = {} as any\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.skipAnimationsConfig = skipAnimations\n        this.options = options\n        this.blockInitialAnimation = Boolean(blockInitialAnimation)\n\n        this.isControllingVariants = checkIsControllingVariants(props)\n        this.isVariantNode = checkIsVariantNode(props)\n        if (this.isVariantNode) {\n            this.variantChildren = new Set()\n        }\n\n        this.manuallyAnimateOnMount = Boolean(parent && parent.current)\n\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 } =\n            this.scrapeMotionValuesFromProps(props, {}, this)\n\n        for (const key in initialMotionValues) {\n            const value = initialMotionValues[key]\n\n            if (latestValues[key] !== undefined && isMotionValue(value)) {\n                value.set(latestValues[key])\n            }\n        }\n    }\n\n    mount(instance: Instance) {\n        /**\n         * If this element has been mounted before (e.g. after a Suspense\n         * unmount/remount), reset motion values to their initial state\n         * so animations replay correctly from initial → animate.\n         */\n        if (this.hasBeenMounted) {\n            for (const key in this.initialValues) {\n                this.values.get(key)?.jump(this.initialValues[key])\n                this.latestValues[key] = this.initialValues[key]\n            }\n        }\n\n        this.current = instance\n\n        visualElementStore.set(instance, this)\n\n        if (this.projection && !this.projection.instance) {\n            this.projection.mount(instance)\n        }\n\n        if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n            this.removeFromVariantTree = this.parent.addVariantChild(this)\n        }\n\n        this.values.forEach((value, key) => this.bindToMotionValue(key, value))\n\n        /**\n         * Determine reduced motion preference. Only initialize the matchMedia\n         * listener if we actually need the dynamic value (i.e., when config\n         * is neither \"never\" nor \"always\").\n         */\n        if (this.reducedMotionConfig === \"never\") {\n            this.shouldReduceMotion = false\n        } else if (this.reducedMotionConfig === \"always\") {\n            this.shouldReduceMotion = true\n        } else {\n            if (!hasReducedMotionListener.current) {\n                initPrefersReducedMotion()\n            }\n            this.shouldReduceMotion = prefersReducedMotion.current\n        }\n\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(\n                this.shouldReduceMotion !== true,\n                \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n                \"reduced-motion-disabled\"\n            )\n        }\n\n        /**\n         * Set whether animations should be skipped based on the config.\n         */\n        this.shouldSkipAnimations = this.skipAnimationsConfig ?? false\n\n        this.parent?.addChild(this)\n\n        this.update(this.props, this.presenceContext)\n\n        this.hasBeenMounted = true\n    }\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?.removeChild(this)\n\n        for (const key in this.events) {\n            this.events[key].clear()\n        }\n\n        for (const key in this.features) {\n            const feature = this.features[key as keyof typeof this.features]\n            if (feature) {\n                feature.unmount()\n                feature.isMounted = false\n            }\n        }\n        this.current = null\n    }\n\n    addChild(child: VisualElement) {\n        this.children.add(child)\n        this.enteringChildren ??= new Set()\n        this.enteringChildren.add(child)\n    }\n\n    removeChild(child: VisualElement) {\n        this.children.delete(child)\n        this.enteringChildren && this.enteringChildren.delete(child)\n    }\n\n    private bindToMotionValue(key: string, value: MotionValue) {\n        if (this.valueSubscriptions.has(key)) {\n            this.valueSubscriptions.get(key)!()\n        }\n\n        if (\n            value.accelerate &&\n            acceleratedValues.has(key) &&\n            this.current instanceof HTMLElement\n        ) {\n            const { factory, keyframes, times, ease, duration } =\n                value.accelerate\n\n            const animation = new NativeAnimation({\n                element: this.current,\n                name: key,\n                keyframes,\n                times,\n                ease,\n                duration: secondsToMilliseconds(duration),\n            })\n\n            const cleanup = factory(animation)\n\n            this.valueSubscriptions.set(key, () => {\n                cleanup()\n                animation.cancel()\n            })\n            return\n        }\n\n        const valueIsTransform = transformProps.has(key)\n\n        if (valueIsTransform && this.onBindTransform) {\n            this.onBindTransform()\n        }\n\n        const removeOnChange = value.on(\n            \"change\",\n            (latestValue: AnyResolvedKeyframe) => {\n                this.latestValues[key] = latestValue\n\n                this.props.onUpdate && frame.preRender(this.notifyUpdate)\n\n                if (valueIsTransform && this.projection) {\n                    this.projection.isTransformDirty = true\n                }\n\n                this.scheduleRender()\n            }\n        )\n\n        let removeSyncCheck: VoidFunction | void\n        if (\n            typeof window !== \"undefined\" &&\n            (window as any).MotionCheckAppearSync\n        ) {\n            removeSyncCheck = (window as any).MotionCheckAppearSync(\n                this,\n                key,\n                value\n            )\n        }\n\n        this.valueSubscriptions.set(key, () => {\n            removeOnChange()\n            if (removeSyncCheck) removeSyncCheck()\n            if (value.owner) value.stop()\n        })\n    }\n\n    sortNodePosition(other: VisualElement<Instance>) {\n        /**\n         * If these nodes aren't even of the same type we can't compare their depth.\n         */\n        if (\n            !this.current ||\n            !this.sortInstanceNodePosition ||\n            this.type !== other.type\n        ) {\n            return 0\n        }\n\n        return this.sortInstanceNodePosition(\n            this.current as Instance,\n            other.current as Instance\n        )\n    }\n\n    updateFeatures() {\n        let key: keyof typeof featureDefinitions = \"animation\"\n\n        for (key in featureDefinitions) {\n            const featureDefinition = featureDefinitions[key]\n\n            if (!featureDefinition) continue\n\n            const { isEnabled, Feature: FeatureConstructor } = featureDefinition\n\n            /**\n             * If this feature is enabled but not active, make a new instance.\n             */\n            if (\n                !this.features[key] &&\n                FeatureConstructor &&\n                isEnabled(this.props)\n            ) {\n                this.features[key] = new FeatureConstructor(this) as any\n            }\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                } else {\n                    feature.mount()\n                    feature.isMounted = true\n                }\n            }\n        }\n    }\n\n    notifyUpdate = () => this.notify(\"Update\", this.latestValues)\n\n    triggerBuild() {\n        this.build(this.renderState, this.latestValues, this.props)\n    }\n\n    render = () => {\n        if (!this.current) return\n        this.triggerBuild()\n        this.renderInstance(\n            this.current,\n            this.renderState,\n            (this.props as any).style,\n            this.projection\n        )\n    }\n\n    private renderScheduledAt = 0.0\n    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\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\n    getStaticValue(key: string) {\n        return this.latestValues[key]\n    }\n\n    setStaticValue(key: string, value: AnyResolvedKeyframe) {\n        this.latestValues[key] = value\n    }\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(\n        props: MotionNodeOptions,\n        presenceContext: PresenceContextProps | null\n    ) {\n        if (props.transformTemplate || this.props.transformTemplate) {\n            this.scheduleRender()\n        }\n\n        this.prevProps = this.props\n        this.props = props\n\n        this.prevPresenceContext = this.presenceContext\n        this.presenceContext = presenceContext\n\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\n            const listenerName = (\"on\" + key) as keyof typeof props\n            const listener = props[listenerName]\n            if (listener) {\n                this.propEventSubscriptions[key] = this.on(key as any, listener)\n            }\n        }\n\n        this.prevMotionValues = updateMotionValuesFromProps(\n            this,\n            this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this),\n            this.prevMotionValues\n        )\n\n        if (this.handleChildMotionValue) {\n            this.handleChildMotionValue()\n        }\n    }\n\n    getProps() {\n        return this.props\n    }\n\n    /**\n     * Returns the variant definition with a given name.\n     */\n    getVariant(name: string) {\n        return this.props.variants ? this.props.variants[name] : undefined\n    }\n\n    /**\n     * Returns the defined default transition on this component.\n     */\n    getDefaultTransition() {\n        return this.props.transition\n    }\n\n    getTransformPagePoint() {\n        return (this.props as any).transformPagePoint\n    }\n\n    getClosestVariantNode(): VisualElement | undefined {\n        return this.isVariantNode\n            ? this\n            : this.parent\n            ? this.parent.getClosestVariantNode()\n            : undefined\n    }\n\n    /**\n     * Add a child visual element to our set of children.\n     */\n    addVariantChild(child: VisualElement) {\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    /**\n     * Add a motion value and bind it to this visual element.\n     */\n    addValue(key: string, value: MotionValue) {\n        // Remove existing value if it exists\n        const existingValue = this.values.get(key)\n\n        if (value !== existingValue) {\n            if (existingValue) this.removeValue(key)\n            this.bindToMotionValue(key, value)\n            this.values.set(key, value)\n            this.latestValues[key] = value.get()\n        }\n    }\n\n    /**\n     * Remove a motion value and unbind any active subscriptions.\n     */\n    removeValue(key: string) {\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    /**\n     * Check whether we have a motion value for this key\n     */\n    hasValue(key: string) {\n        return this.values.has(key)\n    }\n\n    /**\n     * Get a motion value for this key. If called with a default\n     * value, we'll create one if none exists.\n     */\n    getValue(key: string): MotionValue | undefined\n    getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue\n    getValue(\n        key: string,\n        defaultValue?: AnyResolvedKeyframe | null\n    ): MotionValue | undefined {\n        if (this.props.values && this.props.values[key]) {\n            return this.props.values[key]\n        }\n\n        let value = this.values.get(key)\n\n        if (value === undefined && defaultValue !== undefined) {\n            value = motionValue(\n                defaultValue === null ? undefined : defaultValue,\n                { owner: this }\n            )\n            this.addValue(key, value)\n        }\n\n        return value\n    }\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: string, target?: AnyResolvedKeyframe | null) {\n        let value =\n            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\n        if (value !== undefined && value !== null) {\n            if (\n                typeof value === \"string\" &&\n                (isNumericalString(value) || isZeroValueString(value))\n            ) {\n                // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n                value = parseFloat(value)\n            } else if (!findValueType(value) && complex.test(target)) {\n                value = getAnimatableNone(key, target as string)\n            }\n\n            this.setBaseTarget(key, isMotionValue(value) ? value.get() : value)\n        }\n\n        return isMotionValue(value) ? value.get() : value\n    }\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: string, value: AnyResolvedKeyframe) {\n        this.baseTarget[key] = value\n    }\n\n    /**\n     * Find the base target for a value thats been removed from all animation\n     * props.\n     */\n    getBaseTarget(key: string): ResolvedValues[string] | undefined | null {\n        const { initial } = this.props\n\n        let valueFromInitial: ResolvedValues[string] | undefined | null\n\n        if (typeof initial === \"string\" || typeof initial === \"object\") {\n            const variant = resolveVariantFromProps(\n                this.props,\n                initial as any,\n                this.presenceContext?.custom\n            )\n            if (variant) {\n                valueFromInitial = variant[\n                    key as keyof typeof variant\n                ] as string\n            }\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        /**\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)) return target\n\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\n    on<EventName extends keyof VisualElementEventCallbacks>(\n        eventName: EventName,\n        callback: VisualElementEventCallbacks[EventName]\n    ) {\n        if (!this.events[eventName]) {\n            this.events[eventName] = new SubscriptionManager()\n        }\n\n        return this.events[eventName].add(callback)\n    }\n\n    notify<EventName extends keyof VisualElementEventCallbacks>(\n        eventName: EventName,\n        ...args: any\n    ) {\n        if (this.events[eventName]) {\n            this.events[eventName].notify(...args)\n        }\n    }\n\n    scheduleRenderMicrotask() {\n        microtask.render(this.render)\n    }\n}\n", "import { isMotionValue } from \"../../value/utils/is-motion-value\"\nimport type { MotionValue } from \"../../value\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { DOMKeyframesResolver } from \"../../animation/keyframes/DOMKeyframesResolver\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport type { DOMVisualElementOptions } from \"./types\"\nimport type { HTMLRenderState } from \"../html/types\"\nimport { VisualElement, MotionStyle } from \"../VisualElement\"\n\nexport abstract class DOMVisualElement<\n    Instance extends HTMLElement | SVGElement = HTMLElement,\n    State extends HTMLRenderState = HTMLRenderState,\n    Options extends DOMVisualElementOptions = DOMVisualElementOptions\n> extends VisualElement<Instance, State, Options> {\n    sortInstanceNodePosition(a: Instance, b: Instance): number {\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\n    getBaseTargetFromProps(\n        props: MotionNodeOptions,\n        key: string\n    ): AnyResolvedKeyframe | MotionValue<any> | undefined {\n        const style = (props as MotionNodeOptions & { style?: MotionStyle }).style\n        return style ? (style[key] as string) : undefined\n    }\n\n    removeValueFromRenderState(\n        key: string,\n        { vars, style }: HTMLRenderState\n    ): void {\n        delete vars[key]\n        delete style[key]\n    }\n\n    KeyframeResolver = DOMKeyframesResolver\n\n    childSubscription?: VoidFunction\n    handleChildMotionValue() {\n        if (this.childSubscription) {\n            this.childSubscription()\n            delete this.childSubscription\n        }\n\n        const { children } = this.props as MotionNodeOptions & { children?: MotionValue | any }\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", "import type { VisualElement } from \"./VisualElement\"\n\n/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nexport abstract class Feature<T extends any = any> {\n    isMounted = false\n\n    node: VisualElement<T>\n\n    constructor(node: VisualElement<T>) {\n        this.node = node\n    }\n\n    abstract mount(): void\n\n    abstract unmount(): void\n\n    update(): void {}\n}\n", "import { BoundingBox, Box, TransformPoint } from \"motion-utils\"\n\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 */\nexport function convertBoundingBoxToBox({\n    top,\n    left,\n    right,\n    bottom,\n}: BoundingBox): Box {\n    return {\n        x: { min: left, max: right },\n        y: { min: top, max: bottom },\n    }\n}\n\nexport function convertBoxToBoundingBox({ x, y }: Box): BoundingBox {\n    return { top: y.min, right: x.max, bottom: y.max, left: x.min }\n}\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 */\nexport function transformBoxPoints(\n    point: BoundingBox,\n    transformPoint?: TransformPoint\n) {\n    if (!transformPoint) return point\n    const topLeft = transformPoint({ x: point.left, y: point.top })\n    const bottomRight = transformPoint({ x: point.right, y: point.bottom })\n\n    return {\n        top: topLeft.y,\n        left: topLeft.x,\n        bottom: bottomRight.y,\n        right: bottomRight.x,\n    }\n}\n", "import { type AnyResolvedKeyframe } from \"../../animation/types\"\nimport { ResolvedValues } from \"../../render/types\"\n\nfunction isIdentityScale(scale: AnyResolvedKeyframe | undefined) {\n    return scale === undefined || scale === 1\n}\n\nexport function hasScale({ scale, scaleX, scaleY }: ResolvedValues) {\n    return (\n        !isIdentityScale(scale) ||\n        !isIdentityScale(scaleX) ||\n        !isIdentityScale(scaleY)\n    )\n}\n\nexport function hasTransform(values: ResolvedValues) {\n    return (\n        hasScale(values) ||\n        has2DTranslate(values) ||\n        values.z ||\n        values.rotate ||\n        values.rotateX ||\n        values.rotateY ||\n        values.skewX ||\n        values.skewY\n    )\n}\n\nexport function has2DTranslate(values: ResolvedValues) {\n    return is2DTranslate(values.x) || is2DTranslate(values.y)\n}\n\nfunction is2DTranslate(value: AnyResolvedKeyframe | undefined) {\n    return value && value !== \"0%\"\n}\n", "import { Axis, Box, Delta, Point } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { hasTransform } from \"../utils/has-transform\"\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nexport function scalePoint(point: number, scale: number, originPoint: number) {\n    const distanceFromOrigin = point - originPoint\n    const scaled = scale * distanceFromOrigin\n    return originPoint + scaled\n}\n\n/**\n * Applies a translate/scale delta to a point\n */\nexport function applyPointDelta(\n    point: number,\n    translate: number,\n    scale: number,\n    originPoint: number,\n    boxScale?: number\n): number {\n    if (boxScale !== undefined) {\n        point = scalePoint(point, boxScale, originPoint)\n    }\n\n    return scalePoint(point, scale, originPoint) + translate\n}\n\n/**\n * Applies a translate/scale delta to an axis\n */\nexport function applyAxisDelta(\n    axis: Axis,\n    translate: number = 0,\n    scale: number = 1,\n    originPoint: number,\n    boxScale?: number\n): void {\n    axis.min = applyPointDelta(\n        axis.min,\n        translate,\n        scale,\n        originPoint,\n        boxScale\n    )\n\n    axis.max = applyPointDelta(\n        axis.max,\n        translate,\n        scale,\n        originPoint,\n        boxScale\n    )\n}\n\n/**\n * Applies a translate/scale delta to a box\n */\nexport function applyBoxDelta(box: Box, { x, y }: Delta): void {\n    applyAxisDelta(box.x, x.translate, x.scale, x.originPoint)\n    applyAxisDelta(box.y, y.translate, y.scale, y.originPoint)\n}\n\nconst TREE_SCALE_SNAP_MIN = 0.999999999999\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001\n\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nexport function applyTreeDeltas(\n    box: Box,\n    treeScale: Point,\n    treePath: any[],\n    isSharedTransition: boolean = false\n) {\n    const treeLength = treePath.length\n    if (!treeLength) return\n\n    // Reset the treeScale\n    treeScale.x = treeScale.y = 1\n\n    let node: any\n    let delta: Delta | undefined\n\n    for (let i = 0; i < treeLength; i++) {\n        node = treePath[i]\n        delta = node.projectionDelta\n\n        /**\n         * TODO: Prefer to remove this, but currently we have motion components with\n         * display: contents in Framer.\n         */\n        const { visualElement } = node.options\n        if (\n            visualElement &&\n            visualElement.props.style &&\n            visualElement.props.style.display === \"contents\"\n        ) {\n            continue\n        }\n\n        if (\n            isSharedTransition &&\n            node.options.layoutScroll &&\n            node.scroll &&\n            node !== node.root\n        ) {\n            transformBox(box, {\n                x: -node.scroll.offset.x,\n                y: -node.scroll.offset.y,\n            })\n        }\n\n        if (delta) {\n            // Incoporate each ancestor's scale into a cumulative treeScale for this component\n            treeScale.x *= delta.x.scale\n            treeScale.y *= delta.y.scale\n\n            // Apply each ancestor's calculated delta into this component's recorded layout box\n            applyBoxDelta(box, delta)\n        }\n\n        if (isSharedTransition && hasTransform(node.latestValues)) {\n            transformBox(box, node.latestValues)\n        }\n    }\n\n    /**\n     * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n     * This will help reduce useless scales getting rendered.\n     */\n    if (\n        treeScale.x < TREE_SCALE_SNAP_MAX &&\n        treeScale.x > TREE_SCALE_SNAP_MIN\n    ) {\n        treeScale.x = 1.0\n    }\n    if (\n        treeScale.y < TREE_SCALE_SNAP_MAX &&\n        treeScale.y > TREE_SCALE_SNAP_MIN\n    ) {\n        treeScale.y = 1.0\n    }\n}\n\nexport function translateAxis(axis: Axis, distance: number) {\n    axis.min = axis.min + distance\n    axis.max = axis.max + distance\n}\n\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nexport function transformAxis(\n    axis: Axis,\n    axisTranslate?: number,\n    axisScale?: number,\n    boxScale?: number,\n    axisOrigin: number = 0.5\n): void {\n    const originPoint = mixNumber(axis.min, axis.max, axisOrigin)\n\n    // Apply the axis delta to the final axis\n    applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale)\n}\n\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nexport function transformBox(box: Box, transform: ResolvedValues) {\n    transformAxis(\n        box.x,\n        transform.x as number,\n        transform.scaleX as number,\n        transform.scale as number,\n        transform.originX as number\n    )\n    transformAxis(\n        box.y,\n        transform.y as number,\n        transform.scaleY as number,\n        transform.scale as number,\n        transform.originY as number\n    )\n}\n", "import { TransformPoint } from \"motion-utils\"\nimport {\n    convertBoundingBoxToBox,\n    transformBoxPoints,\n} from \"../geometry/conversion\"\nimport { translateAxis } from \"../geometry/delta-apply\"\n\nexport function measureViewportBox(\n    instance: HTMLElement,\n    transformPoint?: TransformPoint\n) {\n    return convertBoundingBoxToBox(\n        transformBoxPoints(instance.getBoundingClientRect(), transformPoint)\n    )\n}\n\nexport function measurePageBox(\n    element: HTMLElement,\n    rootProjectionNode: any,\n    transformPagePoint?: TransformPoint\n) {\n    const viewportBox = measureViewportBox(element, transformPagePoint)\n    const { scroll } = rootProjectionNode\n\n    if (scroll) {\n        translateAxis(viewportBox.x, scroll.offset.x)\n        translateAxis(viewportBox.y, scroll.offset.y)\n    }\n\n    return viewportBox\n}\n", "import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nconst translateAlias = {\n    x: \"translateX\",\n    y: \"translateY\",\n    z: \"translateZ\",\n    transformPerspective: \"perspective\",\n}\n\nconst numTransforms = transformPropOrder.length\n\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 */\nexport function buildTransform(\n    latestValues: ResolvedValues,\n    transform: HTMLRenderState[\"transform\"],\n    transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n    // The transform string we're going to build into.\n    let transformString = \"\"\n    let transformIsDefault = true\n\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] as keyof typeof translateAlias\n        const value = latestValues[key]\n\n        if (value === undefined) continue\n\n        let valueIsDefault = true\n        if (typeof value === \"number\") {\n            valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0)\n        } else {\n            const parsed = parseFloat(value)\n            valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0\n        }\n\n        if (!valueIsDefault || transformTemplate) {\n            const valueAsType = getValueAsType(value, numberValueTypes[key])\n\n            if (!valueIsDefault) {\n                transformIsDefault = false\n                const transformName = translateAlias[key] || key\n                transformString += `${transformName}(${valueAsType}) `\n            }\n\n            if (transformTemplate) {\n                transform[key] = valueAsType\n            }\n        }\n    }\n\n    transformString = transformString.trim()\n\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(\n            transform,\n            transformIsDefault ? \"\" : transformString\n        )\n    } else if (transformIsDefault) {\n        transformString = \"none\"\n    }\n\n    return transformString\n}\n", "import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformProps } from \"../../utils/keys-transform\"\nimport { isCSSVariableName } from \"../../../animation/utils/is-css-variable\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport { buildTransform } from \"./build-transform\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nexport function buildHTMLStyles(\n    state: HTMLRenderState,\n    latestValues: ResolvedValues,\n    transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n    const { style, vars, transformOrigin } = state\n\n    // Track whether we encounter any transform or transformOrigin values.\n    let hasTransform = false\n    let hasTransformOrigin = false\n\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\n        if (transformProps.has(key)) {\n            // If this is a transform, flag to enable further transform processing\n            hasTransform = true\n            continue\n        } else if (isCSSVariableName(key)) {\n            vars[key] = value\n            continue\n        } else {\n            // Convert the value to its default value type, ie 0 -> \"0px\"\n            const valueAsType = getValueAsType(value, numberValueTypes[key])\n\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 as keyof typeof transformOrigin] =\n                    valueAsType\n            } else {\n                style[key] = valueAsType\n            }\n        }\n    }\n\n    if (!latestValues.transform) {\n        if (hasTransform || transformTemplate) {\n            style.transform = buildTransform(\n                latestValues,\n                state.transform,\n                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    /**\n     * Build a transformOrigin style. Uses the same defaults as the browser for\n     * undefined origins.\n     */\n    if (hasTransformOrigin) {\n        const {\n            originX = \"50%\",\n            originY = \"50%\",\n            originZ = 0,\n        } = transformOrigin\n        style.transformOrigin = `${originX} ${originY} ${originZ}`\n    }\n}\n", "import type { MotionStyle } from \"../../VisualElement\"\nimport { HTMLRenderState } from \"../types\"\n\nexport function renderHTML(\n    element: HTMLElement,\n    { style, vars }: HTMLRenderState,\n    styleProp?: MotionStyle,\n    projection?: any\n) {\n    const elementStyle = element.style\n\n    let key: string\n    for (key in style) {\n        // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n        elementStyle[key as unknown as number] = style[key] as string\n    }\n\n    // Write projection styles directly to element style\n    projection?.applyProjectionStyles(elementStyle, styleProp)\n\n    for (key in vars) {\n        // Loop over any CSS variables and assign those.\n        // They can only be assigned using `setProperty`.\n        elementStyle.setProperty(key, vars[key] as string)\n    }\n}\n", "import { px } from \"../../value/types/numbers/units\"\nimport type { Axis } from \"motion-utils\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport function pixelsToPercent(pixels: number, axis: Axis): number {\n    if (axis.max === axis.min) return 0\n    return (pixels / (axis.max - axis.min)) * 100\n}\n\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nexport const correctBorderRadius: ScaleCorrectorDefinition = {\n    correct: (latest, node) => {\n        if (!node.target) return latest\n\n        /**\n         * If latest is a string, if it's a percentage we can return immediately as it's\n         * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n         */\n        if (typeof latest === \"string\") {\n            if (px.test(latest)) {\n                latest = parseFloat(latest)\n            } else {\n                return latest\n            }\n        }\n\n        /**\n         * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n         * pixel value as a percentage of each axis\n         */\n        const x = pixelsToPercent(latest, node.target.x)\n        const y = pixelsToPercent(latest, node.target.y)\n\n        return `${x}% ${y}%`\n    },\n}\n", "import { complex } from \"../../value/types/complex\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport const correctBoxShadow: ScaleCorrectorDefinition = {\n    correct: (latest: string, { treeScale, projectionDelta }) => {\n        const original = latest\n        const shadow = complex.parse(latest)\n\n        // TODO: Doesn't support multiple shadows\n        if (shadow.length > 5) return original\n\n        const template = complex.createTransformer(latest)\n        const offset = typeof shadow[0] !== \"number\" ? 1 : 0\n\n        // Calculate the overall context scale\n        const xScale = projectionDelta!.x.scale * treeScale!.x\n        const yScale = projectionDelta!.y.scale * treeScale!.y\n\n        // Scale x/y\n        ;(shadow[0 + offset] as number) /= xScale\n        ;(shadow[1 + offset] as number) /= yScale\n\n        /**\n         * Ideally we'd correct x and y scales individually, but because blur and\n         * spread apply to both we have to take a scale average and apply that instead.\n         * We could potentially improve the outcome of this by incorporating the ratio between\n         * the two scales.\n         */\n        const averageScale = mixNumber(xScale, yScale, 0.5)\n\n        // Blur\n        if (typeof shadow[2 + offset] === \"number\")\n            (shadow[2 + offset] as number) /= averageScale\n\n        // Spread\n        if (typeof shadow[3 + offset] === \"number\")\n            (shadow[3 + offset] as number) /= averageScale\n\n        return template(shadow)\n    },\n}\n", "import { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport { correctBorderRadius } from \"./scale-border-radius\"\nimport { correctBoxShadow } from \"./scale-box-shadow\"\nimport type { ScaleCorrectorMap } from \"./types\"\n\nexport const scaleCorrectors: ScaleCorrectorMap = {\n    borderRadius: {\n        ...correctBorderRadius,\n        applyTo: [\n            \"borderTopLeftRadius\",\n            \"borderTopRightRadius\",\n            \"borderBottomLeftRadius\",\n            \"borderBottomRightRadius\",\n        ],\n    },\n    borderTopLeftRadius: correctBorderRadius,\n    borderTopRightRadius: correctBorderRadius,\n    borderBottomLeftRadius: correctBorderRadius,\n    borderBottomRightRadius: correctBorderRadius,\n    boxShadow: correctBoxShadow,\n}\n\nexport function addScaleCorrector(correctors: ScaleCorrectorMap) {\n    for (const key in correctors) {\n        scaleCorrectors[key] = correctors[key]\n        if (isCSSVariableName(key)) {\n            scaleCorrectors[key].isCSSVariable = true\n        }\n    }\n}\n", "import { transformProps } from \"./keys-transform\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport {\n    scaleCorrectors,\n    addScaleCorrector,\n} from \"../../projection/styles/scale-correction\"\n\nexport { scaleCorrectors, addScaleCorrector }\n\nexport function isForcedMotionValue(\n    key: string,\n    { layout, layoutId }: MotionNodeOptions\n) {\n    return (\n        transformProps.has(key) ||\n        key.startsWith(\"origin\") ||\n        ((layout || layoutId !== undefined) &&\n            (!!scaleCorrectors[key] || key === \"opacity\"))\n    )\n}\n", "import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { isForcedMotionValue } from \"../../utils/is-forced-motion-value\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n    props: MotionNodeOptions,\n    prevProps: MotionNodeOptions,\n    visualElement?: VisualElement\n) {\n    const style = (props as any).style\n    const prevStyle = (prevProps as any)?.style\n    const newValues: { [key: string]: any } = {}\n\n    if (!style) return newValues\n\n    for (const key in style) {\n        if (\n            isMotionValue(style[key]) ||\n            (prevStyle && isMotionValue(prevStyle[key])) ||\n            isForcedMotionValue(key, props) ||\n            visualElement?.getValue(key)?.liveStyle !== undefined\n        ) {\n            newValues[key] = style[key]\n        }\n    }\n\n    return newValues\n}\n", "import type { Box } from \"motion-utils\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport {\n    defaultTransformValue,\n    readTransformValue,\n} from \"../dom/parse-transform\"\nimport { measureViewportBox } from \"../../projection/utils/measure\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport type { ResolvedValues, MotionConfigContextProps } from \"../types\"\nimport type { VisualElement } from \"../VisualElement\"\nimport { HTMLRenderState } from \"./types\"\nimport { buildHTMLStyles } from \"./utils/build-styles\"\nimport { renderHTML } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\n\nexport function getComputedStyle(element: HTMLElement) {\n    return window.getComputedStyle(element)\n}\n\nexport class HTMLVisualElement extends DOMVisualElement<\n    HTMLElement,\n    HTMLRenderState,\n    DOMVisualElementOptions\n> {\n    type = \"html\"\n\n    readValueFromInstance(\n        instance: HTMLElement,\n        key: string\n    ): AnyResolvedKeyframe | null | undefined {\n        if (transformProps.has(key)) {\n            return this.projection?.isProjecting\n                ? defaultTransformValue(key)\n                : readTransformValue(instance, key)\n        } else {\n            const computedStyle = getComputedStyle(instance)\n            const value =\n                (isCSSVariableName(key)\n                    ? computedStyle.getPropertyValue(key)\n                    : computedStyle[key as keyof typeof computedStyle]) || 0\n\n            return typeof value === \"string\" ? value.trim() : (value as number)\n        }\n    }\n\n    measureInstanceViewportBox(\n        instance: HTMLElement,\n        { transformPagePoint }: MotionNodeOptions & Partial<MotionConfigContextProps>\n    ): Box {\n        return measureViewportBox(instance, transformPagePoint)\n    }\n\n    build(\n        renderState: HTMLRenderState,\n        latestValues: ResolvedValues,\n        props: MotionNodeOptions\n    ) {\n        buildHTMLStyles(renderState, latestValues, props.transformTemplate)\n    }\n\n    scrapeMotionValuesFromProps(\n        props: MotionNodeOptions,\n        prevProps: MotionNodeOptions,\n        visualElement: VisualElement\n    ) {\n        return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n    }\n\n    renderInstance = renderHTML\n}\n", "import { ResolvedValues } from \"../../types\"\n\nconst dashKeys = {\n    offset: \"stroke-dashoffset\",\n    array: \"stroke-dasharray\",\n}\n\nconst camelKeys = {\n    offset: \"strokeDashoffset\",\n    array: \"strokeDasharray\",\n}\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 *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nexport function buildSVGPath(\n    attrs: ResolvedValues,\n    length: number,\n    spacing = 1,\n    offset = 0,\n    useDashCase: boolean = true\n): void {\n    // Normalise path length by setting SVG attribute pathLength to 1\n    attrs.pathLength = 1\n\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\n    // Build the dash offset (unitless to avoid Safari zoom bug)\n    attrs[keys.offset] = `${-offset}`\n\n    // Build the dash array (unitless to avoid Safari zoom bug)\n    attrs[keys.array] = `${length} ${spacing}`\n}\n", "import type { MotionNodeOptions } from \"../../../node/types\"\nimport { buildHTMLStyles } from \"../../html/utils/build-styles\"\nimport { ResolvedValues } from \"../../types\"\nimport { SVGRenderState } from \"../types\"\nimport { buildSVGPath } from \"./path\"\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n    \"offsetDistance\",\n    \"offsetPath\",\n    \"offsetRotate\",\n    \"offsetAnchor\",\n]\n\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nexport function buildSVGAttrs(\n    state: SVGRenderState,\n    {\n        attrX,\n        attrY,\n        attrScale,\n        pathLength,\n        pathSpacing = 1,\n        pathOffset = 0,\n        // This is object creation, which we try to avoid per-frame.\n        ...latest\n    }: ResolvedValues,\n    isSVGTag: boolean,\n    transformTemplate?: MotionNodeOptions[\"transformTemplate\"],\n    styleProp?: Record<string, any>\n) {\n    buildHTMLStyles(state, latest, transformTemplate)\n\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\n    state.attrs = state.style\n    state.style = {}\n    const { attrs, style } = state\n\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\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 as string) ?? \"fill-box\"\n        delete attrs.transformBox\n    }\n\n    for (const key of cssMotionPathProperties) {\n        if (attrs[key] !== undefined) {\n            style[key] = attrs[key]\n            delete attrs[key]\n        }\n    }\n\n    // Render attrX/attrY/attrScale as attributes\n    if (attrX !== undefined) attrs.x = attrX\n    if (attrY !== undefined) attrs.y = attrY\n    if (attrScale !== undefined) attrs.scale = attrScale\n\n    // Build SVG path if one has been defined\n    if (pathLength !== undefined) {\n        buildSVGPath(\n            attrs,\n            pathLength as number,\n            pathSpacing as number,\n            pathOffset as number,\n            false\n        )\n    }\n}\n", "/**\n * A set of attribute names that are always read/written as camel case.\n */\nexport const 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", "export const isSVGTag = (tag: unknown) =>\n    typeof tag === \"string\" && tag.toLowerCase() === \"svg\"\n", "import type { MotionStyle } from \"../../VisualElement\"\nimport { camelToDash } from \"../../dom/utils/camel-to-dash\"\nimport { renderHTML } from \"../../html/utils/render\"\nimport { SVGRenderState } from \"../types\"\nimport { camelCaseAttributes } from \"./camel-case-attrs\"\n\nexport function renderSVG(\n    element: SVGElement,\n    renderState: SVGRenderState,\n    _styleProp?: MotionStyle,\n    projection?: any\n) {\n    renderHTML(element as any, renderState, undefined, projection)\n\n    for (const key in renderState.attrs) {\n        element.setAttribute(\n            !camelCaseAttributes.has(key) ? camelToDash(key) : key,\n            renderState.attrs[key] as string\n        )\n    }\n}\n", "import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps } from \"../../html/utils/scrape-motion-values\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n    props: MotionNodeOptions,\n    prevProps: MotionNodeOptions,\n    visualElement?: VisualElement\n) {\n    const newValues = scrapeHTMLMotionValuesFromProps(\n        props,\n        prevProps,\n        visualElement\n    )\n\n    for (const key in props) {\n        if (\n            isMotionValue(props[key as keyof typeof props]) ||\n            isMotionValue(prevProps[key as keyof typeof prevProps])\n        ) {\n            const targetKey =\n                transformPropOrder.indexOf(key) !== -1\n                    ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n                    : key\n\n            newValues[targetKey] = props[key as keyof typeof props]\n        }\n    }\n\n    return newValues\n}\n", "import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport type { MotionValue } from \"../../value\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport { getDefaultValueType } from \"../../value/types/maps/defaults\"\nimport { createBox } from \"../../projection/geometry/models\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport { camelToDash } from \"../dom/utils/camel-to-dash\"\nimport type { ResolvedValues } from \"../types\"\nimport type { VisualElement, MotionStyle } from \"../VisualElement\"\nimport { SVGRenderState } from \"./types\"\nimport { buildSVGAttrs } from \"./utils/build-attrs\"\nimport { camelCaseAttributes } from \"./utils/camel-case-attrs\"\nimport { isSVGTag } from \"./utils/is-svg-tag\"\nimport { renderSVG } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\nexport class SVGVisualElement extends DOMVisualElement<\n    SVGElement,\n    SVGRenderState,\n    DOMVisualElementOptions\n> {\n    type = \"svg\"\n\n    isSVGTag = false\n\n    getBaseTargetFromProps(\n        props: MotionNodeOptions,\n        key: string\n    ): AnyResolvedKeyframe | MotionValue<any> | undefined {\n        return props[key as keyof MotionNodeOptions]\n    }\n\n    readValueFromInstance(instance: SVGElement, key: string) {\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\n    measureInstanceViewportBox = createBox\n\n    scrapeMotionValuesFromProps(\n        props: MotionNodeOptions,\n        prevProps: MotionNodeOptions,\n        visualElement: VisualElement\n    ) {\n        return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n    }\n\n    build(\n        renderState: SVGRenderState,\n        latestValues: ResolvedValues,\n        props: MotionNodeOptions\n    ) {\n        buildSVGAttrs(\n            renderState,\n            latestValues,\n            this.isSVGTag,\n            props.transformTemplate,\n            (props as any).style\n        )\n    }\n\n    renderInstance(\n        instance: SVGElement,\n        renderState: SVGRenderState,\n        styleProp?: MotionStyle | undefined,\n        projection?: any\n    ): void {\n        renderSVG(instance, renderState, styleProp, projection)\n    }\n\n    mount(instance: SVGElement) {\n        this.isSVGTag = isSVGTag(instance.tagName)\n        super.mount(instance)\n    }\n}\n", "import { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nconst numVariantProps = variantProps.length\n\ntype VariantStateContext = {\n    initial?: string | string[]\n    animate?: string | string[]\n    exit?: string | string[]\n    whileHover?: string | string[]\n    whileDrag?: string | string[]\n    whileFocus?: string | string[]\n    whileTap?: string | string[]\n}\n\n/**\n * Get variant context from a visual element's parent chain.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function getVariantContext(\n    visualElement?: any\n): undefined | VariantStateContext {\n    if (!visualElement) return undefined\n\n    if (!visualElement.isControllingVariants) {\n        const context = visualElement.parent\n            ? getVariantContext(visualElement.parent) || {}\n            : {}\n        if (visualElement.props.initial !== undefined) {\n            context.initial = visualElement.props.initial as any\n        }\n        return context\n    }\n\n    const context: VariantStateContext = {}\n    for (let i = 0; i < numVariantProps; i++) {\n        const name = variantProps[i] as keyof typeof context\n        const prop = visualElement.props[name]\n\n        if (isVariantLabel(prop) || prop === false) {\n            ;(context as any)[name] = prop\n        }\n    }\n\n    return context\n}\n", "export function shallowCompare(next: any[], prev: any[] | null) {\n    if (!Array.isArray(prev)) return false\n\n    const prevLength = prev.length\n\n    if (prevLength !== next.length) return false\n\n    for (let i = 0; i < prevLength; i++) {\n        if (prev[i] !== next[i]) return false\n    }\n\n    return true\n}\n", "import type {\n    AnimationDefinition,\n    TargetAndTransition,\n    VariantLabels,\n} from \"../../node/types\"\nimport type { AnimationType } from \"../types\"\nimport type { VisualElementAnimationOptions } from \"../../animation/interfaces/types\"\nimport { animateVisualElement } from \"../../animation/interfaces/visual-element\"\nimport { calcChildStagger } from \"../../animation/utils/calc-child-stagger\"\nimport { getVariantContext } from \"./get-variant-context\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { shallowCompare } from \"./shallow-compare\"\nimport { variantPriorityOrder } from \"./variant-props\"\n\nexport type { VisualElementAnimationOptions }\n\nexport interface AnimationState {\n    animateChanges: (type?: AnimationType) => Promise<any>\n    setActive: (\n        type: AnimationType,\n        isActive: boolean,\n        options?: VisualElementAnimationOptions\n    ) => Promise<any>\n    setAnimateFunction: (fn: any) => void\n    getState: () => { [key: string]: AnimationTypeState }\n    reset: () => void\n}\n\ninterface DefinitionAndOptions {\n    animation: AnimationDefinition\n    options?: VisualElementAnimationOptions\n}\n\nexport type AnimationList = string[] | TargetAndTransition[]\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse()\nconst numAnimationTypes = variantPriorityOrder.length\n\n/**\n * Type for the animate function that can be injected.\n * This allows the animation implementation to be provided by the framework layer.\n */\nexport type AnimateFunction = (animations: DefinitionAndOptions[]) => Promise<any>\n\nfunction createAnimateFunction(visualElement: any): AnimateFunction {\n    return (animations: DefinitionAndOptions[]) => {\n        return Promise.all(\n            animations.map(({ animation, options }) =>\n                animateVisualElement(visualElement, animation, options)\n            )\n        )\n    }\n}\n\nexport function createAnimationState(visualElement: any): AnimationState {\n    let animate = createAnimateFunction(visualElement)\n    let state = createState()\n    let isInitialRender = true\n\n    /**\n     * This function will be used to reduce the animation definitions for\n     * each active animation type into an object of resolved values for it.\n     */\n    const buildResolvedTypeValues =\n        (type: AnimationType) =>\n        (\n            acc: { [key: string]: any },\n            definition: string | TargetAndTransition | undefined\n        ) => {\n            const resolved = resolveVariant(\n                visualElement,\n                definition,\n                type === \"exit\"\n                    ? visualElement.presenceContext?.custom\n                    : undefined\n            )\n\n            if (resolved) {\n                const { transition, transitionEnd, ...target } = resolved\n                acc = { ...acc, ...target, ...transitionEnd }\n            }\n\n            return acc\n        }\n\n    /**\n     * This just allows us to inject mocked animation functions\n     * @internal\n     */\n    function setAnimateFunction(\n        makeAnimator: (visualElement: any) => AnimateFunction\n    ) {\n        animate = makeAnimator(visualElement)\n    }\n\n    /**\n     * When we receive new props, we need to:\n     * 1. Create a list of protected keys for each type. This is a directory of\n     *    value keys that are currently being \"handled\" by types of a higher priority\n     *    so that whenever an animation is played of a given type, these values are\n     *    protected from being animated.\n     * 2. Determine if an animation type needs animating.\n     * 3. Determine if any values have been removed from a type and figure out\n     *    what to animate those to.\n     */\n    function animateChanges(changedActiveType?: AnimationType) {\n        const { props } = visualElement\n        const context = getVariantContext(visualElement.parent) || {}\n\n        /**\n         * A list of animations that we'll build into as we iterate through the animation\n         * types. This will get executed at the end of the function.\n         */\n        const animations: DefinitionAndOptions[] = []\n\n        /**\n         * Keep track of which values have been removed. Then, as we hit lower priority\n         * animation types, we can check if they contain removed values and animate to that.\n         */\n        const removedKeys = new Set<string>()\n\n        /**\n         * A dictionary of all encountered keys. This is an object to let us build into and\n         * copy it without iteration. Each time we hit an animation type we set its protected\n         * keys - the keys its not allowed to animate - to the latest version of this object.\n         */\n        let encounteredKeys: { [key: string]: any } = {}\n\n        /**\n         * If a variant has been removed at a given index, and this component is controlling\n         * variant animations, we want to ensure lower-priority variants are forced to animate.\n         */\n        let removedVariantIndex = Infinity\n\n        /**\n         * Iterate through all animation types in reverse priority order. For each, we want to\n         * detect which values it's handling and whether or not they've changed (and therefore\n         * need to be animated). If any values have been removed, we want to detect those in\n         * lower priority props and flag for animation.\n         */\n        for (let i = 0; i < numAnimationTypes; i++) {\n            const type = reversePriorityOrder[i]\n            const typeState = state[type]\n            const prop =\n                props[type] !== undefined\n                    ? props[type]\n                    : context[type as keyof typeof context]\n            const propIsVariant = isVariantLabel(prop)\n\n            /**\n             * If this type has *just* changed isActive status, set activeDelta\n             * to that status. Otherwise set to null.\n             */\n            const activeDelta =\n                type === changedActiveType ? typeState.isActive : null\n\n            if (activeDelta === false) removedVariantIndex = i\n\n            /**\n             * If this prop is an inherited variant, rather than been set directly on the\n             * component itself, we want to make sure we allow the parent to trigger animations.\n             *\n             * TODO: Can probably change this to a !isControllingVariants check\n             */\n            let isInherited =\n                prop === context[type as keyof typeof context] &&\n                prop !== props[type] &&\n                propIsVariant\n\n            if (\n                isInherited &&\n                isInitialRender &&\n                visualElement.manuallyAnimateOnMount\n            ) {\n                isInherited = false\n            }\n\n            /**\n             * Set all encountered keys so far as the protected keys for this type. This will\n             * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n             */\n            typeState.protectedKeys = { ...encounteredKeys }\n\n            // Check if we can skip analysing this prop early\n            if (\n                // If it isn't active and hasn't *just* been set as inactive\n                (!typeState.isActive && activeDelta === null) ||\n                // If we didn't and don't have any defined prop for this animation type\n                (!prop && !typeState.prevProp) ||\n                // Or if the prop doesn't define an animation\n                isAnimationControls(prop) ||\n                typeof prop === \"boolean\"\n            ) {\n                continue\n            }\n\n            /**\n             * If exit is already active and wasn't just activated, skip\n             * re-processing to prevent interrupting running exit animations.\n             * Re-resolving exit with a changed custom value can start new\n             * value animations that stop the originals, leaving the exit\n             * animation promise unresolved and the component stuck in the DOM.\n             */\n            if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n                if (typeState.prevResolvedValues) {\n                    encounteredKeys = {\n                        ...encounteredKeys,\n                        ...typeState.prevResolvedValues,\n                    }\n                }\n                continue\n            }\n\n            /**\n             * As we go look through the values defined on this type, if we detect\n             * a changed value or a value that was removed in a higher priority, we set\n             * this to true and add this prop to the animation list.\n             */\n            const variantDidChange = checkVariantsDidChange(\n                typeState.prevProp,\n                prop\n            )\n\n            let shouldAnimateType =\n                variantDidChange ||\n                // If we're making this variant active, we want to always make it active\n                (type === changedActiveType &&\n                    typeState.isActive &&\n                    !isInherited &&\n                    propIsVariant) ||\n                // If we removed a higher-priority variant (i is in reverse order)\n                (i > removedVariantIndex && propIsVariant)\n\n            let handledRemovedValues = false\n\n            /**\n             * As animations can be set as variant lists, variants or target objects, we\n             * coerce everything to an array if it isn't one already\n             */\n            const definitionList = Array.isArray(prop) ? prop : [prop]\n\n            /**\n             * Build an object of all the resolved values. We'll use this in the subsequent\n             * animateChanges calls to determine whether a value has changed.\n             */\n            let resolvedValues = definitionList.reduce(\n                buildResolvedTypeValues(type),\n                {}\n            )\n\n            if (activeDelta === false) resolvedValues = {}\n\n            /**\n             * Now we need to loop through all the keys in the prev prop and this prop,\n             * and decide:\n             * 1. If the value has changed, and needs animating\n             * 2. If it has been removed, and needs adding to the removedKeys set\n             * 3. If it has been removed in a higher priority type and needs animating\n             * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n             *    needs adding to the type's protectedKeys list.\n             */\n            const { prevResolvedValues = {} } = typeState\n\n            const allKeys = {\n                ...prevResolvedValues,\n                ...resolvedValues,\n            }\n            const markToAnimate = (key: string) => {\n                shouldAnimateType = true\n                if (removedKeys.has(key)) {\n                    handledRemovedValues = true\n                    removedKeys.delete(key)\n                }\n                typeState.needsAnimating[key] = true\n\n                const motionValue = visualElement.getValue(key)\n                if (motionValue) motionValue.liveStyle = false\n            }\n\n            for (const key in allKeys) {\n                const next = resolvedValues[key]\n                const prev = prevResolvedValues[key]\n\n                // If we've already handled this we can just skip ahead\n                if (encounteredKeys.hasOwnProperty(key)) continue\n\n                /**\n                 * If the value has changed, we probably want to animate it.\n                 */\n                let valueHasChanged = false\n                if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n                    valueHasChanged = !shallowCompare(next, prev)\n                } else {\n                    valueHasChanged = next !== prev\n                }\n\n                if (valueHasChanged) {\n                    if (next !== undefined && next !== null) {\n                        // If next is defined and doesn't equal prev, it needs animating\n                        markToAnimate(key)\n                    } else {\n                        // If it's undefined, it's been removed.\n                        removedKeys.add(key)\n                    }\n                } else if (next !== undefined && removedKeys.has(key)) {\n                    /**\n                     * If next hasn't changed and it isn't undefined, we want to check if it's\n                     * been removed by a higher priority\n                     */\n                    markToAnimate(key)\n                } else {\n                    /**\n                     * If it hasn't changed, we add it to the list of protected values\n                     * to ensure it doesn't get animated.\n                     */\n                    typeState.protectedKeys[key] = true\n                }\n            }\n\n            /**\n             * Update the typeState so next time animateChanges is called we can compare the\n             * latest prop and resolvedValues to these.\n             */\n            typeState.prevProp = prop\n            typeState.prevResolvedValues = resolvedValues\n\n            if (typeState.isActive) {\n                encounteredKeys = { ...encounteredKeys, ...resolvedValues }\n            }\n\n            if (isInitialRender && visualElement.blockInitialAnimation) {\n                shouldAnimateType = false\n            }\n\n            /**\n             * If this is an inherited prop we want to skip this animation\n             * unless the inherited variants haven't changed on this render.\n             */\n            const willAnimateViaParent = isInherited && variantDidChange\n            const needsAnimating = !willAnimateViaParent || handledRemovedValues\n            if (shouldAnimateType && needsAnimating) {\n                animations.push(\n                    ...definitionList.map((animation) => {\n                        const options: VisualElementAnimationOptions = { type }\n\n                        /**\n                         * If we're performing the initial animation, but we're not\n                         * rendering at the same time as the variant-controlling parent,\n                         * we want to use the parent's transition to calculate the stagger.\n                         */\n                        if (\n                            typeof animation === \"string\" &&\n                            isInitialRender &&\n                            !willAnimateViaParent &&\n                            visualElement.manuallyAnimateOnMount &&\n                            visualElement.parent\n                        ) {\n                            const { parent } = visualElement\n                            const parentVariant = resolveVariant(\n                                parent,\n                                animation\n                            )\n\n                            if (parent.enteringChildren && parentVariant) {\n                                const { delayChildren } =\n                                    parentVariant.transition || {}\n                                options.delay = calcChildStagger(\n                                    parent.enteringChildren,\n                                    visualElement,\n                                    delayChildren\n                                )\n                            }\n                        }\n\n                        return {\n                            animation: animation as AnimationDefinition,\n                            options,\n                        }\n                    })\n                )\n            }\n        }\n\n        /**\n         * If there are some removed value that haven't been dealt with,\n         * we need to create a new animation that falls back either to the value\n         * defined in the style prop, or the last read value.\n         */\n        if (removedKeys.size) {\n            const fallbackAnimation: TargetAndTransition = {}\n\n            /**\n             * If the initial prop contains a transition we can use that, otherwise\n             * allow the animation function to use the visual element's default.\n             */\n            if (typeof props.initial !== \"boolean\") {\n                const initialTransition = resolveVariant(\n                    visualElement,\n                    Array.isArray(props.initial)\n                        ? props.initial[0]\n                        : props.initial\n                )\n\n                if (initialTransition && initialTransition.transition) {\n                    fallbackAnimation.transition = initialTransition.transition\n                }\n            }\n\n            removedKeys.forEach((key) => {\n                const fallbackTarget = visualElement.getBaseTarget(key)\n\n                const motionValue = visualElement.getValue(key)\n                if (motionValue) motionValue.liveStyle = true\n\n                // @ts-expect-error - @mattgperry to figure if we should do something here\n                fallbackAnimation[key] = fallbackTarget ?? null\n            })\n\n            animations.push({ animation: fallbackAnimation })\n        }\n\n        let shouldAnimate = Boolean(animations.length)\n\n        if (\n            isInitialRender &&\n            (props.initial === false || props.initial === props.animate) &&\n            !visualElement.manuallyAnimateOnMount\n        ) {\n            shouldAnimate = false\n        }\n\n        isInitialRender = false\n        return shouldAnimate ? animate(animations) : Promise.resolve()\n    }\n\n    /**\n     * Change whether a certain animation type is active.\n     */\n    function setActive(type: AnimationType, isActive: boolean) {\n        // If the active state hasn't changed, we can safely do nothing here\n        if (state[type].isActive === isActive) return Promise.resolve()\n\n        // Propagate active change to children\n        visualElement.variantChildren?.forEach((child: any) =>\n            child.animationState?.setActive(type, isActive)\n        )\n\n        state[type].isActive = isActive\n\n        const animations = animateChanges(type)\n\n        for (const key in state) {\n            state[key as keyof typeof state].protectedKeys = {}\n        }\n\n        return animations\n    }\n\n    return {\n        animateChanges,\n        setActive,\n        setAnimateFunction,\n        getState: () => state,\n        reset: () => {\n            state = createState()\n            /**\n             * Temporarily disabling resetting this flag as it prevents components\n             * with initial={false} from animating after being remounted, for instance\n             * as the child of an Activity component.\n             */\n            // isInitialRender = true\n        },\n    }\n}\n\nexport function checkVariantsDidChange(prev: any, next: any) {\n    if (typeof next === \"string\") {\n        return next !== prev\n    } else if (Array.isArray(next)) {\n        return !shallowCompare(next, prev)\n    }\n\n    return false\n}\n\nexport interface AnimationTypeState {\n    isActive: boolean\n    protectedKeys: { [key: string]: true }\n    needsAnimating: { [key: string]: boolean }\n    prevResolvedValues: { [key: string]: any }\n    prevProp?: VariantLabels | TargetAndTransition\n}\n\nfunction createTypeState(isActive = false): AnimationTypeState {\n    return {\n        isActive,\n        protectedKeys: {},\n        needsAnimating: {},\n        prevResolvedValues: {},\n    }\n}\n\nfunction createState() {\n    return {\n        animate: createTypeState(true),\n        whileInView: createTypeState(),\n        whileHover: createTypeState(),\n        whileTap: createTypeState(),\n        whileDrag: createTypeState(),\n        whileFocus: createTypeState(),\n        exit: createTypeState(),\n    }\n}\n", "import { Axis, AxisDelta, Box } from \"motion-utils\"\n\n/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisInto(axis: Axis, originAxis: Axis) {\n    axis.min = originAxis.min\n    axis.max = originAxis.max\n}\n\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyBoxInto(box: Box, originBox: Box) {\n    copyAxisInto(box.x, originBox.x)\n    copyAxisInto(box.y, originBox.y)\n}\n\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisDeltaInto(delta: AxisDelta, originDelta: AxisDelta) {\n    delta.translate = originDelta.translate\n    delta.scale = originDelta.scale\n    delta.originPoint = originDelta.originPoint\n    delta.origin = originDelta.origin\n}\n", "import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\n\nconst SCALE_PRECISION = 0.0001\nconst SCALE_MIN = 1 - SCALE_PRECISION\nconst SCALE_MAX = 1 + SCALE_PRECISION\nconst TRANSLATE_PRECISION = 0.01\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION\n\nexport function calcLength(axis: Axis) {\n    return axis.max - axis.min\n}\n\nexport function isNear(\n    value: number,\n    target: number,\n    maxDistance: number\n): boolean {\n    return Math.abs(value - target) <= maxDistance\n}\n\nexport function calcAxisDelta(\n    delta: AxisDelta,\n    source: Axis,\n    target: Axis,\n    origin: number = 0.5\n) {\n    delta.origin = origin\n    delta.originPoint = mixNumber(source.min, source.max, delta.origin)\n    delta.scale = calcLength(target) / calcLength(source)\n    delta.translate =\n        mixNumber(target.min, target.max, delta.origin) - delta.originPoint\n\n    if (\n        (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n        isNaN(delta.scale)\n    ) {\n        delta.scale = 1.0\n    }\n\n    if (\n        (delta.translate >= TRANSLATE_MIN &&\n            delta.translate <= TRANSLATE_MAX) ||\n        isNaN(delta.translate)\n    ) {\n        delta.translate = 0.0\n    }\n}\n\nexport function calcBoxDelta(\n    delta: Delta,\n    source: Box,\n    target: Box,\n    origin?: ResolvedValues\n): void {\n    calcAxisDelta(\n        delta.x,\n        source.x,\n        target.x,\n        origin ? (origin.originX as number) : undefined\n    )\n    calcAxisDelta(\n        delta.y,\n        source.y,\n        target.y,\n        origin ? (origin.originY as number) : undefined\n    )\n}\n\nexport function calcRelativeAxis(target: Axis, relative: Axis, parent: Axis) {\n    target.min = parent.min + relative.min\n    target.max = target.min + calcLength(relative)\n}\n\nexport function calcRelativeBox(target: Box, relative: Box, parent: Box) {\n    calcRelativeAxis(target.x, relative.x, parent.x)\n    calcRelativeAxis(target.y, relative.y, parent.y)\n}\n\nexport function calcRelativeAxisPosition(\n    target: Axis,\n    layout: Axis,\n    parent: Axis\n) {\n    target.min = layout.min - parent.min\n    target.max = target.min + calcLength(layout)\n}\n\nexport function calcRelativePosition(target: Box, layout: Box, parent: Box) {\n    calcRelativeAxisPosition(target.x, layout.x, parent.x)\n    calcRelativeAxisPosition(target.y, layout.y, parent.y)\n}\n", "import { Axis, Box } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { percent } from \"../../value/types/numbers/units\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { scalePoint } from \"./delta-apply\"\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nexport function removePointDelta(\n    point: number,\n    translate: number,\n    scale: number,\n    originPoint: number,\n    boxScale?: number\n): number {\n    point -= translate\n    point = scalePoint(point, 1 / scale, originPoint)\n\n    if (boxScale !== undefined) {\n        point = scalePoint(point, 1 / boxScale, originPoint)\n    }\n\n    return point\n}\n\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nexport function removeAxisDelta(\n    axis: Axis,\n    translate: number | string = 0,\n    scale: number = 1,\n    origin: number = 0.5,\n    boxScale?: number,\n    originAxis: Axis = axis,\n    sourceAxis: Axis = axis\n): void {\n    if (percent.test(translate)) {\n        translate = parseFloat(translate as string)\n        const relativeProgress = mixNumber(\n            sourceAxis.min,\n            sourceAxis.max,\n            translate / 100\n        )\n        translate = relativeProgress - sourceAxis.min\n    }\n\n    if (typeof translate !== \"number\") return\n\n    let originPoint = mixNumber(originAxis.min, originAxis.max, origin)\n    if (axis === originAxis) originPoint -= translate\n\n    axis.min = removePointDelta(\n        axis.min,\n        translate,\n        scale,\n        originPoint,\n        boxScale\n    )\n\n    axis.max = removePointDelta(\n        axis.max,\n        translate,\n        scale,\n        originPoint,\n        boxScale\n    )\n}\n\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeAxisTransforms(\n    axis: Axis,\n    transforms: ResolvedValues,\n    [key, scaleKey, originKey]: string[],\n    origin?: Axis,\n    sourceAxis?: Axis\n) {\n    removeAxisDelta(\n        axis,\n        transforms[key] as number,\n        transforms[scaleKey] as number,\n        transforms[originKey] as number,\n        transforms.scale as number,\n        origin,\n        sourceAxis\n    )\n}\n\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"]\nconst yKeys = [\"y\", \"scaleY\", \"originY\"]\n\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeBoxTransforms(\n    box: Box,\n    transforms: ResolvedValues,\n    originBox?: Box,\n    sourceBox?: Box\n): void {\n    removeAxisTransforms(\n        box.x,\n        transforms,\n        xKeys,\n        originBox ? originBox.x : undefined,\n        sourceBox ? sourceBox.x : undefined\n    )\n    removeAxisTransforms(\n        box.y,\n        transforms,\n        yKeys,\n        originBox ? originBox.y : undefined,\n        sourceBox ? sourceBox.y : undefined\n    )\n}\n", "import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\nimport { calcLength } from \"./delta-calc\"\n\nfunction isAxisDeltaZero(delta: AxisDelta) {\n    return delta.translate === 0 && delta.scale === 1\n}\n\nexport function isDeltaZero(delta: Delta) {\n    return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y)\n}\n\nexport function axisEquals(a: Axis, b: Axis) {\n    return a.min === b.min && a.max === b.max\n}\n\nexport function boxEquals(a: Box, b: Box) {\n    return axisEquals(a.x, b.x) && axisEquals(a.y, b.y)\n}\n\nexport function axisEqualsRounded(a: Axis, b: Axis) {\n    return (\n        Math.round(a.min) === Math.round(b.min) &&\n        Math.round(a.max) === Math.round(b.max)\n    )\n}\n\nexport function boxEqualsRounded(a: Box, b: Box) {\n    return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y)\n}\n\nexport function aspectRatio(box: Box): number {\n    return calcLength(box.x) / calcLength(box.y)\n}\n\nexport function axisDeltaEquals(a: AxisDelta, b: AxisDelta) {\n    return (\n        a.translate === b.translate &&\n        a.scale === b.scale &&\n        a.originPoint === b.originPoint\n    )\n}\n", "type Callback = (axis: \"x\" | \"y\") => void\n\nexport function eachAxis(callback: Callback) {\n    return [callback(\"x\"), callback(\"y\")]\n}\n", "import type { Delta, Point } from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nexport function buildProjectionTransform(\n    delta: Delta,\n    treeScale: Point,\n    latestTransform?: ResolvedValues\n): string {\n    let transform = \"\"\n\n    /**\n     * The translations we use to calculate are always relative to the viewport coordinate space.\n     * But when we apply scales, we also scale the coordinate space of an element and its children.\n     * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n     * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n     */\n    const xTranslate = delta.x.translate / treeScale.x\n    const yTranslate = delta.y.translate / treeScale.y\n    const zTranslate = latestTransform?.z || 0\n    if (xTranslate || yTranslate || zTranslate) {\n        transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `\n    }\n\n    /**\n     * Apply scale correction for the tree transform.\n     * This will apply scale to the screen-orientated axes.\n     */\n    if (treeScale.x !== 1 || treeScale.y !== 1) {\n        transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `\n    }\n\n    if (latestTransform) {\n        const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } =\n            latestTransform\n        if (transformPerspective)\n            transform = `perspective(${transformPerspective}px) ${transform}`\n        if (rotate) transform += `rotate(${rotate}deg) `\n        if (rotateX) transform += `rotateX(${rotateX}deg) `\n        if (rotateY) transform += `rotateY(${rotateY}deg) `\n        if (skewX) transform += `skewX(${skewX}deg) `\n        if (skewY) transform += `skewY(${skewY}deg) `\n    }\n\n    /**\n     * Apply scale to match the size of the element to the size we want it.\n     * This will apply scale to the element-orientated axes.\n     */\n    const elementScaleX = delta.x.scale * treeScale.x\n    const elementScaleY = delta.y.scale * treeScale.y\n    if (elementScaleX !== 1 || elementScaleY !== 1) {\n        transform += `scale(${elementScaleX}, ${elementScaleY})`\n    }\n\n    return transform || \"none\"\n}\n", "import { mixNumber } from \"../../utils/mix/number\"\nimport { percent, px } from \"../../value/types/numbers/units\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport {\n    progress as calcProgress,\n    circOut,\n    EasingFunction,\n    noop,\n} from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"]\nconst numBorders = borders.length\n\nconst asNumber = (value: AnyResolvedKeyframe) =>\n    typeof value === \"string\" ? parseFloat(value) : value\n\nconst isPx = (value: AnyResolvedKeyframe) =>\n    typeof value === \"number\" || px.test(value)\n\nexport function mixValues(\n    target: ResolvedValues,\n    follow: ResolvedValues,\n    lead: ResolvedValues,\n    progress: number,\n    shouldCrossfadeOpacity: boolean,\n    isOnlyMember: boolean\n) {\n    if (shouldCrossfadeOpacity) {\n        target.opacity = mixNumber(\n            0,\n            (lead.opacity as number) ?? 1,\n            easeCrossfadeIn(progress)\n        )\n        target.opacityExit = mixNumber(\n            (follow.opacity as number) ?? 1,\n            0,\n            easeCrossfadeOut(progress)\n        )\n    } else if (isOnlyMember) {\n        target.opacity = mixNumber(\n            (follow.opacity as number) ?? 1,\n            (lead.opacity as number) ?? 1,\n            progress\n        )\n    }\n\n    /**\n     * Mix border radius\n     */\n    for (let i = 0; i < numBorders; i++) {\n        const borderLabel = `border${borders[i]}Radius`\n        let followRadius = getRadius(follow, borderLabel)\n        let leadRadius = getRadius(lead, borderLabel)\n\n        if (followRadius === undefined && leadRadius === undefined) continue\n\n        followRadius ||= 0\n        leadRadius ||= 0\n\n        const canMix =\n            followRadius === 0 ||\n            leadRadius === 0 ||\n            isPx(followRadius) === isPx(leadRadius)\n\n        if (canMix) {\n            target[borderLabel] = Math.max(\n                mixNumber(\n                    asNumber(followRadius),\n                    asNumber(leadRadius),\n                    progress\n                ),\n                0\n            )\n\n            if (percent.test(leadRadius) || percent.test(followRadius)) {\n                target[borderLabel] += \"%\"\n            }\n        } else {\n            target[borderLabel] = leadRadius\n        }\n    }\n\n    /**\n     * Mix rotation\n     */\n    if (follow.rotate || lead.rotate) {\n        target.rotate = mixNumber(\n            (follow.rotate as number) || 0,\n            (lead.rotate as number) || 0,\n            progress\n        )\n    }\n}\n\nfunction getRadius(values: ResolvedValues, radiusName: string) {\n    return values[radiusName] !== undefined\n        ? values[radiusName]\n        : values.borderRadius\n}\n\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut)\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop)\n\nfunction compress(\n    min: number,\n    max: number,\n    easing: EasingFunction\n): EasingFunction {\n    return (p: number) => {\n        // Could replace ifs with clamp\n        if (p < min) return 0\n        if (p > max) return 1\n        return easing(calcProgress(min, max, p))\n    }\n}\n", "import { animateMotionValue } from \"../interfaces/motion-value\"\nimport type {\n    AnimationPlaybackControlsWithThen,\n    AnyResolvedKeyframe,\n    UnresolvedValueKeyframe,\n    ValueAnimationTransition,\n} from \"../types\"\nimport {\n    motionValue as createMotionValue,\n    MotionValue,\n} from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\nexport function animateSingleValue<V extends AnyResolvedKeyframe>(\n    value: MotionValue<V> | V,\n    keyframes: V | UnresolvedValueKeyframe<V>[],\n    options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen {\n    const motionValue = isMotionValue(value) ? value : createMotionValue(value)\n\n    motionValue.start(animateMotionValue(\"\", motionValue, keyframes, options))\n\n    return motionValue.animation!\n}\n", "export function addDomEvent(\n    target: EventTarget,\n    eventName: string,\n    handler: EventListener,\n    options: AddEventListenerOptions = { passive: true }\n) {\n    target.addEventListener(eventName, handler, options)\n\n    return () => target.removeEventListener(eventName, handler)\n}\n", "import type { VisualElement } from \"../../render/VisualElement\"\n\nexport interface WithDepth {\n    depth: number\n}\n\nexport const compareByDepth = (a: VisualElement, b: VisualElement) =>\n    a.depth - b.depth\n", "import { addUniqueItem, removeItem } from \"motion-utils\"\nimport { compareByDepth, WithDepth } from \"./compare-by-depth\"\n\nexport class FlatTree {\n    private children: WithDepth[] = []\n\n    private isDirty: boolean = false\n\n    add(child: WithDepth) {\n        addUniqueItem(this.children, child)\n        this.isDirty = true\n    }\n\n    remove(child: WithDepth) {\n        removeItem(this.children, child)\n        this.isDirty = true\n    }\n\n    forEach(callback: (child: WithDepth) => void) {\n        this.isDirty && this.children.sort(compareByDepth)\n        this.isDirty = false\n        this.children.forEach(callback)\n    }\n}\n", "import { cancelFrame, frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { FrameData } from \"../frameloop/types\"\nimport { secondsToMilliseconds } from \"motion-utils\"\n\nexport type DelayedFunction = (overshoot: number) => void\n\n/**\n * Timeout defined in ms\n */\nexport function delay(callback: DelayedFunction, timeout: number) {\n    const start = time.now()\n\n    const checkElapsed = ({ timestamp }: FrameData) => {\n        const elapsed = timestamp - start\n\n        if (elapsed >= timeout) {\n            cancelFrame(checkElapsed)\n            callback(elapsed - timeout)\n        }\n    }\n\n    frame.setup(checkElapsed, true)\n\n    return () => cancelFrame(checkElapsed)\n}\n\nexport function delayInSeconds(callback: DelayedFunction, timeout: number) {\n    return delay(callback, secondsToMilliseconds(timeout))\n}\n", "import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isMotionValue } from \"./is-motion-value\"\nimport type { MotionValue } from \"../index\"\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n */\nexport function resolveMotionValue(\n    value?: AnyResolvedKeyframe | MotionValue\n): AnyResolvedKeyframe {\n    return isMotionValue(value) ? value.get() : value\n}\n", "import { addUniqueItem, removeItem } from \"motion-utils\"\nimport { IProjectionNode } from \"../node/types\"\n\nexport class NodeStack {\n    lead?: IProjectionNode\n    prevLead?: IProjectionNode\n    members: IProjectionNode[] = []\n\n    add(node: IProjectionNode) {\n        addUniqueItem(this.members, node)\n\n        for (let i = this.members.length - 1; i >= 0; i--) {\n            const m = this.members[i]\n            if (m === node || m === this.lead || m === this.prevLead) continue\n            const inst = m.instance as HTMLElement | undefined\n            if (inst && inst.isConnected === false && m.isPresent !== false && !m.snapshot) {\n                removeItem(this.members, m)\n            }\n        }\n\n        node.scheduleRender()\n    }\n\n    remove(node: IProjectionNode) {\n        removeItem(this.members, node)\n        if (node === this.prevLead) {\n            this.prevLead = undefined\n        }\n        if (node === this.lead) {\n            const prevLead = this.members[this.members.length - 1]\n            if (prevLead) {\n                this.promote(prevLead)\n            }\n        }\n    }\n\n    relegate(node: IProjectionNode): boolean {\n        const indexOfNode = this.members.findIndex((member) => node === member)\n        if (indexOfNode === 0) return false\n\n        /**\n         * Find the next projection node that is present\n         */\n        let prevLead: IProjectionNode | undefined\n        for (let i = indexOfNode; i >= 0; i--) {\n            const member = this.members[i]\n            const inst = member.instance as HTMLElement | undefined\n            if (member.isPresent !== false && (!inst || inst.isConnected !== false)) {\n                prevLead = member\n                break\n            }\n        }\n\n        if (prevLead) {\n            this.promote(prevLead)\n            return true\n        } else {\n            return false\n        }\n    }\n\n    promote(node: IProjectionNode, preserveFollowOpacity?: boolean) {\n        const prevLead = this.lead\n\n        if (node === prevLead) return\n\n        this.prevLead = prevLead\n        this.lead = node\n\n        node.show()\n\n        if (prevLead) {\n            prevLead.instance && prevLead.scheduleRender()\n            node.scheduleRender()\n\n            /**\n             * If both the new and previous lead have the same defined layoutDependency,\n             * skip the shared layout animation. This allows components with layoutId\n             * to opt-out of animations when their layoutDependency hasn't changed,\n             * even when the component unmounts and remounts in a different location.\n             */\n            const prevDep = prevLead.options.layoutDependency\n            const nextDep = node.options.layoutDependency\n            const dependencyMatches =\n                prevDep !== undefined &&\n                nextDep !== undefined &&\n                prevDep === nextDep\n\n            if (!dependencyMatches) {\n                const prevInstance = prevLead.instance as HTMLElement | undefined\n                const isStale = prevInstance && prevInstance.isConnected === false && !prevLead.snapshot\n\n                if (!isStale) {\n                    node.resumeFrom = prevLead\n\n                    if (preserveFollowOpacity) {\n                        node.resumeFrom.preserveOpacity = true\n                    }\n\n                    if (prevLead.snapshot) {\n                        node.snapshot = prevLead.snapshot\n                        node.snapshot.latestValues =\n                            prevLead.animationValues || prevLead.latestValues\n                    }\n\n                    if (node.root && node.root.isUpdating) {\n                        node.isLayoutDirty = true\n                    }\n                }\n            }\n\n            const { crossfade } = node.options\n            if (crossfade === false) {\n                prevLead.hide()\n            }\n        }\n    }\n\n    exitAnimationComplete() {\n        this.members.forEach((node) => {\n            const { options, resumingFrom } = node\n\n            options.onExitComplete && options.onExitComplete()\n\n            if (resumingFrom) {\n                resumingFrom.options.onExitComplete &&\n                    resumingFrom.options.onExitComplete()\n            }\n        })\n    }\n\n    scheduleRender() {\n        this.members.forEach((node) => {\n            node.instance && node.scheduleRender(false)\n        })\n    }\n\n    /**\n     * Clear any leads that have been removed this render to prevent them from being\n     * used in future animations and to prevent memory leaks\n     */\n    removeLeadSnapshot() {\n        if (this.lead && this.lead.snapshot) {\n            this.lead.snapshot = undefined\n        }\n    }\n}\n", "/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nexport const globalProjectionState = {\n    /**\n     * Global flag as to whether the tree has animated since the last time\n     * we resized the window\n     */\n    hasAnimatedSinceResize: true,\n\n    /**\n     * We set this to true once, on the first update. Any nodes added to the tree beyond that\n     * update will be given a `data-projection-id` attribute.\n     */\n    hasEverUpdated: false,\n}\n", "import {\n    Axis,\n    AxisDelta,\n    Box,\n    clamp,\n    Delta,\n    noop,\n    Point,\n    SubscriptionManager,\n} from \"motion-utils\"\nimport { animateSingleValue } from \"../../animation/animate/single-value\"\nimport { JSAnimation } from \"../../animation/JSAnimation\"\nimport { getOptimisedAppearId } from \"../../animation/optimized-appear/get-appear-id\"\nimport { Transition, ValueAnimationOptions } from \"../../animation/types\"\nimport { getValueTransition } from \"../../animation/utils/get-value-transition\"\nimport { cancelFrame, frame, frameData, frameSteps } from \"../../frameloop\"\nimport { microtask } from \"../../frameloop/microtask\"\nimport { time } from \"../../frameloop/sync-time\"\nimport type { Process } from \"../../frameloop/types\"\nimport { HTMLVisualElement } from \"../../render/html/HTMLVisualElement\"\nimport type { ResolvedValues } from \"../../render/types\"\nimport { scaleCorrectors } from \"../../render/utils/is-forced-motion-value\"\nimport type { MotionStyle, VisualElement } from \"../../render/VisualElement\"\nimport { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { delay } from \"../../utils/delay\"\nimport { isSVGElement } from \"../../utils/is-svg-element\"\nimport { isSVGSVGElement } from \"../../utils/is-svg-svg-element\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { MotionValue, motionValue } from \"../../value\"\nimport { resolveMotionValue } from \"../../value/utils/resolve-motion-value\"\nimport { mixValues } from \"../animation/mix-values\"\nimport { copyAxisDeltaInto, copyBoxInto } from \"../geometry/copy\"\nimport {\n    applyBoxDelta,\n    applyTreeDeltas,\n    transformBox,\n    translateAxis,\n} from \"../geometry/delta-apply\"\nimport {\n    calcBoxDelta,\n    calcLength,\n    calcRelativeBox,\n    calcRelativePosition,\n    isNear,\n} from \"../geometry/delta-calc\"\nimport { removeBoxTransforms } from \"../geometry/delta-remove\"\nimport { createBox, createDelta } from \"../geometry/models\"\nimport {\n    aspectRatio,\n    axisDeltaEquals,\n    boxEquals,\n    boxEqualsRounded,\n    isDeltaZero,\n} from \"../geometry/utils\"\nimport { NodeStack } from \"../shared/stack\"\nimport { buildProjectionTransform } from \"../styles/transform\"\nimport { eachAxis } from \"../utils/each-axis\"\nimport { FlatTree } from \"../utils/flat-tree\"\nimport { has2DTranslate, hasScale, hasTransform } from \"../utils/has-transform\"\nimport { globalProjectionState } from \"./state\"\nimport {\n    IProjectionNode,\n    LayoutEvents,\n    LayoutUpdateData,\n    Measurements,\n    Phase,\n    ProjectionNodeConfig,\n    ProjectionNodeOptions,\n    ScrollMeasurements,\n} from \"./types\"\n\nconst metrics = {\n    nodes: 0,\n    calculatedTargetDeltas: 0,\n    calculatedProjections: 0,\n}\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"]\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000\n\nlet id = 0\n\nfunction resetDistortingTransform(\n    key: string,\n    visualElement: VisualElement,\n    values: ResolvedValues,\n    sharedAnimationValues?: ResolvedValues\n) {\n    const { latestValues } = visualElement\n\n    // Record the distorting transform and then temporarily set it to 0\n    if (latestValues[key]) {\n        values[key] = latestValues[key]\n        visualElement.setStaticValue(key, 0)\n        if (sharedAnimationValues) {\n            sharedAnimationValues[key] = 0\n        }\n    }\n}\n\nfunction cancelTreeOptimisedTransformAnimations(\n    projectionNode: IProjectionNode\n) {\n    projectionNode.hasCheckedOptimisedAppear = true\n    if (projectionNode.root === projectionNode) return\n\n    const { visualElement } = projectionNode.options\n\n    if (!visualElement) return\n\n    const appearId = getOptimisedAppearId(visualElement)\n\n    if (window.MotionHasOptimisedAnimation!(appearId, \"transform\")) {\n        const { layout, layoutId } = projectionNode.options\n        window.MotionCancelOptimisedAnimation!(\n            appearId,\n            \"transform\",\n            frame,\n            !(layout || layoutId)\n        )\n    }\n\n    const { parent } = projectionNode\n    if (parent && !parent.hasCheckedOptimisedAppear) {\n        cancelTreeOptimisedTransformAnimations(parent)\n    }\n}\n\nexport function createProjectionNode<I>({\n    attachResizeListener,\n    defaultParent,\n    measureScroll,\n    checkIsScrollRoot,\n    resetTransform,\n}: ProjectionNodeConfig<I>) {\n    return class ProjectionNode implements IProjectionNode<I> {\n        /**\n         * A unique ID generated for every projection node.\n         */\n        id: number = id++\n\n        /**\n         * An id that represents a unique session instigated by startUpdate.\n         */\n        animationId: number = 0\n\n        animationCommitId = 0\n\n        /**\n         * A reference to the platform-native node (currently this will be a HTMLElement).\n         */\n        instance: I | undefined\n\n        /**\n         * A reference to the root projection node. There'll only ever be one tree and one root.\n         */\n        root: IProjectionNode\n\n        /**\n         * A reference to this node's parent.\n         */\n        parent?: IProjectionNode\n\n        /**\n         * A path from this node to the root node. This provides a fast way to iterate\n         * back up the tree.\n         */\n        path: IProjectionNode[]\n\n        /**\n         * A Set containing all this component's children. This is used to iterate\n         * through the children.\n         *\n         * TODO: This could be faster to iterate as a flat array stored on the root node.\n         */\n        children = new Set<IProjectionNode>()\n\n        /**\n         * Options for the node. We use this to configure what kind of layout animations\n         * we should perform (if any).\n         */\n        options: ProjectionNodeOptions = {}\n\n        /**\n         * A snapshot of the element's state just before the current update. This is\n         * hydrated when this node's `willUpdate` method is called and scrubbed at the\n         * end of the tree's `didUpdate` method.\n         */\n        snapshot: Measurements | undefined\n\n        /**\n         * A box defining the element's layout relative to the page. This will have been\n         * captured with all parent scrolls and projection transforms unset.\n         */\n        layout: Measurements | undefined\n\n        /**\n         * The layout used to calculate the previous layout animation. We use this to compare\n         * layouts between renders and decide whether we need to trigger a new layout animation\n         * or just let the current one play out.\n         */\n        targetLayout?: Box\n\n        /**\n         * A mutable data structure we use to apply all parent transforms currently\n         * acting on the element's layout. It's from here we can calculate the projectionDelta\n         * required to get the element from its layout into its calculated target box.\n         */\n        layoutCorrected: Box\n\n        /**\n         * An ideal projection transform we want to apply to the element. This is calculated,\n         * usually when an element's layout has changed, and we want the element to look as though\n         * its in its previous layout on the next frame. From there, we animated it down to 0\n         * to animate the element to its new layout.\n         */\n        targetDelta?: Delta\n\n        /**\n         * A mutable structure representing the visual bounding box on the page where we want\n         * and element to appear. This can be set directly but is currently derived once a frame\n         * from apply targetDelta to layout.\n         */\n        target?: Box\n\n        /**\n         * A mutable structure describing a visual bounding box relative to the element's\n         * projected parent. If defined, target will be derived from this rather than targetDelta.\n         * If not defined, we'll attempt to calculate on the first layout animation frame\n         * based on the targets calculated from targetDelta. This will transfer a layout animation\n         * from viewport-relative to parent-relative.\n         */\n        relativeTarget?: Box\n\n        relativeTargetOrigin?: Box\n        relativeParent?: IProjectionNode\n\n        /**\n         * We use this to detect when its safe to shut down part of a projection tree.\n         * We have to keep projecting children for scale correction and relative projection\n         * until all their parents stop performing layout animations.\n         */\n        isTreeAnimating = false\n\n        isAnimationBlocked = false\n\n        /**\n         * If true, attempt to resolve relativeTarget.\n         */\n        attemptToResolveRelativeTarget?: boolean\n\n        /**\n         * A mutable structure that represents the target as transformed by the element's\n         * latest user-set transforms (ie scale, x)\n         */\n        targetWithTransforms?: Box\n\n        /**\n         * The previous projection delta, which we can compare with the newly calculated\n         * projection delta to see if we need to render.\n         */\n        prevProjectionDelta?: Delta\n\n        /**\n         * A calculated transform that will project an element from its layoutCorrected\n         * into the target. This will be used by children to calculate their own layoutCorrect boxes.\n         */\n        projectionDelta?: Delta\n\n        /**\n         * A calculated transform that will project an element from its layoutCorrected\n         * into the targetWithTransforms.\n         */\n        projectionDeltaWithTransform?: Delta\n\n        /**\n         * If we're tracking the scroll of this element, we store it here.\n         */\n        scroll?: ScrollMeasurements\n\n        /**\n         * Flag to true if we think this layout has been changed. We can't always know this,\n         * currently we set it to true every time a component renders, or if it has a layoutDependency\n         * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n         * and if one node is dirtied, they all are.\n         */\n        isLayoutDirty = false\n\n        /**\n         * Flag to true if we think the projection calculations for this node needs\n         * recalculating as a result of an updated transform or layout animation.\n         */\n        isProjectionDirty = false\n\n        /**\n         * Flag to true if the layout *or* transform has changed. This then gets propagated\n         * throughout the projection tree, forcing any element below to recalculate on the next frame.\n         */\n        isSharedProjectionDirty = false\n\n        /**\n         * Flag transform dirty. This gets propagated throughout the whole tree but is only\n         * respected by shared nodes.\n         */\n        isTransformDirty = false\n\n        /**\n         * Block layout updates for instant layout transitions throughout the tree.\n         */\n        updateManuallyBlocked = false\n\n        updateBlockedByResize = false\n\n        /**\n         * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n         * call.\n         */\n        isUpdating = false\n\n        /**\n         * If this is an SVG element we currently disable projection transforms\n         */\n        isSVG = false\n\n        /**\n         * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n         * its projection styles.\n         */\n        needsReset = false\n\n        /**\n         * Flags whether this node should have its transform reset prior to measuring.\n         */\n        shouldResetTransform = false\n\n        /**\n         * Store whether this node has been checked for optimised appear animations. As\n         * effects fire bottom-up, and we want to look up the tree for appear animations,\n         * this makes sure we only check each path once, stopping at nodes that\n         * have already been checked.\n         */\n        hasCheckedOptimisedAppear = false\n\n        /**\n         * An object representing the calculated contextual/accumulated/tree scale.\n         * This will be used to scale calculcated projection transforms, as these are\n         * calculated in screen-space but need to be scaled for elements to layoutly\n         * make it to their calculated destinations.\n         *\n         * TODO: Lazy-init\n         */\n        treeScale: Point = { x: 1, y: 1 }\n\n        /**\n         * Is hydrated with a projection node if an element is animating from another.\n         */\n        resumeFrom?: IProjectionNode\n\n        /**\n         * Is hydrated with a projection node if an element is animating from another.\n         */\n        resumingFrom?: IProjectionNode\n\n        /**\n         * A reference to the element's latest animated values. This is a reference shared\n         * between the element's VisualElement and the ProjectionNode.\n         */\n        latestValues: ResolvedValues\n\n        /**\n         *\n         */\n        eventHandlers = new Map<LayoutEvents, SubscriptionManager<any>>()\n\n        nodes?: FlatTree\n\n        depth: number\n\n        /**\n         * If transformTemplate generates a different value before/after the\n         * update, we need to reset the transform.\n         */\n        prevTransformTemplateValue: string | undefined\n\n        preserveOpacity?: boolean\n\n        hasTreeAnimated = false\n\n        layoutVersion: number = 0\n\n        constructor(\n            latestValues: ResolvedValues = {},\n            parent: IProjectionNode | undefined = defaultParent?.()\n        ) {\n            this.latestValues = latestValues\n            this.root = parent ? parent.root || parent : this\n            this.path = parent ? [...parent.path, parent] : []\n            this.parent = parent\n\n            this.depth = parent ? parent.depth + 1 : 0\n\n            for (let i = 0; i < this.path.length; i++) {\n                this.path[i].shouldResetTransform = true\n            }\n\n            if (this.root === this) this.nodes = new FlatTree()\n        }\n\n        addEventListener(name: LayoutEvents, handler: any) {\n            if (!this.eventHandlers.has(name)) {\n                this.eventHandlers.set(name, new SubscriptionManager())\n            }\n\n            return this.eventHandlers.get(name)!.add(handler)\n        }\n\n        notifyListeners(name: LayoutEvents, ...args: any) {\n            const subscriptionManager = this.eventHandlers.get(name)\n            subscriptionManager && subscriptionManager.notify(...args)\n        }\n\n        hasListeners(name: LayoutEvents) {\n            return this.eventHandlers.has(name)\n        }\n\n        /**\n         * Lifecycles\n         */\n        mount(instance: I) {\n            if (this.instance) return\n\n            this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance)\n\n            this.instance = instance\n\n            const { layoutId, layout, visualElement } = this.options\n            if (visualElement && !visualElement.current) {\n                visualElement.mount(instance)\n            }\n\n            this.root.nodes!.add(this)\n            this.parent && this.parent.children.add(this)\n\n            if (this.root.hasTreeAnimated && (layout || layoutId)) {\n                this.isLayoutDirty = true\n            }\n\n            if (attachResizeListener) {\n                let cancelDelay: VoidFunction\n                let innerWidth = 0\n\n                const resizeUnblockUpdate = () =>\n                    (this.root.updateBlockedByResize = false)\n\n                // Set initial innerWidth in a frame.read callback to batch the read\n                frame.read(() => {\n                    innerWidth = window.innerWidth\n                })\n\n                attachResizeListener(instance, () => {\n                    const newInnerWidth = window.innerWidth\n                    if (newInnerWidth === innerWidth) return\n\n                    innerWidth = newInnerWidth\n\n                    this.root.updateBlockedByResize = true\n\n                    cancelDelay && cancelDelay()\n                    cancelDelay = delay(resizeUnblockUpdate, 250)\n\n                    if (globalProjectionState.hasAnimatedSinceResize) {\n                        globalProjectionState.hasAnimatedSinceResize = false\n                        this.nodes!.forEach(finishAnimation)\n                    }\n                })\n            }\n\n            if (layoutId) {\n                this.root.registerSharedNode(layoutId, this)\n            }\n\n            // Only register the handler if it requires layout animation\n            if (\n                this.options.animate !== false &&\n                visualElement &&\n                (layoutId || layout)\n            ) {\n                this.addEventListener(\n                    \"didUpdate\",\n                    ({\n                        delta,\n                        hasLayoutChanged,\n                        hasRelativeLayoutChanged,\n                        layout: newLayout,\n                    }: LayoutUpdateData) => {\n                        if (this.isTreeAnimationBlocked()) {\n                            this.target = undefined\n                            this.relativeTarget = undefined\n                            return\n                        }\n\n                        // TODO: Check here if an animation exists\n                        const layoutTransition =\n                            this.options.transition ||\n                            visualElement.getDefaultTransition() ||\n                            defaultLayoutTransition\n\n                        const {\n                            onLayoutAnimationStart,\n                            onLayoutAnimationComplete,\n                        } = visualElement.getProps()\n\n                        /**\n                         * The target layout of the element might stay the same,\n                         * but its position relative to its parent has changed.\n                         */\n                        const hasTargetChanged =\n                            !this.targetLayout ||\n                            !boxEqualsRounded(this.targetLayout, newLayout)\n                        /*\n                         * Note: Disabled to fix relative animations always triggering new\n                         * layout animations. If this causes further issues, we can try\n                         * a different approach to detecting relative target changes.\n                         */\n                        // || hasRelativeLayoutChanged\n\n                        /**\n                         * If the layout hasn't seemed to have changed, it might be that the\n                         * element is visually in the same place in the document but its position\n                         * relative to its parent has indeed changed. So here we check for that.\n                         */\n                        const hasOnlyRelativeTargetChanged =\n                            !hasLayoutChanged && hasRelativeLayoutChanged\n\n                        if (\n                            this.options.layoutRoot ||\n                            this.resumeFrom ||\n                            hasOnlyRelativeTargetChanged ||\n                            (hasLayoutChanged &&\n                                (hasTargetChanged || !this.currentAnimation))\n                        ) {\n                            if (this.resumeFrom) {\n                                this.resumingFrom = this.resumeFrom\n                                this.resumingFrom.resumingFrom = undefined\n                            }\n\n                            const animationOptions = {\n                                ...getValueTransition(\n                                    layoutTransition,\n                                    \"layout\"\n                                ),\n                                onPlay: onLayoutAnimationStart,\n                                onComplete: onLayoutAnimationComplete,\n                            }\n\n                            if (\n                                visualElement.shouldReduceMotion ||\n                                this.options.layoutRoot\n                            ) {\n                                animationOptions.delay = 0\n                                animationOptions.type = false\n                            }\n\n                            this.startAnimation(animationOptions)\n                            /**\n                             * Set animation origin after starting animation to avoid layout jump\n                             * caused by stopping previous layout animation\n                             */\n                            this.setAnimationOrigin(\n                                delta,\n                                hasOnlyRelativeTargetChanged\n                            )\n                        } else {\n                            /**\n                             * If the layout hasn't changed and we have an animation that hasn't started yet,\n                             * finish it immediately. Otherwise it will be animating from a location\n                             * that was probably never committed to screen and look like a jumpy box.\n                             */\n\n                            if (!hasLayoutChanged) {\n                                finishAnimation(this)\n                            }\n\n                            if (this.isLead() && this.options.onExitComplete) {\n                                this.options.onExitComplete()\n                            }\n                        }\n\n                        this.targetLayout = newLayout\n                    }\n                )\n            }\n        }\n\n        unmount() {\n            this.options.layoutId && this.willUpdate()\n            this.root.nodes!.remove(this)\n            const stack = this.getStack()\n            stack && stack.remove(this)\n            this.parent && this.parent.children.delete(this)\n            this.instance = undefined\n            this.eventHandlers.clear()\n\n            cancelFrame(this.updateProjection)\n        }\n\n        // only on the root\n        blockUpdate() {\n            this.updateManuallyBlocked = true\n        }\n\n        unblockUpdate() {\n            this.updateManuallyBlocked = false\n        }\n\n        isUpdateBlocked() {\n            return this.updateManuallyBlocked || this.updateBlockedByResize\n        }\n\n        isTreeAnimationBlocked() {\n            return (\n                this.isAnimationBlocked ||\n                (this.parent && this.parent.isTreeAnimationBlocked()) ||\n                false\n            )\n        }\n\n        // Note: currently only running on root node\n        startUpdate() {\n            if (this.isUpdateBlocked()) return\n\n            this.isUpdating = true\n\n            this.nodes && this.nodes.forEach(resetSkewAndRotation)\n            this.animationId++\n        }\n\n        getTransformTemplate() {\n            const { visualElement } = this.options\n            return visualElement && visualElement.getProps().transformTemplate\n        }\n\n        willUpdate(shouldNotifyListeners = true) {\n            this.root.hasTreeAnimated = true\n\n            if (this.root.isUpdateBlocked()) {\n                this.options.onExitComplete && this.options.onExitComplete()\n                return\n            }\n\n            /**\n             * If we're running optimised appear animations then these must be\n             * cancelled before measuring the DOM. This is so we can measure\n             * the true layout of the element rather than the WAAPI animation\n             * which will be unaffected by the resetSkewAndRotate step.\n             *\n             * Note: This is a DOM write. Worst case scenario is this is sandwiched\n             * between other snapshot reads which will cause unnecessary style recalculations.\n             * This has to happen here though, as we don't yet know which nodes will need\n             * snapshots in startUpdate(), but we only want to cancel optimised animations\n             * if a layout animation measurement is actually going to be affected by them.\n             */\n            if (\n                window.MotionCancelOptimisedAnimation &&\n                !this.hasCheckedOptimisedAppear\n            ) {\n                cancelTreeOptimisedTransformAnimations(this)\n            }\n\n            !this.root.isUpdating && this.root.startUpdate()\n\n            if (this.isLayoutDirty) return\n\n            this.isLayoutDirty = true\n            for (let i = 0; i < this.path.length; i++) {\n                const node = this.path[i]\n                node.shouldResetTransform = true\n\n                node.updateScroll(\"snapshot\")\n\n                if (node.options.layoutRoot) {\n                    node.willUpdate(false)\n                }\n            }\n\n            const { layoutId, layout } = this.options\n            if (layoutId === undefined && !layout) return\n\n            const transformTemplate = this.getTransformTemplate()\n            this.prevTransformTemplateValue = transformTemplate\n                ? transformTemplate(this.latestValues, \"\")\n                : undefined\n\n            this.updateSnapshot()\n            shouldNotifyListeners && this.notifyListeners(\"willUpdate\")\n        }\n\n        // Note: Currently only running on root node\n        updateScheduled = false\n\n        update() {\n            this.updateScheduled = false\n\n            const updateWasBlocked = this.isUpdateBlocked()\n\n            // When doing an instant transition, we skip the layout update,\n            // but should still clean up the measurements so that the next\n            // snapshot could be taken correctly.\n            if (updateWasBlocked) {\n                this.unblockUpdate()\n                this.clearAllSnapshots()\n                this.nodes!.forEach(clearMeasurements)\n                return\n            }\n\n            /**\n             * If this is a repeat of didUpdate then ignore the animation.\n             */\n            if (this.animationId <= this.animationCommitId) {\n                this.nodes!.forEach(clearIsLayoutDirty)\n                return\n            }\n\n            this.animationCommitId = this.animationId\n\n            if (!this.isUpdating) {\n                this.nodes!.forEach(clearIsLayoutDirty)\n            } else {\n                this.isUpdating = false\n\n                /**\n                 * Write\n                 */\n                this.nodes!.forEach(resetTransformStyle)\n\n                /**\n                 * Read ==================\n                 */\n                // Update layout measurements of updated children\n                this.nodes!.forEach(updateLayout)\n\n                /**\n                 * Write\n                 */\n                // Notify listeners that the layout is updated\n                this.nodes!.forEach(notifyLayoutUpdate)\n            }\n\n            this.clearAllSnapshots()\n\n            /**\n             * Manually flush any pending updates. Ideally\n             * we could leave this to the following requestAnimationFrame but this seems\n             * to leave a flash of incorrectly styled content.\n             */\n            const now = time.now()\n            frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp)\n            frameData.timestamp = now\n            frameData.isProcessing = true\n            frameSteps.update.process(frameData)\n            frameSteps.preRender.process(frameData)\n            frameSteps.render.process(frameData)\n            frameData.isProcessing = false\n        }\n\n        scheduleUpdate = () => this.update()\n\n        didUpdate() {\n            if (!this.updateScheduled) {\n                this.updateScheduled = true\n                microtask.read(this.scheduleUpdate)\n            }\n        }\n\n        clearAllSnapshots() {\n            this.nodes!.forEach(clearSnapshot)\n            this.sharedNodes.forEach(removeLeadSnapshots)\n        }\n\n        projectionUpdateScheduled = false\n        scheduleUpdateProjection() {\n            if (!this.projectionUpdateScheduled) {\n                this.projectionUpdateScheduled = true\n                frame.preRender(this.updateProjection, false, true)\n            }\n        }\n\n        scheduleCheckAfterUnmount() {\n            /**\n             * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n             * we manually call didUpdate to give a chance to the siblings to animate.\n             * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n             */\n            frame.postRender(() => {\n                if (this.isLayoutDirty) {\n                    this.root.didUpdate()\n                } else {\n                    this.root.checkUpdateFailed()\n                }\n            })\n        }\n\n        checkUpdateFailed = () => {\n            if (this.isUpdating) {\n                this.isUpdating = false\n                this.clearAllSnapshots()\n            }\n        }\n\n        /**\n         * This is a multi-step process as shared nodes might be of different depths. Nodes\n         * are sorted by depth order, so we need to resolve the entire tree before moving to\n         * the next step.\n         */\n        updateProjection = () => {\n            this.projectionUpdateScheduled = false\n\n            /**\n             * Reset debug counts. Manually resetting rather than creating a new\n             * object each frame.\n             */\n            if (statsBuffer.value) {\n                metrics.nodes =\n                    metrics.calculatedTargetDeltas =\n                    metrics.calculatedProjections =\n                        0\n            }\n\n            this.nodes!.forEach(propagateDirtyNodes)\n            this.nodes!.forEach(resolveTargetDelta)\n            this.nodes!.forEach(calcProjection)\n            this.nodes!.forEach(cleanDirtyNodes)\n\n            if (statsBuffer.addProjectionMetrics) {\n                statsBuffer.addProjectionMetrics(metrics)\n            }\n        }\n\n        /**\n         * Update measurements\n         */\n        updateSnapshot() {\n            if (this.snapshot || !this.instance) return\n\n            this.snapshot = this.measure()\n\n            if (\n                this.snapshot &&\n                !calcLength(this.snapshot.measuredBox.x) &&\n                !calcLength(this.snapshot.measuredBox.y)\n            ) {\n                this.snapshot = undefined\n            }\n        }\n\n        updateLayout() {\n            if (!this.instance) return\n\n            this.updateScroll()\n\n            if (\n                !(this.options.alwaysMeasureLayout && this.isLead()) &&\n                !this.isLayoutDirty\n            ) {\n                return\n            }\n\n            /**\n             * When a node is mounted, it simply resumes from the prevLead's\n             * snapshot instead of taking a new one, but the ancestors scroll\n             * might have updated while the prevLead is unmounted. We need to\n             * update the scroll again to make sure the layout we measure is\n             * up to date.\n             */\n            if (this.resumeFrom && !this.resumeFrom.instance) {\n                for (let i = 0; i < this.path.length; i++) {\n                    const node = this.path[i]\n                    node.updateScroll()\n                }\n            }\n\n            const prevLayout = this.layout\n            this.layout = this.measure(false)\n            this.layoutVersion++\n            this.layoutCorrected = createBox()\n            this.isLayoutDirty = false\n            this.projectionDelta = undefined\n            this.notifyListeners(\"measure\", this.layout.layoutBox)\n\n            const { visualElement } = this.options\n            visualElement &&\n                visualElement.notify(\n                    \"LayoutMeasure\",\n                    this.layout.layoutBox,\n                    prevLayout ? prevLayout.layoutBox : undefined\n                )\n        }\n\n        updateScroll(phase: Phase = \"measure\") {\n            let needsMeasurement = Boolean(\n                this.options.layoutScroll && this.instance\n            )\n\n            if (\n                this.scroll &&\n                this.scroll.animationId === this.root.animationId &&\n                this.scroll.phase === phase\n            ) {\n                needsMeasurement = false\n            }\n\n            if (needsMeasurement && this.instance) {\n                const isRoot = checkIsScrollRoot(this.instance)\n                this.scroll = {\n                    animationId: this.root.animationId,\n                    phase,\n                    isRoot,\n                    offset: measureScroll(this.instance),\n                    wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n                }\n            }\n        }\n\n        resetTransform() {\n            if (!resetTransform) return\n\n            const isResetRequested =\n                this.isLayoutDirty ||\n                this.shouldResetTransform ||\n                this.options.alwaysMeasureLayout\n\n            const hasProjection =\n                this.projectionDelta && !isDeltaZero(this.projectionDelta)\n\n            const transformTemplate = this.getTransformTemplate()\n            const transformTemplateValue = transformTemplate\n                ? transformTemplate(this.latestValues, \"\")\n                : undefined\n\n            const transformTemplateHasChanged =\n                transformTemplateValue !== this.prevTransformTemplateValue\n\n            if (\n                isResetRequested &&\n                this.instance &&\n                (hasProjection ||\n                    hasTransform(this.latestValues) ||\n                    transformTemplateHasChanged)\n            ) {\n                resetTransform(this.instance, transformTemplateValue)\n                this.shouldResetTransform = false\n                this.scheduleRender()\n            }\n        }\n\n        measure(removeTransform = true) {\n            const pageBox = this.measurePageBox()\n\n            let layoutBox = this.removeElementScroll(pageBox)\n\n            /**\n             * Measurements taken during the pre-render stage\n             * still have transforms applied so we remove them\n             * via calculation.\n             */\n            if (removeTransform) {\n                layoutBox = this.removeTransform(layoutBox)\n            }\n\n            roundBox(layoutBox)\n\n            return {\n                animationId: this.root.animationId,\n                measuredBox: pageBox,\n                layoutBox,\n                latestValues: {},\n                source: this.id,\n            }\n        }\n\n        measurePageBox() {\n            const { visualElement } = this.options\n            if (!visualElement) return createBox()\n\n            const box = visualElement.measureViewportBox()\n\n            const wasInScrollRoot =\n                this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot)\n\n            if (!wasInScrollRoot) {\n                // Remove viewport scroll to give page-relative coordinates\n                const { scroll } = this.root\n                if (scroll) {\n                    translateAxis(box.x, scroll.offset.x)\n                    translateAxis(box.y, scroll.offset.y)\n                }\n            }\n\n            return box\n        }\n\n        removeElementScroll(box: Box): Box {\n            const boxWithoutScroll = createBox()\n            copyBoxInto(boxWithoutScroll, box)\n\n            if (this.scroll?.wasRoot) {\n                return boxWithoutScroll\n            }\n\n            /**\n             * Performance TODO: Keep a cumulative scroll offset down the tree\n             * rather than loop back up the path.\n             */\n            for (let i = 0; i < this.path.length; i++) {\n                const node = this.path[i]\n                const { scroll, options } = node\n\n                if (node !== this.root && scroll && options.layoutScroll) {\n                    /**\n                     * If this is a new scroll root, we want to remove all previous scrolls\n                     * from the viewport box.\n                     */\n                    if (scroll.wasRoot) {\n                        copyBoxInto(boxWithoutScroll, box)\n                    }\n\n                    translateAxis(boxWithoutScroll.x, scroll.offset.x)\n                    translateAxis(boxWithoutScroll.y, scroll.offset.y)\n                }\n            }\n\n            return boxWithoutScroll\n        }\n\n        applyTransform(box: Box, transformOnly = false): Box {\n            const withTransforms = createBox()\n            copyBoxInto(withTransforms, box)\n            for (let i = 0; i < this.path.length; i++) {\n                const node = this.path[i]\n\n                if (\n                    !transformOnly &&\n                    node.options.layoutScroll &&\n                    node.scroll &&\n                    node !== node.root\n                ) {\n                    transformBox(withTransforms, {\n                        x: -node.scroll.offset.x,\n                        y: -node.scroll.offset.y,\n                    })\n                }\n\n                if (!hasTransform(node.latestValues)) continue\n                transformBox(withTransforms, node.latestValues)\n            }\n\n            if (hasTransform(this.latestValues)) {\n                transformBox(withTransforms, this.latestValues)\n            }\n\n            return withTransforms\n        }\n\n        removeTransform(box: Box): Box {\n            const boxWithoutTransform = createBox()\n            copyBoxInto(boxWithoutTransform, box)\n\n            for (let i = 0; i < this.path.length; i++) {\n                const node = this.path[i]\n                if (!node.instance) continue\n                if (!hasTransform(node.latestValues)) continue\n\n                hasScale(node.latestValues) && node.updateSnapshot()\n\n                const sourceBox = createBox()\n                const nodeBox = node.measurePageBox()\n                copyBoxInto(sourceBox, nodeBox)\n\n                removeBoxTransforms(\n                    boxWithoutTransform,\n                    node.latestValues,\n                    node.snapshot ? node.snapshot.layoutBox : undefined,\n                    sourceBox\n                )\n            }\n\n            if (hasTransform(this.latestValues)) {\n                removeBoxTransforms(boxWithoutTransform, this.latestValues)\n            }\n\n            return boxWithoutTransform\n        }\n\n        setTargetDelta(delta: Delta) {\n            this.targetDelta = delta\n            this.root.scheduleUpdateProjection()\n            this.isProjectionDirty = true\n        }\n\n        setOptions(options: ProjectionNodeOptions) {\n            this.options = {\n                ...this.options,\n                ...options,\n                crossfade:\n                    options.crossfade !== undefined ? options.crossfade : true,\n            }\n        }\n\n        clearMeasurements() {\n            this.scroll = undefined\n            this.layout = undefined\n            this.snapshot = undefined\n            this.prevTransformTemplateValue = undefined\n            this.targetDelta = undefined\n            this.target = undefined\n            this.isLayoutDirty = false\n        }\n\n        forceRelativeParentToResolveTarget() {\n            if (!this.relativeParent) return\n\n            /**\n             * If the parent target isn't up-to-date, force it to update.\n             * This is an unfortunate de-optimisation as it means any updating relative\n             * projection will cause all the relative parents to recalculate back\n             * up the tree.\n             */\n            if (\n                this.relativeParent.resolvedRelativeTargetAt !==\n                frameData.timestamp\n            ) {\n                this.relativeParent.resolveTargetDelta(true)\n            }\n        }\n\n        /**\n         * Frame calculations\n         */\n        resolvedRelativeTargetAt: number = 0.0\n        resolveTargetDelta(forceRecalculation = false) {\n            /**\n             * Once the dirty status of nodes has been spread through the tree, we also\n             * need to check if we have a shared node of a different depth that has itself\n             * been dirtied.\n             */\n            const lead = this.getLead()\n            this.isProjectionDirty ||= lead.isProjectionDirty\n            this.isTransformDirty ||= lead.isTransformDirty\n            this.isSharedProjectionDirty ||= lead.isSharedProjectionDirty\n\n            const isShared = Boolean(this.resumingFrom) || this !== lead\n\n            /**\n             * We don't use transform for this step of processing so we don't\n             * need to check whether any nodes have changed transform.\n             */\n            const canSkip = !(\n                forceRecalculation ||\n                (isShared && this.isSharedProjectionDirty) ||\n                this.isProjectionDirty ||\n                this.parent?.isProjectionDirty ||\n                this.attemptToResolveRelativeTarget ||\n                this.root.updateBlockedByResize\n            )\n\n            if (canSkip) return\n\n            const { layout, layoutId } = this.options\n\n            /**\n             * If we have no layout, we can't perform projection, so early return\n             */\n            if (!this.layout || !(layout || layoutId)) return\n\n            this.resolvedRelativeTargetAt = frameData.timestamp\n\n            const relativeParent = this.getClosestProjectingParent()\n\n            if (\n                relativeParent &&\n                this.linkedParentVersion !== relativeParent.layoutVersion &&\n                !relativeParent.options.layoutRoot\n            ) {\n                this.removeRelativeTarget()\n            }\n\n            /**\n             * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n             * a relativeParent. This will allow a component to perform scale correction\n             * even if no animation has started.\n             */\n            if (!this.targetDelta && !this.relativeTarget) {\n                if (relativeParent && relativeParent.layout) {\n                    this.createRelativeTarget(\n                        relativeParent,\n                        this.layout.layoutBox,\n                        relativeParent.layout.layoutBox\n                    )\n                } else {\n                    this.removeRelativeTarget()\n                }\n            }\n\n            /**\n             * If we have no relative target or no target delta our target isn't valid\n             * for this frame.\n             */\n            if (!this.relativeTarget && !this.targetDelta) return\n\n            /**\n             * Lazy-init target data structure\n             */\n            if (!this.target) {\n                this.target = createBox()\n                this.targetWithTransforms = createBox()\n            }\n\n            /**\n             * If we've got a relative box for this component, resolve it into a target relative to the parent.\n             */\n            if (\n                this.relativeTarget &&\n                this.relativeTargetOrigin &&\n                this.relativeParent &&\n                this.relativeParent.target\n            ) {\n                this.forceRelativeParentToResolveTarget()\n\n                calcRelativeBox(\n                    this.target,\n                    this.relativeTarget,\n                    this.relativeParent.target\n                )\n\n                /**\n                 * If we've only got a targetDelta, resolve it into a target\n                 */\n            } else if (this.targetDelta) {\n                if (Boolean(this.resumingFrom)) {\n                    // TODO: This is creating a new object every frame\n                    this.target = this.applyTransform(this.layout.layoutBox)\n                } else {\n                    copyBoxInto(this.target, this.layout.layoutBox)\n                }\n\n                applyBoxDelta(this.target, this.targetDelta)\n            } else {\n                /**\n                 * If no target, use own layout as target\n                 */\n                copyBoxInto(this.target, this.layout.layoutBox)\n            }\n\n            /**\n             * If we've been told to attempt to resolve a relative target, do so.\n             */\n            if (this.attemptToResolveRelativeTarget) {\n                this.attemptToResolveRelativeTarget = false\n\n                if (\n                    relativeParent &&\n                    Boolean(relativeParent.resumingFrom) ===\n                        Boolean(this.resumingFrom) &&\n                    !relativeParent.options.layoutScroll &&\n                    relativeParent.target &&\n                    this.animationProgress !== 1\n                ) {\n                    this.createRelativeTarget(\n                        relativeParent,\n                        this.target,\n                        relativeParent.target\n                    )\n                } else {\n                    this.relativeParent = this.relativeTarget = undefined\n                }\n            }\n\n            /**\n             * Increase debug counter for resolved target deltas\n             */\n            if (statsBuffer.value) {\n                metrics.calculatedTargetDeltas++\n            }\n        }\n\n        getClosestProjectingParent() {\n            if (\n                !this.parent ||\n                hasScale(this.parent.latestValues) ||\n                has2DTranslate(this.parent.latestValues)\n            ) {\n                return undefined\n            }\n\n            if (this.parent.isProjecting()) {\n                return this.parent\n            } else {\n                return this.parent.getClosestProjectingParent()\n            }\n        }\n\n        isProjecting() {\n            return Boolean(\n                (this.relativeTarget ||\n                    this.targetDelta ||\n                    this.options.layoutRoot) &&\n                    this.layout\n            )\n        }\n\n        linkedParentVersion: number = 0\n        createRelativeTarget(\n            relativeParent: IProjectionNode,\n            layout: Box,\n            parentLayout: Box\n        ) {\n            this.relativeParent = relativeParent\n            this.linkedParentVersion = relativeParent.layoutVersion\n            this.forceRelativeParentToResolveTarget()\n            this.relativeTarget = createBox()\n            this.relativeTargetOrigin = createBox()\n            calcRelativePosition(\n                this.relativeTargetOrigin,\n                layout,\n                parentLayout\n            )\n\n            copyBoxInto(this.relativeTarget, this.relativeTargetOrigin)\n        }\n\n        removeRelativeTarget() {\n            this.relativeParent = this.relativeTarget = undefined\n        }\n\n        hasProjected: boolean = false\n\n        calcProjection() {\n            const lead = this.getLead()\n            const isShared = Boolean(this.resumingFrom) || this !== lead\n\n            let canSkip = true\n\n            /**\n             * If this is a normal layout animation and neither this node nor its nearest projecting\n             * is dirty then we can't skip.\n             */\n            if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n                canSkip = false\n            }\n\n            /**\n             * If this is a shared layout animation and this node's shared projection is dirty then\n             * we can't skip.\n             */\n            if (\n                isShared &&\n                (this.isSharedProjectionDirty || this.isTransformDirty)\n            ) {\n                canSkip = false\n            }\n\n            /**\n             * If we have resolved the target this frame we must recalculate the\n             * projection to ensure it visually represents the internal calculations.\n             */\n            if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n                canSkip = false\n            }\n\n            if (canSkip) return\n\n            const { layout, layoutId } = this.options\n\n            /**\n             * If this section of the tree isn't animating we can\n             * delete our target sources for the following frame.\n             */\n            this.isTreeAnimating = Boolean(\n                (this.parent && this.parent.isTreeAnimating) ||\n                    this.currentAnimation ||\n                    this.pendingAnimation\n            )\n            if (!this.isTreeAnimating) {\n                this.targetDelta = this.relativeTarget = undefined\n            }\n\n            if (!this.layout || !(layout || layoutId)) return\n\n            /**\n             * Reset the corrected box with the latest values from box, as we're then going\n             * to perform mutative operations on it.\n             */\n            copyBoxInto(this.layoutCorrected, this.layout.layoutBox)\n\n            /**\n             * Record previous tree scales before updating.\n             */\n            const prevTreeScaleX = this.treeScale.x\n            const prevTreeScaleY = this.treeScale.y\n            /**\n             * Apply all the parent deltas to this box to produce the corrected box. This\n             * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n             */\n            applyTreeDeltas(\n                this.layoutCorrected,\n                this.treeScale,\n                this.path,\n                isShared\n            )\n\n            /**\n             * If this layer needs to perform scale correction but doesn't have a target,\n             * use the layout as the target.\n             */\n            if (\n                lead.layout &&\n                !lead.target &&\n                (this.treeScale.x !== 1 || this.treeScale.y !== 1)\n            ) {\n                lead.target = lead.layout.layoutBox\n                lead.targetWithTransforms = createBox()\n            }\n\n            const { target } = lead\n\n            if (!target) {\n                /**\n                 * If we don't have a target to project into, but we were previously\n                 * projecting, we want to remove the stored transform and schedule\n                 * a render to ensure the elements reflect the removed transform.\n                 */\n                if (this.prevProjectionDelta) {\n                    this.createProjectionDeltas()\n                    this.scheduleRender()\n                }\n\n                return\n            }\n\n            if (!this.projectionDelta || !this.prevProjectionDelta) {\n                this.createProjectionDeltas()\n            } else {\n                copyAxisDeltaInto(\n                    this.prevProjectionDelta.x,\n                    this.projectionDelta.x\n                )\n                copyAxisDeltaInto(\n                    this.prevProjectionDelta.y,\n                    this.projectionDelta.y\n                )\n            }\n\n            /**\n             * Update the delta between the corrected box and the target box before user-set transforms were applied.\n             * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n             * for our layout reprojection, but still allow them to be scaled correctly by the user.\n             * It might be that to simplify this we may want to accept that user-set scale is also corrected\n             * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n             * to allow people to choose whether these styles are corrected based on just the\n             * layout reprojection or the final bounding box.\n             */\n            calcBoxDelta(\n                this.projectionDelta!,\n                this.layoutCorrected,\n                target,\n                this.latestValues\n            )\n\n            if (\n                this.treeScale.x !== prevTreeScaleX ||\n                this.treeScale.y !== prevTreeScaleY ||\n                !axisDeltaEquals(\n                    this.projectionDelta!.x,\n                    this.prevProjectionDelta!.x\n                ) ||\n                !axisDeltaEquals(\n                    this.projectionDelta!.y,\n                    this.prevProjectionDelta!.y\n                )\n            ) {\n                this.hasProjected = true\n                this.scheduleRender()\n                this.notifyListeners(\"projectionUpdate\", target)\n            }\n\n            /**\n             * Increase debug counter for recalculated projections\n             */\n            if (statsBuffer.value) {\n                metrics.calculatedProjections++\n            }\n        }\n\n        isVisible = true\n        hide() {\n            this.isVisible = false\n            // TODO: Schedule render\n        }\n        show() {\n            this.isVisible = true\n            // TODO: Schedule render\n        }\n\n        scheduleRender(notifyAll = true) {\n            this.options.visualElement?.scheduleRender()\n            if (notifyAll) {\n                const stack = this.getStack()\n                stack && stack.scheduleRender()\n            }\n            if (this.resumingFrom && !this.resumingFrom.instance) {\n                this.resumingFrom = undefined\n            }\n        }\n\n        createProjectionDeltas() {\n            this.prevProjectionDelta = createDelta()\n            this.projectionDelta = createDelta()\n            this.projectionDeltaWithTransform = createDelta()\n        }\n\n        /**\n         * Animation\n         */\n        animationValues?: ResolvedValues\n        pendingAnimation?: Process\n        currentAnimation?: JSAnimation<number>\n        mixTargetDelta: (progress: number) => void\n        animationProgress = 0\n\n        setAnimationOrigin(\n            delta: Delta,\n            hasOnlyRelativeTargetChanged: boolean = false\n        ) {\n            const snapshot = this.snapshot\n            const snapshotLatestValues = snapshot ? snapshot.latestValues : {}\n            const mixedValues = { ...this.latestValues }\n\n            const targetDelta = createDelta()\n            if (\n                !this.relativeParent ||\n                !this.relativeParent.options.layoutRoot\n            ) {\n                this.relativeTarget = this.relativeTargetOrigin = undefined\n            }\n            this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged\n\n            const relativeLayout = createBox()\n\n            const snapshotSource = snapshot ? snapshot.source : undefined\n            const layoutSource = this.layout ? this.layout.source : undefined\n            const isSharedLayoutAnimation = snapshotSource !== layoutSource\n            const stack = this.getStack()\n            const isOnlyMember = !stack || stack.members.length <= 1\n            const shouldCrossfadeOpacity = Boolean(\n                isSharedLayoutAnimation &&\n                    !isOnlyMember &&\n                    this.options.crossfade === true &&\n                    !this.path.some(hasOpacityCrossfade)\n            )\n\n            this.animationProgress = 0\n\n            let prevRelativeTarget: Box\n\n            this.mixTargetDelta = (latest: number) => {\n                const progress = latest / 1000\n\n                mixAxisDelta(targetDelta.x, delta.x, progress)\n                mixAxisDelta(targetDelta.y, delta.y, progress)\n                this.setTargetDelta(targetDelta)\n\n                if (\n                    this.relativeTarget &&\n                    this.relativeTargetOrigin &&\n                    this.layout &&\n                    this.relativeParent &&\n                    this.relativeParent.layout\n                ) {\n                    calcRelativePosition(\n                        relativeLayout,\n                        this.layout.layoutBox,\n                        this.relativeParent.layout.layoutBox\n                    )\n                    mixBox(\n                        this.relativeTarget,\n                        this.relativeTargetOrigin,\n                        relativeLayout,\n                        progress\n                    )\n\n                    /**\n                     * If this is an unchanged relative target we can consider the\n                     * projection not dirty.\n                     */\n                    if (\n                        prevRelativeTarget &&\n                        boxEquals(this.relativeTarget, prevRelativeTarget)\n                    ) {\n                        this.isProjectionDirty = false\n                    }\n\n                    if (!prevRelativeTarget) prevRelativeTarget = createBox()\n                    copyBoxInto(prevRelativeTarget, this.relativeTarget)\n                }\n\n                if (isSharedLayoutAnimation) {\n                    this.animationValues = mixedValues\n\n                    mixValues(\n                        mixedValues,\n                        snapshotLatestValues,\n                        this.latestValues,\n                        progress,\n                        shouldCrossfadeOpacity,\n                        isOnlyMember\n                    )\n                }\n\n                this.root.scheduleUpdateProjection()\n                this.scheduleRender()\n\n                this.animationProgress = progress\n            }\n\n            this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0)\n        }\n\n        motionValue?: MotionValue<number>\n        startAnimation(options: ValueAnimationOptions<number>) {\n            this.notifyListeners(\"animationStart\")\n\n            this.currentAnimation?.stop()\n            this.resumingFrom?.currentAnimation?.stop()\n\n            if (this.pendingAnimation) {\n                cancelFrame(this.pendingAnimation)\n                this.pendingAnimation = undefined\n            }\n\n            /**\n             * Start the animation in the next frame to have a frame with progress 0,\n             * where the target is the same as when the animation started, so we can\n             * calculate the relative positions correctly for instant transitions.\n             */\n            this.pendingAnimation = frame.update(() => {\n                globalProjectionState.hasAnimatedSinceResize = true\n\n                activeAnimations.layout++\n                this.motionValue ||= motionValue(0)\n                this.motionValue.jump(0, false)\n\n                this.currentAnimation = animateSingleValue(\n                    this.motionValue,\n                    [0, 1000],\n                    {\n                        ...(options as any),\n                        velocity: 0,\n                        isSync: true,\n                        onUpdate: (latest: number) => {\n                            this.mixTargetDelta(latest)\n                            options.onUpdate && options.onUpdate(latest)\n                        },\n                        onStop: () => {\n                            activeAnimations.layout--\n                        },\n                        onComplete: () => {\n                            activeAnimations.layout--\n                            options.onComplete && options.onComplete()\n                            this.completeAnimation()\n                        },\n                    }\n                ) as JSAnimation<number>\n\n                if (this.resumingFrom) {\n                    this.resumingFrom.currentAnimation = this.currentAnimation\n                }\n\n                this.pendingAnimation = undefined\n            })\n        }\n\n        completeAnimation() {\n            if (this.resumingFrom) {\n                this.resumingFrom.currentAnimation = undefined\n                this.resumingFrom.preserveOpacity = undefined\n            }\n\n            const stack = this.getStack()\n            stack && stack.exitAnimationComplete()\n            this.resumingFrom =\n                this.currentAnimation =\n                this.animationValues =\n                    undefined\n\n            this.notifyListeners(\"animationComplete\")\n        }\n\n        finishAnimation() {\n            if (this.currentAnimation) {\n                this.mixTargetDelta && this.mixTargetDelta(animationTarget)\n                this.currentAnimation.stop()\n            }\n\n            this.completeAnimation()\n        }\n\n        applyTransformsToTarget() {\n            const lead = this.getLead()\n            let { targetWithTransforms, target, layout, latestValues } = lead\n\n            if (!targetWithTransforms || !target || !layout) return\n\n            /**\n             * If we're only animating position, and this element isn't the lead element,\n             * then instead of projecting into the lead box we instead want to calculate\n             * a new target that aligns the two boxes but maintains the layout shape.\n             */\n            if (\n                this !== lead &&\n                this.layout &&\n                layout &&\n                shouldAnimatePositionOnly(\n                    this.options.animationType,\n                    this.layout.layoutBox,\n                    layout.layoutBox\n                )\n            ) {\n                target = this.target || createBox()\n\n                const xLength = calcLength(this.layout!.layoutBox.x)\n                target!.x.min = lead.target!.x.min\n                target!.x.max = target.x.min + xLength\n\n                const yLength = calcLength(this.layout!.layoutBox.y)\n                target!.y.min = lead.target!.y.min\n                target!.y.max = target.y.min + yLength\n            }\n\n            copyBoxInto(targetWithTransforms, target)\n\n            /**\n             * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n             * This is the final box that we will then project into by calculating a transform delta and\n             * applying it to the corrected box.\n             */\n            transformBox(targetWithTransforms, latestValues)\n\n            /**\n             * Update the delta between the corrected box and the final target box, after\n             * user-set transforms are applied to it. This will be used by the renderer to\n             * create a transform style that will reproject the element from its layout layout\n             * into the desired bounding box.\n             */\n            calcBoxDelta(\n                this.projectionDeltaWithTransform!,\n                this.layoutCorrected,\n                targetWithTransforms!,\n                latestValues\n            )\n        }\n\n        /**\n         * Shared layout\n         */\n        // TODO Only running on root node\n        sharedNodes: Map<string, NodeStack> = new Map()\n        registerSharedNode(layoutId: string, node: IProjectionNode) {\n            if (!this.sharedNodes.has(layoutId)) {\n                this.sharedNodes.set(layoutId, new NodeStack())\n            }\n\n            const stack = this.sharedNodes.get(layoutId)!\n            stack.add(node)\n\n            const config = node.options.initialPromotionConfig\n            node.promote({\n                transition: config ? config.transition : undefined,\n                preserveFollowOpacity:\n                    config && config.shouldPreserveFollowOpacity\n                        ? config.shouldPreserveFollowOpacity(node)\n                        : undefined,\n            })\n        }\n\n        isLead(): boolean {\n            const stack = this.getStack()\n            return stack ? stack.lead === this : true\n        }\n\n        getLead() {\n            const { layoutId } = this.options\n            return layoutId ? this.getStack()?.lead || this : this\n        }\n\n        getPrevLead() {\n            const { layoutId } = this.options\n            return layoutId ? this.getStack()?.prevLead : undefined\n        }\n\n        getStack() {\n            const { layoutId } = this.options\n            if (layoutId) return this.root.sharedNodes.get(layoutId)\n        }\n\n        promote({\n            needsReset,\n            transition,\n            preserveFollowOpacity,\n        }: {\n            needsReset?: boolean\n            transition?: Transition\n            preserveFollowOpacity?: boolean\n        } = {}) {\n            const stack = this.getStack()\n            if (stack) stack.promote(this, preserveFollowOpacity)\n\n            if (needsReset) {\n                this.projectionDelta = undefined\n                this.needsReset = true\n            }\n            if (transition) this.setOptions({ transition })\n        }\n\n        relegate(): boolean {\n            const stack = this.getStack()\n            if (stack) {\n                return stack.relegate(this)\n            } else {\n                return false\n            }\n        }\n\n        resetSkewAndRotation() {\n            const { visualElement } = this.options\n\n            if (!visualElement) return\n\n            // If there's no detected skew or rotation values, we can early return without a forced render.\n            let hasDistortingTransform = false\n\n            /**\n             * An unrolled check for rotation values. Most elements don't have any rotation and\n             * skipping the nested loop and new object creation is 50% faster.\n             */\n            const { latestValues } = visualElement\n            if (\n                latestValues.z ||\n                latestValues.rotate ||\n                latestValues.rotateX ||\n                latestValues.rotateY ||\n                latestValues.rotateZ ||\n                latestValues.skewX ||\n                latestValues.skewY\n            ) {\n                hasDistortingTransform = true\n            }\n\n            // If there's no distorting values, we don't need to do any more.\n            if (!hasDistortingTransform) return\n\n            const resetValues: ResolvedValues = {}\n\n            if (latestValues.z) {\n                resetDistortingTransform(\n                    \"z\",\n                    visualElement,\n                    resetValues,\n                    this.animationValues\n                )\n            }\n\n            // Check the skew and rotate value of all axes and reset to 0\n            for (let i = 0; i < transformAxes.length; i++) {\n                resetDistortingTransform(\n                    `rotate${transformAxes[i]}`,\n                    visualElement,\n                    resetValues,\n                    this.animationValues\n                )\n                resetDistortingTransform(\n                    `skew${transformAxes[i]}`,\n                    visualElement,\n                    resetValues,\n                    this.animationValues\n                )\n            }\n\n            // Force a render of this element to apply the transform with all skews and rotations\n            // set to 0.\n            visualElement.render()\n\n            // Put back all the values we reset\n            for (const key in resetValues) {\n                visualElement.setStaticValue(key, resetValues[key])\n                if (this.animationValues) {\n                    this.animationValues[key] = resetValues[key]\n                }\n            }\n\n            // Schedule a render for the next frame. This ensures we won't visually\n            // see the element with the reset rotate value applied.\n            visualElement.scheduleRender()\n        }\n\n        applyProjectionStyles(\n            targetStyle: any, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties\n            styleProp?: MotionStyle\n        ) {\n            if (!this.instance || this.isSVG) return\n\n            if (!this.isVisible) {\n                targetStyle.visibility = \"hidden\"\n                return\n            }\n\n            const transformTemplate = this.getTransformTemplate()\n\n            if (this.needsReset) {\n                this.needsReset = false\n\n                targetStyle.visibility = \"\"\n                targetStyle.opacity = \"\"\n                targetStyle.pointerEvents =\n                    resolveMotionValue(styleProp?.pointerEvents) || \"\"\n                targetStyle.transform = transformTemplate\n                    ? transformTemplate(this.latestValues, \"\")\n                    : \"none\"\n                return\n            }\n\n            const lead = this.getLead()\n            if (!this.projectionDelta || !this.layout || !lead.target) {\n                if (this.options.layoutId) {\n                    targetStyle.opacity =\n                        this.latestValues.opacity !== undefined\n                            ? this.latestValues.opacity\n                            : 1\n                    targetStyle.pointerEvents =\n                        resolveMotionValue(styleProp?.pointerEvents) || \"\"\n                }\n                if (this.hasProjected && !hasTransform(this.latestValues)) {\n                    targetStyle.transform = transformTemplate\n                        ? transformTemplate({}, \"\")\n                        : \"none\"\n                    this.hasProjected = false\n                }\n\n                return\n            }\n\n            targetStyle.visibility = \"\"\n\n            const valuesToRender = lead.animationValues || lead.latestValues\n            this.applyTransformsToTarget()\n\n            let transform = buildProjectionTransform(\n                this.projectionDeltaWithTransform!,\n                this.treeScale,\n                valuesToRender\n            )\n\n            if (transformTemplate) {\n                transform = transformTemplate(valuesToRender, transform)\n            }\n\n            targetStyle.transform = transform\n\n            const { x, y } = this.projectionDelta\n            targetStyle.transformOrigin = `${x.origin * 100}% ${\n                y.origin * 100\n            }% 0`\n\n            if (lead.animationValues) {\n                /**\n                 * If the lead component is animating, assign this either the entering/leaving\n                 * opacity\n                 */\n                targetStyle.opacity =\n                    lead === this\n                        ? valuesToRender.opacity ??\n                          this.latestValues.opacity ??\n                          1\n                        : this.preserveOpacity\n                        ? this.latestValues.opacity\n                        : valuesToRender.opacityExit\n            } else {\n                /**\n                 * Or we're not animating at all, set the lead component to its layout\n                 * opacity and other components to hidden.\n                 */\n                targetStyle.opacity =\n                    lead === this\n                        ? valuesToRender.opacity !== undefined\n                            ? valuesToRender.opacity\n                            : \"\"\n                        : valuesToRender.opacityExit !== undefined\n                        ? valuesToRender.opacityExit\n                        : 0\n            }\n\n            /**\n             * Apply scale correction\n             */\n            for (const key in scaleCorrectors) {\n                if (valuesToRender[key] === undefined) continue\n\n                const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]\n\n                /**\n                 * Only apply scale correction to the value if we have an\n                 * active projection transform. Otherwise these values become\n                 * vulnerable to distortion if the element changes size without\n                 * a corresponding layout animation.\n                 */\n                const corrected =\n                    transform === \"none\"\n                        ? valuesToRender[key]\n                        : correct(valuesToRender[key], lead)\n\n                if (applyTo) {\n                    const num = applyTo.length\n                    for (let i = 0; i < num; i++) {\n                        targetStyle[applyTo[i] as any] = corrected\n                    }\n                } else {\n                    // If this is a CSS variable, set it directly on the instance.\n                    // Replacing this function from creating styles to setting them\n                    // would be a good place to remove per frame object creation\n                    if (isCSSVariable) {\n                        ;(\n                            this.options.visualElement as HTMLVisualElement\n                        ).renderState.vars[key] = corrected\n                    } else {\n                        targetStyle[key as any] = corrected\n                    }\n                }\n            }\n\n            /**\n             * Disable pointer events on follow components. This is to ensure\n             * that if a follow component covers a lead component it doesn't block\n             * pointer events on the lead.\n             */\n            if (this.options.layoutId) {\n                targetStyle.pointerEvents =\n                    lead === this\n                        ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n                        : \"none\"\n            }\n        }\n\n        clearSnapshot() {\n            this.resumeFrom = this.snapshot = undefined\n        }\n\n        // Only run on root\n        resetTree() {\n            this.root.nodes!.forEach((node: IProjectionNode) =>\n                node.currentAnimation?.stop()\n            )\n            this.root.nodes!.forEach(clearMeasurements)\n            this.root.sharedNodes.clear()\n        }\n    }\n}\n\nfunction updateLayout(node: IProjectionNode) {\n    node.updateLayout()\n}\n\nfunction notifyLayoutUpdate(node: IProjectionNode) {\n    const snapshot = node.resumeFrom?.snapshot || node.snapshot\n\n    if (\n        node.isLead() &&\n        node.layout &&\n        snapshot &&\n        node.hasListeners(\"didUpdate\")\n    ) {\n        const { layoutBox: layout, measuredBox: measuredLayout } = node.layout\n        const { animationType } = node.options\n\n        const isShared = snapshot.source !== node.layout.source\n\n        // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n        // animations for instance if layout=\"size\" and an element has only changed position\n        if (animationType === \"size\") {\n            eachAxis((axis) => {\n                const axisSnapshot = isShared\n                    ? snapshot.measuredBox[axis]\n                    : snapshot.layoutBox[axis]\n                const length = calcLength(axisSnapshot)\n                axisSnapshot.min = layout[axis].min\n                axisSnapshot.max = axisSnapshot.min + length\n            })\n        } else if (\n            shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)\n        ) {\n            eachAxis((axis) => {\n                const axisSnapshot = isShared\n                    ? snapshot.measuredBox[axis]\n                    : snapshot.layoutBox[axis]\n                const length = calcLength(layout[axis])\n                axisSnapshot.max = axisSnapshot.min + length\n\n                /**\n                 * Ensure relative target gets resized and rerendererd\n                 */\n                if (node.relativeTarget && !node.currentAnimation) {\n                    node.isProjectionDirty = true\n                    node.relativeTarget[axis].max =\n                        node.relativeTarget[axis].min + length\n                }\n            })\n        }\n\n        const layoutDelta = createDelta()\n\n        calcBoxDelta(layoutDelta, layout, snapshot.layoutBox)\n        const visualDelta = createDelta()\n        if (isShared) {\n            calcBoxDelta(\n                visualDelta,\n                node.applyTransform(measuredLayout, true),\n                snapshot.measuredBox\n            )\n        } else {\n            calcBoxDelta(visualDelta, layout, snapshot.layoutBox)\n        }\n\n        const hasLayoutChanged = !isDeltaZero(layoutDelta)\n        let hasRelativeLayoutChanged = false\n\n        if (!node.resumeFrom) {\n            const relativeParent = node.getClosestProjectingParent()\n\n            /**\n             * If the relativeParent is itself resuming from a different element then\n             * the relative snapshot is not relavent\n             */\n            if (relativeParent && !relativeParent.resumeFrom) {\n                const { snapshot: parentSnapshot, layout: parentLayout } =\n                    relativeParent\n\n                if (parentSnapshot && parentLayout) {\n                    const relativeSnapshot = createBox()\n                    calcRelativePosition(\n                        relativeSnapshot,\n                        snapshot.layoutBox,\n                        parentSnapshot.layoutBox\n                    )\n\n                    const relativeLayout = createBox()\n                    calcRelativePosition(\n                        relativeLayout,\n                        layout,\n                        parentLayout.layoutBox\n                    )\n\n                    if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n                        hasRelativeLayoutChanged = true\n                    }\n\n                    if (relativeParent.options.layoutRoot) {\n                        node.relativeTarget = relativeLayout\n                        node.relativeTargetOrigin = relativeSnapshot\n                        node.relativeParent = relativeParent\n                    }\n                }\n            }\n        }\n\n        node.notifyListeners(\"didUpdate\", {\n            layout,\n            snapshot,\n            delta: visualDelta,\n            layoutDelta,\n            hasLayoutChanged,\n            hasRelativeLayoutChanged,\n        })\n    } else if (node.isLead()) {\n        const { onExitComplete } = node.options\n        onExitComplete && onExitComplete()\n    }\n\n    /**\n     * Clearing transition\n     * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n     * and why we need it at all\n     */\n    node.options.transition = undefined\n}\n\nexport function propagateDirtyNodes(node: IProjectionNode) {\n    /**\n     * Increase debug counter for nodes encountered this frame\n     */\n    if (statsBuffer.value) {\n        metrics.nodes++\n    }\n\n    if (!node.parent) return\n\n    /**\n     * If this node isn't projecting, propagate isProjectionDirty. It will have\n     * no performance impact but it will allow the next child that *is* projecting\n     * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n     * correcting.\n     */\n    if (!node.isProjecting()) {\n        node.isProjectionDirty = node.parent.isProjectionDirty\n    }\n\n    /**\n     * Propagate isSharedProjectionDirty and isTransformDirty\n     * throughout the whole tree. A future revision can take another look at\n     * this but for safety we still recalcualte shared nodes.\n     */\n    node.isSharedProjectionDirty ||= Boolean(\n        node.isProjectionDirty ||\n            node.parent.isProjectionDirty ||\n            node.parent.isSharedProjectionDirty\n    )\n\n    node.isTransformDirty ||= node.parent.isTransformDirty\n}\n\nexport function cleanDirtyNodes(node: IProjectionNode) {\n    node.isProjectionDirty =\n        node.isSharedProjectionDirty =\n        node.isTransformDirty =\n            false\n}\n\nfunction clearSnapshot(node: IProjectionNode) {\n    node.clearSnapshot()\n}\n\nfunction clearMeasurements(node: IProjectionNode) {\n    node.clearMeasurements()\n}\n\nfunction clearIsLayoutDirty(node: IProjectionNode) {\n    node.isLayoutDirty = false\n}\n\nfunction resetTransformStyle(node: IProjectionNode) {\n    const { visualElement } = node.options\n    if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n        visualElement.notify(\"BeforeLayoutMeasure\")\n    }\n\n    node.resetTransform()\n}\n\nfunction finishAnimation(node: IProjectionNode) {\n    node.finishAnimation()\n    node.targetDelta = node.relativeTarget = node.target = undefined\n    node.isProjectionDirty = true\n}\n\nfunction resolveTargetDelta(node: IProjectionNode) {\n    node.resolveTargetDelta()\n}\n\nfunction calcProjection(node: IProjectionNode) {\n    node.calcProjection()\n}\n\nfunction resetSkewAndRotation(node: IProjectionNode) {\n    node.resetSkewAndRotation()\n}\n\nfunction removeLeadSnapshots(stack: NodeStack) {\n    stack.removeLeadSnapshot()\n}\n\nexport function mixAxisDelta(output: AxisDelta, delta: AxisDelta, p: number) {\n    output.translate = mixNumber(delta.translate, 0, p)\n    output.scale = mixNumber(delta.scale, 1, p)\n    output.origin = delta.origin\n    output.originPoint = delta.originPoint\n}\n\nexport function mixAxis(output: Axis, from: Axis, to: Axis, p: number) {\n    output.min = mixNumber(from.min, to.min, p)\n    output.max = mixNumber(from.max, to.max, p)\n}\n\nexport function mixBox(output: Box, from: Box, to: Box, p: number) {\n    mixAxis(output.x, from.x, to.x, p)\n    mixAxis(output.y, from.y, to.y, p)\n}\n\nfunction hasOpacityCrossfade(node: IProjectionNode) {\n    return (\n        node.animationValues && node.animationValues.opacityExit !== undefined\n    )\n}\n\nconst defaultLayoutTransition = {\n    duration: 0.45,\n    ease: [0.4, 0, 0.1, 1],\n}\n\nconst userAgentContains = (string: string) =>\n    typeof navigator !== \"undefined\" &&\n    navigator.userAgent &&\n    navigator.userAgent.toLowerCase().includes(string)\n\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint =\n    userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n        ? Math.round\n        : noop\n\nfunction roundAxis(axis: Axis): void {\n    // Round to the nearest .5 pixels to support subpixel layouts\n    axis.min = roundPoint(axis.min)\n    axis.max = roundPoint(axis.max)\n}\n\nfunction roundBox(box: Box): void {\n    roundAxis(box.x)\n    roundAxis(box.y)\n}\n\nfunction shouldAnimatePositionOnly(\n    animationType: string | undefined,\n    snapshot: Box,\n    layout: Box\n) {\n    return (\n        animationType === \"position\" ||\n        (animationType === \"preserve-aspect\" &&\n            !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))\n    )\n}\n\nfunction checkNodeWasScrollRoot(node: IProjectionNode) {\n    return node !== node.root && node.scroll?.wasRoot\n}\n", "import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode<Window>({\n    attachResizeListener: (\n        ref: Window | Element,\n        notify: VoidFunction\n    ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n    measureScroll: () => ({\n        x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n        y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n    }),\n    checkIsScrollRoot: () => true,\n})\n", "import { createProjectionNode } from \"./create-projection-node\"\nimport { DocumentProjectionNode } from \"./DocumentProjectionNode\"\nimport { IProjectionNode } from \"./types\"\n\nexport const rootProjectionNode: { current: IProjectionNode | undefined } = {\n    current: undefined,\n}\n\nexport const HTMLProjectionNode = createProjectionNode<HTMLElement>({\n    measureScroll: (instance) => ({\n        x: instance.scrollLeft,\n        y: instance.scrollTop,\n    }),\n    defaultParent: () => {\n        if (!rootProjectionNode.current) {\n            const documentNode = new DocumentProjectionNode({})\n            documentNode.mount(window)\n            documentNode.setOptions({ layoutScroll: true })\n            rootProjectionNode.current = documentNode\n        }\n        return rootProjectionNode.current\n    },\n    resetTransform: (instance, value) => {\n        instance.style.transform = value !== undefined ? value : \"none\"\n    },\n    checkIsScrollRoot: (instance) =>\n        Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n})\n", "\"use client\"\n\nimport type { Transition } from \"motion-dom\"\nimport { TransformPoint } from \"motion-utils\"\nimport { createContext } from \"react\"\n\nexport type ReducedMotionConfig = \"always\" | \"never\" | \"user\"\n\n/**\n * @public\n */\nexport interface MotionConfigContext {\n    /**\n     * Internal, exported only for usage in Framer\n     */\n    transformPagePoint: TransformPoint\n\n    /**\n     * Internal. Determines whether this is a static context ie the Framer canvas. If so,\n     * it'll disable all dynamic functionality.\n     */\n    isStatic: boolean\n\n    /**\n     * Defines a new default transition for the entire tree.\n     *\n     * @public\n     */\n    transition?: Transition\n\n    /**\n     * If true, will respect the device prefersReducedMotion setting by switching\n     * transform animations off.\n     *\n     * @public\n     */\n    reducedMotion?: ReducedMotionConfig\n\n    /**\n     * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).\n     * For more details see:\n     * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles\n     *\n     * @public\n     */\n    nonce?: string\n\n    /**\n     * If true, all animations will be skipped and values will be set instantly.\n     * Useful for E2E tests and visual regression testing.\n     *\n     * @public\n     */\n    skipAnimations?: boolean\n\n}\n\n/**\n * @public\n */\nexport const MotionConfigContext = createContext<MotionConfigContext>({\n    transformPagePoint: (p) => p,\n    isStatic: false,\n    reducedMotion: \"never\",\n})\n", "\"use client\"\n\nimport { useCallback, useContext, useEffect, useId } from \"react\"\nimport {\n    PresenceContext,\n    PresenceContextProps,\n} from \"../../context/PresenceContext\"\n\nexport type SafeToRemove = () => void\n\ntype AlwaysPresent = [true, null]\n\ntype Present = [true]\n\ntype NotPresent = [false, SafeToRemove]\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n *   const [isPresent, safeToRemove] = usePresence()\n *\n *   useEffect(() => {\n *     !isPresent && setTimeout(safeToRemove, 1000)\n *   }, [isPresent])\n *\n *   return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nexport function usePresence(\n    subscribe: boolean = true\n): AlwaysPresent | Present | NotPresent {\n    const context = useContext(PresenceContext)\n\n    if (context === null) return [true, null]\n\n    const { isPresent, onExitComplete, register } = context\n\n    // It's safe to call the following hooks conditionally (after an early return) because the context will always\n    // either be null or non-null for the lifespan of the component.\n\n    const id = useId()\n    useEffect(() => {\n        if (subscribe) {\n            return register(id)\n        }\n    }, [subscribe])\n\n    const safeToRemove = useCallback(\n        () => subscribe && onExitComplete && onExitComplete(id),\n        [id, onExitComplete, subscribe]\n    )\n\n    return !isPresent && onExitComplete ? [false, safeToRemove] : [true]\n}\n\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n *   const isPresent = useIsPresent()\n *\n *   useEffect(() => {\n *     !isPresent && console.log(\"I've been removed!\")\n *   }, [isPresent])\n *\n *   return <div />\n * }\n * ```\n *\n * @public\n */\nexport function useIsPresent() {\n    return isPresent(useContext(PresenceContext))\n}\n\nexport function isPresent(context: PresenceContextProps | null) {\n    return context === null ? true : context.isPresent\n}\n", "\"use client\"\n\nimport { createContext } from \"react\"\nimport { CreateVisualElement } from \"../render/types\"\n\nexport interface LazyContextProps {\n    renderer?: CreateVisualElement\n    strict: boolean\n}\n\nexport const LazyContext = createContext<LazyContextProps>({ strict: false })\n", "import { getFeatureDefinitions, setFeatureDefinitions } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\nimport { FeatureDefinitions } from \"./types\"\n\nconst 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}\n\nlet isInitialized = false\n\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nexport function initFeatureDefinitions() {\n    if (isInitialized) return\n\n    const initialFeatureDefinitions: Partial<FeatureDefinitions> = {}\n\n    for (const key in featureProps) {\n        initialFeatureDefinitions[\n            key as keyof typeof initialFeatureDefinitions\n        ] = {\n            isEnabled: (props: MotionProps) =>\n                featureProps[key as keyof typeof featureProps].some(\n                    (name: string) => !!props[name as keyof typeof props]\n                ),\n        }\n    }\n\n    setFeatureDefinitions(initialFeatureDefinitions)\n    isInitialized = true\n}\n\n/**\n * Get the current feature definitions, initializing if needed.\n */\nexport function getInitializedFeatureDefinitions(): Partial<FeatureDefinitions> {\n    initFeatureDefinitions()\n    return getFeatureDefinitions()\n}\n", "import { setFeatureDefinitions } from \"motion-dom\"\nimport { getInitializedFeatureDefinitions } from \"./definitions\"\nimport { FeaturePackages } from \"./types\"\n\nexport function loadFeatures(features: FeaturePackages) {\n    const featureDefinitions = getInitializedFeatureDefinitions()\n\n    for (const key in features) {\n        featureDefinitions[key as keyof typeof featureDefinitions] = {\n            ...featureDefinitions[key as keyof typeof featureDefinitions],\n            ...features[key as keyof typeof features],\n        } as any\n    }\n\n    setFeatureDefinitions(featureDefinitions)\n}\n", "import { MotionProps } from \"../types\"\n\n/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set<keyof MotionProps>([\n    \"animate\",\n    \"exit\",\n    \"variants\",\n    \"initial\",\n    \"style\",\n    \"values\",\n    \"variants\",\n    \"transition\",\n    \"transformTemplate\",\n    \"custom\",\n    \"inherit\",\n    \"onBeforeLayoutMeasure\",\n    \"onAnimationStart\",\n    \"onAnimationComplete\",\n    \"onUpdate\",\n    \"onDragStart\",\n    \"onDrag\",\n    \"onDragEnd\",\n    \"onMeasureDragConstraints\",\n    \"onDirectionLock\",\n    \"onDragTransitionEnd\",\n    \"_dragX\",\n    \"_dragY\",\n    \"onHoverStart\",\n    \"onHoverEnd\",\n    \"onViewportEnter\",\n    \"onViewportLeave\",\n    \"globalTapTarget\",\n    \"propagate\",\n    \"ignoreStrict\",\n    \"viewport\",\n])\n\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nexport function isValidMotionProp(key: string) {\n    return (\n        key.startsWith(\"while\") ||\n        (key.startsWith(\"drag\") && key !== \"draggable\") ||\n        key.startsWith(\"layout\") ||\n        key.startsWith(\"onTap\") ||\n        key.startsWith(\"onPan\") ||\n        key.startsWith(\"onLayout\") ||\n        validMotionProps.has(key as keyof MotionProps)\n    )\n}\n", "import type { MotionProps } from \"../../../motion/types\"\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\"\n\nlet shouldForward = (key: string) => !isValidMotionProp(key)\n\nexport type IsValidProp = (key: string) => boolean\n\nexport function loadExternalIsValidProp(isValidProp?: IsValidProp) {\n    if (typeof isValidProp !== \"function\") return\n\n    // Explicitly filter our events\n    shouldForward = (key: string) =>\n        key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key)\n}\n\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n    /**\n     * We attempt to import this package but require won't be defined in esm environments, in that case\n     * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n     * in favour of explicit injection.\n     */\n    loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default)\n} catch {\n    // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\n\nexport function filterProps(\n    props: MotionProps,\n    isDom: boolean,\n    forwardMotionProps: boolean\n) {\n    const filteredProps: MotionProps = {}\n\n    for (const key in props) {\n        /**\n         * values is considered a valid prop by Emotion, so if it's present\n         * this will be rendered out to the DOM unless explicitly filtered.\n         *\n         * We check the type as it could be used with the `feColorMatrix`\n         * element, which we support.\n         */\n        if (key === \"values\" && typeof props.values === \"object\") continue\n\n        if (\n            shouldForward(key) ||\n            (forwardMotionProps === true && isValidMotionProp(key)) ||\n            (!isDom && !isValidMotionProp(key)) ||\n            // If trying to use native HTML drag events, forward drag listeners\n            (props[\"draggable\" as keyof MotionProps] &&\n                key.startsWith(\"onDrag\"))\n        ) {\n            filteredProps[key as keyof MotionProps] =\n                props[key as keyof MotionProps]\n        }\n    }\n\n    return filteredProps\n}\n", "\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport { createContext } from \"react\"\n\nexport interface MotionContextProps<Instance = unknown> {\n    visualElement?: VisualElement<Instance>\n    initial?: false | string | string[]\n    animate?: string | string[]\n}\n\nexport const MotionContext = /* @__PURE__ */ createContext<MotionContextProps>(\n    {}\n)\n", "import { isControllingVariants, isVariantLabel } from \"motion-dom\"\nimport type { MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\n\nexport function getCurrentTreeVariants(\n    props: MotionProps,\n    context: MotionContextProps\n): MotionContextProps {\n    if (isControllingVariants(props)) {\n        const { initial, animate } = props\n        return {\n            initial:\n                initial === false || isVariantLabel(initial)\n                    ? (initial as any)\n                    : undefined,\n            animate: isVariantLabel(animate) ? animate : undefined,\n        }\n    }\n    return props.inherit !== false ? context : {}\n}\n", "\"use client\"\n\nimport { useContext, useMemo } from \"react\"\nimport { MotionContext, type MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getCurrentTreeVariants } from \"./utils\"\n\nexport function useCreateMotionContext<Instance>(\n    props: MotionProps\n): MotionContextProps<Instance> {\n    const { initial, animate } = getCurrentTreeVariants(\n        props,\n        useContext(MotionContext)\n    )\n\n    return useMemo(\n        () => ({ initial, animate }),\n        [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]\n    )\n}\n\nfunction variantLabelsAsDependency(\n    prop: undefined | string | string[] | boolean\n) {\n    return Array.isArray(prop) ? prop.join(\" \") : prop\n}\n", "import { HTMLRenderState } from \"../types\"\n\nexport const createHtmlRenderState = (): HTMLRenderState => ({\n    style: {},\n    transform: {},\n    transformOrigin: {},\n    vars: {},\n})\n", "\"use client\"\n\nimport { AnyResolvedKeyframe, buildHTMLStyles, isForcedMotionValue, isMotionValue, MotionValue } from \"motion-dom\"\nimport { HTMLProps, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { ResolvedValues } from \"../types\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport function copyRawValuesOnly(\n    target: ResolvedValues,\n    source: { [key: string]: AnyResolvedKeyframe | MotionValue },\n    props: MotionProps\n) {\n    for (const key in source) {\n        if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n            target[key] = source[key] as AnyResolvedKeyframe\n        }\n    }\n}\n\nfunction useInitialMotionValues(\n    { transformTemplate }: MotionProps,\n    visualState: ResolvedValues\n) {\n    return useMemo(() => {\n        const state = createHtmlRenderState()\n\n        buildHTMLStyles(state, visualState, transformTemplate)\n\n        return Object.assign({}, state.vars, state.style)\n    }, [visualState])\n}\n\nfunction useStyle(\n    props: MotionProps,\n    visualState: ResolvedValues\n): ResolvedValues {\n    const styleProp = props.style || {}\n    const style = {}\n\n    /**\n     * Copy non-Motion Values straight into style\n     */\n    copyRawValuesOnly(style, styleProp as any, props)\n\n    Object.assign(style, useInitialMotionValues(props, visualState))\n\n    return style\n}\n\nexport function useHTMLProps(\n    props: MotionProps & HTMLProps<HTMLElement>,\n    visualState: ResolvedValues\n) {\n    // The `any` isn't ideal but it is the type of createElement props argument\n    const htmlProps: any = {}\n    const style = useStyle(props, visualState)\n\n    if (props.drag && props.dragListener !== false) {\n        // Disable the ghost element when a user drags\n        htmlProps.draggable = false\n\n        // Disable text selection\n        style.userSelect =\n            style.WebkitUserSelect =\n            style.WebkitTouchCallout =\n                \"none\"\n\n        // Disable scrolling on the draggable direction\n        style.touchAction =\n            props.drag === true\n                ? \"none\"\n                : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`\n    }\n\n    if (\n        props.tabIndex === undefined &&\n        (props.onTap || props.onTapStart || props.whileTap)\n    ) {\n        htmlProps.tabIndex = 0\n    }\n\n    htmlProps.style = style\n\n    return htmlProps\n}\n", "import { createHtmlRenderState } from \"../../html/utils/create-render-state\"\nimport { SVGRenderState } from \"../types\"\n\nexport const createSvgRenderState = (): SVGRenderState => ({\n    ...createHtmlRenderState(),\n    attrs: {},\n})\n", "\"use client\"\n\nimport { buildSVGAttrs, isSVGTag } from \"motion-dom\"\nimport { useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { copyRawValuesOnly } from \"../html/use-props\"\nimport { ResolvedValues } from \"../types\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport function useSVGProps(\n    props: MotionProps,\n    visualState: ResolvedValues,\n    _isStatic: boolean,\n    Component: string | React.ComponentType<React.PropsWithChildren<unknown>>\n) {\n    const visualProps = useMemo(() => {\n        const state = createSvgRenderState()\n\n        buildSVGAttrs(\n            state,\n            visualState,\n            isSVGTag(Component),\n            props.transformTemplate,\n            props.style\n        )\n\n        return {\n            ...state.attrs,\n            style: { ...state.style },\n        }\n    }, [visualState])\n\n    if (props.style) {\n        const rawStyles = {}\n        copyRawValuesOnly(rawStyles, props.style as any, props)\n        visualProps.style = { ...rawStyles, ...visualProps.style }\n    }\n\n    return visualProps\n}\n", "/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n    \"animate\",\n    \"circle\",\n    \"defs\",\n    \"desc\",\n    \"ellipse\",\n    \"g\",\n    \"image\",\n    \"line\",\n    \"filter\",\n    \"marker\",\n    \"mask\",\n    \"metadata\",\n    \"path\",\n    \"pattern\",\n    \"polygon\",\n    \"polyline\",\n    \"rect\",\n    \"stop\",\n    \"switch\",\n    \"symbol\",\n    \"svg\",\n    \"text\",\n    \"tspan\",\n    \"use\",\n    \"view\",\n]\n", "import * as React from \"react\"\nimport { lowercaseSVGElements } from \"../../svg/lowercase-elements\"\n\nexport function isSVGComponent(Component: string | React.ComponentType<any>) {\n    if (\n        /**\n         * If it's not a string, it's a custom React component. Currently we only support\n         * HTML custom React components.\n         */\n        typeof Component !== \"string\" ||\n        /**\n         * If it contains a dash, the element is a custom HTML webcomponent.\n         */\n        Component.includes(\"-\")\n    ) {\n        return false\n    } else if (\n        /**\n         * If it's in our list of lowercase SVG tags, it's an SVG component\n         */\n        lowercaseSVGElements.indexOf(Component) > -1 ||\n        /**\n         * If it contains a capital letter, it's an SVG component\n         */\n        /[A-Z]/u.test(Component)\n    ) {\n        return true\n    }\n\n    return false\n}\n", "\"use client\"\n\nimport { isMotionValue } from \"motion-dom\"\nimport { Fragment, createElement, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { VisualState } from \"../../motion/utils/use-visual-state\"\nimport { HTMLRenderState } from \"../html/types\"\nimport { useHTMLProps } from \"../html/use-props\"\nimport { SVGRenderState } from \"../svg/types\"\nimport { useSVGProps } from \"../svg/use-props\"\nimport { DOMMotionComponents } from \"./types\"\nimport { filterProps } from \"./utils/filter-props\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport function useRender<\n    Props = {},\n    TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n    Component: TagName | string | React.ComponentType<Props>,\n    props: MotionProps,\n    ref: React.Ref<HTMLElement | SVGElement>,\n    {\n        latestValues,\n    }: VisualState<HTMLElement | SVGElement, HTMLRenderState | SVGRenderState>,\n    isStatic: boolean,\n    forwardMotionProps: boolean = false,\n    isSVG?: boolean\n) {\n    const useVisualProps =\n        (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps\n\n    const visualProps = useVisualProps(\n        props as any,\n        latestValues,\n        isStatic,\n        Component as any\n    )\n    const filteredProps = filterProps(\n        props,\n        typeof Component === \"string\",\n        forwardMotionProps\n    )\n    const elementProps =\n        Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {}\n\n    /**\n     * If component has been handed a motion value as its child,\n     * memoise its initial value and render that. Subsequent updates\n     * will be handled by the onChange handler\n     */\n    const { children } = props\n    const renderedChildren = useMemo(\n        () => (isMotionValue(children) ? children.get() : children),\n        [children]\n    )\n\n    return createElement<any>(Component, {\n        ...elementProps,\n        children: renderedChildren,\n    })\n}\n", "\"use client\"\n\nimport {\n    AnyResolvedKeyframe,\n    isAnimationControls,\n    isControllingVariants as checkIsControllingVariants,\n    isVariantNode as checkIsVariantNode,\n    ResolvedValues,\n    resolveVariantFromProps,\n} from \"motion-dom\"\nimport { useContext } from \"react\"\nimport { MotionContext, MotionContextProps } from \"../../context/MotionContext\"\nimport {\n    PresenceContext,\n    type PresenceContextProps,\n} from \"../../context/PresenceContext\"\nimport { ScrapeMotionValuesFromProps } from \"../../render/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { resolveMotionValue } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\n\nexport interface VisualState<Instance, RenderState> {\n    renderState: RenderState\n    latestValues: ResolvedValues\n    onMount?: (instance: Instance) => void\n}\n\nexport type UseVisualState<Instance, RenderState> = (\n    props: MotionProps,\n    isStatic: boolean\n) => VisualState<Instance, RenderState>\n\nexport interface UseVisualStateConfig<RenderState> {\n    scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps\n    createRenderState: () => RenderState\n}\n\nfunction makeState<I, RS>(\n    {\n        scrapeMotionValuesFromProps,\n        createRenderState,\n    }: UseVisualStateConfig<RS>,\n    props: MotionProps,\n    context: MotionContextProps,\n    presenceContext: PresenceContextProps | null\n) {\n    const state: VisualState<I, RS> = {\n        latestValues: makeLatestValues(\n            props,\n            context,\n            presenceContext,\n            scrapeMotionValuesFromProps\n        ),\n        renderState: createRenderState(),\n    }\n\n    return state\n}\n\nfunction makeLatestValues(\n    props: MotionProps,\n    context: MotionContextProps,\n    presenceContext: PresenceContextProps | null,\n    scrapeMotionValues: ScrapeMotionValuesFromProps\n) {\n    const values: ResolvedValues = {}\n\n    const motionValues = scrapeMotionValues(props, {})\n    for (const key in motionValues) {\n        values[key] = resolveMotionValue(motionValues[key])\n    }\n\n    let { initial, animate } = props\n    const isControllingVariants = checkIsControllingVariants(props)\n    const isVariantNode = checkIsVariantNode(props)\n\n    if (\n        context &&\n        isVariantNode &&\n        !isControllingVariants &&\n        props.inherit !== false\n    ) {\n        if (initial === undefined) initial = context.initial\n        if (animate === undefined) animate = context.animate\n    }\n\n    let isInitialAnimationBlocked = presenceContext\n        ? presenceContext.initial === false\n        : false\n    isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false\n\n    const variantToSet = isInitialAnimationBlocked ? animate : initial\n\n    if (\n        variantToSet &&\n        typeof variantToSet !== \"boolean\" &&\n        !isAnimationControls(variantToSet)\n    ) {\n        const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]\n        for (let i = 0; i < list.length; i++) {\n            const resolved = resolveVariantFromProps(props, list[i] as any)\n            if (resolved) {\n                const { transitionEnd, transition, ...target } = resolved\n                for (const key in target) {\n                    let valueTarget = target[key as keyof typeof target]\n\n                    if (Array.isArray(valueTarget)) {\n                        /**\n                         * Take final keyframe if the initial animation is blocked because\n                         * we want to initialise at the end of that blocked animation.\n                         */\n                        const index = isInitialAnimationBlocked\n                            ? valueTarget.length - 1\n                            : 0\n                        valueTarget = valueTarget[index] as any\n                    }\n\n                    if (valueTarget !== null) {\n                        values[key] = valueTarget as AnyResolvedKeyframe\n                    }\n                }\n                for (const key in transitionEnd) {\n                    values[key] = transitionEnd[\n                        key as keyof typeof transitionEnd\n                    ] as AnyResolvedKeyframe\n                }\n            }\n        }\n    }\n\n    return values\n}\n\nexport const makeUseVisualState =\n    <I, RS>(config: UseVisualStateConfig<RS>): UseVisualState<I, RS> =>\n    (props: MotionProps, isStatic: boolean): VisualState<I, RS> => {\n        const context = useContext(MotionContext)\n        const presenceContext = useContext(PresenceContext)\n        const make = () => makeState(config, props, context, presenceContext)\n\n        return isStatic ? make() : useConstant(make)\n    }\n", "\"use client\"\n\nimport { scrapeHTMLMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n    scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n    createRenderState: createHtmlRenderState,\n})\n", "\"use client\"\n\nimport { scrapeSVGMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n    scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n    createRenderState: createSvgRenderState,\n})\n", "export const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\")\n", "\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport * as React from \"react\"\nimport { useCallback, useInsertionEffect, useRef } from \"react\"\nimport { VisualState } from \"./use-visual-state\"\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nexport function useMotionRef<Instance, RenderState>(\n    visualState: VisualState<Instance, RenderState>,\n    visualElement?: VisualElement<Instance> | null,\n    externalRef?: React.Ref<Instance>\n): React.Ref<Instance> {\n    /**\n     * Store externalRef in a ref to avoid including it in the useCallback\n     * dependency array. Including externalRef in dependencies causes issues\n     * with libraries like Radix UI that create new callback refs on each render\n     * when using asChild - this would cause the callback to be recreated,\n     * triggering element remounts and breaking AnimatePresence exit animations.\n     */\n    const externalRefContainer = useRef(externalRef)\n    useInsertionEffect(() => {\n        externalRefContainer.current = externalRef\n    })\n\n    // Store cleanup function returned by callback refs (React 19 feature)\n    const refCleanup = useRef<(() => void) | null>(null)\n\n    return useCallback(\n        (instance: Instance) => {\n            if (instance) {\n                visualState.onMount?.(instance)\n            }\n\n            if (visualElement) {\n                instance ? visualElement.mount(instance) : visualElement.unmount()\n            }\n\n            const ref = externalRefContainer.current\n            if (typeof ref === \"function\") {\n                if (instance) {\n                    const cleanup = ref(instance)\n                    if (typeof cleanup === \"function\") {\n                        refCleanup.current = cleanup\n                    }\n                } else if (refCleanup.current) {\n                    refCleanup.current()\n                    refCleanup.current = null\n                } else {\n                    ref(instance)\n                }\n            } else if (ref) {\n                ;(ref as React.MutableRefObject<Instance>).current = instance\n            }\n        },\n        [visualElement]\n    )\n}\n", "import { MutableRefObject } from \"./safe-react-types\"\n\nexport function isRefObject<E = any>(ref: any): ref is MutableRefObject<E> {\n    return (\n        ref &&\n        typeof ref === \"object\" &&\n        Object.prototype.hasOwnProperty.call(ref, \"current\")\n    )\n}\n", "\"use client\"\n\nimport {\n    optimizedAppearDataAttribute,\n    type HTMLRenderState,\n    type SVGRenderState,\n    type VisualElement,\n} from \"motion-dom\"\nimport * as React from \"react\"\nimport { useContext, useEffect, useInsertionEffect, useRef } from \"react\"\nimport { LazyContext } from \"../../context/LazyContext\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { MotionContext } from \"../../context/MotionContext\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\nimport {\n    InitialPromotionConfig,\n    SwitchLayoutGroupContext,\n} from \"../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../motion/types\"\nimport type { IProjectionNode } from \"motion-dom\"\nimport { DOMMotionComponents } from \"../../render/dom/types\"\nimport { CreateVisualElement } from \"../../render/types\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { VisualState } from \"./use-visual-state\"\n\nexport function useVisualElement<\n    Props,\n    TagName extends keyof DOMMotionComponents | string\n>(\n    Component: TagName | string | React.ComponentType<Props>,\n    visualState:\n        | VisualState<SVGElement, SVGRenderState>\n        | VisualState<HTMLElement, HTMLRenderState>,\n    props: MotionProps & Partial<MotionConfigContext>,\n    createVisualElement?: CreateVisualElement<Props, TagName>,\n    ProjectionNodeConstructor?: any,\n    isSVG?: boolean\n): VisualElement<HTMLElement | SVGElement> | undefined {\n    const { visualElement: parent } = useContext(MotionContext)\n    const lazyContext = useContext(LazyContext)\n    const presenceContext = useContext(PresenceContext)\n    const motionConfig = useContext(MotionConfigContext)\n    const reducedMotionConfig = motionConfig.reducedMotion\n    const skipAnimations = motionConfig.skipAnimations\n\n    const visualElementRef = useRef<VisualElement<\n        HTMLElement | SVGElement\n    > | null>(null)\n\n    /**\n     * Track whether the component has been through React's commit phase.\n     * Used to detect when LazyMotion features load after the component has mounted.\n     */\n    const hasMountedOnce = useRef(false)\n\n    /**\n     * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n     */\n    createVisualElement =\n        createVisualElement ||\n        (lazyContext.renderer as CreateVisualElement<Props, TagName>)\n\n    if (!visualElementRef.current && createVisualElement) {\n        visualElementRef.current = createVisualElement(Component, {\n            visualState,\n            parent,\n            props,\n            presenceContext,\n            blockInitialAnimation: presenceContext\n                ? presenceContext.initial === false\n                : false,\n            reducedMotionConfig,\n            skipAnimations,\n            isSVG,\n        })\n\n        /**\n         * If the component has already mounted before features loaded (e.g. via\n         * LazyMotion with async feature loading), we need to force the initial\n         * animation to run. Otherwise state changes that occurred before features\n         * loaded will be lost and the element will snap to its final state.\n         */\n        if (hasMountedOnce.current && visualElementRef.current) {\n            visualElementRef.current.manuallyAnimateOnMount = true\n        }\n    }\n\n    const visualElement = visualElementRef.current\n\n    /**\n     * Load Motion gesture and animation features. These are rendered as renderless\n     * components so each feature can optionally make use of React lifecycle methods.\n     */\n    const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext)\n\n    if (\n        visualElement &&\n        !visualElement.projection &&\n        ProjectionNodeConstructor &&\n        (visualElement.type === \"html\" || visualElement.type === \"svg\")\n    ) {\n        createProjectionNode(\n            visualElementRef.current!,\n            props,\n            ProjectionNodeConstructor,\n            initialLayoutGroupConfig\n        )\n    }\n\n    const isMounted = useRef(false)\n    useInsertionEffect(() => {\n        /**\n         * Check the component has already mounted before calling\n         * `update` unnecessarily. This ensures we skip the initial update.\n         */\n        if (visualElement && isMounted.current) {\n            visualElement.update(props, presenceContext)\n        }\n    })\n\n    /**\n     * Cache this value as we want to know whether HandoffAppearAnimations\n     * was present on initial render - it will be deleted after this.\n     */\n    const optimisedAppearId =\n        props[optimizedAppearDataAttribute as keyof typeof props]\n    const wantsHandoff = useRef(\n        Boolean(optimisedAppearId) &&\n            !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n            window.MotionHasOptimisedAnimation?.(optimisedAppearId)\n    )\n\n    useIsomorphicLayoutEffect(() => {\n        /**\n         * Track that this component has mounted. This is used to detect when\n         * LazyMotion features load after the component has already committed.\n         */\n        hasMountedOnce.current = true\n\n        if (!visualElement) return\n\n        isMounted.current = true\n        window.MotionIsMounted = true\n\n        visualElement.updateFeatures()\n        visualElement.scheduleRenderMicrotask()\n\n        /**\n         * Ideally this function would always run in a useEffect.\n         *\n         * However, if we have optimised appear animations to handoff from,\n         * it needs to happen synchronously to ensure there's no flash of\n         * incorrect styles in the event of a hydration error.\n         *\n         * So if we detect a situtation where optimised appear animations\n         * are running, we use useLayoutEffect to trigger animations.\n         */\n        if (wantsHandoff.current && visualElement.animationState) {\n            visualElement.animationState.animateChanges()\n        }\n    })\n\n    useEffect(() => {\n        if (!visualElement) return\n\n        if (!wantsHandoff.current && visualElement.animationState) {\n            visualElement.animationState.animateChanges()\n        }\n\n        if (wantsHandoff.current) {\n            // This ensures all future calls to animateChanges() in this component will run in useEffect\n            queueMicrotask(() => {\n                window.MotionHandoffMarkAsComplete?.(optimisedAppearId)\n            })\n\n            wantsHandoff.current = false\n        }\n\n        /**\n         * Now we've finished triggering animations for this element we\n         * can wipe the enteringChildren set for the next render.\n         */\n        visualElement.enteringChildren = undefined\n    })\n\n    return visualElement!\n}\n\nfunction createProjectionNode(\n    visualElement: VisualElement<any>,\n    props: MotionProps,\n    ProjectionNodeConstructor: any,\n    initialPromotionConfig?: InitialPromotionConfig\n) {\n    const {\n        layoutId,\n        layout,\n        drag,\n        dragConstraints,\n        layoutScroll,\n        layoutRoot,\n        layoutCrossfade,\n    } = props\n\n    visualElement.projection = new ProjectionNodeConstructor(\n        visualElement.latestValues,\n        props[\"data-framer-portal-id\"]\n            ? undefined\n            : getClosestProjectingNode(visualElement.parent)\n    ) as IProjectionNode\n\n    visualElement.projection.setOptions({\n        layoutId,\n        layout,\n        alwaysMeasureLayout:\n            Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n        visualElement,\n        /**\n         * TODO: Update options in an effect. This could be tricky as it'll be too late\n         * to update by the time layout animations run.\n         * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n         * ensuring it gets called if there's no potential layout animations.\n         *\n         */\n        animationType: typeof layout === \"string\" ? layout : \"both\",\n        initialPromotionConfig,\n        crossfade: layoutCrossfade,\n        layoutScroll,\n        layoutRoot,\n    })\n}\n\nfunction getClosestProjectingNode(\n    visualElement?: VisualElement<\n        unknown,\n        unknown,\n        { allowProjection?: boolean }\n    >\n): IProjectionNode | undefined {\n    if (!visualElement) return undefined\n\n    return visualElement.options.allowProjection !== false\n        ? visualElement.projection\n        : getClosestProjectingNode(visualElement.parent)\n}\n", "\"use client\"\n\nimport { invariant, warning } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, useContext } from \"react\"\nimport { LayoutGroupContext } from \"../context/LayoutGroupContext\"\nimport { LazyContext } from \"../context/LazyContext\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useCreateMotionContext } from \"../context/MotionContext/create\"\nimport { DOMMotionComponents } from \"../render/dom/types\"\nimport { useRender } from \"../render/dom/use-render\"\nimport { isSVGComponent } from \"../render/dom/utils/is-svg-component\"\nimport { HTMLRenderState } from \"../render/html/types\"\nimport { useHTMLVisualState } from \"../render/html/use-html-visual-state\"\nimport { SVGRenderState } from \"../render/svg/types\"\nimport { useSVGVisualState } from \"../render/svg/use-svg-visual-state\"\nimport { CreateVisualElement } from \"../render/types\"\nimport { isBrowser } from \"../utils/is-browser\"\nimport { getInitializedFeatureDefinitions } from \"./features/definitions\"\nimport { loadFeatures } from \"./features/load-features\"\nimport { FeatureBundle, FeaturePackages } from \"./features/types\"\nimport { MotionProps } from \"./types\"\nimport { motionComponentSymbol } from \"./utils/symbol\"\nimport { useMotionRef } from \"./utils/use-motion-ref\"\nimport { useVisualElement } from \"./utils/use-visual-element\"\n\nexport interface MotionComponentConfig<\n    TagName extends keyof DOMMotionComponents | string = \"div\"\n> {\n    preloadedFeatures?: FeatureBundle\n    createVisualElement?: CreateVisualElement\n    Component: TagName | React.ComponentType<React.PropsWithChildren<unknown>>\n    forwardMotionProps?: boolean\n}\n\nexport type MotionComponentProps<Props> = {\n    [K in Exclude<keyof Props, keyof MotionProps>]?: Props[K]\n} & MotionProps\n\nexport type MotionComponent<T, P> = T extends keyof DOMMotionComponents\n    ? DOMMotionComponents[T]\n    : React.ComponentType<\n          Omit<MotionComponentProps<P>, \"children\"> & {\n              children?: \"children\" extends keyof P\n                  ? P[\"children\"] | MotionComponentProps<P>[\"children\"]\n                  : MotionComponentProps<P>[\"children\"]\n          }\n      >\n\nexport interface MotionComponentOptions {\n    forwardMotionProps?: boolean\n    /**\n     * Specify whether the component renders an HTML or SVG element.\n     * This is useful when wrapping custom SVG components that need\n     * SVG-specific attribute handling (like viewBox animation).\n     * By default, Motion auto-detects based on the component name,\n     * but custom React components are always treated as HTML.\n     */\n    type?: \"html\" | \"svg\"\n}\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nexport function createMotionComponent<\n    Props,\n    TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n    Component: TagName | string | React.ComponentType<Props>,\n    { forwardMotionProps = false, type }: MotionComponentOptions = {},\n    preloadedFeatures?: FeaturePackages,\n    createVisualElement?: CreateVisualElement<Props, TagName>\n) {\n    preloadedFeatures && loadFeatures(preloadedFeatures)\n\n    /**\n     * Determine whether to use SVG or HTML rendering based on:\n     * 1. Explicit `type` option (highest priority)\n     * 2. Auto-detection via `isSVGComponent`\n     */\n    const isSVG = type ? type === \"svg\" : isSVGComponent(Component)\n    const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState\n\n    function MotionDOMComponent(\n        props: MotionComponentProps<Props>,\n        externalRef?: React.Ref<HTMLElement | SVGElement>\n    ) {\n        /**\n         * If we need to measure the element we load this functionality in a\n         * separate class component in order to gain access to getSnapshotBeforeUpdate.\n         */\n        let MeasureLayout: undefined | React.ComponentType<MotionProps>\n\n        const configAndProps = {\n            ...useContext(MotionConfigContext),\n            ...props,\n            layoutId: useLayoutId(props),\n        }\n\n        const { isStatic } = configAndProps\n\n        const context = useCreateMotionContext<HTMLElement | SVGElement>(props)\n\n        const visualState = useVisualState(props, isStatic)\n\n        if (!isStatic && isBrowser) {\n            useStrictMode(configAndProps, preloadedFeatures)\n\n            const layoutProjection = getProjectionFunctionality(configAndProps)\n            MeasureLayout = layoutProjection.MeasureLayout\n\n            /**\n             * Create a VisualElement for this component. A VisualElement provides a common\n             * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n             * providing a way of rendering to these APIs outside of the React render loop\n             * for more performant animations and interactions\n             */\n            context.visualElement = useVisualElement(\n                Component,\n                visualState,\n                configAndProps,\n                createVisualElement,\n                layoutProjection.ProjectionNode,\n                isSVG\n            )\n        }\n\n        /**\n         * The mount order and hierarchy is specific to ensure our element ref\n         * is hydrated by the time features fire their effects.\n         */\n        return (\n            <MotionContext.Provider value={context}>\n                {MeasureLayout && context.visualElement ? (\n                    <MeasureLayout\n                        visualElement={context.visualElement}\n                        {...configAndProps}\n                    />\n                ) : null}\n                {useRender<Props, TagName>(\n                    Component,\n                    props,\n                    useMotionRef<\n                        HTMLElement | SVGElement,\n                        HTMLRenderState | SVGRenderState\n                    >(visualState, context.visualElement, externalRef),\n                    visualState,\n                    isStatic,\n                    forwardMotionProps,\n                    isSVG\n                )}\n            </MotionContext.Provider>\n        )\n    }\n\n    MotionDOMComponent.displayName = `motion.${\n        typeof Component === \"string\"\n            ? Component\n            : `create(${Component.displayName ?? Component.name ?? \"\"})`\n    }`\n\n    const ForwardRefMotionComponent = forwardRef(MotionDOMComponent as any)\n    ;(ForwardRefMotionComponent as any)[motionComponentSymbol] = Component\n\n    return ForwardRefMotionComponent as MotionComponent<TagName, Props>\n}\n\nfunction useLayoutId({ layoutId }: MotionProps) {\n    const layoutGroupId = useContext(LayoutGroupContext).id\n    return layoutGroupId && layoutId !== undefined\n        ? layoutGroupId + \"-\" + layoutId\n        : layoutId\n}\n\nfunction useStrictMode(\n    configAndProps: MotionProps,\n    preloadedFeatures?: FeaturePackages\n) {\n    const isStrict = useContext(LazyContext).strict\n\n    /**\n     * If we're in development mode, check to make sure we're not rendering a motion component\n     * as a child of LazyMotion, as this will break the file-size benefits of using it.\n     */\n    if (\n        process.env.NODE_ENV !== \"production\" &&\n        preloadedFeatures &&\n        isStrict\n    ) {\n        const strictMessage =\n            \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\"\n        configAndProps.ignoreStrict\n            ? warning(false, strictMessage, \"lazy-strict-mode\")\n            : invariant(false, strictMessage, \"lazy-strict-mode\")\n    }\n}\n\nfunction getProjectionFunctionality(props: MotionProps) {\n    const featureDefinitions = getInitializedFeatureDefinitions()\n    const { drag, layout } = featureDefinitions\n\n    if (!drag && !layout) return {}\n\n    const combined = { ...drag, ...layout }\n\n    return {\n        MeasureLayout:\n            drag?.isEnabled(props) || layout?.isEnabled(props)\n                ? combined.MeasureLayout\n                : undefined,\n        ProjectionNode: combined.ProjectionNode,\n    }\n}\n", "import { warnOnce } from \"motion-utils\"\nimport { createMotionComponent, MotionComponentOptions } from \"../../motion\"\nimport { FeaturePackages } from \"../../motion/features/types\"\nimport { MotionProps } from \"../../motion/types\"\nimport { DOMMotionComponents } from \"../dom/types\"\nimport { CreateVisualElement } from \"../types\"\n\n/**\n * I'd rather the return type of `custom` to be implicit but this throws\n * incorrect relative paths in the exported types and API Extractor throws\n * a wobbly.\n */\ntype ComponentProps<Props> = React.PropsWithoutRef<Props & MotionProps> &\n    React.RefAttributes<SVGElement | HTMLElement>\nexport type CustomDomComponent<Props> = React.ComponentType<\n    ComponentProps<Props>\n>\n\ntype MotionProxy = typeof createMotionComponent &\n    DOMMotionComponents & { create: typeof createMotionComponent }\n\nexport function createMotionProxy(\n    preloadedFeatures?: FeaturePackages,\n    createVisualElement?: CreateVisualElement<any, any>\n): MotionProxy {\n    if (typeof Proxy === \"undefined\") {\n        return createMotionComponent as MotionProxy\n    }\n\n    /**\n     * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n     * Rather than generating them anew every render.\n     */\n    const componentCache = new Map<string, any>()\n\n    const factory = (Component: string, options?: MotionComponentOptions) => {\n        return createMotionComponent(\n            Component,\n            options,\n            preloadedFeatures,\n            createVisualElement\n        )\n    }\n\n    /**\n     * Support for deprecated`motion(Component)` pattern\n     */\n    const deprecatedFactoryFunction = (\n        Component: string,\n        options?: MotionComponentOptions\n    ) => {\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(\n                false,\n                \"motion() is deprecated. Use motion.create() instead.\"\n            )\n        }\n        return factory(Component, options)\n    }\n\n    return new Proxy(deprecatedFactoryFunction, {\n        /**\n         * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n         * The prop name is passed through as `key` and we can use that to generate a `motion`\n         * DOM component with that name.\n         */\n        get: (_target, key: string) => {\n            if (key === \"create\") return factory\n\n            /**\n             * If this element doesn't exist in the component cache, create it and cache.\n             */\n            if (!componentCache.has(key)) {\n                componentCache.set(\n                    key,\n                    createMotionComponent(\n                        key,\n                        undefined,\n                        preloadedFeatures,\n                        createVisualElement\n                    )\n                )\n            }\n\n            return componentCache.get(key)!\n        },\n    }) as MotionProxy\n}\n", "import { HTMLVisualElement, SVGVisualElement } from \"motion-dom\"\nimport { ComponentType, Fragment } from \"react\"\nimport { CreateVisualElement, VisualElementOptions } from \"../types\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport const createDomVisualElement: CreateVisualElement = (\n    Component: string | ComponentType<React.PropsWithChildren<unknown>>,\n    options: VisualElementOptions<HTMLElement | SVGElement>\n) => {\n    /**\n     * Use explicit isSVG override if provided, otherwise auto-detect\n     */\n    const isSVG = options.isSVG ?? isSVGComponent(Component)\n\n    return isSVG\n        ? new SVGVisualElement(options)\n        : new HTMLVisualElement(options, {\n              allowProjection: Component !== Fragment,\n          })\n}\n", "import {\n    createAnimationState,\n    Feature,\n    isAnimationControls,\n    type VisualElement,\n} from \"motion-dom\"\n\nexport class AnimationFeature extends Feature<unknown> {\n    unmountControls?: () => void\n\n    /**\n     * We dynamically generate the AnimationState manager as it contains a reference\n     * to the underlying animation library. We only want to load that if we load this,\n     * so people can optionally code split it out using the `m` component.\n     */\n    constructor(node: VisualElement) {\n        super(node)\n        node.animationState ||= createAnimationState(node)\n    }\n\n    updateAnimationControlsSubscription() {\n        const { animate } = this.node.getProps()\n        if (isAnimationControls(animate)) {\n            this.unmountControls = animate.subscribe(this.node)\n        }\n    }\n\n    /**\n     * Subscribe any provided AnimationControls to the component's VisualElement\n     */\n    mount() {\n        this.updateAnimationControlsSubscription()\n    }\n\n    update() {\n        const { animate } = this.node.getProps()\n        const { animate: prevAnimate } = this.node.prevProps || {}\n        if (animate !== prevAnimate) {\n            this.updateAnimationControlsSubscription()\n        }\n    }\n\n    unmount() {\n        this.node.animationState!.reset()\n        this.unmountControls?.()\n    }\n}\n", "import { Feature } from \"motion-dom\"\n\nlet id = 0\n\nexport class ExitAnimationFeature extends Feature<unknown> {\n    private id: number = id++\n\n    update() {\n        if (!this.node.presenceContext) return\n\n        const { isPresent, onExitComplete } = this.node.presenceContext\n        const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}\n\n        if (!this.node.animationState || isPresent === prevIsPresent) {\n            return\n        }\n\n        const exitAnimation = this.node.animationState.setActive(\n            \"exit\",\n            !isPresent\n        )\n\n        if (onExitComplete && !isPresent) {\n            exitAnimation.then(() => {\n                onExitComplete(this.id)\n            })\n        }\n    }\n\n    mount() {\n        const { register, onExitComplete } = this.node.presenceContext || {}\n\n        if (onExitComplete) {\n            onExitComplete(this.id)\n        }\n\n        if (register) {\n            this.unmount = register(this.id)\n        }\n    }\n\n    unmount() {}\n}\n", "import { AnimationFeature } from \"./animation\"\nimport { ExitAnimationFeature } from \"./animation/exit\"\nimport { FeaturePackages } from \"./types\"\n\nexport const animations: FeaturePackages = {\n    animation: {\n        Feature: AnimationFeature,\n    },\n    exit: {\n        Feature: ExitAnimationFeature,\n    },\n}\n", "import { EventInfo, isPrimaryPointer } from \"motion-dom\"\n\nexport type EventListenerWithPointInfo = (\n    e: PointerEvent,\n    info: EventInfo\n) => void\n\nexport function extractEventInfo(event: PointerEvent): EventInfo {\n    return {\n        point: {\n            x: event.pageX,\n            y: event.pageY,\n        },\n    }\n}\n\nexport const addPointerInfo = (\n    handler: EventListenerWithPointInfo\n): EventListener => {\n    return (event: PointerEvent) =>\n        isPrimaryPointer(event) && handler(event, extractEventInfo(event))\n}\n", "import { addDomEvent } from \"motion-dom\"\nimport { addPointerInfo, EventListenerWithPointInfo } from \"./event-info\"\n\nexport function addPointerEvent(\n    target: EventTarget,\n    eventName: string,\n    handler: EventListenerWithPointInfo,\n    options?: AddEventListenerOptions\n) {\n    return addDomEvent(target, eventName, addPointerInfo(handler), options)\n}\n", "import type { VisualElement } from \"motion-dom\"\n\n// Fixes https://github.com/motiondivision/motion/issues/2270\nexport const getContextWindow = ({ current }: VisualElement<Element>) => {\n    return current ? current.ownerDocument.defaultView : null\n}\n", "import { Point } from \"motion-utils\"\n\nexport const distance = (a: number, b: number) => Math.abs(a - b)\n\nexport function distance2D(a: Point, b: Point): number {\n    // Multi-dimensional\n    const xDelta = distance(a.x, b.x)\n    const yDelta = distance(a.y, b.y)\n    return Math.sqrt(xDelta ** 2 + yDelta ** 2)\n}\n", "import type { EventInfo, PanHandler } from \"motion-dom\"\nimport { cancelFrame, frame, frameData, isPrimaryPointer } from \"motion-dom\"\nimport {\n    millisecondsToSeconds,\n    pipe,\n    Point,\n    secondsToMilliseconds,\n    TransformPoint,\n} from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { distance2D } from \"../../utils/distance\"\n\ninterface PanSessionHandlers {\n    onSessionStart: PanHandler\n    onStart: PanHandler\n    onMove: PanHandler\n    onEnd: PanHandler\n    onSessionEnd: PanHandler\n    resumeAnimation: () => void\n}\n\ninterface PanSessionOptions {\n    transformPagePoint?: TransformPoint\n    dragSnapToOrigin?: boolean\n    distanceThreshold?: number\n    contextWindow?: (Window & typeof globalThis) | null\n    /**\n     * Element being dragged. When provided, scroll events on its\n     * ancestors and window are compensated so the gesture continues\n     * smoothly during scroll.\n     */\n    element?: HTMLElement | null\n}\n\ninterface TimestampedPoint extends Point {\n    timestamp: number\n}\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"])\n\n/**\n * @internal\n */\nexport class PanSession {\n    /**\n     * @internal\n     */\n    private history: TimestampedPoint[]\n\n    /**\n     * @internal\n     */\n    private startEvent: PointerEvent | null = null\n\n    /**\n     * @internal\n     */\n    private lastMoveEvent: PointerEvent | null = null\n\n    /**\n     * @internal\n     */\n    private lastMoveEventInfo: EventInfo | null = null\n\n    /**\n     * @internal\n     */\n    private transformPagePoint?: TransformPoint\n\n    /**\n     * @internal\n     */\n    private handlers: Partial<PanSessionHandlers> = {}\n\n    /**\n     * @internal\n     */\n    private removeListeners: Function\n\n    /**\n     * For determining if an animation should resume after it is interupted\n     *\n     * @internal\n     */\n    private dragSnapToOrigin: boolean\n\n    /**\n     * The distance after which panning should start.\n     *\n     * @internal\n     */\n    private distanceThreshold: number\n\n    /**\n     * @internal\n     */\n    private contextWindow: PanSessionOptions[\"contextWindow\"] = window\n\n    /**\n     * Scroll positions of scrollable ancestors and window.\n     * @internal\n     */\n    private scrollPositions: Map<Element | Window, Point> = new Map()\n\n    /**\n     * Cleanup function for scroll listeners.\n     * @internal\n     */\n    private removeScrollListeners: (() => void) | null = null\n\n    constructor(\n        event: PointerEvent,\n        handlers: Partial<PanSessionHandlers>,\n        {\n            transformPagePoint,\n            contextWindow = window,\n            dragSnapToOrigin = false,\n            distanceThreshold = 3,\n            element,\n        }: PanSessionOptions = {}\n    ) {\n        // If we have more than one touch, don't start detecting this gesture\n        if (!isPrimaryPointer(event)) return\n\n        this.dragSnapToOrigin = dragSnapToOrigin\n        this.handlers = handlers\n        this.transformPagePoint = transformPagePoint\n        this.distanceThreshold = distanceThreshold\n        this.contextWindow = contextWindow || window\n\n        const info = extractEventInfo(event)\n        const initialInfo = transformPoint(info, this.transformPagePoint)\n        const { point } = initialInfo\n\n        const { timestamp } = frameData\n\n        this.history = [{ ...point, timestamp }]\n\n        const { onSessionStart } = handlers\n        onSessionStart &&\n            onSessionStart(event, getPanInfo(initialInfo, this.history))\n\n        this.removeListeners = pipe(\n            addPointerEvent(\n                this.contextWindow,\n                \"pointermove\",\n                this.handlePointerMove\n            ),\n            addPointerEvent(\n                this.contextWindow,\n                \"pointerup\",\n                this.handlePointerUp\n            ),\n            addPointerEvent(\n                this.contextWindow,\n                \"pointercancel\",\n                this.handlePointerUp\n            )\n        )\n\n        // Start scroll tracking if element provided\n        if (element) {\n            this.startScrollTracking(element)\n        }\n    }\n\n    /**\n     * Start tracking scroll on ancestors and window.\n     */\n    private startScrollTracking(element: HTMLElement): void {\n        // Store initial scroll positions for scrollable ancestors\n        let current = element.parentElement\n        while (current) {\n            const style = getComputedStyle(current)\n            if (\n                overflowStyles.has(style.overflowX) ||\n                overflowStyles.has(style.overflowY)\n            ) {\n                this.scrollPositions.set(current, {\n                    x: current.scrollLeft,\n                    y: current.scrollTop,\n                })\n            }\n            current = current.parentElement\n        }\n\n        // Track window scroll\n        this.scrollPositions.set(window, {\n            x: window.scrollX,\n            y: window.scrollY,\n        })\n\n        // Capture listener catches element scroll events as they bubble\n        window.addEventListener(\"scroll\", this.onElementScroll, {\n            capture: true,\n        })\n\n        // Direct window scroll listener (window scroll doesn't bubble)\n        window.addEventListener(\"scroll\", this.onWindowScroll)\n\n        this.removeScrollListeners = () => {\n            window.removeEventListener(\"scroll\", this.onElementScroll, {\n                capture: true,\n            })\n            window.removeEventListener(\"scroll\", this.onWindowScroll)\n        }\n    }\n\n    private onElementScroll = (event: Event): void => {\n        this.handleScroll(event.target as Element)\n    }\n\n    private onWindowScroll = (): void => {\n        this.handleScroll(window)\n    }\n\n    /**\n     * Handle scroll compensation during drag.\n     *\n     * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n     * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n     */\n    private handleScroll(target: Element | Window): void {\n        const initial = this.scrollPositions.get(target)\n        if (!initial) return\n\n        const isWindow = target === window\n        const current = isWindow\n            ? { x: window.scrollX, y: window.scrollY }\n            : {\n                  x: (target as Element).scrollLeft,\n                  y: (target as Element).scrollTop,\n              }\n\n        const delta = { x: current.x - initial.x, y: current.y - initial.y }\n        if (delta.x === 0 && delta.y === 0) return\n\n        if (isWindow) {\n            // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n            if (this.lastMoveEventInfo) {\n                this.lastMoveEventInfo.point.x += delta.x\n                this.lastMoveEventInfo.point.y += delta.y\n            }\n        } else {\n            // Element scroll: pageX/pageY unchanged, so adjust history origin\n            if (this.history.length > 0) {\n                this.history[0].x -= delta.x\n                this.history[0].y -= delta.y\n            }\n        }\n\n        this.scrollPositions.set(target, current)\n        frame.update(this.updatePoint, true)\n    }\n\n    private updatePoint = () => {\n        if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n        const info = getPanInfo(this.lastMoveEventInfo, this.history)\n        const isPanStarted = this.startEvent !== null\n\n        // Only start panning if the offset is larger than 3 pixels. If we make it\n        // any larger than this we'll want to reset the pointer history\n        // on the first update to avoid visual snapping to the cursor.\n        const isDistancePastThreshold =\n            distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold\n\n        if (!isPanStarted && !isDistancePastThreshold) return\n\n        const { point } = info\n        const { timestamp } = frameData\n        this.history.push({ ...point, timestamp })\n\n        const { onStart, onMove } = this.handlers\n\n        if (!isPanStarted) {\n            onStart && onStart(this.lastMoveEvent, info)\n            this.startEvent = this.lastMoveEvent\n        }\n\n        onMove && onMove(this.lastMoveEvent, info)\n    }\n\n    private handlePointerMove = (event: PointerEvent, info: EventInfo) => {\n        this.lastMoveEvent = event\n        this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint)\n\n        // Throttle mouse move event to once per frame\n        frame.update(this.updatePoint, true)\n    }\n\n    private handlePointerUp = (event: PointerEvent, info: EventInfo) => {\n        this.end()\n\n        const { onEnd, onSessionEnd, resumeAnimation } = this.handlers\n\n        // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n        // This ensures constraint animations continue when interrupted by a click\n        if (this.dragSnapToOrigin || !this.startEvent) {\n            resumeAnimation && resumeAnimation()\n        }\n        if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n        const panInfo = getPanInfo(\n            event.type === \"pointercancel\"\n                ? this.lastMoveEventInfo\n                : transformPoint(info, this.transformPagePoint),\n            this.history\n        )\n\n        if (this.startEvent && onEnd) {\n            onEnd(event, panInfo)\n        }\n\n        onSessionEnd && onSessionEnd(event, panInfo)\n    }\n\n    updateHandlers(handlers: Partial<PanSessionHandlers>) {\n        this.handlers = handlers\n    }\n\n    end() {\n        this.removeListeners && this.removeListeners()\n        this.removeScrollListeners && this.removeScrollListeners()\n        this.scrollPositions.clear()\n        cancelFrame(this.updatePoint)\n    }\n}\n\nfunction transformPoint(\n    info: EventInfo,\n    transformPagePoint?: (point: Point) => Point\n) {\n    return transformPagePoint ? { point: transformPagePoint(info.point) } : info\n}\n\nfunction subtractPoint(a: Point, b: Point): Point {\n    return { x: a.x - b.x, y: a.y - b.y }\n}\n\nfunction getPanInfo({ point }: EventInfo, history: TimestampedPoint[]) {\n    return {\n        point,\n        delta: subtractPoint(point, lastDevicePoint(history)),\n        offset: subtractPoint(point, startDevicePoint(history)),\n        velocity: getVelocity(history, 0.1),\n    }\n}\n\nfunction startDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n    return history[0]\n}\n\nfunction lastDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n    return history[history.length - 1]\n}\n\nfunction getVelocity(history: TimestampedPoint[], timeDelta: number): Point {\n    if (history.length < 2) {\n        return { x: 0, y: 0 }\n    }\n\n    let i = history.length - 1\n    let timestampedPoint: TimestampedPoint | null = null\n    const lastPoint = lastDevicePoint(history)\n    while (i >= 0) {\n        timestampedPoint = history[i]\n        if (\n            lastPoint.timestamp - timestampedPoint.timestamp >\n            secondsToMilliseconds(timeDelta)\n        ) {\n            break\n        }\n        i--\n    }\n\n    if (!timestampedPoint) {\n        return { x: 0, y: 0 }\n    }\n\n    /**\n     * If the selected point is the pointer-down origin (history[0]),\n     * there are better movement points available, and the time gap\n     * is suspiciously large (>2x timeDelta), use the next point instead.\n     * This prevents stale pointer-down points from diluting velocity\n     * in hold-then-flick gestures.\n     */\n    if (\n        timestampedPoint === history[0] &&\n        history.length > 2 &&\n        lastPoint.timestamp - timestampedPoint.timestamp >\n            secondsToMilliseconds(timeDelta) * 2\n    ) {\n        timestampedPoint = history[1]\n    }\n\n    const time = millisecondsToSeconds(\n        lastPoint.timestamp - timestampedPoint.timestamp\n    )\n    if (time === 0) {\n        return { x: 0, y: 0 }\n    }\n\n    const currentVelocity = {\n        x: (lastPoint.x - timestampedPoint.x) / time,\n        y: (lastPoint.y - timestampedPoint.y) / time,\n    }\n\n    if (currentVelocity.x === Infinity) {\n        currentVelocity.x = 0\n    }\n    if (currentVelocity.y === Infinity) {\n        currentVelocity.y = 0\n    }\n\n    return currentVelocity\n}\n", "import { calcLength, mixNumber, type DragElastic, type ResolvedConstraints } from \"motion-dom\"\nimport {\n    Axis,\n    BoundingBox,\n    Box,\n    progress as calcProgress,\n    clamp,\n    Point,\n} from \"motion-utils\"\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nexport function applyConstraints(\n    point: number,\n    { min, max }: Partial<Axis>,\n    elastic?: Axis\n): number {\n    if (min !== undefined && point < min) {\n        // If we have a min point defined, and this is outside of that, constrain\n        point = elastic\n            ? mixNumber(min, point, elastic.min)\n            : Math.max(point, min)\n    } else if (max !== undefined && point > max) {\n        // If we have a max point defined, and this is outside of that, constrain\n        point = elastic\n            ? mixNumber(max, point, elastic.max)\n            : Math.min(point, max)\n    }\n\n    return point\n}\n\n/**\n * Calculates a min projection point based on a pointer, pointer progress\n * within the drag target, and constraints.\n *\n * For instance if an element was 100px width, we were dragging from 0.25\n * along this axis, the pointer is at 200px, and there were no constraints,\n * we would calculate a min projection point of 175px.\n */\nexport function calcConstrainedMinPoint(\n    point: number,\n    length: number,\n    progress: number,\n    constraints?: Partial<Axis>,\n    elastic?: Axis\n): number {\n    // Calculate a min point for this axis and apply it to the current pointer\n    const min = point - length * progress\n\n    return constraints ? applyConstraints(min, constraints, elastic) : min\n}\n\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nexport function calcRelativeAxisConstraints(\n    axis: Axis,\n    min?: number,\n    max?: number\n): Partial<Axis> {\n    return {\n        min: min !== undefined ? axis.min + min : undefined,\n        max:\n            max !== undefined\n                ? axis.max + max - (axis.max - axis.min)\n                : undefined,\n    }\n}\n\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nexport function calcRelativeConstraints(\n    layoutBox: Box,\n    { top, left, bottom, right }: Partial<BoundingBox>\n): ResolvedConstraints {\n    return {\n        x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n        y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n    }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nexport function calcViewportAxisConstraints(\n    layoutAxis: Axis,\n    constraintsAxis: Axis\n) {\n    let min = constraintsAxis.min - layoutAxis.min\n    let max = constraintsAxis.max - layoutAxis.max\n\n    // If the constraints axis is actually smaller than the layout axis then we can\n    // flip the constraints\n    if (\n        constraintsAxis.max - constraintsAxis.min <\n        layoutAxis.max - layoutAxis.min\n    ) {\n        ;[min, max] = [max, min]\n    }\n\n    return { min, max }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nexport function calcViewportConstraints(layoutBox: Box, constraintsBox: Box) {\n    return {\n        x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n        y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n    }\n}\n\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nexport function calcOrigin(source: Axis, target: Axis): number {\n    let origin = 0.5\n    const sourceLength = calcLength(source)\n    const targetLength = calcLength(target)\n\n    if (targetLength > sourceLength) {\n        origin = calcProgress(target.min, target.max - sourceLength, source.min)\n    } else if (sourceLength > targetLength) {\n        origin = calcProgress(source.min, source.max - targetLength, target.min)\n    }\n\n    return clamp(0, 1, origin)\n}\n\n/**\n * Calculate the relative progress of one constraints box relative to another.\n * Imagine a page scroll bar. At the top, this would return 0, at the bottom, 1.\n * Anywhere in-between, a value between 0 and 1.\n *\n * This also handles flipped constraints, for instance a draggable container within\n * a smaller viewport like a scrollable view.\n */\nexport function calcProgressWithinConstraints(\n    layoutBox: Box,\n    constraintsBox: Box\n): Point {\n    return {\n        x: calcOrigin(layoutBox.x, constraintsBox.x),\n        y: calcOrigin(layoutBox.y, constraintsBox.y),\n    }\n}\n\n/**\n * Calculate the an axis position based on two axes and a progress value.\n */\nexport function calcPositionFromProgress(\n    axis: Axis,\n    constraints: Axis,\n    progress: number\n): Axis {\n    const axisLength = axis.max - axis.min\n    const min = mixNumber(\n        constraints.min,\n        constraints.max - axisLength,\n        progress\n    )\n    return { min, max: min + axisLength }\n}\n\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nexport function rebaseAxisConstraints(\n    layout: Axis,\n    constraints: Partial<Axis>\n): Partial<Axis> {\n    const relativeConstraints: Partial<Axis> = {}\n\n    if (constraints.min !== undefined) {\n        relativeConstraints.min = constraints.min - layout.min\n    }\n\n    if (constraints.max !== undefined) {\n        relativeConstraints.max = constraints.max - layout.min\n    }\n\n    return relativeConstraints\n}\n\nexport const defaultElastic = 0.35\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nexport function resolveDragElastic(\n    dragElastic: DragElastic = defaultElastic\n): Box {\n    if (dragElastic === false) {\n        dragElastic = 0\n    } else if (dragElastic === true) {\n        dragElastic = defaultElastic\n    }\n\n    return {\n        x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n        y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n    }\n}\n\nexport function resolveAxisElastic(\n    dragElastic: DragElastic,\n    minLabel: string,\n    maxLabel: string\n): Axis {\n    return {\n        min: resolvePointElastic(dragElastic, minLabel),\n        max: resolvePointElastic(dragElastic, maxLabel),\n    }\n}\n\nexport function resolvePointElastic(\n    dragElastic: DragElastic,\n    label: string\n): number {\n    return typeof dragElastic === \"number\"\n        ? dragElastic\n        : dragElastic[label as keyof typeof dragElastic] || 0\n}\n", "import {\n    addValueToWillChange,\n    animateMotionValue,\n    calcLength,\n    convertBoundingBoxToBox,\n    convertBoxToBoundingBox,\n    createBox,\n    eachAxis,\n    frame,\n    isElementTextInput,\n    measurePageBox,\n    mixNumber,\n    PanInfo,\n    percent,\n    ResolvedConstraints,\n    resize,\n    setDragLock,\n    Transition,\n    type VisualElement,\n} from \"motion-dom\"\nimport { Axis, Point, invariant } from \"motion-utils\"\nimport { addDomEvent, type LayoutUpdateData } from \"motion-dom\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { PanSession } from \"../pan/PanSession\"\nimport {\n    applyConstraints,\n    calcOrigin,\n    calcRelativeConstraints,\n    calcViewportConstraints,\n    defaultElastic,\n    rebaseAxisConstraints,\n    resolveDragElastic,\n} from \"./utils/constraints\"\n\nexport const elementDragControls = new WeakMap<\n    VisualElement,\n    VisualElementDragControls\n>()\n\nexport interface DragControlOptions {\n    /**\n     * This distance after which dragging starts and a direction is locked in.\n     *\n     * @public\n     */\n    distanceThreshold?: number\n\n    /**\n     * Whether to immediately snap to the cursor when dragging starts.\n     *\n     * @public\n     */\n    snapToCursor?: boolean\n}\n\ntype DragDirection = \"x\" | \"y\"\n\nexport class VisualElementDragControls {\n    private visualElement: VisualElement<HTMLElement>\n\n    private panSession?: PanSession\n\n    private openDragLock: VoidFunction | null = null\n\n    isDragging = false\n    private currentDirection: DragDirection | null = null\n\n    private originPoint: Point = { x: 0, y: 0 }\n\n    /**\n     * The permitted boundaries of travel, in pixels.\n     */\n    private constraints: ResolvedConstraints | false = false\n\n    private hasMutatedConstraints = false\n\n    /**\n     * The per-axis resolved elastic values.\n     */\n    private elastic = createBox()\n\n    /**\n     * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n     */\n    private latestPointerEvent: PointerEvent | null = null\n\n    /**\n     * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n     */\n    private latestPanInfo: PanInfo | null = null\n\n    constructor(visualElement: VisualElement<HTMLElement>) {\n        this.visualElement = visualElement\n    }\n\n    start(\n        originEvent: PointerEvent,\n        { snapToCursor = false, distanceThreshold }: DragControlOptions = {}\n    ) {\n        /**\n         * Don't start dragging if this component is exiting\n         */\n        const { presenceContext } = this.visualElement\n        if (presenceContext && presenceContext.isPresent === false) return\n\n        const onSessionStart = (event: PointerEvent) => {\n            if (snapToCursor) {\n                this.snapToCursor(extractEventInfo(event).point)\n            }\n            this.stopAnimation()\n        }\n\n        const onStart = (event: PointerEvent, info: PanInfo) => {\n            // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n            const { drag, dragPropagation, onDragStart } = this.getProps()\n\n            if (drag && !dragPropagation) {\n                if (this.openDragLock) this.openDragLock()\n\n                this.openDragLock = setDragLock(drag)\n\n                // If we don 't have the lock, don't start dragging\n                if (!this.openDragLock) return\n            }\n\n            this.latestPointerEvent = event\n            this.latestPanInfo = info\n            this.isDragging = true\n\n            this.currentDirection = null\n\n            this.resolveConstraints()\n\n            if (this.visualElement.projection) {\n                this.visualElement.projection.isAnimationBlocked = true\n                this.visualElement.projection.target = undefined\n            }\n\n            /**\n             * Record gesture origin and pointer offset\n             */\n            eachAxis((axis) => {\n                let current = this.getAxisMotionValue(axis).get() || 0\n\n                /**\n                 * If the MotionValue is a percentage value convert to px\n                 */\n                if (percent.test(current)) {\n                    const { projection } = this.visualElement\n\n                    if (projection && projection.layout) {\n                        const measuredAxis = projection.layout.layoutBox[axis]\n\n                        if (measuredAxis) {\n                            const length = calcLength(measuredAxis)\n                            current = length * (parseFloat(current) / 100)\n                        }\n                    }\n                }\n\n                this.originPoint[axis] = current\n            })\n\n            // Fire onDragStart event\n            if (onDragStart) {\n                frame.update(() => onDragStart(event, info), false, true)\n            }\n\n            addValueToWillChange(this.visualElement, \"transform\")\n\n            const { animationState } = this.visualElement\n            animationState && animationState.setActive(\"whileDrag\", true)\n        }\n\n        const onMove = (event: PointerEvent, info: PanInfo) => {\n            this.latestPointerEvent = event\n            this.latestPanInfo = info\n\n            const {\n                dragPropagation,\n                dragDirectionLock,\n                onDirectionLock,\n                onDrag,\n            } = this.getProps()\n\n            // If we didn't successfully receive the gesture lock, early return.\n            if (!dragPropagation && !this.openDragLock) return\n\n            const { offset } = info\n            // Attempt to detect drag direction if directionLock is true\n            if (dragDirectionLock && this.currentDirection === null) {\n                this.currentDirection = getCurrentDirection(offset)\n\n                // If we've successfully set a direction, notify listener\n                if (this.currentDirection !== null) {\n                    onDirectionLock && onDirectionLock(this.currentDirection)\n                }\n\n                return\n            }\n\n            // Update each point with the latest position\n            this.updateAxis(\"x\", info.point, offset)\n            this.updateAxis(\"y\", info.point, offset)\n\n            /**\n             * Ideally we would leave the renderer to fire naturally at the end of\n             * this frame but if the element is about to change layout as the result\n             * of a re-render we want to ensure the browser can read the latest\n             * bounding box to ensure the pointer and element don't fall out of sync.\n             */\n            this.visualElement.render()\n\n            /**\n             * This must fire after the render call as it might trigger a state\n             * change which itself might trigger a layout update.\n             */\n            if (onDrag) {\n                frame.update(() => onDrag(event, info), false, true)\n            }\n        }\n\n        const onSessionEnd = (event: PointerEvent, info: PanInfo) => {\n            this.latestPointerEvent = event\n            this.latestPanInfo = info\n\n            this.stop(event, info)\n\n            this.latestPointerEvent = null\n            this.latestPanInfo = null\n        }\n\n        const resumeAnimation = () => {\n            const { dragSnapToOrigin: snap } = this.getProps()\n            if (snap || this.constraints) {\n                this.startAnimation({ x: 0, y: 0 })\n            }\n        }\n\n        const { dragSnapToOrigin } = this.getProps()\n        this.panSession = new PanSession(\n            originEvent,\n            {\n                onSessionStart,\n                onStart,\n                onMove,\n                onSessionEnd,\n                resumeAnimation,\n            },\n            {\n                transformPagePoint: this.visualElement.getTransformPagePoint(),\n                dragSnapToOrigin,\n                distanceThreshold,\n                contextWindow: getContextWindow(this.visualElement),\n                element: this.visualElement.current,\n            }\n        )\n    }\n\n    /**\n     * @internal\n     */\n    stop(event?: PointerEvent, panInfo?: PanInfo) {\n        const finalEvent = event || this.latestPointerEvent\n        const finalPanInfo = panInfo || this.latestPanInfo\n\n        const isDragging = this.isDragging\n        this.cancel()\n        if (!isDragging || !finalPanInfo || !finalEvent) return\n\n        const { velocity } = finalPanInfo\n        this.startAnimation(velocity)\n\n        const { onDragEnd } = this.getProps()\n        if (onDragEnd) {\n            frame.postRender(() => onDragEnd(finalEvent, finalPanInfo))\n        }\n    }\n\n    /**\n     * @internal\n     */\n    cancel() {\n        this.isDragging = false\n\n        const { projection, animationState } = this.visualElement\n\n        if (projection) {\n            projection.isAnimationBlocked = false\n        }\n\n        this.endPanSession()\n\n        const { dragPropagation } = this.getProps()\n\n        if (!dragPropagation && this.openDragLock) {\n            this.openDragLock()\n            this.openDragLock = null\n        }\n\n        animationState && animationState.setActive(\"whileDrag\", false)\n    }\n\n    /**\n     * Clean up the pan session without modifying other drag state.\n     * This is used during unmount to ensure event listeners are removed\n     * without affecting projection animations or drag locks.\n     * @internal\n     */\n    endPanSession() {\n        this.panSession && this.panSession.end()\n        this.panSession = undefined\n    }\n\n    private updateAxis(axis: DragDirection, _point: Point, offset?: Point) {\n        const { drag } = this.getProps()\n\n        // If we're not dragging this axis, do an early return.\n        if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return\n\n        const axisValue = this.getAxisMotionValue(axis)\n        let next = this.originPoint[axis] + offset[axis]\n\n        // Apply constraints\n        if (this.constraints && this.constraints[axis]) {\n            next = applyConstraints(\n                next,\n                this.constraints[axis],\n                this.elastic[axis]\n            )\n        }\n\n        axisValue.set(next)\n    }\n\n    private resolveConstraints() {\n        const { dragConstraints, dragElastic } = this.getProps()\n\n        const layout =\n            this.visualElement.projection &&\n            !this.visualElement.projection.layout\n                ? this.visualElement.projection.measure(false)\n                : this.visualElement.projection?.layout\n\n        const prevConstraints = this.constraints\n\n        if (dragConstraints && isRefObject(dragConstraints)) {\n            if (!this.constraints) {\n                this.constraints = this.resolveRefConstraints()\n            }\n        } else {\n            if (dragConstraints && layout) {\n                this.constraints = calcRelativeConstraints(\n                    layout.layoutBox,\n                    dragConstraints\n                )\n            } else {\n                this.constraints = false\n            }\n        }\n\n        this.elastic = resolveDragElastic(dragElastic)\n\n        /**\n         * If we're outputting to external MotionValues, we want to rebase the measured constraints\n         * from viewport-relative to component-relative. This only applies to relative (non-ref)\n         * constraints, as ref-based constraints from calcViewportConstraints are already in the\n         * correct coordinate space for the motion value transform offset.\n         */\n        if (\n            prevConstraints !== this.constraints &&\n            !isRefObject(dragConstraints) &&\n            layout &&\n            this.constraints &&\n            !this.hasMutatedConstraints\n        ) {\n            eachAxis((axis) => {\n                if (\n                    this.constraints !== false &&\n                    this.getAxisMotionValue(axis)\n                ) {\n                    this.constraints[axis] = rebaseAxisConstraints(\n                        layout.layoutBox[axis],\n                        this.constraints[axis]\n                    )\n                }\n            })\n        }\n    }\n\n    private resolveRefConstraints() {\n        const { dragConstraints: constraints, onMeasureDragConstraints } =\n            this.getProps()\n        if (!constraints || !isRefObject(constraints)) return false\n\n        const constraintsElement = constraints.current as HTMLElement\n\n        invariant(\n            constraintsElement !== null,\n            \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\",\n            \"drag-constraints-ref\"\n        )\n\n        const { projection } = this.visualElement\n\n        // TODO\n        if (!projection || !projection.layout) return false\n\n        const constraintsBox = measurePageBox(\n            constraintsElement,\n            projection.root!,\n            this.visualElement.getTransformPagePoint()\n        )\n\n        let measuredConstraints = calcViewportConstraints(\n            projection.layout.layoutBox,\n            constraintsBox\n        )\n\n        /**\n         * If there's an onMeasureDragConstraints listener we call it and\n         * if different constraints are returned, set constraints to that\n         */\n        if (onMeasureDragConstraints) {\n            const userConstraints = onMeasureDragConstraints(\n                convertBoxToBoundingBox(measuredConstraints)\n            )\n\n            this.hasMutatedConstraints = !!userConstraints\n\n            if (userConstraints) {\n                measuredConstraints = convertBoundingBoxToBox(userConstraints)\n            }\n        }\n\n        return measuredConstraints\n    }\n\n    private startAnimation(velocity: Point) {\n        const {\n            drag,\n            dragMomentum,\n            dragElastic,\n            dragTransition,\n            dragSnapToOrigin,\n            onDragTransitionEnd,\n        } = this.getProps()\n\n        const constraints: Partial<ResolvedConstraints> = this.constraints || {}\n\n        const momentumAnimations = eachAxis((axis) => {\n            if (!shouldDrag(axis, drag, this.currentDirection)) {\n                return\n            }\n\n            let transition = (constraints && constraints[axis]) || {}\n\n            if (dragSnapToOrigin) transition = { min: 0, max: 0 }\n\n            /**\n             * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n             * of spring animations so we should look into adding a disable spring option to `inertia`.\n             * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n             * using the value of `dragElastic`.\n             */\n            const bounceStiffness = dragElastic ? 200 : 1000000\n            const bounceDamping = dragElastic ? 40 : 10000000\n\n            const inertia: Transition = {\n                type: \"inertia\",\n                velocity: dragMomentum ? velocity[axis] : 0,\n                bounceStiffness,\n                bounceDamping,\n                timeConstant: 750,\n                restDelta: 1,\n                restSpeed: 10,\n                ...dragTransition,\n                ...transition,\n            }\n\n            // If we're not animating on an externally-provided `MotionValue` we can use the\n            // component's animation controls which will handle interactions with whileHover (etc),\n            // otherwise we just have to animate the `MotionValue` itself.\n            return this.startAxisValueAnimation(axis, inertia)\n        })\n\n        // Run all animations and then resolve the new drag constraints.\n        return Promise.all(momentumAnimations).then(onDragTransitionEnd)\n    }\n\n    private startAxisValueAnimation(\n        axis: DragDirection,\n        transition: Transition\n    ) {\n        const axisValue = this.getAxisMotionValue(axis)\n\n        addValueToWillChange(this.visualElement, axis)\n\n        return axisValue.start(\n            animateMotionValue(\n                axis,\n                axisValue,\n                0,\n                transition,\n                this.visualElement,\n                false\n            )\n        )\n    }\n\n    private stopAnimation() {\n        eachAxis((axis) => this.getAxisMotionValue(axis).stop())\n    }\n\n    /**\n     * Drag works differently depending on which props are provided.\n     *\n     * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n     * - Otherwise, we apply the delta to the x/y motion values.\n     */\n    private getAxisMotionValue(axis: DragDirection) {\n        const dragKey =\n            `_drag${axis.toUpperCase()}` as `_drag${Uppercase<DragDirection>}`\n        const props = this.visualElement.getProps()\n        const externalMotionValue = props[dragKey]\n\n        return externalMotionValue\n            ? externalMotionValue\n            : this.visualElement.getValue(\n                  axis,\n                  (props.initial\n                      ? props.initial[axis as keyof typeof props.initial]\n                      : undefined) || 0\n              )\n    }\n\n    private snapToCursor(point: Point) {\n        eachAxis((axis) => {\n            const { drag } = this.getProps()\n\n            // If we're not dragging this axis, do an early return.\n            if (!shouldDrag(axis, drag, this.currentDirection)) return\n\n            const { projection } = this.visualElement\n            const axisValue = this.getAxisMotionValue(axis)\n\n            if (projection && projection.layout) {\n                const { min, max } = projection.layout.layoutBox[axis]\n\n                /**\n                 * The layout measurement includes the current transform value,\n                 * so we need to add it back to get the correct snap position.\n                 * This fixes an issue where elements with initial coordinates\n                 * would snap to the wrong position on the first drag.\n                 */\n                const current = axisValue.get() || 0\n\n                axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current)\n            }\n        })\n    }\n\n    /**\n     * When the viewport resizes we want to check if the measured constraints\n     * have changed and, if so, reposition the element within those new constraints\n     * relative to where it was before the resize.\n     */\n    scalePositionWithinConstraints() {\n        if (!this.visualElement.current) return\n\n        const { drag, dragConstraints } = this.getProps()\n        const { projection } = this.visualElement\n        if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n            return\n\n        /**\n         * Stop current animations as there can be visual glitching if we try to do\n         * this mid-animation\n         */\n        this.stopAnimation()\n\n        /**\n         * Record the relative position of the dragged element relative to the\n         * constraints box and save as a progress value.\n         */\n        const boxProgress = { x: 0, y: 0 }\n        eachAxis((axis) => {\n            const axisValue = this.getAxisMotionValue(axis)\n            if (axisValue && this.constraints !== false) {\n                const latest = axisValue.get()\n                boxProgress[axis] = calcOrigin(\n                    { min: latest, max: latest },\n                    this.constraints[axis] as Axis\n                )\n            }\n        })\n\n        /**\n         * Update the layout of this element and resolve the latest drag constraints\n         */\n        const { transformTemplate } = this.visualElement.getProps()\n        this.visualElement.current.style.transform = transformTemplate\n            ? transformTemplate({}, \"\")\n            : \"none\"\n        projection.root && projection.root.updateScroll()\n        projection.updateLayout()\n\n        /**\n         * Reset constraints so resolveConstraints() will recalculate them\n         * with the freshly measured layout rather than returning the cached value.\n         */\n        this.constraints = false\n        this.resolveConstraints()\n\n        /**\n         * For each axis, calculate the current progress of the layout axis\n         * within the new constraints.\n         */\n        eachAxis((axis) => {\n            if (!shouldDrag(axis, drag, null)) return\n\n            /**\n             * Calculate a new transform based on the previous box progress\n             */\n            const axisValue = this.getAxisMotionValue(axis)\n            const { min, max } = (this.constraints as ResolvedConstraints)[\n                axis\n            ] as Axis\n            axisValue.set(mixNumber(min, max, boxProgress[axis]))\n        })\n\n        /**\n         * Flush the updated transform to the DOM synchronously to prevent\n         * a visual flash at the element's CSS layout position (0,0) when\n         * the transform was stripped for measurement.\n         */\n        this.visualElement.render()\n    }\n\n    addListeners() {\n        if (!this.visualElement.current) return\n        elementDragControls.set(this.visualElement, this)\n        const element = this.visualElement.current\n\n        /**\n         * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n         */\n        const stopPointerListener = addPointerEvent(\n            element,\n            \"pointerdown\",\n            (event) => {\n                const { drag, dragListener = true } = this.getProps()\n                const target = event.target as Element\n\n                /**\n                 * Only block drag if clicking on a text input child element\n                 * (input, textarea, select, contenteditable) where users might\n                 * want to select text or interact with the control.\n                 *\n                 * Buttons and links don't block drag since they don't have\n                 * click-and-move actions of their own.\n                 */\n                const isClickingTextInputChild =\n                    target !== element && isElementTextInput(target)\n\n                if (drag && dragListener && !isClickingTextInputChild) {\n                    this.start(event)\n                }\n            }\n        )\n\n        /**\n         * If using ref-based constraints, observe both the draggable element\n         * and the constraint container for size changes via ResizeObserver.\n         * Setup is deferred because dragConstraints.current is null when\n         * addListeners first runs (React hasn't committed the ref yet).\n         */\n        let stopResizeObservers: VoidFunction | undefined\n\n        const measureDragConstraints = () => {\n            const { dragConstraints } = this.getProps()\n            if (isRefObject(dragConstraints) && dragConstraints.current) {\n                this.constraints = this.resolveRefConstraints()\n\n                if (!stopResizeObservers) {\n                    stopResizeObservers = startResizeObservers(\n                        element,\n                        dragConstraints.current as HTMLElement,\n                        () => this.scalePositionWithinConstraints()\n                    )\n                }\n            }\n        }\n\n        const { projection } = this.visualElement\n\n        const stopMeasureLayoutListener = projection!.addEventListener(\n            \"measure\",\n            measureDragConstraints\n        )\n\n        if (projection && !projection!.layout) {\n            projection.root && projection.root.updateScroll()\n            projection.updateLayout()\n        }\n\n        frame.read(measureDragConstraints)\n\n        /**\n         * Attach a window resize listener to scale the draggable target within its defined\n         * constraints as the window resizes.\n         */\n        const stopResizeListener = addDomEvent(window, \"resize\", () =>\n            this.scalePositionWithinConstraints()\n        )\n\n        /**\n         * If the element's layout changes, calculate the delta and apply that to\n         * the drag gesture's origin point.\n         */\n        const stopLayoutUpdateListener = projection!.addEventListener(\n            \"didUpdate\",\n            (({ delta, hasLayoutChanged }: LayoutUpdateData) => {\n                if (this.isDragging && hasLayoutChanged) {\n                    eachAxis((axis) => {\n                        const motionValue = this.getAxisMotionValue(axis)\n                        if (!motionValue) return\n\n                        this.originPoint[axis] += delta[axis].translate\n                        motionValue.set(\n                            motionValue.get() + delta[axis].translate\n                        )\n                    })\n\n                    this.visualElement.render()\n                }\n            }) as any\n        )\n\n        return () => {\n            stopResizeListener()\n            stopPointerListener()\n            stopMeasureLayoutListener()\n            stopLayoutUpdateListener && stopLayoutUpdateListener()\n            stopResizeObservers && stopResizeObservers()\n        }\n    }\n\n    getProps(): MotionProps {\n        const props = this.visualElement.getProps()\n        const {\n            drag = false,\n            dragDirectionLock = false,\n            dragPropagation = false,\n            dragConstraints = false,\n            dragElastic = defaultElastic,\n            dragMomentum = true,\n        } = props\n        return {\n            ...props,\n            drag,\n            dragDirectionLock,\n            dragPropagation,\n            dragConstraints,\n            dragElastic,\n            dragMomentum,\n        }\n    }\n}\n\nfunction skipFirstCall(callback: VoidFunction): VoidFunction {\n    let isFirst = true\n    return () => {\n        if (isFirst) {\n            isFirst = false\n            return\n        }\n        callback()\n    }\n}\n\nfunction startResizeObservers(\n    element: HTMLElement,\n    constraintsElement: HTMLElement,\n    onResize: VoidFunction\n): VoidFunction {\n    const stopElement = resize(element, skipFirstCall(onResize))\n    const stopContainer = resize(constraintsElement, skipFirstCall(onResize))\n    return () => {\n        stopElement()\n        stopContainer()\n    }\n}\n\nfunction shouldDrag(\n    direction: DragDirection,\n    drag: boolean | DragDirection | undefined,\n    currentDirection: null | DragDirection\n) {\n    return (\n        (drag === true || drag === direction) &&\n        (currentDirection === null || currentDirection === direction)\n    )\n}\n\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(\n    offset: Point,\n    lockThreshold = 10\n): DragDirection | null {\n    let direction: DragDirection | null = null\n\n    if (Math.abs(offset.y) > lockThreshold) {\n        direction = \"y\"\n    } else if (Math.abs(offset.x) > lockThreshold) {\n        direction = \"x\"\n    }\n\n    return direction\n}\n\nexport function expectsResolvedDragConstraints({\n    dragConstraints,\n    onMeasureDragConstraints,\n}: MotionProps) {\n    return isRefObject(dragConstraints) && !!onMeasureDragConstraints\n}\n", "import { Feature, type VisualElement } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { VisualElementDragControls } from \"./VisualElementDragControls\"\n\nexport class DragGesture extends Feature<HTMLElement> {\n    controls: VisualElementDragControls\n\n    removeGroupControls: Function = noop\n    removeListeners: Function = noop\n\n    constructor(node: VisualElement<HTMLElement>) {\n        super(node)\n        this.controls = new VisualElementDragControls(node)\n    }\n\n    mount() {\n        // If we've been provided a DragControls for manual control over the drag gesture,\n        // subscribe this component to it on mount.\n        const { dragControls } = this.node.getProps()\n\n        if (dragControls) {\n            this.removeGroupControls = dragControls.subscribe(this.controls)\n        }\n\n        this.removeListeners = this.controls.addListeners() || noop\n    }\n\n    update() {\n        const { dragControls } = this.node.getProps()\n        const { dragControls: prevDragControls } = this.node.prevProps || {}\n\n        if (dragControls !== prevDragControls) {\n            this.removeGroupControls()\n            if (dragControls) {\n                this.removeGroupControls = dragControls.subscribe(this.controls)\n            }\n        }\n    }\n\n    unmount() {\n        this.removeGroupControls()\n        this.removeListeners()\n        /**\n         * In React 19, during list reorder reconciliation, components may\n         * briefly unmount and remount while the drag is still active. If we're\n         * actively dragging, we should NOT end the pan session - it will\n         * continue tracking pointer events via its window-level listeners.\n         *\n         * The pan session will be properly cleaned up when:\n         * 1. The drag ends naturally (pointerup/pointercancel)\n         * 2. The component is truly removed from the DOM\n         */\n        if (!this.controls.isDragging) {\n            this.controls.endPanSession()\n        }\n    }\n}\n", "import { Feature, frame, type PanInfo } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { PanSession } from \"./PanSession\"\n\ntype PanEventHandler = (event: PointerEvent, info: PanInfo) => void\nconst asyncHandler =\n    (handler?: PanEventHandler) => (event: PointerEvent, info: PanInfo) => {\n        if (handler) {\n            frame.update(() => handler(event, info), false, true)\n        }\n    }\n\nexport class PanGesture extends Feature<Element> {\n    private session?: PanSession\n\n    private removePointerDownListener: Function = noop\n\n    onPointerDown(pointerDownEvent: PointerEvent) {\n        this.session = new PanSession(\n            pointerDownEvent,\n            this.createPanHandlers(),\n            {\n                transformPagePoint: this.node.getTransformPagePoint(),\n                contextWindow: getContextWindow(this.node),\n            }\n        )\n    }\n\n    createPanHandlers() {\n        const { onPanSessionStart, onPanStart, onPan, onPanEnd } =\n            this.node.getProps()\n\n        return {\n            onSessionStart: asyncHandler(onPanSessionStart),\n            onStart: asyncHandler(onPanStart),\n            onMove: asyncHandler(onPan),\n            onEnd: (event: PointerEvent, info: PanInfo) => {\n                delete this.session\n                if (onPanEnd) {\n                    frame.postRender(() => onPanEnd(event, info))\n                }\n            },\n        }\n    }\n\n    mount() {\n        this.removePointerDownListener = addPointerEvent(\n            this.node.current!,\n            \"pointerdown\",\n            (event: PointerEvent) => this.onPointerDown(event)\n        )\n    }\n\n    update() {\n        this.session && this.session.updateHandlers(this.createPanHandlers())\n    }\n\n    unmount() {\n        this.removePointerDownListener()\n        this.session && this.session.end()\n    }\n}\n", "\"use client\"\n\nimport { frame, microtask, globalProjectionState, type VisualElement } from \"motion-dom\"\nimport { Component, useContext } from \"react\"\nimport { usePresence } from \"../../../components/AnimatePresence/use-presence\"\nimport {\n    LayoutGroupContext,\n    LayoutGroupContextProps,\n} from \"../../../context/LayoutGroupContext\"\nimport { SwitchLayoutGroupContext } from \"../../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../types\"\n\ninterface MeasureContextProps {\n    layoutGroup: LayoutGroupContextProps\n    switchLayoutGroup?: SwitchLayoutGroupContext\n    isPresent: boolean\n    safeToRemove?: VoidFunction | null\n}\n\ntype MeasureProps = MotionProps &\n    MeasureContextProps & { visualElement: VisualElement }\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false\n\nclass MeasureLayoutWithContext extends Component<MeasureProps> {\n    /**\n     * This only mounts projection nodes for components that\n     * need measuring, we might want to do it for all components\n     * in order to incorporate transforms\n     */\n    componentDidMount() {\n        const { visualElement, layoutGroup, switchLayoutGroup, layoutId } =\n            this.props\n        const { projection } = visualElement\n\n        if (projection) {\n            if (layoutGroup.group) layoutGroup.group.add(projection)\n\n            if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n                switchLayoutGroup.register(projection)\n            }\n\n            if (hasTakenAnySnapshot) {\n                projection.root!.didUpdate()\n            }\n\n            projection.addEventListener(\"animationComplete\", () => {\n                this.safeToRemove()\n            })\n            projection.setOptions({\n                ...projection.options,\n                layoutDependency: this.props.layoutDependency,\n                onExitComplete: () => this.safeToRemove(),\n            })\n        }\n\n        globalProjectionState.hasEverUpdated = true\n    }\n\n    getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n        const { layoutDependency, visualElement, drag, isPresent } = this.props\n        const { projection } = visualElement\n\n        if (!projection) return null\n\n        /**\n         * TODO: We use this data in relegate to determine whether to\n         * promote a previous element. There's no guarantee its presence data\n         * will have updated by this point - if a bug like this arises it will\n         * have to be that we markForRelegation and then find a new lead some other way,\n         * perhaps in didUpdate\n         */\n        projection.isPresent = isPresent\n\n        if (prevProps.layoutDependency !== layoutDependency) {\n            projection.setOptions({\n                ...projection.options,\n                layoutDependency,\n            })\n        }\n\n        hasTakenAnySnapshot = true\n\n        if (\n            drag ||\n            prevProps.layoutDependency !== layoutDependency ||\n            layoutDependency === undefined ||\n            prevProps.isPresent !== isPresent\n        ) {\n            projection.willUpdate()\n        } else {\n            this.safeToRemove()\n        }\n\n        if (prevProps.isPresent !== isPresent) {\n            if (isPresent) {\n                projection.promote()\n            } else if (!projection.relegate()) {\n                /**\n                 * If there's another stack member taking over from this one,\n                 * it's in charge of the exit animation and therefore should\n                 * be in charge of the safe to remove. Otherwise we call it here.\n                 */\n                frame.postRender(() => {\n                    const stack = projection.getStack()\n                    if (!stack || !stack.members.length) {\n                        this.safeToRemove()\n                    }\n                })\n            }\n        }\n\n        return null\n    }\n\n    componentDidUpdate() {\n        const { projection } = this.props.visualElement\n        if (projection) {\n            projection.root!.didUpdate()\n\n            microtask.postRender(() => {\n                if (!projection.currentAnimation && projection.isLead()) {\n                    this.safeToRemove()\n                }\n            })\n        }\n    }\n\n    componentWillUnmount() {\n        const {\n            visualElement,\n            layoutGroup,\n            switchLayoutGroup: promoteContext,\n        } = this.props\n        const { projection } = visualElement\n\n        hasTakenAnySnapshot = true\n\n        if (projection) {\n            projection.scheduleCheckAfterUnmount()\n            if (layoutGroup && layoutGroup.group)\n                layoutGroup.group.remove(projection)\n            if (promoteContext && promoteContext.deregister)\n                promoteContext.deregister(projection)\n        }\n    }\n\n    safeToRemove() {\n        const { safeToRemove } = this.props\n        safeToRemove && safeToRemove()\n    }\n\n    render() {\n        return null\n    }\n}\n\nexport function MeasureLayout(\n    props: MotionProps & { visualElement: VisualElement }\n) {\n    const [isPresent, safeToRemove] = usePresence()\n    const layoutGroup = useContext(LayoutGroupContext)\n\n    return (\n        <MeasureLayoutWithContext\n            {...props}\n            layoutGroup={layoutGroup}\n            switchLayoutGroup={useContext(SwitchLayoutGroupContext)}\n            isPresent={isPresent}\n            safeToRemove={safeToRemove}\n        />\n    )\n}\n", "import { DragGesture } from \"../../gestures/drag\"\nimport { PanGesture } from \"../../gestures/pan\"\nimport { HTMLProjectionNode } from \"../../projection\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const drag: FeaturePackages = {\n    pan: {\n        Feature: PanGesture,\n    },\n    drag: {\n        Feature: DragGesture,\n        ProjectionNode: HTMLProjectionNode,\n        MeasureLayout,\n    },\n}\n", "import { Feature, frame, hover, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handleHoverEvent(\n    node: VisualElement<Element>,\n    event: PointerEvent,\n    lifecycle: \"Start\" | \"End\"\n) {\n    const { props } = node\n\n    if (node.animationState && props.whileHover) {\n        node.animationState.setActive(\"whileHover\", lifecycle === \"Start\")\n    }\n\n    const eventName = (\"onHover\" + lifecycle) as \"onHoverStart\" | \"onHoverEnd\"\n    const callback = props[eventName]\n    if (callback) {\n        frame.postRender(() => callback(event, extractEventInfo(event)))\n    }\n}\n\nexport class HoverGesture extends Feature<Element> {\n    mount() {\n        const { current } = this.node\n        if (!current) return\n\n        this.unmount = hover(current, (_element, startEvent) => {\n            handleHoverEvent(this.node, startEvent, \"Start\")\n\n            return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\")\n        })\n    }\n\n    unmount() {}\n}\n", "import { Feature, addDomEvent } from \"motion-dom\"\nimport { pipe } from \"motion-utils\"\n\nexport class FocusGesture extends Feature<Element> {\n    private isActive = false\n\n    onFocus() {\n        let isFocusVisible = false\n\n        /**\n         * If this element doesn't match focus-visible then don't\n         * apply whileHover. But, if matches throws that focus-visible\n         * is not a valid selector then in that browser outline styles will be applied\n         * to the element by default and we want to match that behaviour with whileFocus.\n         */\n        try {\n            isFocusVisible = this.node.current!.matches(\":focus-visible\")\n        } catch (e) {\n            isFocusVisible = true\n        }\n\n        if (!isFocusVisible || !this.node.animationState) return\n\n        this.node.animationState.setActive(\"whileFocus\", true)\n        this.isActive = true\n    }\n\n    onBlur() {\n        if (!this.isActive || !this.node.animationState) return\n        this.node.animationState.setActive(\"whileFocus\", false)\n        this.isActive = false\n    }\n\n    mount() {\n        this.unmount = pipe(\n            addDomEvent(this.node.current!, \"focus\", () => this.onFocus()),\n            addDomEvent(this.node.current!, \"blur\", () => this.onBlur())\n        ) as VoidFunction\n    }\n\n    unmount() {}\n}\n", "import { Feature, frame, press, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handlePressEvent(\n    node: VisualElement<Element>,\n    event: PointerEvent,\n    lifecycle: \"Start\" | \"End\" | \"Cancel\"\n) {\n    const { props } = node\n\n    if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n        return\n    }\n\n    if (node.animationState && props.whileTap) {\n        node.animationState.setActive(\"whileTap\", lifecycle === \"Start\")\n    }\n\n    const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle)) as\n        | \"onTapStart\"\n        | \"onTap\"\n        | \"onTapCancel\"\n\n    const callback = props[eventName]\n    if (callback) {\n        frame.postRender(() => callback(event, extractEventInfo(event)))\n    }\n}\n\nexport class PressGesture extends Feature<Element> {\n    mount() {\n        const { current } = this.node\n        if (!current) return\n\n        const { globalTapTarget, propagate } = this.node.props\n\n        this.unmount = press(\n            current,\n            (_element, startEvent) => {\n                handlePressEvent(this.node, startEvent, \"Start\")\n\n                return (endEvent, { success }) =>\n                    handlePressEvent(\n                        this.node,\n                        endEvent,\n                        success ? \"End\" : \"Cancel\"\n                    )\n            },\n            {\n                useGlobalTarget: globalTapTarget,\n                stopPropagation: propagate?.tap === false,\n            }\n        )\n    }\n\n    unmount() {}\n}\n", "type IntersectionHandler = (entry: IntersectionObserverEntry) => void\n\ninterface ElementIntersectionObservers {\n    [key: string]: IntersectionObserver\n}\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap<Element, IntersectionHandler>()\n\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap<\n    Element | Document,\n    ElementIntersectionObservers\n>()\n\nconst fireObserverCallback = (entry: IntersectionObserverEntry) => {\n    const callback = observerCallbacks.get(entry.target)\n    callback && callback(entry)\n}\n\nconst fireAllObserverCallbacks: IntersectionObserverCallback = (entries) => {\n    entries.forEach(fireObserverCallback)\n}\n\nfunction initIntersectionObserver({\n    root,\n    ...options\n}: IntersectionObserverInit): IntersectionObserver {\n    const lookupRoot = root || document\n\n    /**\n     * If we don't have an observer lookup map for this root, create one.\n     */\n    if (!observers.has(lookupRoot)) {\n        observers.set(lookupRoot, {})\n    }\n    const rootObservers = observers.get(lookupRoot)!\n\n    const key = JSON.stringify(options)\n\n    /**\n     * If we don't have an observer for this combination of root and settings,\n     * create one.\n     */\n    if (!rootObservers[key]) {\n        rootObservers[key] = new IntersectionObserver(\n            fireAllObserverCallbacks,\n            { root, ...options }\n        )\n    }\n\n    return rootObservers[key]\n}\n\nexport function observeIntersection(\n    element: Element,\n    options: IntersectionObserverInit,\n    callback: IntersectionHandler\n) {\n    const rootInteresectionObserver = initIntersectionObserver(options)\n\n    observerCallbacks.set(element, callback)\n    rootInteresectionObserver.observe(element)\n\n    return () => {\n        observerCallbacks.delete(element)\n        rootInteresectionObserver.unobserve(element)\n    }\n}\n", "import { Feature } from \"motion-dom\"\nimport { MotionProps } from \"../../types\"\nimport { observeIntersection } from \"./observers\"\n\nconst thresholdNames = {\n    some: 0,\n    all: 1,\n}\n\nexport class InViewFeature extends Feature<Element> {\n    private hasEnteredView = false\n\n    private isInView = false\n\n    private startObserver() {\n        this.unmount()\n\n        const { viewport = {} } = this.node.getProps()\n        const { root, margin: rootMargin, amount = \"some\", once } = viewport\n\n        const options = {\n            root: root ? root.current : undefined,\n            rootMargin,\n            threshold:\n                typeof amount === \"number\" ? amount : thresholdNames[amount],\n        }\n\n        const onIntersectionUpdate = (entry: IntersectionObserverEntry) => {\n            const { isIntersecting } = entry\n\n            /**\n             * If there's been no change in the viewport state, early return.\n             */\n            if (this.isInView === isIntersecting) return\n\n            this.isInView = isIntersecting\n\n            /**\n             * Handle hasEnteredView. If this is only meant to run once, and\n             * element isn't visible, early return. Otherwise set hasEnteredView to true.\n             */\n            if (once && !isIntersecting && this.hasEnteredView) {\n                return\n            } else if (isIntersecting) {\n                this.hasEnteredView = true\n            }\n\n            if (this.node.animationState) {\n                this.node.animationState.setActive(\n                    \"whileInView\",\n                    isIntersecting\n                )\n            }\n\n            /**\n             * Use the latest committed props rather than the ones in scope\n             * when this observer is created\n             */\n            const { onViewportEnter, onViewportLeave } = this.node.getProps()\n            const callback = isIntersecting ? onViewportEnter : onViewportLeave\n            callback && callback(entry)\n        }\n\n        return observeIntersection(\n            this.node.current!,\n            options,\n            onIntersectionUpdate\n        )\n    }\n\n    mount() {\n        this.startObserver()\n    }\n\n    update() {\n        if (typeof IntersectionObserver === \"undefined\") return\n\n        const { props, prevProps } = this.node\n        const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(\n            hasViewportOptionChanged(props, prevProps)\n        )\n\n        if (hasOptionsChanged) {\n            this.startObserver()\n        }\n    }\n\n    unmount() {}\n}\n\nfunction hasViewportOptionChanged(\n    { viewport = {} }: MotionProps,\n    { viewport: prevViewport = {} }: MotionProps = {}\n) {\n    return (name: keyof typeof viewport) =>\n        viewport[name] !== prevViewport[name]\n}\n", "import { HoverGesture } from \"../../gestures/hover\"\nimport { FocusGesture } from \"../../gestures/focus\"\nimport { PressGesture } from \"../../gestures/press\"\nimport { InViewFeature } from \"./viewport\"\nimport { FeaturePackages } from \"./types\"\n\nexport const gestureAnimations: FeaturePackages = {\n    inView: {\n        Feature: InViewFeature,\n    },\n    tap: {\n        Feature: PressGesture,\n    },\n    focus: {\n        Feature: FocusGesture,\n    },\n    hover: {\n        Feature: HoverGesture,\n    },\n}\n", "import { HTMLProjectionNode } from \"motion-dom\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const layout: FeaturePackages = {\n    layout: {\n        ProjectionNode: HTMLProjectionNode,\n        MeasureLayout,\n    },\n}\n", "import { animations } from \"../../../motion/features/animations\"\nimport { drag } from \"../../../motion/features/drag\"\nimport { gestureAnimations } from \"../../../motion/features/gestures\"\nimport { layout } from \"../../../motion/features/layout\"\n\nexport const featureBundle = {\n    ...animations,\n    ...gestureAnimations,\n    ...drag,\n    ...layout,\n}\n", "import { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { createMotionProxy } from \"../create-proxy\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport const motion = /*@__PURE__*/ createMotionProxy(\n    featureBundle,\n    createDomVisualElement\n)\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAYA,UAAI,MAAuC;AACzC,SAAC,WAAW;AAEJ;AAGV,cACE,OAAO,mCAAmC,eAC1C,OAAO,+BAA+B,gCACpC,YACF;AACA,2CAA+B,4BAA4B,IAAI,MAAM,CAAC;AAAA,UACxE;AACU,cAAI,eAAe;AAI7B,cAAI,iBAAiB;AACrB,cAAI,qBAAqB;AACzB,cAAI,0BA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F,CACF,CACF,CACF,GAEA,+BAAAA,QAAA,cAAC,OAAO,QAAP,EAAc,OAAO,OAAO,QAAS,GAAG,UACvC,+BAAAA,QAAA,cAAC,WAAE,UAAQ,oBAAI,KAAK,GAAE,YAAY,GAAE,iCAA+B,GACnE,+BAAAA,QAAA,cAAC,OAAE,OAAO,EAAC,WAAW,SAAQ,KAC5B,+BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,OAAO;AAAA,YACL,OAAO;AAAA,YACP,gBAAgB;AAAA,YAChB,UAAU;AAAA,YACV,YAAY;AAAA,UACd;AAAA,UACA,aAAa,CAAC,MAAM,EAAE,OAAO,MAAM,QAAQ;AAAA,UAC3C,YAAY,CAAC,MAAM,EAAE,OAAO,MAAM,QAAQ;AAAA;AAAA,QAC3C;AAAA,MAED,CACF,CACF,CACF;AAAA,IAEJ;AAAA,EACF;AAEA,SAAO,kBAAkB,OAAO,kBAAkB,OAAO,kBAAkB,CAAC;AAC5E,SAAO,gBAAgB,eAAe;;;AD1sCtC,IAAE,aAAa,EAAE,KAAK,CAAC,GAAG,WAAW;AACpC,UAAM,aAAa,EAAE,MAAM,EAAE,KAAK,aAAa,KAAK,CAAC;AACrD,QAAI,UAAU,OAAO,gBAAgB,EAAE,MAAM,EAAE,KAAK,UAAU,CAAC;AAC/D,mBAAAG,QAAS,WAAW,MAAM,EAAE,OAAO,+BAAAC,QAAA,cAAC,WAAQ,YAA0B,CAAE;AAAA,EACzE,CAAC;",
  "names": ["ReactDebugCurrentFrame", "Component", "self", "createElement", "createContext", "moduleObject", "error", "forwardRef", "memo", "useContext", "useRef", "useEffect", "useInsertionEffect", "useLayoutEffect", "useCallback", "useMemo", "useId", "frame", "location", "returnValue", "initialTime", "startTime", "delay", "React", "ReactDebugCurrentFrame", "Fragment", "prefix", "sanitizeURL", "frame", "Component", "workInProgress", "get", "set", "isHydrating", "options", "style", "registrationNameDependencies", "possibleRegistrationNames", "error", "callCallback", "current", "now", "root", "index", "renderLanes", "queuedEvent", "prefixes", "noop", "createElement", "location", "has", "id", "number", "updateFragment", "child", "reconcileChildFibers", "row", "error$1", "render", "subtreeRenderLanes", "hasContextChanged", "commitTime", "shouldFireAfterActiveInstanceBlur", "hydrate", "currentHook", "ReactCurrentDispatcher", "warnOnce", "setStyle", "delay", "Swal", "globalState", "error", "rejectPromise", "e", "React", "ReactDebugCurrentFrame", "frame", "Component", "location", "self", "jsx", "jsxs", "import_react", "import_client", "import_react", "React", "index", "index2", "import_react", "import_react_dom", "React", "id", "import_react", "import_react_dom", "React", "products", "id", "row", "CONSTANTS", "products", "product_models", "users", "coupon_product_relations", "number", "now", "shipmentItems", "orders", "advances", "couponRelations", "price", "success", "errors", "stockAndPackageQtyMessages", "updateStockAndPackageQtySqlObjs", "quantity", "couponModel", "createdBy", "giftProductModels", "couponBuyAndGiftProducts", "couponBuyAndGiftProductModels", "order", "id", "coupon_product_relations", "CONSTANTS", "products", "product_models", "giftOrders", "buyOrder", "giftCount", "createdBy", "quantity", "row", "import_react", "ease", "frameData", "process", "alpha", "alpha", "alphaType", "alpha", "alphaType", "alpha", "progress", "color", "mixNumber", "mixNumberImmediate", "mixNumberImmediate", "scale", "progress", "undampedFreq", "progress", "keyframes", "spring", "createSpring", "ease", "ease", "keyframes", "percent", "motionValue", "keyframesGenerator", "keyframes", "delay", "progress", "now", "keyframes", "motionValue", "keyframes", "delay", "ease", "keyframes", "delay", "motionValue", "keyframes", "motionValue", "delay", "keyframes", "motionValue", "KeyframeResolver", "DefaultKeyframeResolver", "keyframes", "isNotNull", "getFinalKeyframe", "keyframes", "delay", "getFinalKeyframe", "delay", "animations", "delay", "animations", "animations", "number", "v", "getAnimatableNone", "getAnimatableNone", "motionValue", "acceleratedValues", "isBrowser", "now", "checkIsControllingVariants", "checkIsVariantNode", "acceleratedValues", "keyframes", "ease", "getAnimatableNone", "transformPoint", "scale", "scaleX", "scaleY", "scale", "distance", "transformPoint", "rootProjectionNode", "hasTransform", "layout", "getComputedStyle", "isSVGTag", "scrapeMotionValuesFromProps", "scrapeHTMLMotionValuesFromProps", "scrapeMotionValuesFromProps", "context", "animations", "motionValue", "layout", "scale", "rotate", "progress", "calcProgress", "keyframes", "motionValue", "createMotionValue", "layout", "now", "notifyAll", "progress", "id", "featureDefinitions", "Component", "Component", "Component", "scrapeMotionValuesFromProps", "scrapeMotionValuesFromProps", "Component", "createProjectionNode", "layout", "drag", "Component", "MeasureLayout", "featureDefinitions", "drag", "layout", "Component", "Component", "id", "event", "info", "point", "timestamp", "time", "calcProgress", "layout", "drag", "isDragging", "layout", "inertia", "motionValue", "drag", "Feature", "React", "React", "Swal", "Feature", "ReactDOM", "React"]
}
