{
  "version": 3,
  "sources": ["../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react.production.js", "../../node_modules/.pnpm/react@19.3.1/node_modules/react/index.js", "../../node_modules/.pnpm/scheduler@0.28.0/node_modules/scheduler/cjs/scheduler.production.js", "../../node_modules/.pnpm/scheduler@0.28.0/node_modules/scheduler/index.js", "../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/cjs/react-dom.production.js", "../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/index.js", "../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/cjs/react-dom-client.production.js", "../../node_modules/.pnpm/react-dom@19.3.1_react@19.3.1/node_modules/react-dom/client.js", "../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js", "../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.1/node_modules/use-sync-external-store/with-selector.js", "../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react-jsx-runtime.production.js", "../../node_modules/.pnpm/react@19.3.1/node_modules/react/jsx-runtime.js", "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js", "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js", "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js", "../../node_modules/.pnpm/react-side-effect@2.1.2_react@19.3.1/node_modules/react-side-effect/lib/index.js", "../../node_modules/.pnpm/react-fast-compare@3.2.2/node_modules/react-fast-compare/index.js", "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js", "../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/lodash.js", "../../src/client/index.tsx", "../../node_modules/.pnpm/react-router@7.18.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-router/dist/development/chunk-6KYCQHYJ.mjs", "../../node_modules/.pnpm/react-router@7.18.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-router/dist/development/index.mjs", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/react-is.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/warning.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/verifySubselectors.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/selectorFactory.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/bindActionCreators.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/isPlainObject.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/verifyPlainObject.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/wrapMapToProps.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/invalidArgFactory.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/mapDispatchToProps.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/mapStateToProps.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/connect/mergeProps.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/batch.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/Subscription.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/useIsomorphicLayoutEffect.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/shallowEqual.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/utils/hoistStatics.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/components/Context.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/components/connect.tsx", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/components/Provider.tsx", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/hooks/useReduxContext.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/hooks/useStore.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/hooks/useDispatch.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/hooks/useSelector.ts", "../../node_modules/.pnpm/react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1/node_modules/react-redux/src/exports.ts", "../../src/styled/common.tsx", "../../src/component/Theme.tsx", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/formatProdErrorMessage.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/symbol-observable.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/actionTypes.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/isPlainObject.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/kindOf.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/createStore.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/warning.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/combineReducers.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/bindActionCreators.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/compose.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/applyMiddleware.ts", "../../node_modules/.pnpm/redux@5.0.1/node_modules/redux/src/utils/isAction.ts", "../../node_modules/.pnpm/redux-thunk@3.1.0_redux@5.0.1/node_modules/redux-thunk/dist/redux-thunk.mjs", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/createDraftSafeSelector.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/devtoolsExtension.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/tsHelpers.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/createAction.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/actionCreatorInvariantMiddleware.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/utils.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/immutableStateInvariantMiddleware.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/serializableStateInvariantMiddleware.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/getDefaultMiddleware.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/autoBatchEnhancer.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/getDefaultEnhancers.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/configureStore.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/mapBuilders.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/createReducer.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/matchers.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/nanoid.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/createAsyncThunk.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/createSlice.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/entity_state.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/state_selectors.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/state_adapter.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/utils.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/unsorted_state_adapter.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/sorted_state_adapter.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/entities/create_adapter.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/listenerMiddleware/exceptions.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/listenerMiddleware/utils.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/listenerMiddleware/task.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/listenerMiddleware/index.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/dynamicMiddleware/index.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/combineSlices.ts", "../../node_modules/.pnpm/@reduxjs+toolkit@2.13.0_react-redux@9.3.1_@types+react@19.3.0_react@19.3.1_redux@5.0.1__react@19.3.1/node_modules/@reduxjs/toolkit/src/formatProdErrorMessage.ts", "../../src/store/constants.ts", "../../src/reducers/home.ts", "../../src/reducers/photo.ts", "../../src/reducers/index.ts", "../../src/store/index.ts", "../../src/containers/Home.tsx", "../../src/component/Layout.tsx", "../../src/styled/stx.tsx", "../../src/styled/component/layout.tsx", "../../src/component/Loading.tsx", "../../node_modules/.pnpm/react-helmet@6.1.0_react@19.3.1/node_modules/react-helmet/es/Helmet.js", "../../src/utils/usePreserveSSR.ts", "../../src/utils/index.ts", "../../src/services/suspense.ts", "../../src/component/FeatureIcons.tsx", "../../src/styled/home.tsx", "../../src/containers/Login.tsx", "../../src/styled/component/header.tsx", "../../src/component/Header.tsx", "../../src/containers/Photo.tsx", "../../src/styled/photo.tsx", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/use-constant.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/is-browser.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/use-isomorphic-effect.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/PresenceContext.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/array.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/clamp.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/errors.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/global-config.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/is-numerical-string.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/is-object.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/is-zero-value-string.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/memo.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/noop.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/pipe.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/progress.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/subscription-manager.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/time-conversion.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/velocity-per-second.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/cubic-bezier.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/modifiers/mirror.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/modifiers/reverse.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/back.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/anticipate.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/circ.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/ease.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/utils/is-easing-array.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/utils/is-bezier-definition.ts", "../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/src/easing/utils/map.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/order.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/render-step.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/batcher.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/frame.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/sync-time.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/is-css-variable.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/numbers/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/sanitize.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/float-regex.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/is-nullish.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/single-color-regex.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/utils.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/rgba.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/hex.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/numbers/units.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/hsla.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/color-regex.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/complex/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/color/hsla-to-rgba.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/immediate.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/number.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/color.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/visibility.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/complex.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/mix/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/drivers/frame.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/utils/linear.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/utils/calc-duration.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/utils/create-generator-easing.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/spring.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/utils/velocity.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/inertia.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/interpolate.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/offsets/fill.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/offsets/default.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/offsets/time.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/keyframes.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/get-final.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/replace-transition-type.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/WithPromise.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/JSAnimation.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/utils/fill-wildcards.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/dom/parse-transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/keys-transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/utils/unit-conversion.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/KeyframesResolver.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/dom/is-css-var.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/dom/style-set.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/supports/flags.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/supports/memo.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/supports/scroll-timeline.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/supports/linear-easing.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/easing/cubic-bezier.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/easing/supported.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/easing/map-easing.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/start-waapi-animation.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/generators/utils/is-generator.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/utils/apply-generator.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/NativeAnimation.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/utils/unsupported-easing.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/NativeAnimationExtended.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/is-animatable.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/can-animate.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/make-animation-instant.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/utils/accelerated-values.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/utils/is-browser-color.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/waapi/supports/waapi.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/AsyncMotionValueAnimation.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/calc-child-stagger.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/resolve-transition.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/get-value-transition.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/default-transitions.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/is-transition-defined.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/interfaces/motion-value.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/utils/css-variables-conversion.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/resolve-variants.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/resolve-dynamic-variants.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/keys-position.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/is-keyframes-target.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/setters.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/utils/is-motion-value.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/will-change/is.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/will-change/add-will-change.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/dom/utils/camel-to-dash.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/optimized-appear/data-id.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/optimized-appear/get-appear-id.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/interfaces/visual-element-target.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/interfaces/visual-element-variant.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/interfaces/visual-element.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/auto.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/test.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/dimensions.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/utils/is-none.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/complex/filter.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/complex/mask.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/int.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/maps/transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/maps/number.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/maps/defaults.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/animatable-none.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/utils/make-none-animatable.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/keyframes/DOMKeyframesResolver.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/border-radius.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/resolve-elements.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/get-as-type.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/is-html-element.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/frameloop/microtask.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/drag/state/is-active.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/drag/state/set-active.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/utils/setup.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/hover.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/utils/is-node-or-child.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/utils/is-primary-pointer.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/press/utils/is-keyboard-accessible.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/press/utils/state.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/press/utils/keyboard.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/gestures/press/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/is-svg-element.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/resize/handle-element.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/resize/handle-window.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/resize/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/stats/buffer.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/is-svg-svg-element.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/types/utils/find.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/models.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/store.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/is-animation-controls.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/is-variant-label.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/variant-props.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/is-controlling-variants.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/motion-values.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/reduced-motion/state.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/reduced-motion/index.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/VisualElement.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/dom/DOMVisualElement.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/Feature.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/conversion.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/utils/has-transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/delta-apply.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/utils/measure.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/html/utils/build-transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/html/utils/build-styles.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/html/utils/render.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/styles/scale-border-radius.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/styles/scale-box-shadow.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/styles/scale-correction.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/is-forced-motion-value.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/html/utils/scrape-motion-values.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/html/HTMLVisualElement.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/path.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/build-attrs.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/camel-case-attrs.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/is-svg-tag.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/render.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/utils/scrape-motion-values.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/svg/SVGVisualElement.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/get-variant-context.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/shallow-compare.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/render/utils/animation-state.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/copy.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/delta-calc.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/delta-remove.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/geometry/utils.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/utils/each-axis.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/styles/transform.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/animation/mix-values.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/animation/animate/single-value.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/events/add-dom-event.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/utils/compare-by-depth.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/utils/flat-tree.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/utils/delay.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/value/utils/resolve-motion-value.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/shared/stack.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/node/state.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/node/create-projection-node.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/node/DocumentProjectionNode.ts", "../../node_modules/.pnpm/motion-dom@12.43.0/node_modules/motion-dom/src/projection/node/HTMLProjectionNode.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/MotionConfigContext.tsx", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/components/AnimatePresence/use-presence.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/LazyContext.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/definitions.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/load-features.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/utils/valid-prop.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/dom/utils/filter-props.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/MotionContext/index.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/MotionContext/utils.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/context/MotionContext/create.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/html/utils/create-render-state.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/html/use-props.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/svg/utils/create-render-state.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/svg/use-props.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/svg/lowercase-elements.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/dom/utils/is-svg-component.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/dom/use-render.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/utils/use-visual-state.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/html/use-html-visual-state.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/svg/use-svg-visual-state.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/utils/symbol.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/utils/use-motion-ref.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/is-ref-object.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/utils/use-visual-element.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/index.tsx", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/components/create-proxy.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/dom/create-visual-element.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/animation/index.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/animation/exit.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/animations.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/events/event-info.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/events/add-pointer-event.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/get-context-window.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/utils/distance.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/pan/PanSession.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/drag/utils/constraints.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/drag/VisualElementDragControls.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/drag/index.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/pan/index.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/layout/MeasureLayout.tsx", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/drag.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/hover.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/focus.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/gestures/press.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/viewport/observers.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/viewport/index.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/gestures.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/motion/features/layout.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/components/motion/feature-bundle.ts", "../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.4.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/framer-motion/src/render/components/motion/proxy.ts", "../../src/utils/fetch.ts", "../../src/services/photo.ts", "../../src/services/home.ts", "../../src/Routers.tsx"],
  "sourcesContent": ["/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n  REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n  REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n  REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n  REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n  REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n  REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n  REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n  REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n  REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n  REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n  REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n  REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n  if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n  maybeIterable =\n    (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n    maybeIterable[\"@@iterator\"];\n  return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n    isMounted: function () {\n      return !1;\n    },\n    enqueueForceUpdate: function () {},\n    enqueueReplaceState: function () {},\n    enqueueSetState: function () {}\n  },\n  assign = Object.assign,\n  emptyObject = {};\nfunction Component(props, context, updater) {\n  this.props = props;\n  this.context = context;\n  this.refs = emptyObject;\n  this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n  if (\n    \"object\" !== typeof partialState &&\n    \"function\" !== typeof partialState &&\n    null != partialState\n  )\n    throw Error(\n      \"takes an object of state variables to update or a function which returns an object of state variables.\"\n    );\n  this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n  this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n  this.props = props;\n  this.context = context;\n  this.refs = emptyObject;\n  this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n  hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n  var refProp = props.ref;\n  return {\n    $$typeof: REACT_ELEMENT_TYPE,\n    type: type,\n    key: key,\n    ref: void 0 !== refProp ? refProp : null,\n    props: props\n  };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n  return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n  return (\n    \"object\" === typeof object &&\n    null !== object &&\n    object.$$typeof === REACT_ELEMENT_TYPE\n  );\n}\nfunction escape(key) {\n  var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n  return (\n    \"$\" +\n    key.replace(/[=:]/g, function (match) {\n      return escaperLookup[match];\n    })\n  );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n  return \"object\" === typeof element && null !== element && null != element.key\n    ? escape(\"\" + element.key)\n    : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n  switch (thenable.status) {\n    case \"fulfilled\":\n      return thenable.value;\n    case \"rejected\":\n      throw thenable.reason;\n    default:\n      switch (\n        (\"string\" === typeof thenable.status\n          ? thenable.then(noop, noop)\n          : ((thenable.status = \"pending\"),\n            thenable.then(\n              function (fulfilledValue) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"fulfilled\"),\n                  (thenable.value = fulfilledValue));\n              },\n              function (error) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"rejected\"), (thenable.reason = error));\n              }\n            )),\n        thenable.status)\n      ) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n      }\n  }\n  throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n  var type = typeof children;\n  if (\"undefined\" === type || \"boolean\" === type) children = null;\n  var invokeCallback = !1;\n  if (null === children) invokeCallback = !0;\n  else\n    switch (type) {\n      case \"bigint\":\n      case \"string\":\n      case \"number\":\n        invokeCallback = !0;\n        break;\n      case \"object\":\n        switch (children.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n          case REACT_PORTAL_TYPE:\n            invokeCallback = !0;\n            break;\n          case REACT_LAZY_TYPE:\n            return (\n              (invokeCallback = children._init),\n              mapIntoArray(\n                invokeCallback(children._payload),\n                array,\n                escapedPrefix,\n                nameSoFar,\n                callback\n              )\n            );\n        }\n    }\n  if (invokeCallback)\n    return (\n      (callback = callback(children)),\n      (invokeCallback =\n        \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n      isArrayImpl(callback)\n        ? ((escapedPrefix = \"\"),\n          null != invokeCallback &&\n            (escapedPrefix =\n              invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n          mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n            return c;\n          }))\n        : null != callback &&\n          (isValidElement(callback) &&\n            (callback = cloneAndReplaceKey(\n              callback,\n              escapedPrefix +\n                (null == callback.key ||\n                (children && children.key === callback.key)\n                  ? \"\"\n                  : (\"\" + callback.key).replace(\n                      userProvidedKeyEscapeRegex,\n                      \"$&/\"\n                    ) + \"/\") +\n                invokeCallback\n            )),\n          array.push(callback)),\n      1\n    );\n  invokeCallback = 0;\n  var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n  if (isArrayImpl(children))\n    for (var i = 0; i < children.length; i++)\n      (nameSoFar = children[i]),\n        (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n        (invokeCallback += mapIntoArray(\n          nameSoFar,\n          array,\n          escapedPrefix,\n          type,\n          callback\n        ));\n  else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n    for (\n      children = i.call(children), i = 0;\n      !(nameSoFar = children.next()).done;\n\n    )\n      (nameSoFar = nameSoFar.value),\n        (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n        (invokeCallback += mapIntoArray(\n          nameSoFar,\n          array,\n          escapedPrefix,\n          type,\n          callback\n        ));\n  else if (\"object\" === type) {\n    if (\"function\" === typeof children.then)\n      return mapIntoArray(\n        resolveThenable(children),\n        array,\n        escapedPrefix,\n        nameSoFar,\n        callback\n      );\n    array = String(children);\n    throw Error(\n      \"Objects are not valid as a React child (found: \" +\n        (\"[object Object]\" === array\n          ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n          : array) +\n        \"). If you meant to render a collection of children, use an array instead.\"\n    );\n  }\n  return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n  if (null == children) return children;\n  var result = [],\n    count = 0;\n  mapIntoArray(children, result, \"\", \"\", function (child) {\n    return func.call(context, child, count++);\n  });\n  return result;\n}\nfunction lazyInitializer(payload) {\n  if (-1 === payload._status) {\n    var ctor = payload._result,\n      thenable = ctor();\n    thenable.then(\n      function (moduleObject) {\n        if (0 === payload._status || -1 === payload._status)\n          (payload._status = 1),\n            (payload._result = moduleObject),\n            void 0 === thenable.status &&\n              ((thenable.status = \"fulfilled\"),\n              (thenable.value = moduleObject));\n      },\n      function (error) {\n        if (0 === payload._status || -1 === payload._status)\n          (payload._status = 2),\n            (payload._result = error),\n            void 0 === thenable.status &&\n              ((thenable.status = \"rejected\"), (thenable.reason = error));\n      }\n    );\n    -1 === payload._status &&\n      ((payload._status = 0), (payload._result = thenable));\n  }\n  if (1 === payload._status) return payload._result.default;\n  throw payload._result;\n}\nvar reportGlobalError =\n  \"function\" === typeof reportError\n    ? reportError\n    : function (error) {\n        if (\n          \"object\" === typeof window &&\n          \"function\" === typeof window.ErrorEvent\n        ) {\n          var event = new window.ErrorEvent(\"error\", {\n            bubbles: !0,\n            cancelable: !0,\n            message:\n              \"object\" === typeof error &&\n              null !== error &&\n              \"string\" === typeof error.message\n                ? String(error.message)\n                : String(error),\n            error: error\n          });\n          if (!window.dispatchEvent(event)) return;\n        } else if (\n          \"object\" === typeof process &&\n          \"function\" === typeof process.emit\n        ) {\n          process.emit(\"uncaughtException\", error);\n          return;\n        }\n        console.error(error);\n      };\nfunction startTransition(scope) {\n  var prevTransition = ReactSharedInternals.T,\n    currentTransition = {};\n  currentTransition.types =\n    null !== prevTransition ? prevTransition.types : null;\n  ReactSharedInternals.T = currentTransition;\n  try {\n    var returnValue = scope(),\n      onStartTransitionFinish = ReactSharedInternals.S;\n    null !== onStartTransitionFinish &&\n      onStartTransitionFinish(currentTransition, returnValue);\n    \"object\" === typeof returnValue &&\n      null !== returnValue &&\n      \"function\" === typeof returnValue.then &&\n      returnValue.then(noop, reportGlobalError);\n  } catch (error) {\n    reportGlobalError(error);\n  } finally {\n    null !== prevTransition &&\n      null !== currentTransition.types &&\n      (prevTransition.types = currentTransition.types),\n      (ReactSharedInternals.T = prevTransition);\n  }\n}\nfunction addTransitionType(type) {\n  var transition = ReactSharedInternals.T;\n  if (null !== transition) {\n    var transitionTypes = transition.types;\n    null === transitionTypes\n      ? (transition.types = [type])\n      : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n  } else startTransition(addTransitionType.bind(null, type));\n}\nvar Children = {\n  map: mapChildren,\n  forEach: function (children, forEachFunc, forEachContext) {\n    mapChildren(\n      children,\n      function () {\n        forEachFunc.apply(this, arguments);\n      },\n      forEachContext\n    );\n  },\n  count: function (children) {\n    var n = 0;\n    mapChildren(children, function () {\n      n++;\n    });\n    return n;\n  },\n  toArray: function (children) {\n    return (\n      mapChildren(children, function (child) {\n        return child;\n      }) || []\n    );\n  },\n  only: function (children) {\n    if (!isValidElement(children))\n      throw Error(\n        \"React.Children.only expected to receive a single React element child.\"\n      );\n    return children;\n  }\n};\nexports.Activity = REACT_ACTIVITY_TYPE;\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.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n  ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n  __proto__: null,\n  c: function (size) {\n    return ReactSharedInternals.H.useMemoCache(size);\n  }\n};\nexports.addTransitionType = addTransitionType;\nexports.cache = function (fn) {\n  return function () {\n    return fn.apply(null, arguments);\n  };\n};\nexports.cacheSignal = function () {\n  return null;\n};\nexports.cloneElement = function (element, config, children) {\n  if (null === element || void 0 === element)\n    throw Error(\n      \"The argument must be a React element, but you passed \" + element + \".\"\n    );\n  var props = assign({}, element.props),\n    key = element.key;\n  if (null != config)\n    for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n      !hasOwnProperty.call(config, propName) ||\n        \"key\" === propName ||\n        \"__self\" === propName ||\n        \"__source\" === propName ||\n        (\"ref\" === propName && void 0 === config.ref) ||\n        (props[propName] = config[propName]);\n  var propName = arguments.length - 2;\n  if (1 === propName) props.children = children;\n  else if (1 < propName) {\n    for (var childArray = Array(propName), i = 0; i < propName; i++)\n      childArray[i] = arguments[i + 2];\n    props.children = childArray;\n  }\n  return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n  defaultValue = {\n    $$typeof: REACT_CONTEXT_TYPE,\n    _currentValue: defaultValue,\n    _currentValue2: defaultValue,\n    _threadCount: 0,\n    Provider: null,\n    Consumer: null\n  };\n  defaultValue.Provider = defaultValue;\n  defaultValue.Consumer = {\n    $$typeof: REACT_CONSUMER_TYPE,\n    _context: defaultValue\n  };\n  return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n  var propName,\n    props = {},\n    key = null;\n  if (null != config)\n    for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n      hasOwnProperty.call(config, propName) &&\n        \"key\" !== propName &&\n        \"__self\" !== propName &&\n        \"__source\" !== propName &&\n        (props[propName] = config[propName]);\n  var childrenLength = arguments.length - 2;\n  if (1 === childrenLength) props.children = children;\n  else if (1 < childrenLength) {\n    for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n      childArray[i] = arguments[i + 2];\n    props.children = childArray;\n  }\n  if (type && type.defaultProps)\n    for (propName in ((childrenLength = type.defaultProps), childrenLength))\n      void 0 === props[propName] &&\n        (props[propName] = childrenLength[propName]);\n  return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n  return { current: null };\n};\nexports.forwardRef = function (render) {\n  return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n  return {\n    $$typeof: REACT_LAZY_TYPE,\n    _payload: { _status: -1, _result: ctor },\n    _init: lazyInitializer\n  };\n};\nexports.memo = function (type, compare) {\n  return {\n    $$typeof: REACT_MEMO_TYPE,\n    type: type,\n    compare: void 0 === compare ? null : compare\n  };\n};\nexports.startTransition = startTransition;\nexports.unstable_useCacheRefresh = function () {\n  return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n  return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n  return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n  return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n  return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n  return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n  return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n  return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n  return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n  return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n  return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n  return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n  return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n  return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n  return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n  return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n  return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n  subscribe,\n  getSnapshot,\n  getServerSnapshot\n) {\n  return ReactSharedInternals.H.useSyncExternalStore(\n    subscribe,\n    getSnapshot,\n    getServerSnapshot\n  );\n};\nexports.useTransition = function () {\n  return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.3.1\";\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n", "/**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nfunction push(heap, node) {\n  var index = heap.length;\n  heap.push(node);\n  a: for (; 0 < index; ) {\n    var parentIndex = (index - 1) >>> 1,\n      parent = heap[parentIndex];\n    if (0 < compare(parent, node))\n      (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);\n    else break a;\n  }\n}\nfunction peek(heap) {\n  return 0 === heap.length ? null : heap[0];\n}\nfunction pop(heap) {\n  if (0 === heap.length) return null;\n  var first = heap[0],\n    last = heap.pop();\n  if (last !== first) {\n    heap[0] = last;\n    a: for (\n      var index = 0, length = heap.length, halfLength = length >>> 1;\n      index < halfLength;\n\n    ) {\n      var leftIndex = 2 * (index + 1) - 1,\n        left = heap[leftIndex],\n        rightIndex = leftIndex + 1,\n        right = heap[rightIndex];\n      if (0 > compare(left, last))\n        rightIndex < length && 0 > compare(right, left)\n          ? ((heap[index] = right),\n            (heap[rightIndex] = last),\n            (index = rightIndex))\n          : ((heap[index] = left),\n            (heap[leftIndex] = last),\n            (index = leftIndex));\n      else if (rightIndex < length && 0 > compare(right, last))\n        (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);\n      else break a;\n    }\n  }\n  return first;\n}\nfunction compare(a, b) {\n  var diff = a.sortIndex - b.sortIndex;\n  return 0 !== diff ? diff : a.id - b.id;\n}\nexports.unstable_now = void 0;\nif (\"object\" === typeof performance && \"function\" === typeof performance.now) {\n  var localPerformance = performance;\n  exports.unstable_now = function () {\n    return localPerformance.now();\n  };\n} else {\n  var localDate = Date,\n    initialTime = localDate.now();\n  exports.unstable_now = function () {\n    return localDate.now() - initialTime;\n  };\n}\nvar taskQueue = [],\n  timerQueue = [],\n  taskIdCounter = 1,\n  currentTask = null,\n  currentPriorityLevel = 3,\n  isPerformingWork = !1,\n  isHostCallbackScheduled = !1,\n  isHostTimeoutScheduled = !1,\n  needsPaint = !1,\n  localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n  localClearTimeout = \"function\" === typeof clearTimeout ? clearTimeout : null,\n  localSetImmediate = \"undefined\" !== typeof setImmediate ? setImmediate : null;\nfunction advanceTimers(currentTime) {\n  for (var timer = peek(timerQueue); null !== timer; ) {\n    if (null === timer.callback) pop(timerQueue);\n    else if (timer.startTime <= currentTime)\n      pop(timerQueue),\n        (timer.sortIndex = timer.expirationTime),\n        push(taskQueue, timer);\n    else break;\n    timer = peek(timerQueue);\n  }\n}\nfunction handleTimeout(currentTime) {\n  isHostTimeoutScheduled = !1;\n  advanceTimers(currentTime);\n  if (!isHostCallbackScheduled)\n    if (null !== peek(taskQueue))\n      (isHostCallbackScheduled = !0),\n        isMessageLoopRunning ||\n          ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n    else {\n      var firstTimer = peek(timerQueue);\n      null !== firstTimer &&\n        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n    }\n}\nvar isMessageLoopRunning = !1,\n  taskTimeoutID = -1,\n  frameInterval = 5,\n  startTime = -1;\nfunction shouldYieldToHost() {\n  return needsPaint\n    ? !0\n    : exports.unstable_now() - startTime < frameInterval\n      ? !1\n      : !0;\n}\nfunction performWorkUntilDeadline() {\n  needsPaint = !1;\n  if (isMessageLoopRunning) {\n    var currentTime = exports.unstable_now();\n    startTime = currentTime;\n    var hasMoreWork = !0;\n    try {\n      a: {\n        isHostCallbackScheduled = !1;\n        isHostTimeoutScheduled &&\n          ((isHostTimeoutScheduled = !1),\n          localClearTimeout(taskTimeoutID),\n          (taskTimeoutID = -1));\n        isPerformingWork = !0;\n        var previousPriorityLevel = currentPriorityLevel;\n        try {\n          b: {\n            advanceTimers(currentTime);\n            for (\n              currentTask = peek(taskQueue);\n              null !== currentTask &&\n              !(\n                currentTask.expirationTime > currentTime && shouldYieldToHost()\n              );\n\n            ) {\n              var callback = currentTask.callback;\n              if (\"function\" === typeof callback) {\n                currentTask.callback = null;\n                currentPriorityLevel = currentTask.priorityLevel;\n                var continuationCallback = callback(\n                  currentTask.expirationTime <= currentTime\n                );\n                currentTime = exports.unstable_now();\n                if (\"function\" === typeof continuationCallback) {\n                  currentTask.callback = continuationCallback;\n                  advanceTimers(currentTime);\n                  hasMoreWork = !0;\n                  break b;\n                }\n                currentTask === peek(taskQueue) && pop(taskQueue);\n                advanceTimers(currentTime);\n              } else pop(taskQueue);\n              currentTask = peek(taskQueue);\n            }\n            if (null !== currentTask) hasMoreWork = !0;\n            else {\n              var firstTimer = peek(timerQueue);\n              null !== firstTimer &&\n                requestHostTimeout(\n                  handleTimeout,\n                  firstTimer.startTime - currentTime\n                );\n              hasMoreWork = !1;\n            }\n          }\n          break a;\n        } finally {\n          (currentTask = null),\n            (currentPriorityLevel = previousPriorityLevel),\n            (isPerformingWork = !1);\n        }\n        hasMoreWork = void 0;\n      }\n    } finally {\n      hasMoreWork\n        ? schedulePerformWorkUntilDeadline()\n        : (isMessageLoopRunning = !1);\n    }\n  }\n}\nvar schedulePerformWorkUntilDeadline;\nif (\"function\" === typeof localSetImmediate)\n  schedulePerformWorkUntilDeadline = function () {\n    localSetImmediate(performWorkUntilDeadline);\n  };\nelse if (\"undefined\" !== typeof MessageChannel) {\n  var channel = new MessageChannel(),\n    port = channel.port2;\n  channel.port1.onmessage = performWorkUntilDeadline;\n  schedulePerformWorkUntilDeadline = function () {\n    port.postMessage(null);\n  };\n} else\n  schedulePerformWorkUntilDeadline = function () {\n    localSetTimeout(performWorkUntilDeadline, 0);\n  };\nfunction requestHostTimeout(callback, ms) {\n  taskTimeoutID = localSetTimeout(function () {\n    callback(exports.unstable_now());\n  }, ms);\n}\nexports.unstable_IdlePriority = 5;\nexports.unstable_ImmediatePriority = 1;\nexports.unstable_LowPriority = 4;\nexports.unstable_NormalPriority = 3;\nexports.unstable_Profiling = null;\nexports.unstable_UserBlockingPriority = 2;\nexports.unstable_cancelCallback = function (task) {\n  task.callback = null;\n};\nexports.unstable_forceFrameRate = function (fps) {\n  0 > fps || 125 < fps\n    ? console.error(\n        \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n      )\n    : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n};\nexports.unstable_getCurrentPriorityLevel = function () {\n  return currentPriorityLevel;\n};\nexports.unstable_next = function (eventHandler) {\n  switch (currentPriorityLevel) {\n    case 1:\n    case 2:\n    case 3:\n      var priorityLevel = 3;\n      break;\n    default:\n      priorityLevel = currentPriorityLevel;\n  }\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n};\nexports.unstable_requestPaint = function () {\n  needsPaint = !0;\n};\nexports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n  switch (priorityLevel) {\n    case 1:\n    case 2:\n    case 3:\n    case 4:\n    case 5:\n      break;\n    default:\n      priorityLevel = 3;\n  }\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n};\nexports.unstable_scheduleCallback = function (\n  priorityLevel,\n  callback,\n  options\n) {\n  var currentTime = exports.unstable_now();\n  \"object\" === typeof options && null !== options\n    ? ((options = options.delay),\n      (options =\n        \"number\" === typeof options && 0 < options\n          ? currentTime + options\n          : currentTime))\n    : (options = currentTime);\n  switch (priorityLevel) {\n    case 1:\n      var timeout = -1;\n      break;\n    case 2:\n      timeout = 250;\n      break;\n    case 5:\n      timeout = 1073741823;\n      break;\n    case 4:\n      timeout = 1e4;\n      break;\n    default:\n      timeout = 5e3;\n  }\n  timeout = options + timeout;\n  priorityLevel = {\n    id: taskIdCounter++,\n    callback: callback,\n    priorityLevel: priorityLevel,\n    startTime: options,\n    expirationTime: timeout,\n    sortIndex: -1\n  };\n  options > currentTime\n    ? ((priorityLevel.sortIndex = options),\n      push(timerQueue, priorityLevel),\n      null === peek(taskQueue) &&\n        priorityLevel === peek(timerQueue) &&\n        (isHostTimeoutScheduled\n          ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n          : (isHostTimeoutScheduled = !0),\n        requestHostTimeout(handleTimeout, options - currentTime)))\n    : ((priorityLevel.sortIndex = timeout),\n      push(taskQueue, priorityLevel),\n      isHostCallbackScheduled ||\n        isPerformingWork ||\n        ((isHostCallbackScheduled = !0),\n        isMessageLoopRunning ||\n          ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));\n  return priorityLevel;\n};\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = function (callback) {\n  var parentPriorityLevel = currentPriorityLevel;\n  return function () {\n    var previousPriorityLevel = currentPriorityLevel;\n    currentPriorityLevel = parentPriorityLevel;\n    try {\n      return callback.apply(this, arguments);\n    } finally {\n      currentPriorityLevel = previousPriorityLevel;\n    }\n  };\n};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/scheduler.production.js');\n} else {\n  module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n  var url = \"https://react.dev/errors/\" + code;\n  if (1 < arguments.length) {\n    url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n    for (var i = 2; i < arguments.length; i++)\n      url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n  }\n  return (\n    \"Minified React error #\" +\n    code +\n    \"; visit \" +\n    url +\n    \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n  );\n}\nfunction noop() {}\nvar Internals = {\n    d: {\n      f: noop,\n      r: function () {\n        throw Error(formatProdErrorMessage(522));\n      },\n      D: noop,\n      C: noop,\n      L: noop,\n      m: noop,\n      X: noop,\n      S: noop,\n      M: noop\n    },\n    p: 0,\n    findDOMNode: null\n  },\n  REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n  REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n  REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\");\nfunction createPortal$1(children, containerInfo, implementation) {\n  var key =\n    3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n  return {\n    $$typeof: REACT_PORTAL_TYPE,\n    key:\n      null == key\n        ? null\n        : key === REACT_OPTIMISTIC_KEY\n          ? REACT_OPTIMISTIC_KEY\n          : \"\" + key,\n    children: children,\n    containerInfo: containerInfo,\n    implementation: implementation\n  };\n}\nvar ReactSharedInternals =\n  React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n  if (\"font\" === as) return \"\";\n  if (\"string\" === typeof input)\n    return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n  Internals;\nexports.browser = function (reason) {\n  return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason };\n};\nexports.createPortal = function (children, container) {\n  var key =\n    2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n  if (\n    !container ||\n    (1 !== container.nodeType &&\n      9 !== container.nodeType &&\n      11 !== container.nodeType)\n  )\n    throw Error(formatProdErrorMessage(299));\n  return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n  var previousTransition = ReactSharedInternals.T,\n    previousUpdatePriority = Internals.p;\n  try {\n    if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n  } finally {\n    (ReactSharedInternals.T = previousTransition),\n      (Internals.p = previousUpdatePriority),\n      Internals.d.f();\n  }\n};\nexports.preconnect = function (href, options) {\n  \"string\" === typeof href &&\n    (options\n      ? ((options = options.crossOrigin),\n        (options =\n          \"string\" === typeof options\n            ? \"use-credentials\" === options\n              ? options\n              : \"\"\n            : void 0))\n      : (options = null),\n    Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n  \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n  if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n    var as = options.as,\n      crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n      integrity =\n        \"string\" === typeof options.integrity ? options.integrity : void 0,\n      fetchPriority =\n        \"string\" === typeof options.fetchPriority\n          ? options.fetchPriority\n          : void 0;\n    \"style\" === as\n      ? Internals.d.S(\n          href,\n          \"string\" === typeof options.precedence ? options.precedence : void 0,\n          {\n            crossOrigin: crossOrigin,\n            integrity: integrity,\n            fetchPriority: fetchPriority\n          }\n        )\n      : \"script\" === as &&\n        Internals.d.X(href, {\n          crossOrigin: crossOrigin,\n          integrity: integrity,\n          fetchPriority: fetchPriority,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n        });\n  }\n};\nexports.preinitModule = function (href, options) {\n  if (\"string\" === typeof href)\n    if (\"object\" === typeof options && null !== options) {\n      if (null == options.as || \"script\" === options.as) {\n        var crossOrigin = getCrossOriginStringAs(\n          options.as,\n          options.crossOrigin\n        );\n        Internals.d.M(href, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0\n        });\n      }\n    } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n  if (\n    \"string\" === typeof href &&\n    \"object\" === typeof options &&\n    null !== options &&\n    \"string\" === typeof options.as\n  ) {\n    var as = options.as,\n      crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n    Internals.d.L(href, as, {\n      crossOrigin: crossOrigin,\n      integrity:\n        \"string\" === typeof options.integrity ? options.integrity : void 0,\n      nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n      type: \"string\" === typeof options.type ? options.type : void 0,\n      fetchPriority:\n        \"string\" === typeof options.fetchPriority\n          ? options.fetchPriority\n          : void 0,\n      referrerPolicy:\n        \"string\" === typeof options.referrerPolicy\n          ? options.referrerPolicy\n          : void 0,\n      imageSrcSet:\n        \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n      imageSizes:\n        \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n      media: \"string\" === typeof options.media ? options.media : void 0\n    });\n  }\n};\nexports.preloadModule = function (href, options) {\n  if (\"string\" === typeof href)\n    if (options) {\n      var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n      Internals.d.m(href, {\n        as:\n          \"string\" === typeof options.as && \"script\" !== options.as\n            ? options.as\n            : void 0,\n        crossOrigin: crossOrigin,\n        integrity:\n          \"string\" === typeof options.integrity ? options.integrity : void 0,\n        nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n        fetchPriority:\n          \"string\" === typeof options.fetchPriority\n            ? options.fetchPriority\n            : void 0\n      });\n    } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n  Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n  return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n  return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n  return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.3.1\";\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.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n", "/**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n\"use strict\";\nvar Scheduler = require(\"scheduler\"),\n  React = require(\"react\"),\n  ReactDOM = require(\"react-dom\");\nfunction formatProdErrorMessage(code) {\n  var url = \"https://react.dev/errors/\" + code;\n  if (1 < arguments.length) {\n    url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n    for (var i = 2; i < arguments.length; i++)\n      url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n  }\n  return (\n    \"Minified React error #\" +\n    code +\n    \"; visit \" +\n    url +\n    \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n  );\n}\nfunction isValidContainer(node) {\n  return !(\n    !node ||\n    (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)\n  );\n}\nfunction getNearestMountedFiber(fiber) {\n  for (var node = fiber, nextNode = node; nextNode && !nextNode.alternate; )\n    (node = nextNode),\n      0 !== (node.flags & 4098) && (fiber = node.return),\n      (nextNode = node.return);\n  for (; node.return; ) node = node.return;\n  return 3 === node.tag ? fiber : null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n  if (13 === fiber.tag) {\n    var suspenseState = fiber.memoizedState;\n    null === suspenseState &&\n      ((fiber = fiber.alternate),\n      null !== fiber && (suspenseState = fiber.memoizedState));\n    if (null !== suspenseState) return suspenseState.dehydrated;\n  }\n  return null;\n}\nfunction getActivityInstanceFromFiber(fiber) {\n  if (31 === fiber.tag) {\n    var activityState = fiber.memoizedState;\n    null === activityState &&\n      ((fiber = fiber.alternate),\n      null !== fiber && (activityState = fiber.memoizedState));\n    if (null !== activityState) return activityState.dehydrated;\n  }\n  return null;\n}\nfunction assertIsMounted(fiber) {\n  if (getNearestMountedFiber(fiber) !== fiber)\n    throw Error(formatProdErrorMessage(188));\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n  var alternate = fiber.alternate;\n  if (!alternate) {\n    alternate = getNearestMountedFiber(fiber);\n    if (null === alternate) throw Error(formatProdErrorMessage(188));\n    return alternate !== fiber ? null : fiber;\n  }\n  for (var a = fiber, b = alternate; ; ) {\n    var parentA = a.return;\n    if (null === parentA) break;\n    var parentB = parentA.alternate;\n    if (null === parentB) {\n      b = parentA.return;\n      if (null !== b) {\n        a = b;\n        continue;\n      }\n      break;\n    }\n    if (parentA.child === parentB.child) {\n      for (parentB = parentA.child; parentB; ) {\n        if (parentB === a) return assertIsMounted(parentA), fiber;\n        if (parentB === b) return assertIsMounted(parentA), alternate;\n        parentB = parentB.sibling;\n      }\n      throw Error(formatProdErrorMessage(188));\n    }\n    if (a.return !== b.return) (a = parentA), (b = parentB);\n    else {\n      for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {\n        if (child$0 === a) {\n          didFindChild = !0;\n          a = parentA;\n          b = parentB;\n          break;\n        }\n        if (child$0 === b) {\n          didFindChild = !0;\n          b = parentA;\n          a = parentB;\n          break;\n        }\n        child$0 = child$0.sibling;\n      }\n      if (!didFindChild) {\n        for (child$0 = parentB.child; child$0; ) {\n          if (child$0 === a) {\n            didFindChild = !0;\n            a = parentB;\n            b = parentA;\n            break;\n          }\n          if (child$0 === b) {\n            didFindChild = !0;\n            b = parentB;\n            a = parentA;\n            break;\n          }\n          child$0 = child$0.sibling;\n        }\n        if (!didFindChild) throw Error(formatProdErrorMessage(189));\n      }\n    }\n    if (a.alternate !== b) throw Error(formatProdErrorMessage(190));\n  }\n  if (3 !== a.tag) throw Error(formatProdErrorMessage(188));\n  return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiberImpl(node) {\n  var tag = node.tag;\n  if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n  for (node = node.child; null !== node; ) {\n    tag = findCurrentHostFiberImpl(node);\n    if (null !== tag) return tag;\n    node = node.sibling;\n  }\n  return null;\n}\nfunction traverseVisibleInstancesAndTextInstances(\n  child,\n  searchWithinHosts,\n  fn,\n  a,\n  b,\n  c\n) {\n  for (; null !== child; ) {\n    if (\n      ((5 === child.tag || 27 === child.tag || 6 === child.tag) &&\n        fn(child, a, b, c)) ||\n      ((22 !== child.tag || null === child.memoizedState) &&\n        (searchWithinHosts || (5 !== child.tag && 27 !== child.tag)) &&\n        traverseVisibleInstancesAndTextInstances(\n          child.child,\n          searchWithinHosts,\n          fn,\n          a,\n          b,\n          c\n        ))\n    )\n      return !0;\n    child = child.sibling;\n  }\n  return !1;\n}\nfunction getFragmentParentInstanceOrContainerFiber(fiber) {\n  for (fiber = fiber.return; null !== fiber; ) {\n    if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) return fiber;\n    fiber = fiber.return;\n  }\n  return null;\n}\nfunction fiberIsPortaledIntoHost(fiber) {\n  var foundPortalParent = !1;\n  for (fiber = fiber.return; null !== fiber; ) {\n    4 === fiber.tag && (foundPortalParent = !0);\n    if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) break;\n    fiber = fiber.return;\n  }\n  return foundPortalParent;\n}\nfunction getFragmentInstanceOrTextInstanceSiblings(fiber) {\n  var result = [null, null],\n    parentHostFiber = getFragmentParentInstanceOrContainerFiber(fiber);\n  if (null === parentHostFiber) return result;\n  findFragmentInstanceOrTextInstanceSiblings(\n    result,\n    fiber,\n    parentHostFiber.child,\n    { foundSelf: !1 }\n  );\n  return result;\n}\nfunction findFragmentInstanceOrTextInstanceSiblings(\n  result,\n  self,\n  child,\n  state\n) {\n  for (; null !== child; ) {\n    if (child === self) state.foundSelf = !0;\n    else if (5 === child.tag || 27 === child.tag || 6 === child.tag) {\n      if (state.foundSelf) return (result[1] = child), !0;\n      result[0] = child;\n    } else if (\n      (22 !== child.tag || null === child.memoizedState) &&\n      findFragmentInstanceOrTextInstanceSiblings(\n        result,\n        self,\n        child.child,\n        state\n      )\n    )\n      return !0;\n    child = child.sibling;\n  }\n  return !1;\n}\nfunction getInstanceFromHostFiber(fiber) {\n  switch (fiber.tag) {\n    case 5:\n    case 27:\n    case 6:\n      return fiber.stateNode;\n    case 3:\n      return fiber.stateNode.containerInfo;\n    default:\n      throw Error(formatProdErrorMessage(559));\n  }\n}\nvar searchTarget = null,\n  searchBoundary = null;\nfunction isFiberPrecedingCheck(child, target, boundary) {\n  return child === boundary\n    ? !0\n    : child === target\n      ? ((searchTarget = child), !0)\n      : !1;\n}\nfunction isFiberFollowingCheck(child, target, boundary) {\n  return child === boundary\n    ? ((searchBoundary = child), !1)\n    : child === target\n      ? (null !== searchBoundary && (searchTarget = child), !0)\n      : !1;\n}\nfunction getParentForFragmentAncestors(inst) {\n  if (null === inst) return null;\n  do inst = null === inst ? null : inst.return;\n  while (inst && 5 !== inst.tag && 27 !== inst.tag && 3 !== inst.tag);\n  return inst ? inst : null;\n}\nfunction getLowestCommonAncestor(instA, instB, getParent) {\n  for (var depthA = 0, tempA = instA; tempA; tempA = getParent(tempA)) depthA++;\n  tempA = 0;\n  for (var tempB = instB; tempB; tempB = getParent(tempB)) tempA++;\n  for (; 0 < depthA - tempA; ) (instA = getParent(instA)), depthA--;\n  for (; 0 < tempA - depthA; ) (instB = getParent(instB)), tempA--;\n  for (; depthA--; ) {\n    if (instA === instB || (null !== instB && instA === instB.alternate))\n      return instA;\n    instA = getParent(instA);\n    instB = getParent(instB);\n  }\n  return null;\n}\nvar assign = Object.assign,\n  REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n  REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n  REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n  REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n  REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n  REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n  REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n  REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n  REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n  REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n  REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n  REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n  REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nvar REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n  REACT_LEGACY_HIDDEN_TYPE = Symbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.tracing_marker\");\nvar REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n  REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n  REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n  if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n  maybeIterable =\n    (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n    maybeIterable[\"@@iterator\"];\n  return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction getComponentNameFromType(type) {\n  if (null == type) return null;\n  if (\"function\" === typeof type)\n    return type.$$typeof === REACT_CLIENT_REFERENCE\n      ? null\n      : type.displayName || type.name || null;\n  if (\"string\" === typeof type) return type;\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return \"Fragment\";\n    case REACT_PROFILER_TYPE:\n      return \"Profiler\";\n    case REACT_STRICT_MODE_TYPE:\n      return \"StrictMode\";\n    case REACT_SUSPENSE_TYPE:\n      return \"Suspense\";\n    case REACT_SUSPENSE_LIST_TYPE:\n      return \"SuspenseList\";\n    case REACT_ACTIVITY_TYPE:\n      return \"Activity\";\n    case REACT_VIEW_TRANSITION_TYPE:\n      return \"ViewTransition\";\n  }\n  if (\"object\" === typeof type)\n    switch (type.$$typeof) {\n      case REACT_PORTAL_TYPE:\n        return \"Portal\";\n      case REACT_CONTEXT_TYPE:\n        return type.displayName || \"Context\";\n      case REACT_CONSUMER_TYPE:\n        return (type._context.displayName || \"Context\") + \".Consumer\";\n      case REACT_FORWARD_REF_TYPE:\n        var innerType = type.render;\n        type = type.displayName;\n        type ||\n          ((type = innerType.displayName || innerType.name || \"\"),\n          (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n        return type;\n      case REACT_MEMO_TYPE:\n        return (\n          (innerType = type.displayName || null),\n          null !== innerType\n            ? innerType\n            : getComponentNameFromType(type.type) || \"Memo\"\n        );\n      case REACT_LAZY_TYPE:\n        innerType = type._payload;\n        type = type._init;\n        try {\n          return getComponentNameFromType(type(innerType));\n        } catch (x) {}\n    }\n  return null;\n}\nvar isArrayImpl = Array.isArray,\n  ReactSharedInternals =\n    React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n  ReactDOMSharedInternals =\n    ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n  sharedNotPendingObject = {\n    pending: !1,\n    data: null,\n    method: null,\n    action: null\n  },\n  valueStack = [],\n  index = -1;\nfunction createCursor(defaultValue) {\n  return { current: defaultValue };\n}\nfunction pop(cursor) {\n  0 > index ||\n    ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n  index++;\n  valueStack[index] = cursor.current;\n  cursor.current = value;\n}\nvar contextStackCursor = createCursor(null),\n  contextFiberStackCursor = createCursor(null),\n  rootInstanceStackCursor = createCursor(null),\n  hostTransitionProviderCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n  push(rootInstanceStackCursor, nextRootInstance);\n  push(contextFiberStackCursor, fiber);\n  push(contextStackCursor, null);\n  switch (nextRootInstance.nodeType) {\n    case 9:\n    case 11:\n      fiber = (fiber = nextRootInstance.documentElement)\n        ? (fiber = fiber.namespaceURI)\n          ? getOwnHostContext(fiber)\n          : 0\n        : 0;\n      break;\n    default:\n      if (\n        ((fiber = nextRootInstance.tagName),\n        (nextRootInstance = nextRootInstance.namespaceURI))\n      )\n        (nextRootInstance = getOwnHostContext(nextRootInstance)),\n          (fiber = getChildHostContextProd(nextRootInstance, fiber));\n      else\n        switch (fiber) {\n          case \"svg\":\n            fiber = 1;\n            break;\n          case \"math\":\n            fiber = 2;\n            break;\n          default:\n            fiber = 0;\n        }\n  }\n  pop(contextStackCursor);\n  push(contextStackCursor, fiber);\n}\nfunction popHostContainer() {\n  pop(contextStackCursor);\n  pop(contextFiberStackCursor);\n  pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n  var stateHook = fiber.memoizedState;\n  null !== stateHook &&\n    ((HostTransitionContext._currentValue = stateHook.memoizedState),\n    push(hostTransitionProviderCursor, fiber));\n  stateHook = contextStackCursor.current;\n  var JSCompiler_inline_result = getChildHostContextProd(stateHook, fiber.type);\n  stateHook !== JSCompiler_inline_result &&\n    (push(contextFiberStackCursor, fiber),\n    push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n  contextFiberStackCursor.current === fiber &&\n    (pop(contextStackCursor), pop(contextFiberStackCursor));\n  hostTransitionProviderCursor.current === fiber &&\n    (pop(hostTransitionProviderCursor),\n    (HostTransitionContext._currentValue = sharedNotPendingObject));\n}\nvar prefix, suffix;\nfunction describeBuiltInComponentFrame(name) {\n  if (void 0 === prefix)\n    try {\n      throw Error();\n    } catch (x) {\n      var match = x.stack.trim().match(/\\n( *(at )?)/);\n      prefix = (match && match[1]) || \"\";\n      suffix =\n        -1 < x.stack.indexOf(\"\\n    at\")\n          ? \" (<anonymous>)\"\n          : -1 < x.stack.indexOf(\"@\")\n            ? \"@unknown:0:0\"\n            : \"\";\n    }\n  return \"\\n\" + prefix + name + suffix;\n}\nvar reentry = !1;\nfunction describeNativeComponentFrame(fn, construct) {\n  if (!fn || reentry) return \"\";\n  reentry = !0;\n  var previousPrepareStackTrace = Error.prepareStackTrace;\n  Error.prepareStackTrace = void 0;\n  try {\n    var RunInRootFrame = {\n      DetermineComponentFrameRoot: function () {\n        try {\n          if (construct) {\n            var Fake = function () {\n              throw Error();\n            };\n            Object.defineProperty(Fake.prototype, \"props\", {\n              set: function () {\n                throw Error();\n              }\n            });\n            if (\"object\" === typeof Reflect && Reflect.construct) {\n              try {\n                Reflect.construct(Fake, []);\n              } catch (x) {\n                var control = x;\n              }\n              Reflect.construct(fn, [], Fake);\n            } else {\n              try {\n                Fake.call();\n              } catch (x$1) {\n                control = x$1;\n              }\n              Fake = !1;\n              try {\n                var prevProps = Object.getOwnPropertyDescriptor(\n                  fn.prototype,\n                  \"props\"\n                );\n                Object.defineProperty(fn.prototype, \"props\", {\n                  configurable: !0,\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                Fake = !0;\n                new fn();\n              } finally {\n                Fake &&\n                  (void 0 !== prevProps\n                    ? Object.defineProperty(fn.prototype, \"props\", prevProps)\n                    : delete fn.prototype.props);\n              }\n            }\n          } else {\n            try {\n              throw Error();\n            } catch (x$2) {\n              control = x$2;\n            }\n            (Fake = fn()) &&\n              \"function\" === typeof Fake.catch &&\n              Fake.catch(function () {});\n          }\n        } catch (sample) {\n          if (sample && control && \"string\" === typeof sample.stack)\n            return [sample.stack, control.stack];\n        }\n        return [null, null];\n      }\n    };\n    RunInRootFrame.DetermineComponentFrameRoot.displayName =\n      \"DetermineComponentFrameRoot\";\n    var namePropDescriptor = Object.getOwnPropertyDescriptor(\n      RunInRootFrame.DetermineComponentFrameRoot,\n      \"name\"\n    );\n    namePropDescriptor &&\n      namePropDescriptor.configurable &&\n      Object.defineProperty(\n        RunInRootFrame.DetermineComponentFrameRoot,\n        \"name\",\n        { value: \"DetermineComponentFrameRoot\" }\n      );\n    var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n      sampleStack = _RunInRootFrame$Deter[0],\n      controlStack = _RunInRootFrame$Deter[1];\n    if (sampleStack && controlStack) {\n      var sampleLines = sampleStack.split(\"\\n\"),\n        controlLines = controlStack.split(\"\\n\");\n      for (\n        namePropDescriptor = RunInRootFrame = 0;\n        RunInRootFrame < sampleLines.length &&\n        !sampleLines[RunInRootFrame].includes(\"DetermineComponentFrameRoot\");\n\n      )\n        RunInRootFrame++;\n      for (\n        ;\n        namePropDescriptor < controlLines.length &&\n        !controlLines[namePropDescriptor].includes(\n          \"DetermineComponentFrameRoot\"\n        );\n\n      )\n        namePropDescriptor++;\n      if (\n        RunInRootFrame === sampleLines.length ||\n        namePropDescriptor === controlLines.length\n      )\n        for (\n          RunInRootFrame = sampleLines.length - 1,\n            namePropDescriptor = controlLines.length - 1;\n          1 <= RunInRootFrame &&\n          0 <= namePropDescriptor &&\n          sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];\n\n        )\n          namePropDescriptor--;\n      for (\n        ;\n        1 <= RunInRootFrame && 0 <= namePropDescriptor;\n        RunInRootFrame--, namePropDescriptor--\n      )\n        if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {\n          if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {\n            do\n              if (\n                (RunInRootFrame--,\n                namePropDescriptor--,\n                0 > namePropDescriptor ||\n                  sampleLines[RunInRootFrame] !==\n                    controlLines[namePropDescriptor])\n              ) {\n                var frame =\n                  \"\\n\" +\n                  sampleLines[RunInRootFrame].replace(\" at new \", \" at \");\n                fn.displayName &&\n                  frame.includes(\"<anonymous>\") &&\n                  (frame = frame.replace(\"<anonymous>\", fn.displayName));\n                return frame;\n              }\n            while (1 <= RunInRootFrame && 0 <= namePropDescriptor);\n          }\n          break;\n        }\n    }\n  } finally {\n    (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);\n  }\n  return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : \"\")\n    ? describeBuiltInComponentFrame(previousPrepareStackTrace)\n    : \"\";\n}\nfunction describeFiber(fiber, childFiber) {\n  switch (fiber.tag) {\n    case 26:\n    case 27:\n    case 5:\n      return describeBuiltInComponentFrame(fiber.type);\n    case 16:\n      return describeBuiltInComponentFrame(\"Lazy\");\n    case 13:\n      return fiber.child !== childFiber && null !== childFiber\n        ? describeBuiltInComponentFrame(\"Suspense Fallback\")\n        : describeBuiltInComponentFrame(\"Suspense\");\n    case 19:\n      return describeBuiltInComponentFrame(\"SuspenseList\");\n    case 0:\n    case 15:\n      return describeNativeComponentFrame(fiber.type, !1);\n    case 11:\n      return describeNativeComponentFrame(fiber.type.render, !1);\n    case 1:\n      return describeNativeComponentFrame(fiber.type, !0);\n    case 31:\n      return describeBuiltInComponentFrame(\"Activity\");\n    case 30:\n      return describeBuiltInComponentFrame(\"ViewTransition\");\n    default:\n      return \"\";\n  }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n  try {\n    var info = \"\",\n      previous = null;\n    do\n      (info += describeFiber(workInProgress, previous)),\n        (previous = workInProgress),\n        (workInProgress = workInProgress.return);\n    while (workInProgress);\n    return info;\n  } catch (x) {\n    return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n  }\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n  scheduleCallback$3 = Scheduler.unstable_scheduleCallback,\n  cancelCallback$1 = Scheduler.unstable_cancelCallback,\n  shouldYield = Scheduler.unstable_shouldYield,\n  requestPaint = Scheduler.unstable_requestPaint,\n  now = Scheduler.unstable_now,\n  getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n  ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n  UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n  NormalPriority$1 = Scheduler.unstable_NormalPriority,\n  LowPriority = Scheduler.unstable_LowPriority,\n  IdlePriority = Scheduler.unstable_IdlePriority,\n  log$1 = Scheduler.log,\n  unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,\n  rendererID = null,\n  injectedHook = null;\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n  \"function\" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);\n  if (injectedHook && \"function\" === typeof injectedHook.setStrictMode)\n    try {\n      injectedHook.setStrictMode(rendererID, newIsStrictMode);\n    } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n  log = Math.log,\n  LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n  x >>>= 0;\n  return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionUpdateLane = 256,\n  nextTransitionDeferredLane = 262144,\n  nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n  var pendingSyncLanes = lanes & 42;\n  if (0 !== pendingSyncLanes) return pendingSyncLanes;\n  switch (lanes & -lanes) {\n    case 1:\n      return 1;\n    case 2:\n      return 2;\n    case 4:\n      return 4;\n    case 8:\n      return 8;\n    case 16:\n      return 16;\n    case 32:\n      return 32;\n    case 64:\n      return 64;\n    case 128:\n      return 128;\n    case 256:\n    case 512:\n    case 1024:\n    case 2048:\n    case 4096:\n    case 8192:\n    case 16384:\n    case 32768:\n    case 65536:\n    case 131072:\n      return lanes & -lanes;\n    case 262144:\n    case 524288:\n    case 1048576:\n    case 2097152:\n      return lanes & 3932160;\n    case 4194304:\n    case 8388608:\n    case 16777216:\n    case 33554432:\n      return lanes & 62914560;\n    case 67108864:\n      return 67108864;\n    case 134217728:\n      return 134217728;\n    case 268435456:\n      return 268435456;\n    case 536870912:\n      return 536870912;\n    case 1073741824:\n      return 0;\n    default:\n      return lanes;\n  }\n}\nfunction getNextLanes(root, wipLanes, rootHasPendingCommit) {\n  var pendingLanes = root.pendingLanes;\n  if (0 === pendingLanes) return 0;\n  var nextLanes = 0,\n    suspendedLanes = root.suspendedLanes,\n    pingedLanes = root.pingedLanes;\n  root = root.warmLanes;\n  var nonIdlePendingLanes = pendingLanes & 134217727;\n  0 !== nonIdlePendingLanes\n    ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n      0 !== pendingLanes\n        ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n        : ((pingedLanes &= nonIdlePendingLanes),\n          0 !== pingedLanes\n            ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n            : rootHasPendingCommit ||\n              ((rootHasPendingCommit = nonIdlePendingLanes & ~root),\n              0 !== rootHasPendingCommit &&\n                (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))\n    : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),\n      0 !== nonIdlePendingLanes\n        ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))\n        : 0 !== pingedLanes\n          ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n          : rootHasPendingCommit ||\n            ((rootHasPendingCommit = pendingLanes & ~root),\n            0 !== rootHasPendingCommit &&\n              (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));\n  return 0 === nextLanes\n    ? 0\n    : 0 !== wipLanes &&\n        wipLanes !== nextLanes &&\n        0 === (wipLanes & suspendedLanes) &&\n        ((suspendedLanes = nextLanes & -nextLanes),\n        (rootHasPendingCommit = wipLanes & -wipLanes),\n        suspendedLanes >= rootHasPendingCommit ||\n          (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))\n      ? wipLanes\n      : nextLanes;\n}\nfunction checkIfRootIsPrerendering(root, renderLanes) {\n  return (\n    0 ===\n    (root.pendingLanes &\n      ~(root.suspendedLanes & ~root.pingedLanes) &\n      renderLanes)\n  );\n}\nfunction getEntangledLanes(root, renderLanes) {\n  0 !== (renderLanes & 8) && (renderLanes |= renderLanes & 32);\n  var allEntangledLanes = root.entangledLanes;\n  if (0 !== allEntangledLanes)\n    for (\n      root = root.entanglements, allEntangledLanes &= renderLanes;\n      0 < allEntangledLanes;\n\n    ) {\n      var index$4 = 31 - clz32(allEntangledLanes),\n        lane = 1 << index$4;\n      renderLanes |= root[index$4];\n      allEntangledLanes &= ~lane;\n    }\n  return renderLanes;\n}\nfunction computeExpirationTime(lane, currentTime) {\n  switch (lane) {\n    case 1:\n    case 2:\n    case 4:\n    case 8:\n    case 64:\n      return currentTime + 250;\n    case 16:\n    case 32:\n    case 128:\n    case 256:\n    case 512:\n    case 1024:\n    case 2048:\n    case 4096:\n    case 8192:\n    case 16384:\n    case 32768:\n    case 65536:\n    case 131072:\n    case 262144:\n    case 524288:\n    case 1048576:\n    case 2097152:\n      return currentTime + 5e3;\n    case 4194304:\n    case 8388608:\n    case 16777216:\n    case 33554432:\n      return -1;\n    case 67108864:\n    case 134217728:\n    case 268435456:\n    case 536870912:\n    case 1073741824:\n      return -1;\n    default:\n      return -1;\n  }\n}\nfunction claimNextRetryLane() {\n  var lane = nextRetryLane;\n  nextRetryLane <<= 1;\n  0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n  return lane;\n}\nfunction createLaneMap(initial) {\n  for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n  return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n  root.pendingLanes |= updateLane;\n  268435456 !== updateLane &&\n    ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));\n}\nfunction markRootFinished(\n  root,\n  finishedLanes,\n  remainingLanes,\n  spawnedLane,\n  updatedLanes,\n  suspendedRetryLanes\n) {\n  var previouslyPendingLanes = root.pendingLanes;\n  root.pendingLanes = remainingLanes;\n  root.suspendedLanes = 0;\n  root.pingedLanes = 0;\n  root.warmLanes = 0;\n  root.expiredLanes &= remainingLanes;\n  root.entangledLanes &= remainingLanes;\n  root.errorRecoveryDisabledLanes &= remainingLanes;\n  root.shellSuspendCounter = 0;\n  var entanglements = root.entanglements,\n    expirationTimes = root.expirationTimes,\n    hiddenUpdates = root.hiddenUpdates;\n  for (\n    remainingLanes = previouslyPendingLanes & ~remainingLanes;\n    0 < remainingLanes;\n\n  ) {\n    var index$7 = 31 - clz32(remainingLanes),\n      lane = 1 << index$7;\n    entanglements[index$7] = 0;\n    expirationTimes[index$7] = -1;\n    var hiddenUpdatesForLane = hiddenUpdates[index$7];\n    if (null !== hiddenUpdatesForLane)\n      for (\n        hiddenUpdates[index$7] = null, index$7 = 0;\n        index$7 < hiddenUpdatesForLane.length;\n        index$7++\n      ) {\n        var update = hiddenUpdatesForLane[index$7];\n        null !== update && (update.lane &= -536870913);\n      }\n    remainingLanes &= ~lane;\n  }\n  0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n  0 !== suspendedRetryLanes &&\n    0 === updatedLanes &&\n    0 !== root.tag &&\n    (root.suspendedLanes |=\n      suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n  root.pendingLanes |= spawnedLane;\n  root.suspendedLanes &= ~spawnedLane;\n  var spawnedLaneIndex = 31 - clz32(spawnedLane);\n  root.entangledLanes |= spawnedLane;\n  root.entanglements[spawnedLaneIndex] =\n    root.entanglements[spawnedLaneIndex] |\n    1073741824 |\n    (entangledLanes & 261930);\n}\nfunction markRootEntangled(root, entangledLanes) {\n  var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n  for (root = root.entanglements; rootEntangledLanes; ) {\n    var index$8 = 31 - clz32(rootEntangledLanes),\n      lane = 1 << index$8;\n    (lane & entangledLanes) | (root[index$8] & entangledLanes) &&\n      (root[index$8] |= entangledLanes);\n    rootEntangledLanes &= ~lane;\n  }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n  var renderLane = renderLanes & -renderLanes;\n  renderLane =\n    0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);\n  return 0 !== (renderLane & (root.suspendedLanes | renderLanes))\n    ? 0\n    : renderLane;\n}\nfunction getBumpedLaneForHydrationByLane(lane) {\n  switch (lane) {\n    case 2:\n      lane = 1;\n      break;\n    case 8:\n      lane = 4;\n      break;\n    case 32:\n      lane = 16;\n      break;\n    case 256:\n    case 512:\n    case 1024:\n    case 2048:\n    case 4096:\n    case 8192:\n    case 16384:\n    case 32768:\n    case 65536:\n    case 131072:\n    case 262144:\n    case 524288:\n    case 1048576:\n    case 2097152:\n    case 4194304:\n    case 8388608:\n    case 16777216:\n    case 33554432:\n      lane = 128;\n      break;\n    case 268435456:\n      lane = 134217728;\n      break;\n    default:\n      lane = 0;\n  }\n  return lane;\n}\nfunction lanesToEventPriority(lanes) {\n  lanes &= -lanes;\n  return 2 < lanes\n    ? 8 < lanes\n      ? 0 !== (lanes & 134217727)\n        ? 32\n        : 268435456\n      : 8\n    : 2;\n}\nfunction resolveUpdatePriority() {\n  var updatePriority = ReactDOMSharedInternals.p;\n  if (0 !== updatePriority) return updatePriority;\n  updatePriority = window.event;\n  return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);\n}\nfunction runWithPriority(priority, fn) {\n  var previousPriority = ReactDOMSharedInternals.p;\n  try {\n    return (ReactDOMSharedInternals.p = priority), fn();\n  } finally {\n    ReactDOMSharedInternals.p = previousPriority;\n  }\n}\nvar randomKey = Math.random().toString(36).slice(2),\n  internalInstanceKey = \"__reactFiber$\" + randomKey,\n  internalPropsKey = \"__reactProps$\" + randomKey,\n  internalContainerInstanceKey = \"__reactContainer$\" + randomKey,\n  internalEventHandlersKey = \"__reactEvents$\" + randomKey,\n  internalEventHandlerListenersKey = \"__reactListeners$\" + randomKey,\n  internalEventHandlesSetKey = \"__reactHandles$\" + randomKey,\n  internalRootNodeResourcesKey = \"__reactResources$\" + randomKey,\n  internalHoistableMarker = \"__reactMarker$\" + randomKey,\n  internalLoadPendingKey = \"__reactLoad$\" + randomKey;\nfunction detachDeletedInstance(node) {\n  delete node[internalInstanceKey];\n  delete node[internalPropsKey];\n  delete node[internalEventHandlerListenersKey];\n  delete node[internalEventHandlesSetKey];\n}\nfunction getClosestInstanceFromNode(targetNode) {\n  var targetInst;\n  if ((targetInst = targetNode[internalInstanceKey])) return targetInst;\n  for (var parentNode = targetNode.parentNode; parentNode; ) {\n    if (\n      (targetInst =\n        parentNode[internalContainerInstanceKey] ||\n        parentNode[internalInstanceKey])\n    ) {\n      parentNode = targetInst.alternate;\n      if (\n        null !== targetInst.child ||\n        (null !== parentNode && null !== parentNode.child)\n      )\n        for (\n          targetNode = getParentHydrationBoundary(targetNode);\n          null !== targetNode;\n\n        ) {\n          if ((parentNode = targetNode[internalInstanceKey])) return parentNode;\n          targetNode = getParentHydrationBoundary(targetNode);\n        }\n      return targetInst;\n    }\n    targetNode = parentNode;\n    parentNode = targetNode.parentNode;\n  }\n  return null;\n}\nfunction getInstanceFromNode(node) {\n  if (\n    (node = node[internalInstanceKey] || node[internalContainerInstanceKey])\n  ) {\n    var tag = node.tag;\n    if (\n      5 === tag ||\n      6 === tag ||\n      13 === tag ||\n      31 === tag ||\n      26 === tag ||\n      27 === tag ||\n      3 === tag\n    )\n      return node;\n  }\n  return null;\n}\nfunction getNodeFromInstance(inst) {\n  var tag = inst.tag;\n  if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;\n  throw Error(formatProdErrorMessage(33));\n}\nfunction getResourcesFromRoot(root) {\n  var resources = root[internalRootNodeResourcesKey];\n  resources ||\n    (resources = root[internalRootNodeResourcesKey] =\n      { hoistableStyles: new Map(), hoistableScripts: new Map() });\n  return resources;\n}\nfunction markNodeAsHoistable(node) {\n  node[internalHoistableMarker] = !0;\n}\nfunction clearPendingLoadOnNode(node) {\n  node[internalLoadPendingKey] = void 0;\n}\nvar allNativeEvents = new Set(),\n  registrationNameDependencies = {};\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n  registerDirectEvent(registrationName, dependencies);\n  registerDirectEvent(registrationName + \"Capture\", dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n  registrationNameDependencies[registrationName] = dependencies;\n  for (\n    registrationName = 0;\n    registrationName < dependencies.length;\n    registrationName++\n  )\n    allNativeEvents.add(dependencies[registrationName]);\n}\nvar VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n    \"^[: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][: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\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n  ),\n  illegalAttributeNameCache = {},\n  validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n    return !0;\n  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;\n  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n    return (validatedAttributeNameCache[attributeName] = !0);\n  illegalAttributeNameCache[attributeName] = !0;\n  return !1;\n}\nvar viewTransitionMutationContext = !1;\nfunction pushMutationContext() {\n  var prev = viewTransitionMutationContext;\n  viewTransitionMutationContext = !1;\n  return prev;\n}\nfunction setValueForAttribute(node, name, value) {\n  if (isAttributeNameSafe(name))\n    if (null === value) node.removeAttribute(name);\n    else {\n      switch (typeof value) {\n        case \"undefined\":\n        case \"function\":\n        case \"symbol\":\n          node.removeAttribute(name);\n          return;\n        case \"boolean\":\n          var prefix$10 = name.toLowerCase().slice(0, 5);\n          if (\"data-\" !== prefix$10 && \"aria-\" !== prefix$10) {\n            node.removeAttribute(name);\n            return;\n          }\n      }\n      node.setAttribute(name, value);\n    }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n  if (null === value) node.removeAttribute(name);\n  else {\n    switch (typeof value) {\n      case \"undefined\":\n      case \"function\":\n      case \"symbol\":\n      case \"boolean\":\n        node.removeAttribute(name);\n        return;\n    }\n    node.setAttribute(name, value);\n  }\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n  if (null === value) node.removeAttribute(name);\n  else {\n    switch (typeof value) {\n      case \"undefined\":\n      case \"function\":\n      case \"symbol\":\n      case \"boolean\":\n        node.removeAttribute(name);\n        return;\n    }\n    node.setAttributeNS(namespace, name, value);\n  }\n}\nfunction getToStringValue(value) {\n  switch (typeof value) {\n    case \"bigint\":\n    case \"boolean\":\n    case \"number\":\n    case \"string\":\n    case \"undefined\":\n      return value;\n    case \"object\":\n      return value;\n    default:\n      return \"\";\n  }\n}\nfunction isCheckable(elem) {\n  var type = elem.type;\n  return (\n    (elem = elem.nodeName) &&\n    \"input\" === elem.toLowerCase() &&\n    (\"checkbox\" === type || \"radio\" === type)\n  );\n}\nfunction trackValueOnNode(node, valueField, currentValue) {\n  var descriptor = Object.getOwnPropertyDescriptor(\n    node.constructor.prototype,\n    valueField\n  );\n  if (\n    !node.hasOwnProperty(valueField) &&\n    \"undefined\" !== typeof descriptor &&\n    \"function\" === typeof descriptor.get &&\n    \"function\" === typeof descriptor.set\n  ) {\n    var get = descriptor.get,\n      set = descriptor.set;\n    Object.defineProperty(node, valueField, {\n      configurable: !0,\n      get: function () {\n        return get.call(this);\n      },\n      set: function (value) {\n        currentValue = \"\" + value;\n        set.call(this, value);\n      }\n    });\n    Object.defineProperty(node, valueField, {\n      enumerable: descriptor.enumerable\n    });\n    return {\n      getValue: function () {\n        return currentValue;\n      },\n      setValue: function (value) {\n        currentValue = \"\" + value;\n      },\n      stopTracking: function () {\n        node._valueTracker = null;\n        delete node[valueField];\n      }\n    };\n  }\n}\nfunction track(node) {\n  if (!node._valueTracker) {\n    var valueField = isCheckable(node) ? \"checked\" : \"value\";\n    node._valueTracker = trackValueOnNode(\n      node,\n      valueField,\n      \"\" + node[valueField]\n    );\n  }\n}\nfunction updateValueIfChanged(node) {\n  if (!node) return !1;\n  var tracker = node._valueTracker;\n  if (!tracker) return !0;\n  var lastValue = tracker.getValue();\n  var value = \"\";\n  node &&\n    (value = isCheckable(node)\n      ? node.checked\n        ? \"true\"\n        : \"false\"\n      : node.value);\n  node = value;\n  return node !== lastValue ? (tracker.setValue(node), !0) : !1;\n}\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n  return value.replace(\n    escapeSelectorAttributeValueInsideDoubleQuotesRegex,\n    function (ch) {\n      return \"\\\\\" + ch.charCodeAt(0).toString(16) + \" \";\n    }\n  );\n}\nfunction updateInput(\n  element,\n  value,\n  defaultValue,\n  lastDefaultValue,\n  checked,\n  defaultChecked,\n  type,\n  name\n) {\n  element.name = \"\";\n  null != type &&\n  \"function\" !== typeof type &&\n  \"symbol\" !== typeof type &&\n  \"boolean\" !== typeof type\n    ? (element.type = type)\n    : element.removeAttribute(\"type\");\n  if (null != value)\n    if (\"number\" === type) {\n      if ((0 === value && \"\" === element.value) || element.value != value)\n        element.value = \"\" + getToStringValue(value);\n    } else\n      element.value !== \"\" + getToStringValue(value) &&\n        (element.value = \"\" + getToStringValue(value));\n  else\n    (\"submit\" !== type && \"reset\" !== type) || element.removeAttribute(\"value\");\n  null != value\n    ? \"number\" === type && element.value == value\n      ? setDefaultValue(element, getToStringValue(element.value))\n      : setDefaultValue(element, getToStringValue(value))\n    : null != defaultValue\n      ? setDefaultValue(element, getToStringValue(defaultValue))\n      : null != lastDefaultValue && element.removeAttribute(\"value\");\n  null == checked &&\n    null != defaultChecked &&\n    (element.defaultChecked = !!defaultChecked);\n  null != checked &&\n    (element.checked =\n      checked && \"function\" !== typeof checked && \"symbol\" !== typeof checked);\n  null != name &&\n  \"function\" !== typeof name &&\n  \"symbol\" !== typeof name &&\n  \"boolean\" !== typeof name\n    ? (element.name = \"\" + getToStringValue(name))\n    : element.removeAttribute(\"name\");\n}\nfunction initInput(\n  element,\n  value,\n  defaultValue,\n  checked,\n  defaultChecked,\n  type,\n  name,\n  isHydrating\n) {\n  null != type &&\n    \"function\" !== typeof type &&\n    \"symbol\" !== typeof type &&\n    \"boolean\" !== typeof type &&\n    (element.type = type);\n  if (null != value || null != defaultValue) {\n    if (\n      !(\n        (\"submit\" !== type && \"reset\" !== type) ||\n        (void 0 !== value && null !== value)\n      )\n    ) {\n      track(element);\n      return;\n    }\n    defaultValue =\n      null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n    value = null != value ? \"\" + getToStringValue(value) : defaultValue;\n    isHydrating || value === element.value || (element.value = value);\n    element.defaultValue = value;\n  }\n  checked = null != checked ? checked : defaultChecked;\n  checked =\n    \"function\" !== typeof checked && \"symbol\" !== typeof checked && !!checked;\n  element.checked = isHydrating ? element.checked : !!checked;\n  element.defaultChecked = !!checked;\n  null != name &&\n    \"function\" !== typeof name &&\n    \"symbol\" !== typeof name &&\n    \"boolean\" !== typeof name &&\n    (element.name = name);\n  track(element);\n}\nfunction setDefaultValue(node, value) {\n  node.defaultValue !== \"\" + value && (node.defaultValue = \"\" + value);\n}\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n  node = node.options;\n  if (multiple) {\n    multiple = {};\n    for (var i = 0; i < propValue.length; i++)\n      multiple[\"$\" + propValue[i]] = !0;\n    for (propValue = 0; propValue < node.length; propValue++)\n      (i = multiple.hasOwnProperty(\"$\" + node[propValue].value)),\n        node[propValue].selected !== i && (node[propValue].selected = i),\n        i && setDefaultSelected && (node[propValue].defaultSelected = !0);\n  } else {\n    propValue = \"\" + getToStringValue(propValue);\n    multiple = null;\n    for (i = 0; i < node.length; i++) {\n      if (node[i].value === propValue) {\n        node[i].selected = !0;\n        setDefaultSelected && (node[i].defaultSelected = !0);\n        return;\n      }\n      null !== multiple || node[i].disabled || (multiple = node[i]);\n    }\n    null !== multiple && (multiple.selected = !0);\n  }\n}\nfunction updateTextarea(element, value, defaultValue) {\n  if (\n    null != value &&\n    ((value = \"\" + getToStringValue(value)),\n    value !== element.value && (element.value = value),\n    null == defaultValue)\n  ) {\n    element.defaultValue !== value && (element.defaultValue = value);\n    return;\n  }\n  element.defaultValue =\n    null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n}\nfunction initTextarea(element, value, defaultValue, children) {\n  if (null == value) {\n    if (null != children) {\n      if (null != defaultValue) throw Error(formatProdErrorMessage(92));\n      if (isArrayImpl(children)) {\n        if (1 < children.length) throw Error(formatProdErrorMessage(93));\n        children = children[0];\n      }\n      defaultValue = children;\n    }\n    null == defaultValue && (defaultValue = \"\");\n    value = defaultValue;\n  }\n  defaultValue = getToStringValue(value);\n  element.defaultValue = defaultValue;\n  children = element.textContent;\n  children === defaultValue &&\n    \"\" !== children &&\n    null !== children &&\n    (element.value = children);\n  track(element);\n}\nfunction setTextContent(node, text) {\n  if (text) {\n    var firstChild = node.firstChild;\n    if (\n      firstChild &&\n      firstChild === node.lastChild &&\n      3 === firstChild.nodeType\n    ) {\n      firstChild.nodeValue = text;\n      return;\n    }\n  }\n  node.textContent = text;\n}\nvar unitlessNumbers = new Set(\n  \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n    \" \"\n  )\n);\nfunction setValueForStyle(style, styleName, value) {\n  var isCustomProperty = 0 === styleName.indexOf(\"--\");\n  null == value || \"boolean\" === typeof value || \"\" === value\n    ? isCustomProperty\n      ? style.setProperty(styleName, \"\")\n      : \"float\" === styleName\n        ? (style.cssFloat = \"\")\n        : (style[styleName] = \"\")\n    : isCustomProperty\n      ? style.setProperty(styleName, value)\n      : \"number\" !== typeof value ||\n          0 === value ||\n          unitlessNumbers.has(styleName)\n        ? \"float\" === styleName\n          ? (style.cssFloat = value)\n          : (style[styleName] = (\"\" + value).trim())\n        : (style[styleName] = value + \"px\");\n}\nfunction setValueForStyles(node, styles, prevStyles) {\n  if (null != styles && \"object\" !== typeof styles)\n    throw Error(formatProdErrorMessage(62));\n  node = node.style;\n  if (null != prevStyles) {\n    for (var styleName in prevStyles)\n      !prevStyles.hasOwnProperty(styleName) ||\n        (null != styles && styles.hasOwnProperty(styleName)) ||\n        (0 === styleName.indexOf(\"--\")\n          ? node.setProperty(styleName, \"\")\n          : \"float\" === styleName\n            ? (node.cssFloat = \"\")\n            : (node[styleName] = \"\"),\n        (viewTransitionMutationContext = !0));\n    for (var styleName$16 in styles)\n      (styleName = styles[styleName$16]),\n        styles.hasOwnProperty(styleName$16) &&\n          prevStyles[styleName$16] !== styleName &&\n          (setValueForStyle(node, styleName$16, styleName),\n          (viewTransitionMutationContext = !0));\n  } else\n    for (var styleName$17 in styles)\n      styles.hasOwnProperty(styleName$17) &&\n        setValueForStyle(node, styleName$17, styles[styleName$17]);\n}\nfunction isCustomElement(tagName) {\n  if (-1 === tagName.indexOf(\"-\")) return !1;\n  switch (tagName) {\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 !1;\n    default:\n      return !0;\n  }\n}\nvar aliases = new Map([\n    [\"acceptCharset\", \"accept-charset\"],\n    [\"htmlFor\", \"for\"],\n    [\"httpEquiv\", \"http-equiv\"],\n    [\"crossOrigin\", \"crossorigin\"],\n    [\"accentHeight\", \"accent-height\"],\n    [\"alignmentBaseline\", \"alignment-baseline\"],\n    [\"arabicForm\", \"arabic-form\"],\n    [\"baselineShift\", \"baseline-shift\"],\n    [\"capHeight\", \"cap-height\"],\n    [\"clipPath\", \"clip-path\"],\n    [\"clipRule\", \"clip-rule\"],\n    [\"colorInterpolation\", \"color-interpolation\"],\n    [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n    [\"colorProfile\", \"color-profile\"],\n    [\"colorRendering\", \"color-rendering\"],\n    [\"dominantBaseline\", \"dominant-baseline\"],\n    [\"enableBackground\", \"enable-background\"],\n    [\"fillOpacity\", \"fill-opacity\"],\n    [\"fillRule\", \"fill-rule\"],\n    [\"floodColor\", \"flood-color\"],\n    [\"floodOpacity\", \"flood-opacity\"],\n    [\"fontFamily\", \"font-family\"],\n    [\"fontSize\", \"font-size\"],\n    [\"fontSizeAdjust\", \"font-size-adjust\"],\n    [\"fontStretch\", \"font-stretch\"],\n    [\"fontStyle\", \"font-style\"],\n    [\"fontVariant\", \"font-variant\"],\n    [\"fontWeight\", \"font-weight\"],\n    [\"glyphName\", \"glyph-name\"],\n    [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n    [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n    [\"horizAdvX\", \"horiz-adv-x\"],\n    [\"horizOriginX\", \"horiz-origin-x\"],\n    [\"imageRendering\", \"image-rendering\"],\n    [\"letterSpacing\", \"letter-spacing\"],\n    [\"lightingColor\", \"lighting-color\"],\n    [\"markerEnd\", \"marker-end\"],\n    [\"markerMid\", \"marker-mid\"],\n    [\"markerStart\", \"marker-start\"],\n    [\"maskType\", \"mask-type\"],\n    [\"overlinePosition\", \"overline-position\"],\n    [\"overlineThickness\", \"overline-thickness\"],\n    [\"paintOrder\", \"paint-order\"],\n    [\"panose-1\", \"panose-1\"],\n    [\"pointerEvents\", \"pointer-events\"],\n    [\"renderingIntent\", \"rendering-intent\"],\n    [\"shapeRendering\", \"shape-rendering\"],\n    [\"stopColor\", \"stop-color\"],\n    [\"stopOpacity\", \"stop-opacity\"],\n    [\"strikethroughPosition\", \"strikethrough-position\"],\n    [\"strikethroughThickness\", \"strikethrough-thickness\"],\n    [\"strokeDasharray\", \"stroke-dasharray\"],\n    [\"strokeDashoffset\", \"stroke-dashoffset\"],\n    [\"strokeLinecap\", \"stroke-linecap\"],\n    [\"strokeLinejoin\", \"stroke-linejoin\"],\n    [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n    [\"strokeOpacity\", \"stroke-opacity\"],\n    [\"strokeWidth\", \"stroke-width\"],\n    [\"textAnchor\", \"text-anchor\"],\n    [\"textDecoration\", \"text-decoration\"],\n    [\"textRendering\", \"text-rendering\"],\n    [\"transformOrigin\", \"transform-origin\"],\n    [\"underlinePosition\", \"underline-position\"],\n    [\"underlineThickness\", \"underline-thickness\"],\n    [\"unicodeBidi\", \"unicode-bidi\"],\n    [\"unicodeRange\", \"unicode-range\"],\n    [\"unitsPerEm\", \"units-per-em\"],\n    [\"vAlphabetic\", \"v-alphabetic\"],\n    [\"vHanging\", \"v-hanging\"],\n    [\"vIdeographic\", \"v-ideographic\"],\n    [\"vMathematical\", \"v-mathematical\"],\n    [\"vectorEffect\", \"vector-effect\"],\n    [\"vertAdvY\", \"vert-adv-y\"],\n    [\"vertOriginX\", \"vert-origin-x\"],\n    [\"vertOriginY\", \"vert-origin-y\"],\n    [\"wordSpacing\", \"word-spacing\"],\n    [\"writingMode\", \"writing-mode\"],\n    [\"xmlnsXlink\", \"xmlns:xlink\"],\n    [\"xHeight\", \"x-height\"]\n  ]),\n  isJavaScriptProtocol =\n    /^[\\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;\nfunction sanitizeURL(url) {\n  return isJavaScriptProtocol.test(\"\" + url)\n    ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n    : url;\n}\nfunction noop$1() {}\nvar currentReplayingEvent = null;\nfunction getEventTarget(nativeEvent) {\n  nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;\n  nativeEvent.correspondingUseElement &&\n    (nativeEvent = nativeEvent.correspondingUseElement);\n  return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;\n}\nvar restoreTarget = null,\n  restoreQueue = null;\nfunction restoreStateOfTarget(target) {\n  var internalInstance = getInstanceFromNode(target);\n  if (internalInstance && (target = internalInstance.stateNode)) {\n    var props = target[internalPropsKey] || null;\n    a: switch (((target = internalInstance.stateNode), internalInstance.type)) {\n      case \"input\":\n        updateInput(\n          target,\n          props.value,\n          props.defaultValue,\n          props.defaultValue,\n          props.checked,\n          props.defaultChecked,\n          props.type,\n          props.name\n        );\n        internalInstance = props.name;\n        if (\"radio\" === props.type && null != internalInstance) {\n          for (props = target; props.parentNode; ) props = props.parentNode;\n          props = props.querySelectorAll(\n            'input[name=\"' +\n              escapeSelectorAttributeValueInsideDoubleQuotes(\n                \"\" + internalInstance\n              ) +\n              '\"][type=\"radio\"]'\n          );\n          for (\n            internalInstance = 0;\n            internalInstance < props.length;\n            internalInstance++\n          ) {\n            var otherNode = props[internalInstance];\n            if (otherNode !== target && otherNode.form === target.form) {\n              var otherProps = otherNode[internalPropsKey] || null;\n              if (!otherProps) throw Error(formatProdErrorMessage(90));\n              updateInput(\n                otherNode,\n                otherProps.value,\n                otherProps.defaultValue,\n                otherProps.defaultValue,\n                otherProps.checked,\n                otherProps.defaultChecked,\n                otherProps.type,\n                otherProps.name\n              );\n            }\n          }\n          for (\n            internalInstance = 0;\n            internalInstance < props.length;\n            internalInstance++\n          )\n            (otherNode = props[internalInstance]),\n              otherNode.form === target.form && updateValueIfChanged(otherNode);\n        }\n        break a;\n      case \"textarea\":\n        updateTextarea(target, props.value, props.defaultValue);\n        break a;\n      case \"select\":\n        (internalInstance = props.value),\n          null != internalInstance &&\n            updateOptions(target, !!props.multiple, internalInstance, !1);\n    }\n  }\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, a, b) {\n  if (isInsideEventHandler) return fn(a, b);\n  isInsideEventHandler = !0;\n  try {\n    var JSCompiler_inline_result = fn(a);\n    return JSCompiler_inline_result;\n  } finally {\n    if (\n      ((isInsideEventHandler = !1),\n      null !== restoreTarget || null !== restoreQueue)\n    )\n      if (\n        (flushSyncWork$1(),\n        restoreTarget &&\n          ((a = restoreTarget),\n          (fn = restoreQueue),\n          (restoreQueue = restoreTarget = null),\n          restoreStateOfTarget(a),\n          fn))\n      )\n        for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);\n  }\n}\nfunction getListener(inst, registrationName) {\n  var stateNode = inst.stateNode;\n  if (null === stateNode) return null;\n  var props = stateNode[internalPropsKey] || null;\n  if (null === props) return null;\n  stateNode = props[registrationName];\n  a: switch (registrationName) {\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      (props = !props.disabled) ||\n        ((inst = inst.type),\n        (props = !(\n          \"button\" === inst ||\n          \"input\" === inst ||\n          \"select\" === inst ||\n          \"textarea\" === inst\n        )));\n      inst = !props;\n      break a;\n    default:\n      inst = !1;\n  }\n  if (inst) return null;\n  if (stateNode && \"function\" !== typeof stateNode)\n    throw Error(\n      formatProdErrorMessage(231, registrationName, typeof stateNode)\n    );\n  return stateNode;\n}\nvar canUseDOM = !(\n    \"undefined\" === typeof window ||\n    \"undefined\" === typeof window.document ||\n    \"undefined\" === typeof window.document.createElement\n  ),\n  passiveBrowserEventsSupported = !1;\nif (canUseDOM)\n  try {\n    var options = {};\n    Object.defineProperty(options, \"passive\", {\n      get: function () {\n        passiveBrowserEventsSupported = !0;\n      }\n    });\n    window.addEventListener(\"test\", options, options);\n    window.removeEventListener(\"test\", options, options);\n  } catch (e) {\n    passiveBrowserEventsSupported = !1;\n  }\nvar root = null,\n  startText = null,\n  fallbackText = null;\nfunction getData() {\n  if (fallbackText) return fallbackText;\n  var start,\n    startValue = startText,\n    startLength = startValue.length,\n    end,\n    endValue = \"value\" in root ? root.value : root.textContent,\n    endLength = endValue.length;\n  for (\n    start = 0;\n    start < startLength && startValue[start] === endValue[start];\n    start++\n  );\n  var minEnd = startLength - start;\n  for (\n    end = 1;\n    end <= minEnd &&\n    startValue[startLength - end] === endValue[endLength - end];\n    end++\n  );\n  return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));\n}\nfunction getEventCharCode(nativeEvent) {\n  var keyCode = nativeEvent.keyCode;\n  \"charCode\" in nativeEvent\n    ? ((nativeEvent = nativeEvent.charCode),\n      0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))\n    : (nativeEvent = keyCode);\n  10 === nativeEvent && (nativeEvent = 13);\n  return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;\n}\nfunction functionThatReturnsTrue() {\n  return !0;\n}\nfunction functionThatReturnsFalse() {\n  return !1;\n}\nfunction createSyntheticEvent(Interface) {\n  function SyntheticBaseEvent(\n    reactName,\n    reactEventType,\n    targetInst,\n    nativeEvent,\n    nativeEventTarget\n  ) {\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    for (var propName in Interface)\n      Interface.hasOwnProperty(propName) &&\n        ((reactName = Interface[propName]),\n        (this[propName] = reactName\n          ? reactName(nativeEvent)\n          : nativeEvent[propName]));\n    this.isDefaultPrevented = (\n      null != nativeEvent.defaultPrevented\n        ? nativeEvent.defaultPrevented\n        : !1 === nativeEvent.returnValue\n    )\n      ? functionThatReturnsTrue\n      : functionThatReturnsFalse;\n    this.isPropagationStopped = functionThatReturnsFalse;\n    return this;\n  }\n  assign(SyntheticBaseEvent.prototype, {\n    preventDefault: function () {\n      this.defaultPrevented = !0;\n      var event = this.nativeEvent;\n      event &&\n        (event.preventDefault\n          ? event.preventDefault()\n          : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n        (this.isDefaultPrevented = functionThatReturnsTrue));\n    },\n    stopPropagation: function () {\n      var event = this.nativeEvent;\n      event &&\n        (event.stopPropagation\n          ? event.stopPropagation()\n          : \"unknown\" !== typeof event.cancelBubble &&\n            (event.cancelBubble = !0),\n        (this.isPropagationStopped = functionThatReturnsTrue));\n    },\n    persist: function () {},\n    isPersistent: functionThatReturnsTrue\n  });\n  return SyntheticBaseEvent;\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  },\n  SyntheticEvent = createSyntheticEvent(EventInterface),\n  UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),\n  SyntheticUIEvent = createSyntheticEvent(UIEventInterface),\n  lastMovementX,\n  lastMovementY,\n  lastMouseEvent,\n  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      return void 0 === event.relatedTarget\n        ? event.fromElement === event.srcElement\n          ? event.toElement\n          : event.fromElement\n        : event.relatedTarget;\n    },\n    movementX: function (event) {\n      if (\"movementX\" in event) return event.movementX;\n      event !== lastMouseEvent &&\n        (lastMouseEvent && \"mousemove\" === event.type\n          ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),\n            (lastMovementY = event.screenY - lastMouseEvent.screenY))\n          : (lastMovementY = lastMovementX = 0),\n        (lastMouseEvent = event));\n      return lastMovementX;\n    },\n    movementY: function (event) {\n      return \"movementY\" in event ? event.movementY : lastMovementY;\n    }\n  }),\n  SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),\n  DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),\n  SyntheticDragEvent = createSyntheticEvent(DragEventInterface),\n  FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),\n  SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),\n  AnimationEventInterface = assign({}, EventInterface, {\n    animationName: 0,\n    elapsedTime: 0,\n    pseudoElement: 0\n  }),\n  SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),\n  ClipboardEventInterface = assign({}, EventInterface, {\n    clipboardData: function (event) {\n      return \"clipboardData\" in event\n        ? event.clipboardData\n        : window.clipboardData;\n    }\n  }),\n  SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),\n  CompositionEventInterface = assign({}, EventInterface, { data: 0 }),\n  SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),\n  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  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  modifierKeyToProp = {\n    Alt: \"altKey\",\n    Control: \"ctrlKey\",\n    Meta: \"metaKey\",\n    Shift: \"shiftKey\"\n  };\nfunction modifierStateGetter(keyArg) {\n  var nativeEvent = this.nativeEvent;\n  return nativeEvent.getModifierState\n    ? nativeEvent.getModifierState(keyArg)\n    : (keyArg = modifierKeyToProp[keyArg])\n      ? !!nativeEvent[keyArg]\n      : !1;\n}\nfunction getEventModifierState() {\n  return modifierStateGetter;\n}\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n    key: function (nativeEvent) {\n      if (nativeEvent.key) {\n        var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n        if (\"Unidentified\" !== key) return key;\n      }\n      return \"keypress\" === nativeEvent.type\n        ? ((nativeEvent = getEventCharCode(nativeEvent)),\n          13 === nativeEvent ? \"Enter\" : String.fromCharCode(nativeEvent))\n        : \"keydown\" === nativeEvent.type || \"keyup\" === nativeEvent.type\n          ? translateToKey[nativeEvent.keyCode] || \"Unidentified\"\n          : \"\";\n    },\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    charCode: function (event) {\n      return \"keypress\" === event.type ? getEventCharCode(event) : 0;\n    },\n    keyCode: function (event) {\n      return \"keydown\" === event.type || \"keyup\" === event.type\n        ? event.keyCode\n        : 0;\n    },\n    which: function (event) {\n      return \"keypress\" === event.type\n        ? getEventCharCode(event)\n        : \"keydown\" === event.type || \"keyup\" === event.type\n          ? event.keyCode\n          : 0;\n    }\n  }),\n  SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),\n  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  SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),\n  SubmitEventInterface = assign({}, EventInterface, { submitter: 0 }),\n  SyntheticSubmitEvent = createSyntheticEvent(SubmitEventInterface),\n  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  SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),\n  TransitionEventInterface = assign({}, EventInterface, {\n    propertyName: 0,\n    elapsedTime: 0,\n    pseudoElement: 0\n  }),\n  SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),\n  WheelEventInterface = assign({}, MouseEventInterface, {\n    deltaX: function (event) {\n      return \"deltaX\" in event\n        ? event.deltaX\n        : \"wheelDeltaX\" in event\n          ? -event.wheelDeltaX\n          : 0;\n    },\n    deltaY: function (event) {\n      return \"deltaY\" in event\n        ? event.deltaY\n        : \"wheelDeltaY\" in event\n          ? -event.wheelDeltaY\n          : \"wheelDelta\" in event\n            ? -event.wheelDelta\n            : 0;\n    },\n    deltaZ: 0,\n    deltaMode: 0\n  }),\n  SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),\n  ToggleEventInterface = assign({}, EventInterface, {\n    newState: 0,\n    oldState: 0,\n    source: 0\n  }),\n  SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),\n  END_KEYCODES = [9, 13, 27, 32],\n  canUseCompositionEvent = canUseDOM && \"CompositionEvent\" in window,\n  documentMode = null;\ncanUseDOM &&\n  \"documentMode\" in document &&\n  (documentMode = document.documentMode);\nvar canUseTextInputEvent = canUseDOM && \"TextEvent\" in window && !documentMode,\n  useFallbackCompositionData =\n    canUseDOM &&\n    (!canUseCompositionEvent ||\n      (documentMode && 8 < documentMode && 11 >= documentMode)),\n  SPACEBAR_CHAR = String.fromCharCode(32),\n  hasSpaceKeypress = !1;\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case \"keyup\":\n      return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);\n    case \"keydown\":\n      return 229 !== nativeEvent.keyCode;\n    case \"keypress\":\n    case \"mousedown\":\n    case \"focusout\":\n      return !0;\n    default:\n      return !1;\n  }\n}\nfunction getDataFromCustomEvent(nativeEvent) {\n  nativeEvent = nativeEvent.detail;\n  return \"object\" === typeof nativeEvent && \"data\" in nativeEvent\n    ? nativeEvent.data\n    : null;\n}\nvar isComposing = !1;\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case \"compositionend\":\n      return getDataFromCustomEvent(nativeEvent);\n    case \"keypress\":\n      if (32 !== nativeEvent.which) return null;\n      hasSpaceKeypress = !0;\n      return SPACEBAR_CHAR;\n    case \"textInput\":\n      return (\n        (domEventName = nativeEvent.data),\n        domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName\n      );\n    default:\n      return null;\n  }\n}\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n  if (isComposing)\n    return \"compositionend\" === domEventName ||\n      (!canUseCompositionEvent &&\n        isFallbackCompositionEnd(domEventName, nativeEvent))\n      ? ((domEventName = getData()),\n        (fallbackText = startText = root = null),\n        (isComposing = !1),\n        domEventName)\n      : null;\n  switch (domEventName) {\n    case \"paste\":\n      return null;\n    case \"keypress\":\n      if (\n        !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||\n        (nativeEvent.ctrlKey && nativeEvent.altKey)\n      ) {\n        if (nativeEvent.char && 1 < nativeEvent.char.length)\n          return nativeEvent.char;\n        if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);\n      }\n      return null;\n    case \"compositionend\":\n      return useFallbackCompositionData && \"ko\" !== nativeEvent.locale\n        ? null\n        : nativeEvent.data;\n    default:\n      return null;\n  }\n}\nvar supportedInputTypes = {\n  color: !0,\n  date: !0,\n  datetime: !0,\n  \"datetime-local\": !0,\n  email: !0,\n  month: !0,\n  number: !0,\n  password: !0,\n  range: !0,\n  search: !0,\n  tel: !0,\n  text: !0,\n  time: !0,\n  url: !0,\n  week: !0\n};\nfunction isTextInputElement(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n  return \"input\" === nodeName\n    ? !!supportedInputTypes[elem.type]\n    : \"textarea\" === nodeName\n      ? !0\n      : !1;\n}\nfunction createAndAccumulateChangeEvent(\n  dispatchQueue,\n  inst,\n  nativeEvent,\n  target\n) {\n  restoreTarget\n    ? restoreQueue\n      ? restoreQueue.push(target)\n      : (restoreQueue = [target])\n    : (restoreTarget = target);\n  inst = accumulateTwoPhaseListeners(inst, \"onChange\");\n  0 < inst.length &&\n    ((nativeEvent = new SyntheticEvent(\n      \"onChange\",\n      \"change\",\n      null,\n      nativeEvent,\n      target\n    )),\n    dispatchQueue.push({ event: nativeEvent, listeners: inst }));\n}\nvar activeElement$1 = null,\n  activeElementInst$1 = null;\nfunction runEventInBatch(dispatchQueue) {\n  processDispatchQueue(dispatchQueue, 0);\n}\nfunction getInstIfValueChanged(targetInst) {\n  var targetNode = getNodeFromInstance(targetInst);\n  if (updateValueIfChanged(targetNode)) return targetInst;\n}\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n  if (\"change\" === domEventName) return targetInst;\n}\nvar isInputEventSupported = !1;\nif (canUseDOM) {\n  var JSCompiler_inline_result$jscomp$318;\n  if (canUseDOM) {\n    var isSupported$jscomp$inline_474 = \"oninput\" in document;\n    if (!isSupported$jscomp$inline_474) {\n      var element$jscomp$inline_475 = document.createElement(\"div\");\n      element$jscomp$inline_475.setAttribute(\"oninput\", \"return;\");\n      isSupported$jscomp$inline_474 =\n        \"function\" === typeof element$jscomp$inline_475.oninput;\n    }\n    JSCompiler_inline_result$jscomp$318 = isSupported$jscomp$inline_474;\n  } else JSCompiler_inline_result$jscomp$318 = !1;\n  isInputEventSupported =\n    JSCompiler_inline_result$jscomp$318 &&\n    (!document.documentMode || 9 < document.documentMode);\n}\nfunction stopWatchingForValueChange() {\n  activeElement$1 &&\n    (activeElement$1.detachEvent(\"onpropertychange\", handlePropertyChange),\n    (activeElementInst$1 = activeElement$1 = null));\n}\nfunction handlePropertyChange(nativeEvent) {\n  if (\n    \"value\" === nativeEvent.propertyName &&\n    getInstIfValueChanged(activeElementInst$1)\n  ) {\n    var dispatchQueue = [];\n    createAndAccumulateChangeEvent(\n      dispatchQueue,\n      activeElementInst$1,\n      nativeEvent,\n      getEventTarget(nativeEvent)\n    );\n    batchedUpdates$1(runEventInBatch, dispatchQueue);\n  }\n}\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n  \"focusin\" === domEventName\n    ? (stopWatchingForValueChange(),\n      (activeElement$1 = target),\n      (activeElementInst$1 = targetInst),\n      activeElement$1.attachEvent(\"onpropertychange\", handlePropertyChange))\n    : \"focusout\" === domEventName && stopWatchingForValueChange();\n}\nfunction getTargetInstForInputEventPolyfill(domEventName) {\n  if (\n    \"selectionchange\" === domEventName ||\n    \"keyup\" === domEventName ||\n    \"keydown\" === domEventName\n  )\n    return getInstIfValueChanged(activeElementInst$1);\n}\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n  if (\"click\" === domEventName) return getInstIfValueChanged(targetInst);\n}\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n  if (\"input\" === domEventName || \"change\" === domEventName)\n    return getInstIfValueChanged(targetInst);\n}\nfunction is(x, y) {\n  return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is;\nfunction shallowEqual(objA, objB) {\n  if (objectIs(objA, objB)) return !0;\n  if (\n    \"object\" !== typeof objA ||\n    null === objA ||\n    \"object\" !== typeof objB ||\n    null === objB\n  )\n    return !1;\n  var keysA = Object.keys(objA),\n    keysB = Object.keys(objB);\n  if (keysA.length !== keysB.length) return !1;\n  for (keysB = 0; keysB < keysA.length; keysB++) {\n    var currentKey = keysA[keysB];\n    if (\n      !hasOwnProperty.call(objB, currentKey) ||\n      !objectIs(objA[currentKey], objB[currentKey])\n    )\n      return !1;\n  }\n  return !0;\n}\nfunction getActiveElement(doc) {\n  doc = doc || (\"undefined\" !== typeof document ? document : void 0);\n  if (\"undefined\" === typeof doc) return null;\n  try {\n    return doc.activeElement || doc.body;\n  } catch (e$20) {\n    return doc.body;\n  }\n}\nfunction getLeafNode(node) {\n  for (; node && node.firstChild; ) node = node.firstChild;\n  return node;\n}\nfunction getNodeForCharacterOffset(root, offset) {\n  var node = getLeafNode(root);\n  root = 0;\n  for (var nodeEnd; node; ) {\n    if (3 === node.nodeType) {\n      nodeEnd = root + node.textContent.length;\n      if (root <= offset && nodeEnd >= offset)\n        return { node: node, offset: offset - root };\n      root = nodeEnd;\n    }\n    a: {\n      for (; node; ) {\n        if (node.nextSibling) {\n          node = node.nextSibling;\n          break a;\n        }\n        node = node.parentNode;\n      }\n      node = void 0;\n    }\n    node = getLeafNode(node);\n  }\n}\nfunction containsNode(outerNode, innerNode) {\n  return outerNode && innerNode\n    ? outerNode === innerNode\n      ? !0\n      : outerNode && 3 === outerNode.nodeType\n        ? !1\n        : innerNode && 3 === innerNode.nodeType\n          ? containsNode(outerNode, innerNode.parentNode)\n          : \"contains\" in outerNode\n            ? outerNode.contains(innerNode)\n            : outerNode.compareDocumentPosition\n              ? !!(outerNode.compareDocumentPosition(innerNode) & 16)\n              : !1\n    : !1;\n}\nfunction getActiveElementDeep(containerInfo) {\n  containerInfo =\n    null != containerInfo &&\n    null != containerInfo.ownerDocument &&\n    null != containerInfo.ownerDocument.defaultView\n      ? containerInfo.ownerDocument.defaultView\n      : window;\n  for (\n    var element = getActiveElement(containerInfo.document);\n    element instanceof containerInfo.HTMLIFrameElement;\n\n  ) {\n    try {\n      var JSCompiler_inline_result =\n        \"string\" === typeof element.contentWindow.location.href;\n    } catch (err) {\n      JSCompiler_inline_result = !1;\n    }\n    if (JSCompiler_inline_result) containerInfo = element.contentWindow;\n    else break;\n    element = getActiveElement(containerInfo.document);\n  }\n  return element;\n}\nfunction hasSelectionCapabilities(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n  return (\n    nodeName &&\n    ((\"input\" === nodeName &&\n      (\"text\" === elem.type ||\n        \"search\" === elem.type ||\n        \"tel\" === elem.type ||\n        \"url\" === elem.type ||\n        \"password\" === elem.type)) ||\n      \"textarea\" === nodeName ||\n      \"true\" === elem.contentEditable)\n  );\n}\nvar skipSelectionChangeEvent =\n    canUseDOM && \"documentMode\" in document && 11 >= document.documentMode,\n  activeElement = null,\n  activeElementInst = null,\n  lastSelection = null,\n  mouseDown = !1;\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n  var doc =\n    nativeEventTarget.window === nativeEventTarget\n      ? nativeEventTarget.document\n      : 9 === nativeEventTarget.nodeType\n        ? nativeEventTarget\n        : nativeEventTarget.ownerDocument;\n  mouseDown ||\n    null == activeElement ||\n    activeElement !== getActiveElement(doc) ||\n    ((doc = activeElement),\n    \"selectionStart\" in doc && hasSelectionCapabilities(doc)\n      ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })\n      : ((doc = (\n          (doc.ownerDocument && doc.ownerDocument.defaultView) ||\n          window\n        ).getSelection()),\n        (doc = {\n          anchorNode: doc.anchorNode,\n          anchorOffset: doc.anchorOffset,\n          focusNode: doc.focusNode,\n          focusOffset: doc.focusOffset\n        })),\n    (lastSelection && shallowEqual(lastSelection, doc)) ||\n      ((lastSelection = doc),\n      (doc = accumulateTwoPhaseListeners(activeElementInst, \"onSelect\")),\n      0 < doc.length &&\n        ((nativeEvent = new SyntheticEvent(\n          \"onSelect\",\n          \"select\",\n          null,\n          nativeEvent,\n          nativeEventTarget\n        )),\n        dispatchQueue.push({ event: nativeEvent, listeners: doc }),\n        (nativeEvent.target = activeElement))));\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}\nvar vendorPrefixes = {\n    animationend: makePrefixMap(\"Animation\", \"AnimationEnd\"),\n    animationiteration: makePrefixMap(\"Animation\", \"AnimationIteration\"),\n    animationstart: makePrefixMap(\"Animation\", \"AnimationStart\"),\n    transitionrun: makePrefixMap(\"Transition\", \"TransitionRun\"),\n    transitionstart: makePrefixMap(\"Transition\", \"TransitionStart\"),\n    transitioncancel: makePrefixMap(\"Transition\", \"TransitionCancel\"),\n    transitionend: makePrefixMap(\"Transition\", \"TransitionEnd\")\n  },\n  prefixedEventNames = {},\n  style = {};\ncanUseDOM &&\n  ((style = document.createElement(\"div\").style),\n  \"AnimationEvent\" in window ||\n    (delete vendorPrefixes.animationend.animation,\n    delete vendorPrefixes.animationiteration.animation,\n    delete vendorPrefixes.animationstart.animation),\n  \"TransitionEvent\" in window ||\n    delete vendorPrefixes.transitionend.transition);\nfunction getVendorPrefixedEventName(eventName) {\n  if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];\n  if (!vendorPrefixes[eventName]) return eventName;\n  var prefixMap = vendorPrefixes[eventName],\n    styleProp;\n  for (styleProp in prefixMap)\n    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)\n      return (prefixedEventNames[eventName] = prefixMap[styleProp]);\n  return eventName;\n}\nvar ANIMATION_END = getVendorPrefixedEventName(\"animationend\"),\n  ANIMATION_ITERATION = getVendorPrefixedEventName(\"animationiteration\"),\n  ANIMATION_START = getVendorPrefixedEventName(\"animationstart\"),\n  TRANSITION_RUN = getVendorPrefixedEventName(\"transitionrun\"),\n  TRANSITION_START = getVendorPrefixedEventName(\"transitionstart\"),\n  TRANSITION_CANCEL = getVendorPrefixedEventName(\"transitioncancel\"),\n  TRANSITION_END = getVendorPrefixedEventName(\"transitionend\"),\n  topLevelEventsToReactNames = new Map(),\n  simpleEventPluginEvents =\n    \"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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\".split(\n      \" \"\n    );\nsimpleEventPluginEvents.push(\"scrollEnd\");\nfunction registerSimpleEvent(domEventName, reactName) {\n  topLevelEventsToReactNames.set(domEventName, reactName);\n  registerTwoPhaseEvent(reactName, [domEventName]);\n}\nvar globalClientIdCounter$1 = 0;\nfunction getViewTransitionName(props, instance) {\n  if (null != props.name && \"auto\" !== props.name) return props.name;\n  if (null !== instance.autoName) return instance.autoName;\n  props = pendingEffectsRoot.identifierPrefix;\n  var globalClientId = globalClientIdCounter$1++;\n  props = \"_\" + props + \"t_\" + globalClientId.toString(32) + \"_\";\n  return (instance.autoName = props);\n}\nfunction getClassNameByType(classByType) {\n  if (null == classByType || \"string\" === typeof classByType)\n    return classByType;\n  var className = null,\n    activeTypes = pendingTransitionTypes;\n  if (null !== activeTypes)\n    for (var i = 0; i < activeTypes.length; i++) {\n      var match = classByType[activeTypes[i]];\n      if (null != match) {\n        if (\"none\" === match) return \"none\";\n        className = null == className ? match : className + (\" \" + match);\n      }\n    }\n  return null == className ? classByType.default : className;\n}\nfunction getViewTransitionClassName(defaultClass, eventClass) {\n  defaultClass = getClassNameByType(defaultClass);\n  eventClass = getClassNameByType(eventClass);\n  return null == eventClass\n    ? \"auto\" === defaultClass\n      ? null\n      : defaultClass\n    : \"auto\" === eventClass\n      ? null\n      : eventClass;\n}\nvar reportGlobalError =\n    \"function\" === typeof reportError\n      ? reportError\n      : function (error) {\n          if (\n            \"object\" === typeof window &&\n            \"function\" === typeof window.ErrorEvent\n          ) {\n            var event = new window.ErrorEvent(\"error\", {\n              bubbles: !0,\n              cancelable: !0,\n              message:\n                \"object\" === typeof error &&\n                null !== error &&\n                \"string\" === typeof error.message\n                  ? String(error.message)\n                  : String(error),\n              error: error\n            });\n            if (!window.dispatchEvent(event)) return;\n          } else if (\n            \"object\" === typeof process &&\n            \"function\" === typeof process.emit\n          ) {\n            process.emit(\"uncaughtException\", error);\n            return;\n          }\n          console.error(error);\n        },\n  concurrentQueues = [],\n  concurrentQueuesIndex = 0,\n  concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n  for (\n    var endIndex = concurrentQueuesIndex,\n      i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n    i < endIndex;\n\n  ) {\n    var fiber = concurrentQueues[i];\n    concurrentQueues[i++] = null;\n    var queue = concurrentQueues[i];\n    concurrentQueues[i++] = null;\n    var update = concurrentQueues[i];\n    concurrentQueues[i++] = null;\n    var lane = concurrentQueues[i];\n    concurrentQueues[i++] = null;\n    if (null !== queue && null !== update) {\n      var pending = queue.pending;\n      null === pending\n        ? (update.next = update)\n        : ((update.next = pending.next), (pending.next = update));\n      queue.pending = update;\n    }\n    0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n  }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n  concurrentQueues[concurrentQueuesIndex++] = fiber;\n  concurrentQueues[concurrentQueuesIndex++] = queue;\n  concurrentQueues[concurrentQueuesIndex++] = update;\n  concurrentQueues[concurrentQueuesIndex++] = lane;\n  concurrentlyUpdatedLanes |= lane;\n  fiber.lanes |= lane;\n  fiber = fiber.alternate;\n  null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n  enqueueUpdate$1(fiber, queue, update, lane);\n  return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n  enqueueUpdate$1(fiber, null, null, lane);\n  return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n  sourceFiber.lanes |= lane;\n  var alternate = sourceFiber.alternate;\n  null !== alternate && (alternate.lanes |= lane);\n  for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n    (parent.childLanes |= lane),\n      (alternate = parent.alternate),\n      null !== alternate && (alternate.childLanes |= lane),\n      22 === parent.tag &&\n        ((sourceFiber = parent.stateNode),\n        null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n      (sourceFiber = parent),\n      (parent = parent.return);\n  return 3 === sourceFiber.tag\n    ? ((parent = sourceFiber.stateNode),\n      isHidden &&\n        null !== update &&\n        ((isHidden = 31 - clz32(lane)),\n        (sourceFiber = parent.hiddenUpdates),\n        (alternate = sourceFiber[isHidden]),\n        null === alternate\n          ? (sourceFiber[isHidden] = [update])\n          : alternate.push(update),\n        (update.lane = lane | 536870912)),\n      parent)\n    : null;\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n  if (50 < nestedUpdateCount)\n    throw (\n      ((nestedUpdateCount = 0),\n      (rootWithNestedUpdates = null),\n      Error(formatProdErrorMessage(185)))\n    );\n  for (var parent = sourceFiber.return; null !== parent; )\n    (sourceFiber = parent), (parent = sourceFiber.return);\n  return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar emptyContextObject = {};\nfunction FiberNode(tag, pendingProps, key, mode) {\n  this.tag = tag;\n  this.key = key;\n  this.sibling =\n    this.child =\n    this.return =\n    this.stateNode =\n    this.type =\n    this.elementType =\n      null;\n  this.index = 0;\n  this.refCleanup = this.ref = null;\n  this.pendingProps = pendingProps;\n  this.dependencies =\n    this.memoizedState =\n    this.updateQueue =\n    this.memoizedProps =\n      null;\n  this.mode = mode;\n  this.subtreeFlags = this.flags = 0;\n  this.deletions = null;\n  this.childLanes = this.lanes = 0;\n  this.alternate = null;\n}\nfunction createFiberImplClass(tag, pendingProps, key, mode) {\n  return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n  Component = Component.prototype;\n  return !(!Component || !Component.isReactComponent);\n}\nfunction createWorkInProgress(current, pendingProps) {\n  var workInProgress = current.alternate;\n  null === workInProgress\n    ? ((workInProgress = createFiberImplClass(\n        current.tag,\n        pendingProps,\n        current.key,\n        current.mode\n      )),\n      (workInProgress.elementType = current.elementType),\n      (workInProgress.type = current.type),\n      (workInProgress.stateNode = current.stateNode),\n      (workInProgress.alternate = current),\n      (current.alternate = workInProgress))\n    : ((workInProgress.pendingProps = pendingProps),\n      (workInProgress.type = current.type),\n      (workInProgress.flags = 0),\n      (workInProgress.subtreeFlags = 0),\n      (workInProgress.deletions = null));\n  workInProgress.flags = current.flags & 1206910976;\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;\n  pendingProps = current.dependencies;\n  workInProgress.dependencies =\n    null === pendingProps\n      ? null\n      : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n  workInProgress.sibling = current.sibling;\n  workInProgress.index = current.index;\n  workInProgress.ref = current.ref;\n  workInProgress.refCleanup = current.refCleanup;\n  return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n  workInProgress.flags &= 1206910978;\n  var current = workInProgress.alternate;\n  null === current\n    ? ((workInProgress.childLanes = 0),\n      (workInProgress.lanes = renderLanes),\n      (workInProgress.child = null),\n      (workInProgress.subtreeFlags = 0),\n      (workInProgress.memoizedProps = null),\n      (workInProgress.memoizedState = null),\n      (workInProgress.updateQueue = null),\n      (workInProgress.dependencies = null),\n      (workInProgress.stateNode = null))\n    : ((workInProgress.childLanes = current.childLanes),\n      (workInProgress.lanes = current.lanes),\n      (workInProgress.child = current.child),\n      (workInProgress.subtreeFlags = 0),\n      (workInProgress.deletions = null),\n      (workInProgress.memoizedProps = current.memoizedProps),\n      (workInProgress.memoizedState = current.memoizedState),\n      (workInProgress.updateQueue = current.updateQueue),\n      (workInProgress.type = current.type),\n      (renderLanes = current.dependencies),\n      (workInProgress.dependencies =\n        null === renderLanes\n          ? null\n          : {\n              lanes: renderLanes.lanes,\n              firstContext: renderLanes.firstContext\n            }));\n  return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n  type,\n  key,\n  pendingProps,\n  owner,\n  mode,\n  lanes\n) {\n  var fiberTag = 0;\n  owner = type;\n  if (\"function\" === typeof owner) shouldConstruct(owner) && (fiberTag = 1);\n  else if (\"string\" === typeof owner)\n    fiberTag = isHostHoistableType(\n      type,\n      pendingProps,\n      contextStackCursor.current\n    )\n      ? 26\n      : \"html\" === type || \"head\" === type || \"body\" === type\n        ? 27\n        : 5;\n  else\n    a: switch (owner) {\n      case REACT_ACTIVITY_TYPE:\n        return (\n          (type = createFiberImplClass(31, pendingProps, key, mode)),\n          (type.elementType = REACT_ACTIVITY_TYPE),\n          (type.lanes = lanes),\n          type\n        );\n      case REACT_FRAGMENT_TYPE:\n        return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n      case REACT_STRICT_MODE_TYPE:\n        fiberTag = 8;\n        mode |= 24;\n        break;\n      case REACT_PROFILER_TYPE:\n        return (\n          (type = createFiberImplClass(12, pendingProps, key, mode | 2)),\n          (type.elementType = REACT_PROFILER_TYPE),\n          (type.lanes = lanes),\n          type\n        );\n      case REACT_SUSPENSE_TYPE:\n        return (\n          (type = createFiberImplClass(13, pendingProps, key, mode)),\n          (type.elementType = REACT_SUSPENSE_TYPE),\n          (type.lanes = lanes),\n          type\n        );\n      case REACT_SUSPENSE_LIST_TYPE:\n        return (\n          (type = createFiberImplClass(19, pendingProps, key, mode)),\n          (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n          (type.lanes = lanes),\n          type\n        );\n      case REACT_LEGACY_HIDDEN_TYPE:\n      case REACT_VIEW_TRANSITION_TYPE:\n        return (\n          (type = mode | 32),\n          (type = createFiberImplClass(30, pendingProps, key, type)),\n          (type.elementType = REACT_VIEW_TRANSITION_TYPE),\n          (type.lanes = lanes),\n          (type.stateNode = {\n            autoName: null,\n            paired: null,\n            clones: null,\n            ref: null\n          }),\n          type\n        );\n      default:\n        if (\"object\" === typeof owner && null !== owner)\n          switch (owner.$$typeof) {\n            case REACT_CONTEXT_TYPE:\n              fiberTag = 10;\n              break a;\n            case REACT_CONSUMER_TYPE:\n              fiberTag = 9;\n              break a;\n            case REACT_FORWARD_REF_TYPE:\n              fiberTag = 11;\n              break a;\n            case REACT_MEMO_TYPE:\n              fiberTag = 14;\n              break a;\n            case REACT_LAZY_TYPE:\n              fiberTag = 16;\n              owner = null;\n              break a;\n          }\n        fiberTag = 29;\n        pendingProps = Error(\n          formatProdErrorMessage(130, null === type ? \"null\" : typeof type, \"\")\n        );\n        owner = null;\n    }\n  key = createFiberImplClass(fiberTag, pendingProps, key, mode);\n  key.elementType = type;\n  key.type = owner;\n  key.lanes = lanes;\n  return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n  elements = createFiberImplClass(7, elements, key, mode);\n  elements.lanes = lanes;\n  return elements;\n}\nfunction createFiberFromText(content, mode, lanes) {\n  content = createFiberImplClass(6, content, null, mode);\n  content.lanes = lanes;\n  return content;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n  var fiber = createFiberImplClass(18, null, null, 0);\n  fiber.stateNode = dehydratedNode;\n  return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n  mode = createFiberImplClass(\n    4,\n    null !== portal.children ? portal.children : [],\n    portal.key,\n    mode\n  );\n  mode.lanes = lanes;\n  mode.stateNode = {\n    containerInfo: portal.containerInfo,\n    pendingChildren: null,\n    implementation: portal.implementation\n  };\n  return mode;\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n  if (\"object\" === typeof value && null !== value) {\n    var existing = CapturedStacks.get(value);\n    if (void 0 !== existing) return existing;\n    source = {\n      value: value,\n      source: source,\n      stack: getStackByFiberInDevAndProd(source)\n    };\n    CapturedStacks.set(value, source);\n    return source;\n  }\n  return {\n    value: value,\n    source: source,\n    stack: getStackByFiberInDevAndProd(source)\n  };\n}\nvar forkStack = [],\n  forkStackIndex = 0,\n  treeForkProvider = null,\n  treeForkCount = 0,\n  idStack = [],\n  idStackIndex = 0,\n  treeContextProvider = null,\n  treeContextId = 1,\n  treeContextOverflow = \"\";\nfunction pushTreeFork(workInProgress, totalChildren) {\n  forkStack[forkStackIndex++] = treeForkCount;\n  forkStack[forkStackIndex++] = treeForkProvider;\n  treeForkProvider = workInProgress;\n  treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextProvider = workInProgress;\n  var baseIdWithLeadingBit = treeContextId;\n  workInProgress = treeContextOverflow;\n  var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n  baseIdWithLeadingBit &= ~(1 << baseLength);\n  index += 1;\n  var length = 32 - clz32(totalChildren) + baseLength;\n  if (30 < length) {\n    var numberOfOverflowBits = baseLength - (baseLength % 5);\n    length = (\n      baseIdWithLeadingBit &\n      ((1 << numberOfOverflowBits) - 1)\n    ).toString(32);\n    baseIdWithLeadingBit >>= numberOfOverflowBits;\n    baseLength -= numberOfOverflowBits;\n    treeContextId =\n      (1 << (32 - clz32(totalChildren) + baseLength)) |\n      (index << baseLength) |\n      baseIdWithLeadingBit;\n    treeContextOverflow = length + workInProgress;\n  } else\n    (treeContextId =\n      (1 << length) | (index << baseLength) | baseIdWithLeadingBit),\n      (treeContextOverflow = workInProgress);\n}\nfunction pushMaterializedTreeId(workInProgress) {\n  null !== workInProgress.return &&\n    (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));\n}\nfunction popTreeContext(workInProgress) {\n  for (; workInProgress === treeForkProvider; )\n    (treeForkProvider = forkStack[--forkStackIndex]),\n      (forkStack[forkStackIndex] = null),\n      (treeForkCount = forkStack[--forkStackIndex]),\n      (forkStack[forkStackIndex] = null);\n  for (; 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}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextId = suspendedContext.id;\n  treeContextOverflow = suspendedContext.overflow;\n  treeContextProvider = workInProgress;\n}\nvar hydrationParentFiber = null,\n  nextHydratableInstance = null,\n  isHydrating = !1,\n  hydrationErrors = null,\n  rootOrSingletonContext = !1,\n  HydrationMismatchException = Error(formatProdErrorMessage(519));\nfunction throwOnHydrationMismatch(fiber) {\n  var error = Error(\n    formatProdErrorMessage(\n      418,\n      1 < arguments.length && void 0 !== arguments[1] && arguments[1]\n        ? \"text\"\n        : \"HTML\",\n      \"\"\n    )\n  );\n  queueHydrationError(createCapturedValueAtFiber(error, fiber));\n  throw HydrationMismatchException;\n}\nfunction prepareToHydrateHostInstance(fiber) {\n  var instance = fiber.stateNode,\n    type = fiber.type,\n    props = fiber.memoizedProps;\n  instance[internalInstanceKey] = fiber;\n  instance[internalPropsKey] = props;\n  switch (type) {\n    case \"dialog\":\n      listenToNonDelegatedEvent(\"cancel\", instance);\n      listenToNonDelegatedEvent(\"close\", instance);\n      break;\n    case \"iframe\":\n    case \"object\":\n    case \"embed\":\n      listenToNonDelegatedEvent(\"load\", instance);\n      break;\n    case \"video\":\n    case \"audio\":\n      for (type = 0; type < mediaEventTypes.length; type++)\n        listenToNonDelegatedEvent(mediaEventTypes[type], instance);\n      break;\n    case \"source\":\n      listenToNonDelegatedEvent(\"error\", instance);\n      break;\n    case \"img\":\n    case \"image\":\n    case \"link\":\n      listenToNonDelegatedEvent(\"error\", instance);\n      listenToNonDelegatedEvent(\"load\", instance);\n      break;\n    case \"details\":\n      listenToNonDelegatedEvent(\"toggle\", instance);\n      break;\n    case \"input\":\n      listenToNonDelegatedEvent(\"invalid\", instance);\n      initInput(\n        instance,\n        props.value,\n        props.defaultValue,\n        props.checked,\n        props.defaultChecked,\n        props.type,\n        props.name,\n        !0\n      );\n      break;\n    case \"select\":\n      listenToNonDelegatedEvent(\"invalid\", instance);\n      break;\n    case \"textarea\":\n      listenToNonDelegatedEvent(\"invalid\", instance),\n        initTextarea(instance, props.value, props.defaultValue, props.children);\n  }\n  type = props.children;\n  (\"string\" !== typeof type &&\n    \"number\" !== typeof type &&\n    \"bigint\" !== typeof type) ||\n  instance.textContent === \"\" + type ||\n  !0 === props.suppressHydrationWarning ||\n  checkForUnmatchedText(instance.textContent, type)\n    ? (null != props.popover &&\n        (listenToNonDelegatedEvent(\"beforetoggle\", instance),\n        listenToNonDelegatedEvent(\"toggle\", instance)),\n      null != props.onScroll && listenToNonDelegatedEvent(\"scroll\", instance),\n      null != props.onScrollEnd &&\n        listenToNonDelegatedEvent(\"scrollend\", instance),\n      null != props.onClick && (instance.onclick = noop$1),\n      (instance = !0))\n    : (instance = !1);\n  instance || throwOnHydrationMismatch(fiber, !0);\n}\nfunction popToNextHostParent(fiber) {\n  for (hydrationParentFiber = fiber.return; hydrationParentFiber; )\n    switch (hydrationParentFiber.tag) {\n      case 5:\n      case 31:\n      case 13:\n        rootOrSingletonContext = !1;\n        return;\n      case 27:\n      case 3:\n        rootOrSingletonContext = !0;\n        return;\n      default:\n        hydrationParentFiber = hydrationParentFiber.return;\n    }\n}\nfunction popHydrationState(fiber) {\n  if (fiber !== hydrationParentFiber) return !1;\n  if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;\n  var tag = fiber.tag,\n    JSCompiler_temp;\n  if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {\n    if ((JSCompiler_temp = 5 === tag))\n      (JSCompiler_temp = fiber.type),\n        (JSCompiler_temp =\n          !(\"form\" !== JSCompiler_temp && \"button\" !== JSCompiler_temp) ||\n          shouldSetTextContent(fiber.type, fiber.memoizedProps));\n    JSCompiler_temp = !JSCompiler_temp;\n  }\n  JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);\n  popToNextHostParent(fiber);\n  if (13 === tag) {\n    fiber = fiber.memoizedState;\n    fiber = null !== fiber ? fiber.dehydrated : null;\n    if (!fiber) throw Error(formatProdErrorMessage(317));\n    nextHydratableInstance =\n      getNextHydratableInstanceAfterHydrationBoundary(fiber);\n  } else if (31 === tag) {\n    fiber = fiber.memoizedState;\n    fiber = null !== fiber ? fiber.dehydrated : null;\n    if (!fiber) throw Error(formatProdErrorMessage(317));\n    nextHydratableInstance =\n      getNextHydratableInstanceAfterHydrationBoundary(fiber);\n  } else\n    27 === tag\n      ? ((tag = nextHydratableInstance),\n        isSingletonScope(fiber.type)\n          ? ((fiber = previousHydratableOnEnteringScopedSingleton),\n            (previousHydratableOnEnteringScopedSingleton = null),\n            (nextHydratableInstance = fiber))\n          : (nextHydratableInstance = tag))\n      : (nextHydratableInstance = hydrationParentFiber\n          ? getNextHydratable(fiber.stateNode.nextSibling)\n          : null);\n  return !0;\n}\nfunction resetHydrationState() {\n  nextHydratableInstance = hydrationParentFiber = null;\n  isHydrating = !1;\n}\nfunction upgradeHydrationErrorsToRecoverable() {\n  var queuedErrors = hydrationErrors;\n  null !== queuedErrors &&\n    (null === workInProgressRootRecoverableErrors\n      ? (workInProgressRootRecoverableErrors = queuedErrors)\n      : workInProgressRootRecoverableErrors.push.apply(\n          workInProgressRootRecoverableErrors,\n          queuedErrors\n        ),\n    (hydrationErrors = null));\n  return queuedErrors;\n}\nfunction queueHydrationError(error) {\n  null === hydrationErrors\n    ? (hydrationErrors = [error])\n    : hydrationErrors.push(error);\n}\nvar valueCursor = createCursor(null),\n  currentlyRenderingFiber$1 = null,\n  lastContextDependency = null;\nfunction pushProvider(providerFiber, context, nextValue) {\n  push(valueCursor, context._currentValue);\n  context._currentValue = nextValue;\n}\nfunction popProvider(context) {\n  context._currentValue = valueCursor.current;\n  pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n  for (; null !== parent; ) {\n    var alternate = parent.alternate;\n    (parent.childLanes & renderLanes) !== renderLanes\n      ? ((parent.childLanes |= renderLanes),\n        null !== alternate && (alternate.childLanes |= renderLanes))\n      : null !== alternate &&\n        (alternate.childLanes & renderLanes) !== renderLanes &&\n        (alternate.childLanes |= renderLanes);\n    if (parent === propagationRoot) break;\n    parent = parent.return;\n  }\n}\nfunction propagateContextChanges(\n  workInProgress,\n  contexts,\n  renderLanes,\n  forcePropagateEntireTree\n) {\n  var fiber = workInProgress.child;\n  null !== fiber && (fiber.return = workInProgress);\n  for (; null !== fiber; ) {\n    var list = fiber.dependencies;\n    if (null !== list) {\n      var nextFiber = fiber.child;\n      list = list.firstContext;\n      a: for (; null !== list; ) {\n        var dependency = list;\n        list = fiber;\n        for (var i = 0; i < contexts.length; i++)\n          if (dependency.context === contexts[i]) {\n            list.lanes |= renderLanes;\n            dependency = list.alternate;\n            null !== dependency && (dependency.lanes |= renderLanes);\n            scheduleContextWorkOnParentPath(\n              list.return,\n              renderLanes,\n              workInProgress\n            );\n            forcePropagateEntireTree || (nextFiber = null);\n            break a;\n          }\n        list = dependency.next;\n      }\n    } else if (18 === fiber.tag) {\n      nextFiber = fiber.return;\n      if (null === nextFiber) throw Error(formatProdErrorMessage(341));\n      nextFiber.lanes |= renderLanes;\n      list = nextFiber.alternate;\n      null !== list && (list.lanes |= renderLanes);\n      scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);\n      nextFiber = null;\n    } else\n      13 === fiber.tag &&\n      null !== fiber.memoizedState &&\n      null === fiber.memoizedState.dehydrated\n        ? ((fiber.lanes |= renderLanes),\n          (nextFiber = fiber.alternate),\n          null !== nextFiber && (nextFiber.lanes |= renderLanes),\n          scheduleContextWorkOnParentPath(\n            fiber.return,\n            renderLanes,\n            workInProgress\n          ),\n          (nextFiber = fiber.child),\n          (nextFiber = null !== nextFiber ? nextFiber.sibling : null))\n        : (nextFiber = fiber.child);\n    if (null !== nextFiber) nextFiber.return = fiber;\n    else\n      for (nextFiber = fiber; null !== nextFiber; ) {\n        if (nextFiber === workInProgress) {\n          nextFiber = null;\n          break;\n        }\n        fiber = nextFiber.sibling;\n        if (null !== fiber) {\n          fiber.return = nextFiber.return;\n          nextFiber = fiber;\n          break;\n        }\n        nextFiber = nextFiber.return;\n      }\n    fiber = nextFiber;\n  }\n}\nfunction propagateParentContextChanges(\n  current,\n  workInProgress,\n  renderLanes,\n  forcePropagateEntireTree\n) {\n  current = null;\n  for (\n    var parent = workInProgress, isInsidePropagationBailout = !1;\n    null !== parent;\n\n  ) {\n    if (!isInsidePropagationBailout)\n      if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;\n      else if (0 !== (parent.flags & 262144)) break;\n    if (10 === parent.tag) {\n      var currentParent = parent.alternate;\n      if (null === currentParent) throw Error(formatProdErrorMessage(387));\n      currentParent = currentParent.memoizedProps;\n      if (null !== currentParent) {\n        var context = parent.type;\n        objectIs(parent.pendingProps.value, currentParent.value) ||\n          (null !== current ? current.push(context) : (current = [context]));\n      }\n    } else if (parent === hostTransitionProviderCursor.current) {\n      currentParent = parent.alternate;\n      if (null === currentParent) throw Error(formatProdErrorMessage(387));\n      currentParent.memoizedState.memoizedState !==\n        parent.memoizedState.memoizedState &&\n        (null !== current\n          ? current.push(HostTransitionContext)\n          : (current = [HostTransitionContext]));\n    }\n    parent = parent.return;\n  }\n  null !== current &&\n    propagateContextChanges(\n      workInProgress,\n      current,\n      renderLanes,\n      forcePropagateEntireTree\n    );\n  workInProgress.flags |= 262144;\n  return null !== current;\n}\nfunction checkIfContextChanged(currentDependencies) {\n  for (\n    currentDependencies = currentDependencies.firstContext;\n    null !== currentDependencies;\n\n  ) {\n    if (\n      !objectIs(\n        currentDependencies.context._currentValue,\n        currentDependencies.memoizedValue\n      )\n    )\n      return !0;\n    currentDependencies = currentDependencies.next;\n  }\n  return !1;\n}\nfunction prepareToReadContext(workInProgress) {\n  currentlyRenderingFiber$1 = workInProgress;\n  lastContextDependency = null;\n  workInProgress = workInProgress.dependencies;\n  null !== workInProgress && (workInProgress.firstContext = null);\n}\nfunction readContext(context) {\n  return readContextForConsumer(currentlyRenderingFiber$1, context);\n}\nfunction readContextDuringReconciliation(consumer, context) {\n  null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);\n  return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n  var value = context._currentValue;\n  context = { context: context, memoizedValue: value, next: null };\n  if (null === lastContextDependency) {\n    if (null === consumer) throw Error(formatProdErrorMessage(308));\n    lastContextDependency = context;\n    consumer.dependencies = { lanes: 0, firstContext: context };\n    consumer.flags |= 524288;\n  } else lastContextDependency = lastContextDependency.next = context;\n  return value;\n}\nvar AbortControllerLocal =\n    \"undefined\" !== typeof AbortController\n      ? AbortController\n      : function () {\n          var listeners = [],\n            signal = (this.signal = {\n              aborted: !1,\n              addEventListener: function (type, listener) {\n                listeners.push(listener);\n              }\n            });\n          this.abort = function () {\n            signal.aborted = !0;\n            listeners.forEach(function (listener) {\n              return listener();\n            });\n          };\n        },\n  scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n  NormalPriority = Scheduler.unstable_NormalPriority,\n  CacheContext = {\n    $$typeof: REACT_CONTEXT_TYPE,\n    Consumer: null,\n    Provider: null,\n    _currentValue: null,\n    _currentValue2: null,\n    _threadCount: 0\n  };\nfunction createCache() {\n  return {\n    controller: new AbortControllerLocal(),\n    data: new Map(),\n    refCount: 0\n  };\n}\nfunction releaseCache(cache) {\n  cache.refCount--;\n  0 === cache.refCount &&\n    scheduleCallback$2(NormalPriority, function () {\n      cache.controller.abort();\n    });\n}\nfunction queueTransitionTypes(root, transitionTypes) {\n  if (0 !== (root.pendingLanes & 4194048)) {\n    var queued = root.transitionTypes;\n    null === queued && (queued = root.transitionTypes = []);\n    for (root = 0; root < transitionTypes.length; root++) {\n      var transitionType = transitionTypes[root];\n      -1 === queued.indexOf(transitionType) && queued.push(transitionType);\n    }\n  }\n}\nvar entangledTransitionTypes = null;\nfunction claimQueuedTransitionTypes(root) {\n  var claimed = root.transitionTypes;\n  root.transitionTypes = null;\n  return claimed;\n}\nvar currentEntangledListeners = null,\n  currentEntangledPendingCount = 0,\n  currentEntangledLane = 0,\n  currentEntangledActionThenable = null;\nfunction entangleAsyncAction(transition, thenable) {\n  if (null === currentEntangledListeners) {\n    var entangledListeners = (currentEntangledListeners = []);\n    currentEntangledPendingCount = 0;\n    currentEntangledLane = requestTransitionLane();\n    currentEntangledActionThenable = {\n      status: \"pending\",\n      value: void 0,\n      then: function (resolve) {\n        entangledListeners.push(resolve);\n      }\n    };\n  }\n  currentEntangledPendingCount++;\n  thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n  return thenable;\n}\nfunction pingEngtangledActionScope() {\n  if (\n    0 === --currentEntangledPendingCount &&\n    ((entangledTransitionTypes = null), null !== currentEntangledListeners)\n  ) {\n    null !== currentEntangledActionThenable &&\n      (currentEntangledActionThenable.status = \"fulfilled\");\n    var listeners = currentEntangledListeners;\n    currentEntangledListeners = null;\n    currentEntangledLane = 0;\n    currentEntangledActionThenable = null;\n    for (var i = 0; i < listeners.length; i++) (0, listeners[i])();\n  }\n}\nfunction chainThenableValue(thenable, result) {\n  var listeners = [],\n    thenableWithOverride = {\n      status: \"pending\",\n      value: null,\n      reason: null,\n      then: function (resolve) {\n        listeners.push(resolve);\n      }\n    };\n  thenable.then(\n    function () {\n      thenableWithOverride.status = \"fulfilled\";\n      thenableWithOverride.value = result;\n      for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);\n    },\n    function (error) {\n      thenableWithOverride.status = \"rejected\";\n      thenableWithOverride.reason = error;\n      for (error = 0; error < listeners.length; error++)\n        (0, listeners[error])(void 0);\n    }\n  );\n  return thenableWithOverride;\n}\nvar prevOnStartTransitionFinish = ReactSharedInternals.S;\nReactSharedInternals.S = function (transition, returnValue) {\n  globalMostRecentTransitionTime = now();\n  \"object\" === typeof returnValue &&\n    null !== returnValue &&\n    \"function\" === typeof returnValue.then &&\n    entangleAsyncAction(transition, returnValue);\n  if (null !== entangledTransitionTypes)\n    for (var root$28 = firstScheduledRoot; null !== root$28; )\n      queueTransitionTypes(root$28, entangledTransitionTypes),\n        (root$28 = root$28.next);\n  root$28 = transition.types;\n  if (null !== root$28) {\n    for (var root$29 = firstScheduledRoot; null !== root$29; )\n      queueTransitionTypes(root$29, root$28), (root$29 = root$29.next);\n    if (0 !== currentEntangledLane) {\n      root$29 = entangledTransitionTypes;\n      null === root$29 && (root$29 = entangledTransitionTypes = []);\n      for (var i = 0; i < root$28.length; i++) {\n        var transitionType = root$28[i];\n        -1 === root$29.indexOf(transitionType) && root$29.push(transitionType);\n      }\n    }\n  }\n  null !== prevOnStartTransitionFinish &&\n    prevOnStartTransitionFinish(transition, returnValue);\n};\nvar resumedCache = createCursor(null);\nfunction peekCacheFromPool() {\n  var cacheResumedFromPreviousRender = resumedCache.current;\n  return null !== cacheResumedFromPreviousRender\n    ? cacheResumedFromPreviousRender\n    : workInProgressRoot.pooledCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool) {\n  null === prevCachePool\n    ? push(resumedCache, resumedCache.current)\n    : push(resumedCache, prevCachePool.pool);\n}\nfunction getSuspendedCache() {\n  var cacheFromPool = peekCacheFromPool();\n  return null === cacheFromPool\n    ? null\n    : { parent: CacheContext._currentValue, pool: cacheFromPool };\n}\nvar SuspenseException = Error(formatProdErrorMessage(460)),\n  SuspenseyCommitException = Error(formatProdErrorMessage(474)),\n  SuspenseActionException = Error(formatProdErrorMessage(542)),\n  noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n  thenable = thenable.status;\n  return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction trackUsedThenable(thenableState, thenable, index) {\n  index = thenableState[index];\n  void 0 === index\n    ? thenableState.push(thenable)\n    : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));\n  switch (thenable.status) {\n    case \"fulfilled\":\n      return thenable.value;\n    case \"rejected\":\n      thenableState = thenable.reason;\n      checkIfUseWrappedInAsyncCatch(thenableState);\n      if (void 0 === thenableState && !(\"reason\" in thenable))\n        throw Error(formatProdErrorMessage(600));\n      throw thenableState;\n    default:\n      if (\"string\" === typeof thenable.status) thenable.then(noop$1, noop$1);\n      else {\n        thenableState = workInProgressRoot;\n        if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n          throw Error(formatProdErrorMessage(482));\n        thenableState = thenable;\n        thenableState.status = \"pending\";\n        thenableState.then(\n          function (fulfilledValue) {\n            if (\"pending\" === thenable.status) {\n              var fulfilledThenable = thenable;\n              fulfilledThenable.status = \"fulfilled\";\n              fulfilledThenable.value = fulfilledValue;\n            }\n          },\n          function (error) {\n            if (\"pending\" === thenable.status) {\n              var rejectedThenable = thenable;\n              rejectedThenable.status = \"rejected\";\n              rejectedThenable.reason = error;\n            }\n          }\n        );\n      }\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw (\n            ((thenableState = thenable.reason),\n            checkIfUseWrappedInAsyncCatch(thenableState),\n            thenableState)\n          );\n      }\n      suspendedThenable = thenable;\n      throw SuspenseException;\n  }\n}\nfunction resolveLazy(lazyType) {\n  try {\n    var init = lazyType._init;\n    return init(lazyType._payload);\n  } catch (x) {\n    if (null !== x && \"object\" === typeof x && \"function\" === typeof x.then)\n      throw ((suspendedThenable = x), SuspenseException);\n    throw x;\n  }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n  if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));\n  var thenable = suspendedThenable;\n  suspendedThenable = null;\n  return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n  if (\n    rejectedReason === SuspenseException ||\n    rejectedReason === SuspenseActionException\n  )\n    throw Error(formatProdErrorMessage(483));\n}\nvar thenableState$1 = null,\n  thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n  var index = thenableIndexCounter$1;\n  thenableIndexCounter$1 += 1;\n  null === thenableState$1 && (thenableState$1 = []);\n  return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction coerceRef(workInProgress, element) {\n  element = element.props.ref;\n  workInProgress.ref = void 0 !== element ? element : null;\n}\nfunction throwOnInvalidObjectTypeImpl(returnFiber, newChild) {\n  if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)\n    throw Error(formatProdErrorMessage(525));\n  returnFiber = Object.prototype.toString.call(newChild);\n  throw Error(\n    formatProdErrorMessage(\n      31,\n      \"[object Object]\" === returnFiber\n        ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n        : returnFiber\n    )\n  );\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n  function deleteChild(returnFiber, childToDelete) {\n    if (shouldTrackSideEffects) {\n      var deletions = returnFiber.deletions;\n      null === deletions\n        ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n        : deletions.push(childToDelete);\n    }\n  }\n  function deleteRemainingChildren(returnFiber, currentFirstChild) {\n    if (!shouldTrackSideEffects) return null;\n    for (; null !== currentFirstChild; )\n      deleteChild(returnFiber, currentFirstChild),\n        (currentFirstChild = currentFirstChild.sibling);\n    return null;\n  }\n  function mapRemainingChildren(currentFirstChild) {\n    for (var existingChildren = new Map(); null !== currentFirstChild; )\n      null === currentFirstChild.key\n        ? existingChildren.set(currentFirstChild.index, currentFirstChild)\n        : existingChildren.set(currentFirstChild.key, currentFirstChild),\n        (currentFirstChild = currentFirstChild.sibling);\n    return existingChildren;\n  }\n  function useFiber(fiber, pendingProps) {\n    fiber = createWorkInProgress(fiber, pendingProps);\n    fiber.index = 0;\n    fiber.sibling = null;\n    return fiber;\n  }\n  function placeChild(newFiber, lastPlacedIndex, newIndex) {\n    newFiber.index = newIndex;\n    if (!shouldTrackSideEffects)\n      return (newFiber.flags |= 1048576), lastPlacedIndex;\n    newIndex = newFiber.alternate;\n    if (null !== newIndex)\n      return (\n        (newIndex = newIndex.index),\n        newIndex < lastPlacedIndex\n          ? ((newFiber.flags |= 2), lastPlacedIndex)\n          : newIndex\n      );\n    newFiber.flags |= 134217730;\n    return lastPlacedIndex;\n  }\n  function placeSingleChild(newFiber) {\n    shouldTrackSideEffects &&\n      null === newFiber.alternate &&\n      (newFiber.flags |= 134217730);\n    return newFiber;\n  }\n  function updateTextNode(returnFiber, current, textContent, lanes) {\n    if (null === current || 6 !== current.tag)\n      return (\n        (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n        (current.return = returnFiber),\n        current\n      );\n    current = useFiber(current, textContent);\n    current.return = returnFiber;\n    return current;\n  }\n  function updateElement(returnFiber, current, element, lanes) {\n    var elementType = element.type;\n    if (elementType === REACT_FRAGMENT_TYPE)\n      return (\n        (returnFiber = updateFragment(\n          returnFiber,\n          current,\n          element.props.children,\n          lanes,\n          element.key\n        )),\n        coerceRef(returnFiber, element),\n        returnFiber\n      );\n    if (\n      null !== current &&\n      (current.elementType === elementType ||\n        (\"object\" === typeof elementType &&\n          null !== elementType &&\n          elementType.$$typeof === REACT_LAZY_TYPE &&\n          resolveLazy(elementType) === current.type))\n    )\n      return (\n        (current = useFiber(current, element.props)),\n        coerceRef(current, element),\n        (current.return = returnFiber),\n        current\n      );\n    current = createFiberFromTypeAndProps(\n      element.type,\n      element.key,\n      element.props,\n      null,\n      returnFiber.mode,\n      lanes\n    );\n    coerceRef(current, element);\n    current.return = returnFiber;\n    return current;\n  }\n  function updatePortal(returnFiber, current, portal, lanes) {\n    if (\n      null === current ||\n      4 !== current.tag ||\n      current.stateNode.containerInfo !== portal.containerInfo ||\n      current.stateNode.implementation !== portal.implementation\n    )\n      return (\n        (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n        (current.return = returnFiber),\n        current\n      );\n    current = useFiber(current, portal.children || []);\n    current.return = returnFiber;\n    return current;\n  }\n  function updateFragment(returnFiber, current, fragment, lanes, key) {\n    if (null === current || 7 !== current.tag)\n      return (\n        (current = createFiberFromFragment(\n          fragment,\n          returnFiber.mode,\n          lanes,\n          key\n        )),\n        (current.return = returnFiber),\n        current\n      );\n    current = useFiber(current, fragment);\n    current.return = returnFiber;\n    return current;\n  }\n  function createChild(returnFiber, newChild, lanes) {\n    if (\n      (\"string\" === typeof newChild && \"\" !== newChild) ||\n      \"number\" === typeof newChild ||\n      \"bigint\" === typeof newChild\n    )\n      return (\n        (newChild = createFiberFromText(\n          \"\" + newChild,\n          returnFiber.mode,\n          lanes\n        )),\n        (newChild.return = returnFiber),\n        newChild\n      );\n    if (\"object\" === typeof newChild && null !== newChild) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          return (\n            (lanes = createFiberFromTypeAndProps(\n              newChild.type,\n              newChild.key,\n              newChild.props,\n              null,\n              returnFiber.mode,\n              lanes\n            )),\n            coerceRef(lanes, newChild),\n            (lanes.return = returnFiber),\n            lanes\n          );\n        case REACT_PORTAL_TYPE:\n          return (\n            (newChild = createFiberFromPortal(\n              newChild,\n              returnFiber.mode,\n              lanes\n            )),\n            (newChild.return = returnFiber),\n            newChild\n          );\n        case REACT_LAZY_TYPE:\n          return (\n            (newChild = resolveLazy(newChild)),\n            createChild(returnFiber, newChild, lanes)\n          );\n      }\n      if (isArrayImpl(newChild) || getIteratorFn(newChild))\n        return (\n          (newChild = createFiberFromFragment(\n            newChild,\n            returnFiber.mode,\n            lanes,\n            null\n          )),\n          (newChild.return = returnFiber),\n          newChild\n        );\n      if (\"function\" === typeof newChild.then)\n        return createChild(returnFiber, unwrapThenable(newChild), lanes);\n      if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n        return createChild(\n          returnFiber,\n          readContextDuringReconciliation(returnFiber, newChild),\n          lanes\n        );\n      throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n    }\n    return null;\n  }\n  function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n    var key = null !== oldFiber ? oldFiber.key : null;\n    if (\n      (\"string\" === typeof newChild && \"\" !== newChild) ||\n      \"number\" === typeof newChild ||\n      \"bigint\" === typeof newChild\n    )\n      return null !== key\n        ? null\n        : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n    if (\"object\" === typeof newChild && null !== newChild) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          return newChild.key === key\n            ? updateElement(returnFiber, oldFiber, newChild, lanes)\n            : null;\n        case REACT_PORTAL_TYPE:\n          return newChild.key === key\n            ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n            : null;\n        case REACT_LAZY_TYPE:\n          return (\n            (newChild = resolveLazy(newChild)),\n            updateSlot(returnFiber, oldFiber, newChild, lanes)\n          );\n      }\n      if (isArrayImpl(newChild) || getIteratorFn(newChild))\n        return null !== key\n          ? null\n          : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n      if (\"function\" === typeof newChild.then)\n        return updateSlot(\n          returnFiber,\n          oldFiber,\n          unwrapThenable(newChild),\n          lanes\n        );\n      if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n        return updateSlot(\n          returnFiber,\n          oldFiber,\n          readContextDuringReconciliation(returnFiber, newChild),\n          lanes\n        );\n      throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n    }\n    return null;\n  }\n  function updateFromMap(\n    existingChildren,\n    returnFiber,\n    newIdx,\n    newChild,\n    lanes\n  ) {\n    if (\n      (\"string\" === typeof newChild && \"\" !== newChild) ||\n      \"number\" === typeof newChild ||\n      \"bigint\" === typeof newChild\n    )\n      return (\n        (existingChildren = existingChildren.get(newIdx) || null),\n        updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n      );\n    if (\"object\" === typeof newChild && null !== newChild) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          return (\n            (existingChildren =\n              existingChildren.get(\n                null === newChild.key ? newIdx : newChild.key\n              ) || null),\n            updateElement(returnFiber, existingChildren, newChild, lanes)\n          );\n        case REACT_PORTAL_TYPE:\n          return (\n            (existingChildren =\n              existingChildren.get(\n                null === newChild.key ? newIdx : newChild.key\n              ) || null),\n            updatePortal(returnFiber, existingChildren, newChild, lanes)\n          );\n        case REACT_LAZY_TYPE:\n          return (\n            (newChild = resolveLazy(newChild)),\n            updateFromMap(\n              existingChildren,\n              returnFiber,\n              newIdx,\n              newChild,\n              lanes\n            )\n          );\n      }\n      if (isArrayImpl(newChild) || getIteratorFn(newChild))\n        return (\n          (existingChildren = existingChildren.get(newIdx) || null),\n          updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n        );\n      if (\"function\" === typeof newChild.then)\n        return updateFromMap(\n          existingChildren,\n          returnFiber,\n          newIdx,\n          unwrapThenable(newChild),\n          lanes\n        );\n      if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n        return updateFromMap(\n          existingChildren,\n          returnFiber,\n          newIdx,\n          readContextDuringReconciliation(returnFiber, newChild),\n          lanes\n        );\n      throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n    }\n    return null;\n  }\n  function reconcileChildrenArray(\n    returnFiber,\n    currentFirstChild,\n    newChildren,\n    lanes\n  ) {\n    for (\n      var resultingFirstChild = null,\n        previousNewFiber = null,\n        oldFiber = currentFirstChild,\n        newIdx = (currentFirstChild = 0),\n        nextOldFiber = null;\n      null !== oldFiber && newIdx < newChildren.length;\n      newIdx++\n    ) {\n      oldFiber.index > newIdx\n        ? ((nextOldFiber = oldFiber), (oldFiber = null))\n        : (nextOldFiber = oldFiber.sibling);\n      var newFiber = updateSlot(\n        returnFiber,\n        oldFiber,\n        newChildren[newIdx],\n        lanes\n      );\n      if (null === newFiber) {\n        null === oldFiber && (oldFiber = nextOldFiber);\n        break;\n      }\n      shouldTrackSideEffects &&\n        oldFiber &&\n        null === newFiber.alternate &&\n        deleteChild(returnFiber, oldFiber);\n      currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n      null === previousNewFiber\n        ? (resultingFirstChild = newFiber)\n        : (previousNewFiber.sibling = newFiber);\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n    if (newIdx === newChildren.length)\n      return (\n        deleteRemainingChildren(returnFiber, oldFiber),\n        isHydrating && pushTreeFork(returnFiber, newIdx),\n        resultingFirstChild\n      );\n    if (null === oldFiber) {\n      for (; newIdx < newChildren.length; newIdx++)\n        (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n          null !== oldFiber &&\n            ((currentFirstChild = placeChild(\n              oldFiber,\n              currentFirstChild,\n              newIdx\n            )),\n            null === previousNewFiber\n              ? (resultingFirstChild = oldFiber)\n              : (previousNewFiber.sibling = oldFiber),\n            (previousNewFiber = oldFiber));\n      isHydrating && pushTreeFork(returnFiber, newIdx);\n      return resultingFirstChild;\n    }\n    for (\n      oldFiber = mapRemainingChildren(oldFiber);\n      newIdx < newChildren.length;\n      newIdx++\n    )\n      (nextOldFiber = updateFromMap(\n        oldFiber,\n        returnFiber,\n        newIdx,\n        newChildren[newIdx],\n        lanes\n      )),\n        null !== nextOldFiber &&\n          (shouldTrackSideEffects &&\n            ((newFiber = nextOldFiber.alternate),\n            null !== newFiber &&\n              oldFiber.delete(null === newFiber.key ? newIdx : newFiber.key)),\n          (currentFirstChild = placeChild(\n            nextOldFiber,\n            currentFirstChild,\n            newIdx\n          )),\n          null === previousNewFiber\n            ? (resultingFirstChild = nextOldFiber)\n            : (previousNewFiber.sibling = nextOldFiber),\n          (previousNewFiber = nextOldFiber));\n    shouldTrackSideEffects &&\n      oldFiber.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    isHydrating && pushTreeFork(returnFiber, newIdx);\n    return resultingFirstChild;\n  }\n  function reconcileChildrenIterator(\n    returnFiber,\n    currentFirstChild,\n    newChildren,\n    lanes\n  ) {\n    if (null == newChildren) throw Error(formatProdErrorMessage(151));\n    for (\n      var resultingFirstChild = null,\n        previousNewFiber = null,\n        oldFiber = currentFirstChild,\n        newIdx = (currentFirstChild = 0),\n        nextOldFiber = null,\n        step = newChildren.next();\n      null !== oldFiber && !step.done;\n      newIdx++, step = newChildren.next()\n    ) {\n      oldFiber.index > newIdx\n        ? ((nextOldFiber = oldFiber), (oldFiber = null))\n        : (nextOldFiber = oldFiber.sibling);\n      var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n      if (null === newFiber) {\n        null === oldFiber && (oldFiber = nextOldFiber);\n        break;\n      }\n      shouldTrackSideEffects &&\n        oldFiber &&\n        null === newFiber.alternate &&\n        deleteChild(returnFiber, oldFiber);\n      currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n      null === previousNewFiber\n        ? (resultingFirstChild = newFiber)\n        : (previousNewFiber.sibling = newFiber);\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n    if (step.done)\n      return (\n        deleteRemainingChildren(returnFiber, oldFiber),\n        isHydrating && pushTreeFork(returnFiber, newIdx),\n        resultingFirstChild\n      );\n    if (null === oldFiber) {\n      for (; !step.done; newIdx++, step = newChildren.next())\n        (step = createChild(returnFiber, step.value, lanes)),\n          null !== step &&\n            ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n            null === previousNewFiber\n              ? (resultingFirstChild = step)\n              : (previousNewFiber.sibling = step),\n            (previousNewFiber = step));\n      isHydrating && pushTreeFork(returnFiber, newIdx);\n      return resultingFirstChild;\n    }\n    for (\n      oldFiber = mapRemainingChildren(oldFiber);\n      !step.done;\n      newIdx++, step = newChildren.next()\n    )\n      (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n        null !== step &&\n          (shouldTrackSideEffects &&\n            ((nextOldFiber = step.alternate),\n            null !== nextOldFiber &&\n              oldFiber.delete(\n                null === nextOldFiber.key ? newIdx : nextOldFiber.key\n              )),\n          (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n          null === previousNewFiber\n            ? (resultingFirstChild = step)\n            : (previousNewFiber.sibling = step),\n          (previousNewFiber = step));\n    shouldTrackSideEffects &&\n      oldFiber.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    isHydrating && pushTreeFork(returnFiber, newIdx);\n    return resultingFirstChild;\n  }\n  function reconcileChildFibersImpl(\n    returnFiber,\n    currentFirstChild,\n    newChild,\n    lanes\n  ) {\n    \"object\" === typeof newChild &&\n      null !== newChild &&\n      newChild.type === REACT_FRAGMENT_TYPE &&\n      null === newChild.key &&\n      void 0 === newChild.props.ref &&\n      (newChild = newChild.props.children);\n    if (\"object\" === typeof newChild && null !== newChild) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          a: {\n            for (var key = newChild.key; null !== currentFirstChild; ) {\n              if (currentFirstChild.key === key) {\n                key = newChild.type;\n                if (key === REACT_FRAGMENT_TYPE) {\n                  if (7 === currentFirstChild.tag) {\n                    deleteRemainingChildren(\n                      returnFiber,\n                      currentFirstChild.sibling\n                    );\n                    lanes = useFiber(\n                      currentFirstChild,\n                      newChild.props.children\n                    );\n                    coerceRef(lanes, newChild);\n                    lanes.return = returnFiber;\n                    returnFiber = lanes;\n                    break a;\n                  }\n                } else if (\n                  currentFirstChild.elementType === key ||\n                  (\"object\" === typeof key &&\n                    null !== key &&\n                    key.$$typeof === REACT_LAZY_TYPE &&\n                    resolveLazy(key) === currentFirstChild.type)\n                ) {\n                  deleteRemainingChildren(\n                    returnFiber,\n                    currentFirstChild.sibling\n                  );\n                  lanes = useFiber(currentFirstChild, newChild.props);\n                  coerceRef(lanes, newChild);\n                  lanes.return = returnFiber;\n                  returnFiber = lanes;\n                  break a;\n                }\n                deleteRemainingChildren(returnFiber, currentFirstChild);\n                break;\n              } else deleteChild(returnFiber, currentFirstChild);\n              currentFirstChild = currentFirstChild.sibling;\n            }\n            newChild.type === REACT_FRAGMENT_TYPE\n              ? ((lanes = createFiberFromFragment(\n                  newChild.props.children,\n                  returnFiber.mode,\n                  lanes,\n                  newChild.key\n                )),\n                coerceRef(lanes, newChild),\n                (lanes.return = returnFiber),\n                (returnFiber = lanes))\n              : ((lanes = createFiberFromTypeAndProps(\n                  newChild.type,\n                  newChild.key,\n                  newChild.props,\n                  null,\n                  returnFiber.mode,\n                  lanes\n                )),\n                coerceRef(lanes, newChild),\n                (lanes.return = returnFiber),\n                (returnFiber = lanes));\n          }\n          return placeSingleChild(returnFiber);\n        case REACT_PORTAL_TYPE:\n          a: {\n            for (key = newChild.key; null !== currentFirstChild; ) {\n              if (currentFirstChild.key === key)\n                if (\n                  4 === currentFirstChild.tag &&\n                  currentFirstChild.stateNode.containerInfo ===\n                    newChild.containerInfo &&\n                  currentFirstChild.stateNode.implementation ===\n                    newChild.implementation\n                ) {\n                  deleteRemainingChildren(\n                    returnFiber,\n                    currentFirstChild.sibling\n                  );\n                  lanes = useFiber(currentFirstChild, newChild.children || []);\n                  lanes.return = returnFiber;\n                  returnFiber = lanes;\n                  break a;\n                } else {\n                  deleteRemainingChildren(returnFiber, currentFirstChild);\n                  break;\n                }\n              else deleteChild(returnFiber, currentFirstChild);\n              currentFirstChild = currentFirstChild.sibling;\n            }\n            lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n            lanes.return = returnFiber;\n            returnFiber = lanes;\n          }\n          return placeSingleChild(returnFiber);\n        case REACT_LAZY_TYPE:\n          return (\n            (newChild = resolveLazy(newChild)),\n            reconcileChildFibersImpl(\n              returnFiber,\n              currentFirstChild,\n              newChild,\n              lanes\n            )\n          );\n      }\n      if (isArrayImpl(newChild))\n        return reconcileChildrenArray(\n          returnFiber,\n          currentFirstChild,\n          newChild,\n          lanes\n        );\n      if (getIteratorFn(newChild)) {\n        key = getIteratorFn(newChild);\n        if (\"function\" !== typeof key) throw Error(formatProdErrorMessage(150));\n        newChild = key.call(newChild);\n        return reconcileChildrenIterator(\n          returnFiber,\n          currentFirstChild,\n          newChild,\n          lanes\n        );\n      }\n      if (\"function\" === typeof newChild.then)\n        return reconcileChildFibersImpl(\n          returnFiber,\n          currentFirstChild,\n          unwrapThenable(newChild),\n          lanes\n        );\n      if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n        return reconcileChildFibersImpl(\n          returnFiber,\n          currentFirstChild,\n          readContextDuringReconciliation(returnFiber, newChild),\n          lanes\n        );\n      throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n    }\n    return (\"string\" === typeof newChild && \"\" !== newChild) ||\n      \"number\" === typeof newChild ||\n      \"bigint\" === typeof newChild\n      ? ((newChild = \"\" + newChild),\n        null !== currentFirstChild && 6 === currentFirstChild.tag\n          ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n            (lanes = useFiber(currentFirstChild, newChild)),\n            (lanes.return = returnFiber),\n            (returnFiber = lanes))\n          : (deleteRemainingChildren(returnFiber, currentFirstChild),\n            (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),\n            (lanes.return = returnFiber),\n            (returnFiber = lanes)),\n        placeSingleChild(returnFiber))\n      : deleteRemainingChildren(returnFiber, currentFirstChild);\n  }\n  return function (returnFiber, currentFirstChild, newChild, lanes) {\n    try {\n      thenableIndexCounter$1 = 0;\n      var firstChildFiber = reconcileChildFibersImpl(\n        returnFiber,\n        currentFirstChild,\n        newChild,\n        lanes\n      );\n      thenableState$1 = null;\n      return firstChildFiber;\n    } catch (x) {\n      if (x === SuspenseException || x === SuspenseActionException) throw x;\n      var fiber = createFiberImplClass(29, x, null, returnFiber.mode);\n      fiber.lanes = lanes;\n      fiber.return = returnFiber;\n      return fiber;\n    } finally {\n    }\n  };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n  mountChildFibers = createChildReconciler(!1),\n  hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n  fiber.updateQueue = {\n    baseState: fiber.memoizedState,\n    firstBaseUpdate: null,\n    lastBaseUpdate: null,\n    shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n    callbacks: null\n  };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n  current = current.updateQueue;\n  workInProgress.updateQueue === current &&\n    (workInProgress.updateQueue = {\n      baseState: current.baseState,\n      firstBaseUpdate: current.firstBaseUpdate,\n      lastBaseUpdate: current.lastBaseUpdate,\n      shared: current.shared,\n      callbacks: null\n    });\n}\nfunction createUpdate(lane) {\n  return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n  var updateQueue = fiber.updateQueue;\n  if (null === updateQueue) return null;\n  updateQueue = updateQueue.shared;\n  if (0 !== (executionContext & 2)) {\n    var pending = updateQueue.pending;\n    null === pending\n      ? (update.next = update)\n      : ((update.next = pending.next), (pending.next = update));\n    updateQueue.pending = update;\n    update = getRootForUpdatedFiber(fiber);\n    markUpdateLaneFromFiberToRoot(fiber, null, lane);\n    return update;\n  }\n  enqueueUpdate$1(fiber, updateQueue, update, lane);\n  return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n  fiber = fiber.updateQueue;\n  if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {\n    var queueLanes = fiber.lanes;\n    queueLanes &= root.pendingLanes;\n    lane |= queueLanes;\n    fiber.lanes = lane;\n    markRootEntangled(root, lane);\n  }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n  var queue = workInProgress.updateQueue,\n    current = workInProgress.alternate;\n  if (\n    null !== current &&\n    ((current = current.updateQueue), queue === current)\n  ) {\n    var newFirst = null,\n      newLast = null;\n    queue = queue.firstBaseUpdate;\n    if (null !== queue) {\n      do {\n        var clone = {\n          lane: queue.lane,\n          tag: queue.tag,\n          payload: queue.payload,\n          callback: null,\n          next: null\n        };\n        null === newLast\n          ? (newFirst = newLast = clone)\n          : (newLast = newLast.next = clone);\n        queue = queue.next;\n      } while (null !== queue);\n      null === newLast\n        ? (newFirst = newLast = capturedUpdate)\n        : (newLast = newLast.next = capturedUpdate);\n    } else newFirst = newLast = capturedUpdate;\n    queue = {\n      baseState: current.baseState,\n      firstBaseUpdate: newFirst,\n      lastBaseUpdate: newLast,\n      shared: current.shared,\n      callbacks: current.callbacks\n    };\n    workInProgress.updateQueue = queue;\n    return;\n  }\n  workInProgress = queue.lastBaseUpdate;\n  null === workInProgress\n    ? (queue.firstBaseUpdate = capturedUpdate)\n    : (workInProgress.next = capturedUpdate);\n  queue.lastBaseUpdate = capturedUpdate;\n}\nvar didReadFromEntangledAsyncAction = !1;\nfunction suspendIfUpdateReadFromEntangledAsyncAction() {\n  if (didReadFromEntangledAsyncAction) {\n    var entangledActionThenable = currentEntangledActionThenable;\n    if (null !== entangledActionThenable) throw entangledActionThenable;\n  }\n}\nfunction processUpdateQueue(\n  workInProgress$jscomp$0,\n  props,\n  instance$jscomp$0,\n  renderLanes\n) {\n  didReadFromEntangledAsyncAction = !1;\n  var queue = workInProgress$jscomp$0.updateQueue;\n  hasForceUpdate = !1;\n  var firstBaseUpdate = queue.firstBaseUpdate,\n    lastBaseUpdate = queue.lastBaseUpdate,\n    pendingQueue = queue.shared.pending;\n  if (null !== pendingQueue) {\n    queue.shared.pending = null;\n    var lastPendingUpdate = pendingQueue,\n      firstPendingUpdate = lastPendingUpdate.next;\n    lastPendingUpdate.next = null;\n    null === lastBaseUpdate\n      ? (firstBaseUpdate = firstPendingUpdate)\n      : (lastBaseUpdate.next = firstPendingUpdate);\n    lastBaseUpdate = lastPendingUpdate;\n    var current = workInProgress$jscomp$0.alternate;\n    null !== current &&\n      ((current = current.updateQueue),\n      (pendingQueue = current.lastBaseUpdate),\n      pendingQueue !== lastBaseUpdate &&\n        (null === pendingQueue\n          ? (current.firstBaseUpdate = firstPendingUpdate)\n          : (pendingQueue.next = firstPendingUpdate),\n        (current.lastBaseUpdate = lastPendingUpdate)));\n  }\n  if (null !== firstBaseUpdate) {\n    var newState = queue.baseState;\n    lastBaseUpdate = 0;\n    current = firstPendingUpdate = lastPendingUpdate = null;\n    pendingQueue = firstBaseUpdate;\n    do {\n      var updateLane = pendingQueue.lane & -536870913,\n        isHiddenUpdate = updateLane !== pendingQueue.lane;\n      if (\n        isHiddenUpdate\n          ? (workInProgressRootRenderLanes & updateLane) === updateLane\n          : (renderLanes & updateLane) === updateLane\n      ) {\n        0 !== updateLane &&\n          updateLane === currentEntangledLane &&\n          (didReadFromEntangledAsyncAction = !0);\n        null !== current &&\n          (current = current.next =\n            {\n              lane: 0,\n              tag: pendingQueue.tag,\n              payload: pendingQueue.payload,\n              callback: null,\n              next: null\n            });\n        a: {\n          var workInProgress = workInProgress$jscomp$0,\n            update = pendingQueue;\n          updateLane = props;\n          var instance = instance$jscomp$0;\n          switch (update.tag) {\n            case 1:\n              workInProgress = update.payload;\n              if (\"function\" === typeof workInProgress) {\n                newState = workInProgress.call(instance, newState, updateLane);\n                break a;\n              }\n              newState = workInProgress;\n              break a;\n            case 3:\n              workInProgress.flags = (workInProgress.flags & -65537) | 128;\n            case 0:\n              workInProgress = update.payload;\n              updateLane =\n                \"function\" === typeof workInProgress\n                  ? workInProgress.call(instance, newState, updateLane)\n                  : workInProgress;\n              if (null === updateLane || void 0 === updateLane) break a;\n              newState = assign({}, newState, updateLane);\n              break a;\n            case 2:\n              hasForceUpdate = !0;\n          }\n        }\n        updateLane = pendingQueue.callback;\n        null !== updateLane &&\n          ((workInProgress$jscomp$0.flags |= 64),\n          isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n          (isHiddenUpdate = queue.callbacks),\n          null === isHiddenUpdate\n            ? (queue.callbacks = [updateLane])\n            : isHiddenUpdate.push(updateLane));\n      } else\n        (isHiddenUpdate = {\n          lane: updateLane,\n          tag: pendingQueue.tag,\n          payload: pendingQueue.payload,\n          callback: pendingQueue.callback,\n          next: null\n        }),\n          null === current\n            ? ((firstPendingUpdate = current = isHiddenUpdate),\n              (lastPendingUpdate = newState))\n            : (current = current.next = isHiddenUpdate),\n          (lastBaseUpdate |= updateLane);\n      pendingQueue = pendingQueue.next;\n      if (null === pendingQueue)\n        if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n          break;\n        else\n          (isHiddenUpdate = pendingQueue),\n            (pendingQueue = isHiddenUpdate.next),\n            (isHiddenUpdate.next = null),\n            (queue.lastBaseUpdate = isHiddenUpdate),\n            (queue.shared.pending = null);\n    } while (1);\n    null === current && (lastPendingUpdate = newState);\n    queue.baseState = lastPendingUpdate;\n    queue.firstBaseUpdate = firstPendingUpdate;\n    queue.lastBaseUpdate = current;\n    null === firstBaseUpdate && (queue.shared.lanes = 0);\n    workInProgressRootSkippedLanes |= lastBaseUpdate;\n    workInProgress$jscomp$0.lanes = lastBaseUpdate;\n    workInProgress$jscomp$0.memoizedState = newState;\n  }\n}\nfunction callCallback(callback, context) {\n  if (\"function\" !== typeof callback)\n    throw Error(formatProdErrorMessage(191, callback));\n  callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n  var callbacks = updateQueue.callbacks;\n  if (null !== callbacks)\n    for (\n      updateQueue.callbacks = null, updateQueue = 0;\n      updateQueue < callbacks.length;\n      updateQueue++\n    )\n      callCallback(callbacks[updateQueue], context);\n}\nvar currentTreeHiddenStackCursor = createCursor(null),\n  prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n  fiber = entangledRenderLanes;\n  push(prevEntangledRenderLanesCursor, fiber);\n  push(currentTreeHiddenStackCursor, context);\n  entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n  push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n  push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n  entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n  pop(currentTreeHiddenStackCursor);\n  pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n  shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n  var current = handler.alternate;\n  push(suspenseStackCursor, suspenseStackCursor.current & 1);\n  push(suspenseHandlerStackCursor, handler);\n  null === shellBoundary &&\n    (null === current || null !== currentTreeHiddenStackCursor.current\n      ? (shellBoundary = handler)\n      : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushDehydratedActivitySuspenseHandler(fiber) {\n  push(suspenseStackCursor, suspenseStackCursor.current);\n  push(suspenseHandlerStackCursor, fiber);\n  null === shellBoundary && (shellBoundary = fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n  22 === fiber.tag\n    ? (push(suspenseStackCursor, suspenseStackCursor.current),\n      push(suspenseHandlerStackCursor, fiber),\n      null === shellBoundary && (shellBoundary = fiber))\n    : reuseSuspenseHandlerOnStack();\n}\nfunction reuseSuspenseHandlerOnStack() {\n  push(suspenseStackCursor, suspenseStackCursor.current);\n  push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n  pop(suspenseHandlerStackCursor);\n  shellBoundary === fiber && (shellBoundary = null);\n  pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction pushSuspenseListContext(fiber, newContext) {\n  push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n  push(suspenseStackCursor, newContext);\n}\nfunction popSuspenseListContext(fiber) {\n  pop(suspenseStackCursor);\n  pop(suspenseHandlerStackCursor);\n  shellBoundary === fiber && (shellBoundary = null);\n}\nfunction findFirstSuspended(row) {\n  for (var node = row; null !== node; ) {\n    if (13 === node.tag) {\n      var state = node.memoizedState;\n      if (\n        null !== state &&\n        ((state = state.dehydrated),\n        null === state ||\n          isSuspenseInstancePending(state) ||\n          isSuspenseInstanceFallback(state))\n      )\n        return node;\n    } else if (\n      19 === node.tag &&\n      \"independent\" !== node.memoizedProps.revealOrder\n    ) {\n      if (0 !== (node.flags & 128)) return node;\n    } else if (null !== node.child) {\n      node.child.return = node;\n      node = node.child;\n      continue;\n    }\n    if (node === row) break;\n    for (; null === node.sibling; ) {\n      if (null === node.return || node.return === row) return null;\n      node = node.return;\n    }\n    node.sibling.return = node.return;\n    node = node.sibling;\n  }\n  return null;\n}\nvar renderLanes = 0,\n  currentlyRenderingFiber = null,\n  currentHook = null,\n  workInProgressHook = null,\n  didScheduleRenderPhaseUpdate = !1,\n  didScheduleRenderPhaseUpdateDuringThisPass = !1,\n  shouldDoubleInvokeUserFnsInHooksDEV = !1,\n  localIdCounter = 0,\n  thenableIndexCounter = 0,\n  thenableState = null,\n  globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n  throw Error(formatProdErrorMessage(321));\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n  if (null === prevDeps) return !1;\n  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n    if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n  return !0;\n}\nfunction renderWithHooks(\n  current,\n  workInProgress,\n  Component,\n  props,\n  secondArg,\n  nextRenderLanes\n) {\n  renderLanes = nextRenderLanes;\n  currentlyRenderingFiber = workInProgress;\n  workInProgress.memoizedState = null;\n  workInProgress.updateQueue = null;\n  workInProgress.lanes = 0;\n  ReactSharedInternals.H =\n    null === current || null === current.memoizedState\n      ? HooksDispatcherOnMount\n      : HooksDispatcherOnUpdate;\n  shouldDoubleInvokeUserFnsInHooksDEV = !1;\n  nextRenderLanes = Component(props, secondArg);\n  shouldDoubleInvokeUserFnsInHooksDEV = !1;\n  didScheduleRenderPhaseUpdateDuringThisPass &&\n    (nextRenderLanes = renderWithHooksAgain(\n      workInProgress,\n      Component,\n      props,\n      secondArg\n    ));\n  finishRenderingHooks(current);\n  return nextRenderLanes;\n}\nfunction finishRenderingHooks(current) {\n  ReactSharedInternals.H = ContextOnlyDispatcher;\n  var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n  renderLanes = 0;\n  workInProgressHook = currentHook = currentlyRenderingFiber = null;\n  didScheduleRenderPhaseUpdate = !1;\n  thenableIndexCounter = 0;\n  thenableState = null;\n  if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));\n  null === current ||\n    didReceiveUpdate ||\n    ((current = current.dependencies),\n    null !== current &&\n      checkIfContextChanged(current) &&\n      (didReceiveUpdate = !0));\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n  currentlyRenderingFiber = workInProgress;\n  var numberOfReRenders = 0;\n  do {\n    didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n    thenableIndexCounter = 0;\n    didScheduleRenderPhaseUpdateDuringThisPass = !1;\n    if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));\n    numberOfReRenders += 1;\n    workInProgressHook = currentHook = null;\n    if (null != workInProgress.updateQueue) {\n      var children = workInProgress.updateQueue;\n      children.lastEffect = null;\n      children.events = null;\n      children.stores = null;\n      null != children.memoCache && (children.memoCache.index = 0);\n    }\n    ReactSharedInternals.H = HooksDispatcherOnRerender;\n    children = Component(props, secondArg);\n  } while (didScheduleRenderPhaseUpdateDuringThisPass);\n  return children;\n}\nfunction TransitionAwareHostComponent() {\n  var dispatcher = ReactSharedInternals.H,\n    maybeThenable = dispatcher.useState()[0];\n  maybeThenable =\n    \"function\" === typeof maybeThenable.then\n      ? useThenable(maybeThenable)\n      : maybeThenable;\n  dispatcher = dispatcher.useState()[0];\n  (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&\n    (currentlyRenderingFiber.flags |= 1024);\n  return maybeThenable;\n}\nfunction checkDidRenderIdHook() {\n  var didRenderIdHook = 0 !== localIdCounter;\n  localIdCounter = 0;\n  return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n  workInProgress.updateQueue = current.updateQueue;\n  workInProgress.flags &= -2053;\n  current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n  if (didScheduleRenderPhaseUpdate) {\n    for (\n      workInProgress = workInProgress.memoizedState;\n      null !== workInProgress;\n\n    ) {\n      var queue = workInProgress.queue;\n      null !== queue && (queue.pending = null);\n      workInProgress = workInProgress.next;\n    }\n    didScheduleRenderPhaseUpdate = !1;\n  }\n  renderLanes = 0;\n  workInProgressHook = currentHook = currentlyRenderingFiber = null;\n  didScheduleRenderPhaseUpdateDuringThisPass = !1;\n  thenableIndexCounter = localIdCounter = 0;\n  thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n  var hook = {\n    memoizedState: null,\n    baseState: null,\n    baseQueue: null,\n    queue: null,\n    next: null\n  };\n  null === workInProgressHook\n    ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)\n    : (workInProgressHook = workInProgressHook.next = hook);\n  return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n  if (null === currentHook) {\n    var nextCurrentHook = currentlyRenderingFiber.alternate;\n    nextCurrentHook =\n      null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n  } else nextCurrentHook = currentHook.next;\n  var nextWorkInProgressHook =\n    null === workInProgressHook\n      ? currentlyRenderingFiber.memoizedState\n      : workInProgressHook.next;\n  if (null !== nextWorkInProgressHook)\n    (workInProgressHook = nextWorkInProgressHook),\n      (currentHook = nextCurrentHook);\n  else {\n    if (null === nextCurrentHook) {\n      if (null === currentlyRenderingFiber.alternate)\n        throw Error(formatProdErrorMessage(467));\n      throw Error(formatProdErrorMessage(310));\n    }\n    currentHook = nextCurrentHook;\n    nextCurrentHook = {\n      memoizedState: currentHook.memoizedState,\n      baseState: currentHook.baseState,\n      baseQueue: currentHook.baseQueue,\n      queue: currentHook.queue,\n      next: null\n    };\n    null === workInProgressHook\n      ? (currentlyRenderingFiber.memoizedState = workInProgressHook =\n          nextCurrentHook)\n      : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n  }\n  return workInProgressHook;\n}\nfunction createFunctionComponentUpdateQueue() {\n  return { lastEffect: null, events: null, stores: null, memoCache: null };\n}\nfunction useThenable(thenable) {\n  var index = thenableIndexCounter;\n  thenableIndexCounter += 1;\n  null === thenableState && (thenableState = []);\n  thenable = trackUsedThenable(thenableState, thenable, index);\n  index = currentlyRenderingFiber;\n  null ===\n    (null === workInProgressHook\n      ? index.memoizedState\n      : workInProgressHook.next) &&\n    ((index = index.alternate),\n    (ReactSharedInternals.H =\n      null === index || null === index.memoizedState\n        ? HooksDispatcherOnMount\n        : HooksDispatcherOnUpdate));\n  return thenable;\n}\nfunction use(usable) {\n  if (null !== usable && \"object\" === typeof usable) {\n    if (\"function\" === typeof usable.then) return useThenable(usable);\n    if (usable.$$typeof === REACT_RECOVERABLE_TYPE) return;\n    if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n  }\n  throw Error(formatProdErrorMessage(438, String(usable)));\n}\nfunction useMemoCache(size) {\n  var memoCache = null,\n    updateQueue = currentlyRenderingFiber.updateQueue;\n  null !== updateQueue && (memoCache = updateQueue.memoCache);\n  if (null == memoCache) {\n    var current = currentlyRenderingFiber.alternate;\n    null !== current &&\n      ((current = current.updateQueue),\n      null !== current &&\n        ((current = current.memoCache),\n        null != current &&\n          (memoCache = {\n            data: current.data.map(function (array) {\n              return array.slice();\n            }),\n            index: 0\n          })));\n  }\n  null == memoCache && (memoCache = { data: [], index: 0 });\n  null === updateQueue &&\n    ((updateQueue = createFunctionComponentUpdateQueue()),\n    (currentlyRenderingFiber.updateQueue = updateQueue));\n  updateQueue.memoCache = memoCache;\n  updateQueue = memoCache.data[memoCache.index];\n  if (void 0 === updateQueue)\n    for (\n      updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;\n      current < size;\n      current++\n    )\n      updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;\n  memoCache.index++;\n  return updateQueue;\n}\nfunction basicStateReducer(state, action) {\n  return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n  var hook = updateWorkInProgressHook();\n  return updateReducerImpl(hook, currentHook, reducer);\n}\nfunction updateReducerImpl(hook, current, reducer) {\n  var queue = hook.queue;\n  if (null === queue) throw Error(formatProdErrorMessage(311));\n  queue.lastRenderedReducer = reducer;\n  var baseQueue = hook.baseQueue,\n    pendingQueue = queue.pending;\n  if (null !== pendingQueue) {\n    if (null !== baseQueue) {\n      var baseFirst = baseQueue.next;\n      baseQueue.next = pendingQueue.next;\n      pendingQueue.next = baseFirst;\n    }\n    current.baseQueue = baseQueue = pendingQueue;\n    queue.pending = null;\n  }\n  pendingQueue = hook.baseState;\n  if (null === baseQueue) hook.memoizedState = pendingQueue;\n  else {\n    current = baseQueue.next;\n    var newBaseQueueFirst = (baseFirst = null),\n      newBaseQueueLast = null,\n      update = current,\n      didReadFromEntangledAsyncAction$64 = !1;\n    do {\n      var updateLane = update.lane & -536870913;\n      if (\n        updateLane !== update.lane\n          ? (workInProgressRootRenderLanes & updateLane) === updateLane\n          : (renderLanes & updateLane) === updateLane\n      ) {\n        var revertLane = update.revertLane;\n        if (0 === revertLane)\n          null !== newBaseQueueLast &&\n            (newBaseQueueLast = newBaseQueueLast.next =\n              {\n                lane: 0,\n                revertLane: 0,\n                gesture: null,\n                action: update.action,\n                hasEagerState: update.hasEagerState,\n                eagerState: update.eagerState,\n                next: null\n              }),\n            updateLane === currentEntangledLane &&\n              (didReadFromEntangledAsyncAction$64 = !0);\n        else if ((renderLanes & revertLane) === revertLane) {\n          update = update.next;\n          revertLane === currentEntangledLane &&\n            (didReadFromEntangledAsyncAction$64 = !0);\n          continue;\n        } else\n          (updateLane = {\n            lane: 0,\n            revertLane: update.revertLane,\n            gesture: null,\n            action: update.action,\n            hasEagerState: update.hasEagerState,\n            eagerState: update.eagerState,\n            next: null\n          }),\n            null === newBaseQueueLast\n              ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),\n                (baseFirst = pendingQueue))\n              : (newBaseQueueLast = newBaseQueueLast.next = updateLane),\n            (currentlyRenderingFiber.lanes |= revertLane),\n            (workInProgressRootSkippedLanes |= revertLane);\n        updateLane = update.action;\n        shouldDoubleInvokeUserFnsInHooksDEV &&\n          reducer(pendingQueue, updateLane);\n        pendingQueue = update.hasEagerState\n          ? update.eagerState\n          : reducer(pendingQueue, updateLane);\n      } else\n        (revertLane = {\n          lane: updateLane,\n          revertLane: update.revertLane,\n          gesture: update.gesture,\n          action: update.action,\n          hasEagerState: update.hasEagerState,\n          eagerState: update.eagerState,\n          next: null\n        }),\n          null === newBaseQueueLast\n            ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),\n              (baseFirst = pendingQueue))\n            : (newBaseQueueLast = newBaseQueueLast.next = revertLane),\n          (currentlyRenderingFiber.lanes |= updateLane),\n          (workInProgressRootSkippedLanes |= updateLane);\n      update = update.next;\n    } while (null !== update && update !== current);\n    null === newBaseQueueLast\n      ? (baseFirst = pendingQueue)\n      : (newBaseQueueLast.next = newBaseQueueFirst);\n    if (\n      !objectIs(pendingQueue, hook.memoizedState) &&\n      ((didReceiveUpdate = !0),\n      didReadFromEntangledAsyncAction$64 &&\n        ((reducer = currentEntangledActionThenable), null !== reducer))\n    )\n      throw reducer;\n    hook.memoizedState = pendingQueue;\n    hook.baseState = baseFirst;\n    hook.baseQueue = newBaseQueueLast;\n    queue.lastRenderedState = pendingQueue;\n  }\n  null === baseQueue && (queue.lanes = 0);\n  return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n  var hook = updateWorkInProgressHook(),\n    queue = hook.queue;\n  if (null === queue) throw Error(formatProdErrorMessage(311));\n  queue.lastRenderedReducer = reducer;\n  var dispatch = queue.dispatch,\n    lastRenderPhaseUpdate = queue.pending,\n    newState = hook.memoizedState;\n  if (null !== lastRenderPhaseUpdate) {\n    queue.pending = null;\n    var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n    do (newState = reducer(newState, update.action)), (update = update.next);\n    while (update !== lastRenderPhaseUpdate);\n    objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n    hook.memoizedState = newState;\n    null === hook.baseQueue && (hook.baseState = newState);\n    queue.lastRenderedState = newState;\n  }\n  return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var fiber = currentlyRenderingFiber,\n    hook = updateWorkInProgressHook(),\n    isHydrating$jscomp$0 = isHydrating;\n  if (isHydrating$jscomp$0) {\n    if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));\n    getServerSnapshot = getServerSnapshot();\n  } else getServerSnapshot = getSnapshot();\n  var snapshotChanged = !objectIs(\n    (currentHook || hook).memoizedState,\n    getServerSnapshot\n  );\n  snapshotChanged &&\n    ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));\n  hook = hook.queue;\n  updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n    subscribe\n  ]);\n  subscribe =\n    hook.getSnapshot !== getSnapshot ||\n    snapshotChanged ||\n    (null !== workInProgressHook &&\n      0 !== (workInProgressHook.memoizedState.tag & 1));\n  pushSimpleEffect(\n    subscribe ? 9 : 8,\n    { destroy: void 0 },\n    updateStoreInstance.bind(null, fiber, hook, getServerSnapshot, getSnapshot),\n    null\n  );\n  if (subscribe) {\n    fiber.flags |= 2048;\n    if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));\n    isHydrating$jscomp$0 ||\n      0 !== (renderLanes & 127) ||\n      pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n  }\n  return getServerSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n  fiber.flags |= 16384;\n  fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n  getSnapshot = currentlyRenderingFiber.updateQueue;\n  null === getSnapshot\n    ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n      (currentlyRenderingFiber.updateQueue = getSnapshot),\n      (getSnapshot.stores = [fiber]))\n    : ((renderedSnapshot = getSnapshot.stores),\n      null === renderedSnapshot\n        ? (getSnapshot.stores = [fiber])\n        : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n  inst.value = nextSnapshot;\n  inst.getSnapshot = getSnapshot;\n  checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n  return subscribe(function () {\n    checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n  });\n}\nfunction checkIfSnapshotChanged(inst) {\n  var latestGetSnapshot = inst.getSnapshot;\n  inst = inst.value;\n  try {\n    var nextValue = latestGetSnapshot();\n    return !objectIs(inst, nextValue);\n  } catch (error) {\n    return !0;\n  }\n}\nfunction forceStoreRerender(fiber) {\n  var root = enqueueConcurrentRenderForLane(fiber, 2);\n  null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n  var hook = mountWorkInProgressHook();\n  if (\"function\" === typeof initialState) {\n    var initialStateInitializer = initialState;\n    initialState = initialStateInitializer();\n    if (shouldDoubleInvokeUserFnsInHooksDEV) {\n      setIsStrictModeForDevtools(!0);\n      try {\n        initialStateInitializer();\n      } finally {\n        setIsStrictModeForDevtools(!1);\n      }\n    }\n  }\n  hook.memoizedState = hook.baseState = initialState;\n  hook.queue = {\n    pending: null,\n    lanes: 0,\n    dispatch: null,\n    lastRenderedReducer: basicStateReducer,\n    lastRenderedState: initialState\n  };\n  return hook;\n}\nfunction updateOptimisticImpl(hook, current, passthrough, reducer) {\n  hook.baseState = passthrough;\n  return updateReducerImpl(\n    hook,\n    currentHook,\n    \"function\" === typeof reducer ? reducer : basicStateReducer\n  );\n}\nfunction dispatchActionState(\n  fiber,\n  actionQueue,\n  setPendingState,\n  setState,\n  payload\n) {\n  if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));\n  fiber = actionQueue.action;\n  if (null !== fiber) {\n    var actionNode = {\n      payload: payload,\n      action: fiber,\n      next: null,\n      isTransition: !0,\n      status: \"pending\",\n      value: null,\n      reason: null,\n      listeners: [],\n      then: function (listener) {\n        actionNode.listeners.push(listener);\n      }\n    };\n    null !== ReactSharedInternals.T\n      ? setPendingState(!0)\n      : (actionNode.isTransition = !1);\n    setState(actionNode);\n    setPendingState = actionQueue.pending;\n    null === setPendingState\n      ? ((actionNode.next = actionQueue.pending = actionNode),\n        runActionStateAction(actionQueue, actionNode))\n      : ((actionNode.next = setPendingState.next),\n        (actionQueue.pending = setPendingState.next = actionNode));\n  }\n}\nfunction runActionStateAction(actionQueue, node) {\n  var action = node.action,\n    payload = node.payload,\n    prevState = actionQueue.state;\n  if (node.isTransition) {\n    var prevTransition = ReactSharedInternals.T,\n      currentTransition = {};\n    currentTransition.types =\n      null !== prevTransition ? prevTransition.types : null;\n    ReactSharedInternals.T = currentTransition;\n    try {\n      var returnValue = action(prevState, payload),\n        onStartTransitionFinish = ReactSharedInternals.S;\n      null !== onStartTransitionFinish &&\n        onStartTransitionFinish(currentTransition, returnValue);\n      handleActionReturnValue(actionQueue, node, returnValue);\n    } catch (error) {\n      onActionError(actionQueue, node, error);\n    } finally {\n      null !== prevTransition &&\n        null !== currentTransition.types &&\n        (prevTransition.types = currentTransition.types),\n        (ReactSharedInternals.T = prevTransition);\n    }\n  } else\n    try {\n      (prevTransition = action(prevState, payload)),\n        handleActionReturnValue(actionQueue, node, prevTransition);\n    } catch (error$70) {\n      onActionError(actionQueue, node, error$70);\n    }\n}\nfunction handleActionReturnValue(actionQueue, node, returnValue) {\n  null !== returnValue &&\n  \"object\" === typeof returnValue &&\n  \"function\" === typeof returnValue.then\n    ? returnValue.then(\n        function (nextState) {\n          onActionSuccess(actionQueue, node, nextState);\n        },\n        function (error) {\n          return onActionError(actionQueue, node, error);\n        }\n      )\n    : onActionSuccess(actionQueue, node, returnValue);\n}\nfunction onActionSuccess(actionQueue, actionNode, nextState) {\n  actionNode.status = \"fulfilled\";\n  actionNode.value = nextState;\n  notifyActionListeners(actionNode);\n  actionQueue.state = nextState;\n  actionNode = actionQueue.pending;\n  null !== actionNode &&\n    ((nextState = actionNode.next),\n    nextState === actionNode\n      ? (actionQueue.pending = null)\n      : ((nextState = nextState.next),\n        (actionNode.next = nextState),\n        runActionStateAction(actionQueue, nextState)));\n}\nfunction onActionError(actionQueue, actionNode, error) {\n  var last = actionQueue.pending;\n  actionQueue.pending = null;\n  if (null !== last) {\n    last = last.next;\n    do\n      (actionNode.status = \"rejected\"),\n        (actionNode.reason = error),\n        notifyActionListeners(actionNode),\n        (actionNode = actionNode.next);\n    while (actionNode !== last);\n  }\n  actionQueue.action = null;\n}\nfunction notifyActionListeners(actionNode) {\n  actionNode = actionNode.listeners;\n  for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();\n}\nfunction actionStateReducer(oldState, newState) {\n  return newState;\n}\nfunction mountActionState(action, initialStateProp) {\n  if (isHydrating) {\n    var ssrFormState = workInProgressRoot.formState;\n    if (null !== ssrFormState) {\n      a: {\n        var JSCompiler_inline_result = currentlyRenderingFiber;\n        if (isHydrating) {\n          if (nextHydratableInstance) {\n            b: {\n              var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;\n              for (\n                var inRootOrSingleton = rootOrSingletonContext;\n                8 !== JSCompiler_inline_result$jscomp$0.nodeType;\n\n              ) {\n                if (!inRootOrSingleton) {\n                  JSCompiler_inline_result$jscomp$0 = null;\n                  break b;\n                }\n                JSCompiler_inline_result$jscomp$0 = getNextHydratable(\n                  JSCompiler_inline_result$jscomp$0.nextSibling\n                );\n                if (null === JSCompiler_inline_result$jscomp$0) {\n                  JSCompiler_inline_result$jscomp$0 = null;\n                  break b;\n                }\n              }\n              inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;\n              JSCompiler_inline_result$jscomp$0 =\n                \"F!\" === inRootOrSingleton || \"F\" === inRootOrSingleton\n                  ? JSCompiler_inline_result$jscomp$0\n                  : null;\n            }\n            if (JSCompiler_inline_result$jscomp$0) {\n              nextHydratableInstance = getNextHydratable(\n                JSCompiler_inline_result$jscomp$0.nextSibling\n              );\n              JSCompiler_inline_result =\n                \"F!\" === JSCompiler_inline_result$jscomp$0.data;\n              break a;\n            }\n          }\n          throwOnHydrationMismatch(JSCompiler_inline_result);\n        }\n        JSCompiler_inline_result = !1;\n      }\n      JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);\n    }\n  }\n  ssrFormState = mountWorkInProgressHook();\n  ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;\n  JSCompiler_inline_result = {\n    pending: null,\n    lanes: 0,\n    dispatch: null,\n    lastRenderedReducer: actionStateReducer,\n    lastRenderedState: initialStateProp\n  };\n  ssrFormState.queue = JSCompiler_inline_result;\n  ssrFormState = dispatchSetState.bind(\n    null,\n    currentlyRenderingFiber,\n    JSCompiler_inline_result\n  );\n  JSCompiler_inline_result.dispatch = ssrFormState;\n  JSCompiler_inline_result = mountStateImpl(!1);\n  inRootOrSingleton = dispatchOptimisticSetState.bind(\n    null,\n    currentlyRenderingFiber,\n    !1,\n    JSCompiler_inline_result.queue\n  );\n  JSCompiler_inline_result = mountWorkInProgressHook();\n  JSCompiler_inline_result$jscomp$0 = {\n    state: initialStateProp,\n    dispatch: null,\n    action: action,\n    pending: null\n  };\n  JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;\n  ssrFormState = dispatchActionState.bind(\n    null,\n    currentlyRenderingFiber,\n    JSCompiler_inline_result$jscomp$0,\n    inRootOrSingleton,\n    ssrFormState\n  );\n  JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;\n  JSCompiler_inline_result.memoizedState = action;\n  return [initialStateProp, ssrFormState, !1];\n}\nfunction updateActionState(action) {\n  var stateHook = updateWorkInProgressHook();\n  return updateActionStateImpl(stateHook, currentHook, action);\n}\nfunction updateActionStateImpl(stateHook, currentStateHook, action) {\n  currentStateHook = updateReducerImpl(\n    stateHook,\n    currentStateHook,\n    actionStateReducer\n  )[0];\n  stateHook = updateReducer(basicStateReducer)[0];\n  if (\n    \"object\" === typeof currentStateHook &&\n    null !== currentStateHook &&\n    \"function\" === typeof currentStateHook.then\n  )\n    try {\n      var state = useThenable(currentStateHook);\n    } catch (x) {\n      if (x === SuspenseException) throw SuspenseActionException;\n      throw x;\n    }\n  else state = currentStateHook;\n  currentStateHook = updateWorkInProgressHook();\n  var actionQueue = currentStateHook.queue,\n    dispatch = actionQueue.dispatch;\n  action !== currentStateHook.memoizedState &&\n    ((currentlyRenderingFiber.flags |= 2048),\n    pushSimpleEffect(\n      9,\n      { destroy: void 0 },\n      actionStateActionEffect.bind(null, actionQueue, action),\n      null\n    ));\n  return [state, dispatch, stateHook];\n}\nfunction actionStateActionEffect(actionQueue, action) {\n  actionQueue.action = action;\n}\nfunction rerenderActionState(action) {\n  var stateHook = updateWorkInProgressHook(),\n    currentStateHook = currentHook;\n  if (null !== currentStateHook)\n    return updateActionStateImpl(stateHook, currentStateHook, action);\n  updateWorkInProgressHook();\n  stateHook = stateHook.memoizedState;\n  currentStateHook = updateWorkInProgressHook();\n  var dispatch = currentStateHook.queue.dispatch;\n  currentStateHook.memoizedState = action;\n  return [stateHook, dispatch, !1];\n}\nfunction pushSimpleEffect(tag, inst, create, deps) {\n  tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };\n  inst = currentlyRenderingFiber.updateQueue;\n  null === inst &&\n    ((inst = createFunctionComponentUpdateQueue()),\n    (currentlyRenderingFiber.updateQueue = inst));\n  create = inst.lastEffect;\n  null === create\n    ? (inst.lastEffect = tag.next = tag)\n    : ((deps = create.next),\n      (create.next = tag),\n      (tag.next = deps),\n      (inst.lastEffect = tag));\n  return tag;\n}\nfunction updateRef() {\n  return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = mountWorkInProgressHook();\n  currentlyRenderingFiber.flags |= fiberFlags;\n  hook.memoizedState = pushSimpleEffect(\n    1 | hookFlags,\n    { destroy: void 0 },\n    create,\n    void 0 === deps ? null : deps\n  );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = updateWorkInProgressHook();\n  deps = void 0 === deps ? null : deps;\n  var inst = hook.memoizedState.inst;\n  null !== currentHook &&\n  null !== deps &&\n  areHookInputsEqual(deps, currentHook.memoizedState.deps)\n    ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))\n    : ((currentlyRenderingFiber.flags |= fiberFlags),\n      (hook.memoizedState = pushSimpleEffect(\n        1 | hookFlags,\n        inst,\n        create,\n        deps\n      )));\n}\nfunction mountEffect(create, deps) {\n  mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n  updateEffectImpl(2048, 8, create, deps);\n}\nfunction useEffectEventImpl(payload) {\n  currentlyRenderingFiber.flags |= 4;\n  var componentUpdateQueue = currentlyRenderingFiber.updateQueue;\n  if (null === componentUpdateQueue)\n    (componentUpdateQueue = createFunctionComponentUpdateQueue()),\n      (currentlyRenderingFiber.updateQueue = componentUpdateQueue),\n      (componentUpdateQueue.events = [payload]);\n  else {\n    var events = componentUpdateQueue.events;\n    null === events\n      ? (componentUpdateQueue.events = [payload])\n      : events.push(payload);\n  }\n}\nfunction updateEvent(callback) {\n  var ref = updateWorkInProgressHook().memoizedState;\n  useEffectEventImpl({ ref: ref, nextImpl: callback });\n  return function () {\n    if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));\n    return ref.impl.apply(void 0, arguments);\n  };\n}\nfunction updateInsertionEffect(create, deps) {\n  return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n  return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n  if (\"function\" === typeof ref) {\n    create = create();\n    var refCleanup = ref(create);\n    return function () {\n      \"function\" === typeof refCleanup ? refCleanup() : ref(null);\n    };\n  }\n  if (null !== ref && void 0 !== ref)\n    return (\n      (create = create()),\n      (ref.current = create),\n      function () {\n        ref.current = null;\n      }\n    );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n  deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n  updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n  var hook = updateWorkInProgressHook();\n  deps = void 0 === deps ? null : deps;\n  var prevState = hook.memoizedState;\n  if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n    return prevState[0];\n  hook.memoizedState = [callback, deps];\n  return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n  var hook = updateWorkInProgressHook();\n  deps = void 0 === deps ? null : deps;\n  var prevState = hook.memoizedState;\n  if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n    return prevState[0];\n  prevState = nextCreate();\n  if (shouldDoubleInvokeUserFnsInHooksDEV) {\n    setIsStrictModeForDevtools(!0);\n    try {\n      nextCreate();\n    } finally {\n      setIsStrictModeForDevtools(!1);\n    }\n  }\n  hook.memoizedState = [prevState, deps];\n  return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n  if (\n    void 0 === initialValue ||\n    (0 !== (renderLanes & 1073741824) &&\n      0 === (workInProgressRootRenderLanes & 261930))\n  )\n    return (hook.memoizedState = value);\n  hook.memoizedState = initialValue;\n  hook = requestDeferredLane();\n  currentlyRenderingFiber.lanes |= hook;\n  workInProgressRootSkippedLanes |= hook;\n  return initialValue;\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n  if (objectIs(value, prevValue)) return value;\n  if (null !== currentTreeHiddenStackCursor.current)\n    return (\n      (hook = mountDeferredValueImpl(hook, value, initialValue)),\n      objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n      hook\n    );\n  if (\n    0 === (renderLanes & 106) ||\n    (0 !== (renderLanes & 1073741824) &&\n      0 === (workInProgressRootRenderLanes & 261930))\n  )\n    return (didReceiveUpdate = !0), (hook.memoizedState = value);\n  hook = requestDeferredLane();\n  currentlyRenderingFiber.lanes |= hook;\n  workInProgressRootSkippedLanes |= hook;\n  return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n  var previousPriority = ReactDOMSharedInternals.p;\n  ReactDOMSharedInternals.p =\n    0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n  var prevTransition = ReactSharedInternals.T,\n    currentTransition = {};\n  currentTransition.types =\n    null !== prevTransition ? prevTransition.types : null;\n  ReactSharedInternals.T = currentTransition;\n  dispatchOptimisticSetState(fiber, !1, queue, pendingState);\n  try {\n    var returnValue = callback(),\n      onStartTransitionFinish = ReactSharedInternals.S;\n    null !== onStartTransitionFinish &&\n      onStartTransitionFinish(currentTransition, returnValue);\n    if (\n      null !== returnValue &&\n      \"object\" === typeof returnValue &&\n      \"function\" === typeof returnValue.then\n    ) {\n      var thenableForFinishedState = chainThenableValue(\n        returnValue,\n        finishedState\n      );\n      dispatchSetStateInternal(\n        fiber,\n        queue,\n        thenableForFinishedState,\n        requestUpdateLane(fiber)\n      );\n    } else\n      dispatchSetStateInternal(\n        fiber,\n        queue,\n        finishedState,\n        requestUpdateLane(fiber)\n      );\n  } catch (error) {\n    dispatchSetStateInternal(\n      fiber,\n      queue,\n      { then: function () {}, status: \"rejected\", reason: error },\n      requestUpdateLane()\n    );\n  } finally {\n    (ReactDOMSharedInternals.p = previousPriority),\n      null !== prevTransition &&\n        null !== currentTransition.types &&\n        (prevTransition.types = currentTransition.types),\n      (ReactSharedInternals.T = prevTransition);\n  }\n}\nfunction noop() {}\nfunction startHostTransition(formFiber, pendingState, action, formData) {\n  if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));\n  var queue = ensureFormComponentIsStateful(formFiber).queue;\n  startTransition(\n    formFiber,\n    queue,\n    pendingState,\n    sharedNotPendingObject,\n    null === action\n      ? noop\n      : function () {\n          requestFormReset$1(formFiber);\n          return action(formData);\n        }\n  );\n}\nfunction ensureFormComponentIsStateful(formFiber) {\n  var existingStateHook = formFiber.memoizedState;\n  if (null !== existingStateHook) return existingStateHook;\n  existingStateHook = {\n    memoizedState: sharedNotPendingObject,\n    baseState: sharedNotPendingObject,\n    baseQueue: null,\n    queue: {\n      pending: null,\n      lanes: 0,\n      dispatch: null,\n      lastRenderedReducer: basicStateReducer,\n      lastRenderedState: sharedNotPendingObject\n    },\n    next: null\n  };\n  var initialResetState = {};\n  existingStateHook.next = {\n    memoizedState: initialResetState,\n    baseState: initialResetState,\n    baseQueue: null,\n    queue: {\n      pending: null,\n      lanes: 0,\n      dispatch: null,\n      lastRenderedReducer: basicStateReducer,\n      lastRenderedState: initialResetState\n    },\n    next: null\n  };\n  formFiber.memoizedState = existingStateHook;\n  formFiber = formFiber.alternate;\n  null !== formFiber && (formFiber.memoizedState = existingStateHook);\n  return existingStateHook;\n}\nfunction requestFormReset$1(formFiber) {\n  var stateHook = ensureFormComponentIsStateful(formFiber);\n  null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);\n  dispatchSetStateInternal(\n    formFiber,\n    stateHook.next.queue,\n    {},\n    requestUpdateLane()\n  );\n}\nfunction useHostTransitionStatus() {\n  return readContext(HostTransitionContext);\n}\nfunction updateId() {\n  return updateWorkInProgressHook().memoizedState;\n}\nfunction updateRefresh() {\n  return updateWorkInProgressHook().memoizedState;\n}\nfunction refreshCache(fiber) {\n  for (var provider = fiber.return; null !== provider; ) {\n    switch (provider.tag) {\n      case 24:\n      case 3:\n        var lane = requestUpdateLane();\n        fiber = createUpdate(lane);\n        var root$73 = enqueueUpdate(provider, fiber, lane);\n        null !== root$73 &&\n          (scheduleUpdateOnFiber(root$73, provider, lane),\n          entangleTransitions(root$73, provider, lane));\n        provider = { cache: createCache() };\n        fiber.payload = provider;\n        return;\n    }\n    provider = provider.return;\n  }\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n  var lane = requestUpdateLane();\n  action = {\n    lane: lane,\n    revertLane: 0,\n    gesture: null,\n    action: action,\n    hasEagerState: !1,\n    eagerState: null,\n    next: null\n  };\n  isRenderPhaseUpdate(fiber)\n    ? enqueueRenderPhaseUpdate(queue, action)\n    : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),\n      null !== action &&\n        (scheduleUpdateOnFiber(action, fiber, lane),\n        entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n  var lane = requestUpdateLane();\n  dispatchSetStateInternal(fiber, queue, action, lane);\n}\nfunction dispatchSetStateInternal(fiber, queue, action, lane) {\n  var update = {\n    lane: lane,\n    revertLane: 0,\n    gesture: null,\n    action: action,\n    hasEagerState: !1,\n    eagerState: null,\n    next: null\n  };\n  if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n  else {\n    var alternate = fiber.alternate;\n    if (\n      0 === fiber.lanes &&\n      (null === alternate || 0 === alternate.lanes) &&\n      ((alternate = queue.lastRenderedReducer), null !== alternate)\n    )\n      try {\n        var currentState = queue.lastRenderedState,\n          eagerState = alternate(currentState, action);\n        update.hasEagerState = !0;\n        update.eagerState = eagerState;\n        if (objectIs(eagerState, currentState))\n          return (\n            enqueueUpdate$1(fiber, queue, update, 0),\n            null === workInProgressRoot && finishQueueingConcurrentUpdates(),\n            !1\n          );\n      } catch (error) {\n      } finally {\n      }\n    action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n    if (null !== action)\n      return (\n        scheduleUpdateOnFiber(action, fiber, lane),\n        entangleTransitionUpdate(action, queue, lane),\n        !0\n      );\n  }\n  return !1;\n}\nfunction dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {\n  action = {\n    lane: 2,\n    revertLane: requestTransitionLane(),\n    gesture: null,\n    action: action,\n    hasEagerState: !1,\n    eagerState: null,\n    next: null\n  };\n  if (isRenderPhaseUpdate(fiber)) {\n    if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));\n  } else\n    (throwIfDuringRender = enqueueConcurrentHookUpdate(\n      fiber,\n      queue,\n      action,\n      2\n    )),\n      null !== throwIfDuringRender &&\n        scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);\n}\nfunction isRenderPhaseUpdate(fiber) {\n  var alternate = fiber.alternate;\n  return (\n    fiber === currentlyRenderingFiber ||\n    (null !== alternate && alternate === currentlyRenderingFiber)\n  );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n  didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n    !0;\n  var pending = queue.pending;\n  null === pending\n    ? (update.next = update)\n    : ((update.next = pending.next), (pending.next = update));\n  queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n  if (0 !== (lane & 4194048)) {\n    var queueLanes = queue.lanes;\n    queueLanes &= root.pendingLanes;\n    lane |= queueLanes;\n    queue.lanes = lane;\n    markRootEntangled(root, lane);\n  }\n}\nvar ContextOnlyDispatcher = {\n    readContext: readContext,\n    use: use,\n    useCallback: throwInvalidHookError,\n    useContext: throwInvalidHookError,\n    useEffect: throwInvalidHookError,\n    useImperativeHandle: throwInvalidHookError,\n    useLayoutEffect: throwInvalidHookError,\n    useInsertionEffect: throwInvalidHookError,\n    useMemo: throwInvalidHookError,\n    useReducer: throwInvalidHookError,\n    useRef: throwInvalidHookError,\n    useState: throwInvalidHookError,\n    useDebugValue: throwInvalidHookError,\n    useDeferredValue: throwInvalidHookError,\n    useTransition: throwInvalidHookError,\n    useSyncExternalStore: throwInvalidHookError,\n    useId: throwInvalidHookError,\n    useHostTransitionStatus: throwInvalidHookError,\n    useFormState: throwInvalidHookError,\n    useActionState: throwInvalidHookError,\n    useOptimistic: throwInvalidHookError,\n    useMemoCache: throwInvalidHookError,\n    useCacheRefresh: throwInvalidHookError,\n    useEffectEvent: throwInvalidHookError\n  },\n  HooksDispatcherOnMount = {\n    readContext: readContext,\n    use: use,\n    useCallback: function (callback, deps) {\n      mountWorkInProgressHook().memoizedState = [\n        callback,\n        void 0 === deps ? null : deps\n      ];\n      return callback;\n    },\n    useContext: readContext,\n    useEffect: mountEffect,\n    useImperativeHandle: function (ref, create, deps) {\n      deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n      mountEffectImpl(\n        4194308,\n        4,\n        imperativeHandleEffect.bind(null, create, ref),\n        deps\n      );\n    },\n    useLayoutEffect: function (create, deps) {\n      return mountEffectImpl(4194308, 4, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      mountEffectImpl(4, 2, create, deps);\n    },\n    useMemo: function (nextCreate, deps) {\n      var hook = mountWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      var nextValue = nextCreate();\n      if (shouldDoubleInvokeUserFnsInHooksDEV) {\n        setIsStrictModeForDevtools(!0);\n        try {\n          nextCreate();\n        } finally {\n          setIsStrictModeForDevtools(!1);\n        }\n      }\n      hook.memoizedState = [nextValue, deps];\n      return nextValue;\n    },\n    useReducer: function (reducer, initialArg, init) {\n      var hook = mountWorkInProgressHook();\n      if (void 0 !== init) {\n        var initialState = init(initialArg);\n        if (shouldDoubleInvokeUserFnsInHooksDEV) {\n          setIsStrictModeForDevtools(!0);\n          try {\n            init(initialArg);\n          } finally {\n            setIsStrictModeForDevtools(!1);\n          }\n        }\n      } else initialState = initialArg;\n      hook.memoizedState = hook.baseState = initialState;\n      reducer = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: reducer,\n        lastRenderedState: initialState\n      };\n      hook.queue = reducer;\n      reducer = reducer.dispatch = dispatchReducerAction.bind(\n        null,\n        currentlyRenderingFiber,\n        reducer\n      );\n      return [hook.memoizedState, reducer];\n    },\n    useRef: function (initialValue) {\n      var hook = mountWorkInProgressHook();\n      initialValue = { current: initialValue };\n      return (hook.memoizedState = initialValue);\n    },\n    useState: function (initialState) {\n      initialState = mountStateImpl(initialState);\n      var queue = initialState.queue,\n        dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);\n      queue.dispatch = dispatch;\n      return [initialState.memoizedState, dispatch];\n    },\n    useDebugValue: mountDebugValue,\n    useDeferredValue: function (value, initialValue) {\n      var hook = mountWorkInProgressHook();\n      return mountDeferredValueImpl(hook, value, initialValue);\n    },\n    useTransition: function () {\n      var stateHook = mountStateImpl(!1);\n      stateHook = startTransition.bind(\n        null,\n        currentlyRenderingFiber,\n        stateHook.queue,\n        !0,\n        !1\n      );\n      mountWorkInProgressHook().memoizedState = stateHook;\n      return [!1, stateHook];\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      var fiber = currentlyRenderingFiber,\n        hook = mountWorkInProgressHook();\n      if (isHydrating) {\n        if (void 0 === getServerSnapshot)\n          throw Error(formatProdErrorMessage(407));\n        getServerSnapshot = getServerSnapshot();\n      } else {\n        getServerSnapshot = getSnapshot();\n        if (null === workInProgressRoot)\n          throw Error(formatProdErrorMessage(349));\n        0 !== (workInProgressRootRenderLanes & 127) ||\n          pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n      }\n      hook.memoizedState = getServerSnapshot;\n      var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };\n      hook.queue = inst;\n      mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n        subscribe\n      ]);\n      fiber.flags |= 2048;\n      pushSimpleEffect(\n        9,\n        { destroy: void 0 },\n        updateStoreInstance.bind(\n          null,\n          fiber,\n          inst,\n          getServerSnapshot,\n          getSnapshot\n        ),\n        null\n      );\n      return getServerSnapshot;\n    },\n    useId: function () {\n      var hook = mountWorkInProgressHook(),\n        identifierPrefix = workInProgressRoot.identifierPrefix;\n      if (isHydrating) {\n        var JSCompiler_inline_result = treeContextOverflow;\n        var idWithLeadingBit = treeContextId;\n        JSCompiler_inline_result =\n          (\n            idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))\n          ).toString(32) + JSCompiler_inline_result;\n        identifierPrefix =\n          \"_\" + identifierPrefix + \"R_\" + JSCompiler_inline_result;\n        JSCompiler_inline_result = localIdCounter++;\n        0 < JSCompiler_inline_result &&\n          (identifierPrefix += \"H\" + JSCompiler_inline_result.toString(32));\n        identifierPrefix += \"_\";\n      } else\n        (JSCompiler_inline_result = globalClientIdCounter++),\n          (identifierPrefix =\n            \"_\" +\n            identifierPrefix +\n            \"r_\" +\n            JSCompiler_inline_result.toString(32) +\n            \"_\");\n      return (hook.memoizedState = identifierPrefix);\n    },\n    useHostTransitionStatus: useHostTransitionStatus,\n    useFormState: mountActionState,\n    useActionState: mountActionState,\n    useOptimistic: function (passthrough) {\n      var hook = mountWorkInProgressHook();\n      hook.memoizedState = hook.baseState = passthrough;\n      var queue = {\n        pending: null,\n        lanes: 0,\n        dispatch: null,\n        lastRenderedReducer: null,\n        lastRenderedState: null\n      };\n      hook.queue = queue;\n      hook = dispatchOptimisticSetState.bind(\n        null,\n        currentlyRenderingFiber,\n        !0,\n        queue\n      );\n      queue.dispatch = hook;\n      return [passthrough, hook];\n    },\n    useMemoCache: useMemoCache,\n    useCacheRefresh: function () {\n      return (mountWorkInProgressHook().memoizedState = refreshCache.bind(\n        null,\n        currentlyRenderingFiber\n      ));\n    },\n    useEffectEvent: function (callback) {\n      var hook = mountWorkInProgressHook(),\n        ref = { impl: callback };\n      hook.memoizedState = ref;\n      return function () {\n        if (0 !== (executionContext & 2))\n          throw Error(formatProdErrorMessage(440));\n        return ref.impl.apply(void 0, arguments);\n      };\n    }\n  },\n  HooksDispatcherOnUpdate = {\n    readContext: readContext,\n    use: use,\n    useCallback: updateCallback,\n    useContext: readContext,\n    useEffect: updateEffect,\n    useImperativeHandle: updateImperativeHandle,\n    useInsertionEffect: updateInsertionEffect,\n    useLayoutEffect: updateLayoutEffect,\n    useMemo: updateMemo,\n    useReducer: updateReducer,\n    useRef: updateRef,\n    useState: function () {\n      return updateReducer(basicStateReducer);\n    },\n    useDebugValue: mountDebugValue,\n    useDeferredValue: function (value, initialValue) {\n      var hook = updateWorkInProgressHook();\n      return updateDeferredValueImpl(\n        hook,\n        currentHook.memoizedState,\n        value,\n        initialValue\n      );\n    },\n    useTransition: function () {\n      var booleanOrThenable = updateReducer(basicStateReducer)[0],\n        start = updateWorkInProgressHook().memoizedState;\n      return [\n        \"boolean\" === typeof booleanOrThenable\n          ? booleanOrThenable\n          : useThenable(booleanOrThenable),\n        start\n      ];\n    },\n    useSyncExternalStore: updateSyncExternalStore,\n    useId: updateId,\n    useHostTransitionStatus: useHostTransitionStatus,\n    useFormState: updateActionState,\n    useActionState: updateActionState,\n    useOptimistic: function (passthrough, reducer) {\n      var hook = updateWorkInProgressHook();\n      return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n    },\n    useMemoCache: useMemoCache,\n    useCacheRefresh: updateRefresh,\n    useEffectEvent: updateEvent\n  },\n  HooksDispatcherOnRerender = {\n    readContext: readContext,\n    use: use,\n    useCallback: updateCallback,\n    useContext: readContext,\n    useEffect: updateEffect,\n    useImperativeHandle: updateImperativeHandle,\n    useInsertionEffect: updateInsertionEffect,\n    useLayoutEffect: updateLayoutEffect,\n    useMemo: updateMemo,\n    useReducer: rerenderReducer,\n    useRef: updateRef,\n    useState: function () {\n      return rerenderReducer(basicStateReducer);\n    },\n    useDebugValue: mountDebugValue,\n    useDeferredValue: function (value, initialValue) {\n      var hook = updateWorkInProgressHook();\n      return null === currentHook\n        ? mountDeferredValueImpl(hook, value, initialValue)\n        : updateDeferredValueImpl(\n            hook,\n            currentHook.memoizedState,\n            value,\n            initialValue\n          );\n    },\n    useTransition: function () {\n      var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n        start = updateWorkInProgressHook().memoizedState;\n      return [\n        \"boolean\" === typeof booleanOrThenable\n          ? booleanOrThenable\n          : useThenable(booleanOrThenable),\n        start\n      ];\n    },\n    useSyncExternalStore: updateSyncExternalStore,\n    useId: updateId,\n    useHostTransitionStatus: useHostTransitionStatus,\n    useFormState: rerenderActionState,\n    useActionState: rerenderActionState,\n    useOptimistic: function (passthrough, reducer) {\n      var hook = updateWorkInProgressHook();\n      if (null !== currentHook)\n        return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n      hook.baseState = passthrough;\n      return [passthrough, hook.queue.dispatch];\n    },\n    useMemoCache: useMemoCache,\n    useCacheRefresh: updateRefresh,\n    useEffectEvent: updateEvent\n  };\nfunction applyDerivedStateFromProps(\n  workInProgress,\n  ctor,\n  getDerivedStateFromProps,\n  nextProps\n) {\n  ctor = workInProgress.memoizedState;\n  getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n  getDerivedStateFromProps =\n    null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n      ? ctor\n      : assign({}, ctor, getDerivedStateFromProps);\n  workInProgress.memoizedState = getDerivedStateFromProps;\n  0 === workInProgress.lanes &&\n    (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n  enqueueSetState: function (inst, payload, callback) {\n    inst = inst._reactInternals;\n    var lane = requestUpdateLane(),\n      update = createUpdate(lane);\n    update.payload = payload;\n    void 0 !== callback && null !== callback && (update.callback = callback);\n    payload = enqueueUpdate(inst, update, lane);\n    null !== payload &&\n      (scheduleUpdateOnFiber(payload, inst, lane),\n      entangleTransitions(payload, inst, lane));\n  },\n  enqueueReplaceState: function (inst, payload, callback) {\n    inst = inst._reactInternals;\n    var lane = requestUpdateLane(),\n      update = createUpdate(lane);\n    update.tag = 1;\n    update.payload = payload;\n    void 0 !== callback && null !== callback && (update.callback = callback);\n    payload = enqueueUpdate(inst, update, lane);\n    null !== payload &&\n      (scheduleUpdateOnFiber(payload, inst, lane),\n      entangleTransitions(payload, inst, lane));\n  },\n  enqueueForceUpdate: function (inst, callback) {\n    inst = inst._reactInternals;\n    var lane = requestUpdateLane(),\n      update = createUpdate(lane);\n    update.tag = 2;\n    void 0 !== callback && null !== callback && (update.callback = callback);\n    callback = enqueueUpdate(inst, update, lane);\n    null !== callback &&\n      (scheduleUpdateOnFiber(callback, inst, lane),\n      entangleTransitions(callback, inst, lane));\n  }\n};\nfunction checkShouldComponentUpdate(\n  workInProgress,\n  ctor,\n  oldProps,\n  newProps,\n  oldState,\n  newState,\n  nextContext\n) {\n  workInProgress = workInProgress.stateNode;\n  return \"function\" === typeof workInProgress.shouldComponentUpdate\n    ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n    : ctor.prototype && ctor.prototype.isPureReactComponent\n      ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n      : !0;\n}\nfunction callComponentWillReceiveProps(\n  workInProgress,\n  instance,\n  newProps,\n  nextContext\n) {\n  workInProgress = instance.state;\n  \"function\" === typeof instance.componentWillReceiveProps &&\n    instance.componentWillReceiveProps(newProps, nextContext);\n  \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n  instance.state !== workInProgress &&\n    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction resolveClassComponentProps(Component, baseProps) {\n  var newProps = baseProps;\n  if (\"ref\" in baseProps) {\n    newProps = {};\n    for (var propName in baseProps)\n      \"ref\" !== propName && (newProps[propName] = baseProps[propName]);\n  }\n  if ((Component = Component.defaultProps)) {\n    newProps === baseProps && (newProps = assign({}, newProps));\n    for (var propName$77 in Component)\n      void 0 === newProps[propName$77] &&\n        (newProps[propName$77] = Component[propName$77]);\n  }\n  return newProps;\n}\nfunction defaultOnUncaughtError(error) {\n  reportGlobalError(error);\n}\nfunction defaultOnCaughtError(error) {\n  console.error(error);\n}\nfunction defaultOnRecoverableError(error) {\n  reportGlobalError(error);\n}\nfunction logUncaughtError(root, errorInfo) {\n  try {\n    var onUncaughtError = root.onUncaughtError;\n    onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });\n  } catch (e$78) {\n    setTimeout(function () {\n      throw e$78;\n    });\n  }\n}\nfunction logCaughtError(root, boundary, errorInfo) {\n  try {\n    var onCaughtError = root.onCaughtError;\n    onCaughtError(errorInfo.value, {\n      componentStack: errorInfo.stack,\n      errorBoundary: 1 === boundary.tag ? boundary.stateNode : null\n    });\n  } catch (e$79) {\n    setTimeout(function () {\n      throw e$79;\n    });\n  }\n}\nfunction createRootErrorUpdate(root, errorInfo, lane) {\n  lane = createUpdate(lane);\n  lane.tag = 3;\n  lane.payload = { element: null };\n  lane.callback = function () {\n    logUncaughtError(root, errorInfo);\n  };\n  return lane;\n}\nfunction createClassErrorUpdate(lane) {\n  lane = createUpdate(lane);\n  lane.tag = 3;\n  return lane;\n}\nfunction initializeClassErrorUpdate(update, root, fiber, errorInfo) {\n  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n  if (\"function\" === typeof getDerivedStateFromError) {\n    var error = errorInfo.value;\n    update.payload = function () {\n      return getDerivedStateFromError(error);\n    };\n    update.callback = function () {\n      logCaughtError(root, fiber, errorInfo);\n    };\n  }\n  var inst = fiber.stateNode;\n  null !== inst &&\n    \"function\" === typeof inst.componentDidCatch &&\n    (update.callback = function () {\n      logCaughtError(root, fiber, errorInfo);\n      \"function\" !== typeof getDerivedStateFromError &&\n        (null === legacyErrorBoundariesThatAlreadyFailed\n          ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n          : legacyErrorBoundariesThatAlreadyFailed.add(this));\n      var stack = errorInfo.stack;\n      this.componentDidCatch(errorInfo.value, {\n        componentStack: null !== stack ? stack : \"\"\n      });\n    });\n}\nfunction throwException(\n  root,\n  returnFiber,\n  sourceFiber,\n  value,\n  rootRenderLanes\n) {\n  sourceFiber.flags |= 32768;\n  if (\n    null !== value &&\n    \"object\" === typeof value &&\n    \"function\" === typeof value.then\n  ) {\n    returnFiber = sourceFiber.alternate;\n    null !== returnFiber &&\n      propagateParentContextChanges(\n        returnFiber,\n        sourceFiber,\n        rootRenderLanes,\n        !0\n      );\n    sourceFiber = suspenseHandlerStackCursor.current;\n    if (null !== sourceFiber) {\n      switch (sourceFiber.tag) {\n        case 31:\n        case 13:\n        case 19:\n          return (\n            null === shellBoundary\n              ? renderDidSuspendDelayIfPossible()\n              : null === sourceFiber.alternate &&\n                0 === workInProgressRootExitStatus &&\n                (workInProgressRootExitStatus = 3),\n            (sourceFiber.flags &= -257),\n            (sourceFiber.flags |= 65536),\n            (sourceFiber.lanes = rootRenderLanes),\n            value === noopSuspenseyCommitThenable\n              ? (sourceFiber.flags |= 16384)\n              : ((returnFiber = sourceFiber.updateQueue),\n                null === returnFiber\n                  ? (sourceFiber.updateQueue = new Set([value]))\n                  : returnFiber.add(value),\n                attachPingListener(root, value, rootRenderLanes)),\n            !1\n          );\n        case 22:\n          return (\n            (sourceFiber.flags |= 65536),\n            value === noopSuspenseyCommitThenable\n              ? (sourceFiber.flags |= 16384)\n              : ((returnFiber = sourceFiber.updateQueue),\n                null === returnFiber\n                  ? ((returnFiber = {\n                      transitions: null,\n                      markerInstances: null,\n                      retryQueue: new Set([value])\n                    }),\n                    (sourceFiber.updateQueue = returnFiber))\n                  : ((sourceFiber = returnFiber.retryQueue),\n                    null === sourceFiber\n                      ? (returnFiber.retryQueue = new Set([value]))\n                      : sourceFiber.add(value)),\n                attachPingListener(root, value, rootRenderLanes)),\n            !1\n          );\n      }\n      throw Error(formatProdErrorMessage(435, sourceFiber.tag));\n    }\n    attachPingListener(root, value, rootRenderLanes);\n    renderDidSuspendDelayIfPossible();\n    return !1;\n  }\n  if (isHydrating)\n    return (\n      (returnFiber = suspenseHandlerStackCursor.current),\n      null !== returnFiber\n        ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),\n          (returnFiber.flags |= 65536),\n          (returnFiber.lanes = rootRenderLanes),\n          value !== HydrationMismatchException &&\n            ((root = Error(formatProdErrorMessage(422), { cause: value })),\n            queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))\n        : (value !== HydrationMismatchException &&\n            ((returnFiber = Error(formatProdErrorMessage(423), {\n              cause: value\n            })),\n            queueHydrationError(\n              createCapturedValueAtFiber(returnFiber, sourceFiber)\n            )),\n          (root = root.current.alternate),\n          (root.flags |= 65536),\n          (rootRenderLanes &= -rootRenderLanes),\n          (root.lanes |= rootRenderLanes),\n          (value = createCapturedValueAtFiber(value, sourceFiber)),\n          (rootRenderLanes = createRootErrorUpdate(\n            root.stateNode,\n            value,\n            rootRenderLanes\n          )),\n          enqueueCapturedUpdate(root, rootRenderLanes),\n          4 !== workInProgressRootExitStatus &&\n            (workInProgressRootExitStatus = 2)),\n      !1\n    );\n  var wrapperError = Error(formatProdErrorMessage(520), { cause: value });\n  wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);\n  null === workInProgressRootConcurrentErrors\n    ? (workInProgressRootConcurrentErrors = [wrapperError])\n    : workInProgressRootConcurrentErrors.push(wrapperError);\n  4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n  if (null === returnFiber) return !0;\n  value = createCapturedValueAtFiber(value, sourceFiber);\n  sourceFiber = returnFiber;\n  do {\n    switch (sourceFiber.tag) {\n      case 3:\n        return (\n          (sourceFiber.flags |= 65536),\n          (root = rootRenderLanes & -rootRenderLanes),\n          (sourceFiber.lanes |= root),\n          (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),\n          enqueueCapturedUpdate(sourceFiber, root),\n          !1\n        );\n      case 1:\n        returnFiber = sourceFiber.type;\n        wrapperError = sourceFiber.stateNode;\n        if (\n          0 === (sourceFiber.flags & 128) &&\n          (\"function\" === typeof returnFiber.getDerivedStateFromError ||\n            (null !== wrapperError &&\n              \"function\" === typeof wrapperError.componentDidCatch &&\n              (null === legacyErrorBoundariesThatAlreadyFailed ||\n                !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))\n        )\n          return (\n            (sourceFiber.flags |= 65536),\n            (rootRenderLanes &= -rootRenderLanes),\n            (sourceFiber.lanes |= rootRenderLanes),\n            (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),\n            initializeClassErrorUpdate(\n              rootRenderLanes,\n              root,\n              sourceFiber,\n              value\n            ),\n            enqueueCapturedUpdate(sourceFiber, rootRenderLanes),\n            !1\n          );\n        break;\n      case 22:\n        if (null !== sourceFiber.memoizedState)\n          return (sourceFiber.flags |= 65536), !1;\n    }\n    sourceFiber = sourceFiber.return;\n  } while (null !== sourceFiber);\n  return !1;\n}\nvar SelectiveHydrationException = Error(formatProdErrorMessage(461)),\n  didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n  workInProgress.child =\n    null === current\n      ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n      : reconcileChildFibers(\n          workInProgress,\n          current.child,\n          nextChildren,\n          renderLanes\n        );\n}\nfunction updateForwardRef(\n  current,\n  workInProgress,\n  Component,\n  nextProps,\n  renderLanes\n) {\n  Component = Component.render;\n  var ref = workInProgress.ref;\n  if (\"ref\" in nextProps) {\n    var propsWithoutRef = {};\n    for (var key in nextProps)\n      \"ref\" !== key && (propsWithoutRef[key] = nextProps[key]);\n  } else propsWithoutRef = nextProps;\n  prepareToReadContext(workInProgress);\n  nextProps = renderWithHooks(\n    current,\n    workInProgress,\n    Component,\n    propsWithoutRef,\n    ref,\n    renderLanes\n  );\n  key = checkDidRenderIdHook();\n  if (null !== current && !didReceiveUpdate)\n    return (\n      bailoutHooks(current, workInProgress, renderLanes),\n      bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n    );\n  isHydrating && key && pushMaterializedTreeId(workInProgress);\n  workInProgress.flags |= 1;\n  reconcileChildren(current, workInProgress, nextProps, renderLanes);\n  return workInProgress.child;\n}\nfunction updateMemoComponent(\n  current,\n  workInProgress,\n  Component,\n  nextProps,\n  renderLanes\n) {\n  if (null === current) {\n    var type = Component.type;\n    if (\n      \"function\" === typeof type &&\n      !shouldConstruct(type) &&\n      void 0 === type.defaultProps &&\n      null === Component.compare\n    )\n      return (\n        (workInProgress.tag = 15),\n        (workInProgress.type = type),\n        updateSimpleMemoComponent(\n          current,\n          workInProgress,\n          type,\n          nextProps,\n          renderLanes\n        )\n      );\n    current = createFiberFromTypeAndProps(\n      Component.type,\n      null,\n      nextProps,\n      workInProgress,\n      workInProgress.mode,\n      renderLanes\n    );\n    current.ref = workInProgress.ref;\n    current.return = workInProgress;\n    return (workInProgress.child = current);\n  }\n  type = current.child;\n  if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n    var prevProps = type.memoizedProps;\n    Component = Component.compare;\n    Component = null !== Component ? Component : shallowEqual;\n    if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n  workInProgress.flags |= 1;\n  current = createWorkInProgress(type, nextProps);\n  current.ref = workInProgress.ref;\n  current.return = workInProgress;\n  return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n  current,\n  workInProgress,\n  Component,\n  nextProps,\n  renderLanes\n) {\n  if (null !== current) {\n    var prevProps = current.memoizedProps;\n    if (\n      shallowEqual(prevProps, nextProps) &&\n      current.ref === workInProgress.ref\n    )\n      if (\n        ((didReceiveUpdate = !1),\n        (workInProgress.pendingProps = nextProps = prevProps),\n        checkScheduledUpdateOrContext(current, renderLanes))\n      )\n        0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n      else\n        return (\n          (workInProgress.lanes = current.lanes),\n          bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n        );\n  }\n  return updateFunctionComponent(\n    current,\n    workInProgress,\n    Component,\n    nextProps,\n    renderLanes\n  );\n}\nfunction updateOffscreenComponent(\n  current,\n  workInProgress,\n  renderLanes,\n  nextProps\n) {\n  var nextChildren = nextProps.children,\n    prevState = null !== current ? current.memoizedState : null;\n  null === current &&\n    null === workInProgress.stateNode &&\n    (workInProgress.stateNode = {\n      _visibility: 1,\n      _pendingMarkers: null,\n      _retryCache: null,\n      _transitions: null\n    });\n  if (\"hidden\" === nextProps.mode) {\n    if (0 !== (workInProgress.flags & 128)) {\n      prevState =\n        null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n      if (null !== current) {\n        nextProps = workInProgress.child = current.child;\n        for (nextChildren = 0; null !== nextProps; )\n          (nextChildren =\n            nextChildren | nextProps.lanes | nextProps.childLanes),\n            (nextProps = nextProps.sibling);\n        nextProps = nextChildren & ~prevState;\n      } else (nextProps = 0), (workInProgress.child = null);\n      return deferHiddenOffscreenComponent(\n        current,\n        workInProgress,\n        prevState,\n        renderLanes,\n        nextProps\n      );\n    }\n    if (0 !== (renderLanes & 536870912))\n      (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n        null !== current &&\n          pushTransition(\n            workInProgress,\n            null !== prevState ? prevState.cachePool : null\n          ),\n        null !== prevState\n          ? pushHiddenContext(workInProgress, prevState)\n          : reuseHiddenContextOnStack(),\n        pushOffscreenSuspenseHandler(workInProgress);\n    else\n      return (\n        (nextProps = workInProgress.lanes = 536870912),\n        deferHiddenOffscreenComponent(\n          current,\n          workInProgress,\n          null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,\n          renderLanes,\n          nextProps\n        )\n      );\n  } else\n    null !== prevState\n      ? (pushTransition(workInProgress, prevState.cachePool),\n        pushHiddenContext(workInProgress, prevState),\n        reuseSuspenseHandlerOnStack(),\n        (workInProgress.memoizedState = null))\n      : (null !== current && pushTransition(workInProgress, null),\n        reuseHiddenContextOnStack(),\n        reuseSuspenseHandlerOnStack());\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\nfunction bailoutOffscreenComponent(current, workInProgress) {\n  (null !== current && 22 === current.tag) ||\n    null !== workInProgress.stateNode ||\n    (workInProgress.stateNode = {\n      _visibility: 1,\n      _pendingMarkers: null,\n      _retryCache: null,\n      _transitions: null\n    });\n  return workInProgress.sibling;\n}\nfunction deferHiddenOffscreenComponent(\n  current,\n  workInProgress,\n  nextBaseLanes,\n  renderLanes,\n  remainingChildLanes\n) {\n  var JSCompiler_inline_result = peekCacheFromPool();\n  JSCompiler_inline_result =\n    null === JSCompiler_inline_result\n      ? null\n      : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };\n  workInProgress.memoizedState = {\n    baseLanes: nextBaseLanes,\n    cachePool: JSCompiler_inline_result\n  };\n  null !== current && pushTransition(workInProgress, null);\n  reuseHiddenContextOnStack();\n  pushOffscreenSuspenseHandler(workInProgress);\n  null !== current &&\n    propagateParentContextChanges(current, workInProgress, renderLanes, !0);\n  workInProgress.childLanes = remainingChildLanes;\n  return null;\n}\nfunction mountActivityChildren(workInProgress, nextProps) {\n  nextProps = mountWorkInProgressOffscreenFiber(\n    { mode: nextProps.mode, children: nextProps.children },\n    workInProgress.mode\n  );\n  nextProps.ref = workInProgress.ref;\n  workInProgress.child = nextProps;\n  nextProps.return = workInProgress;\n  return nextProps;\n}\nfunction retryActivityComponentWithoutHydrating(\n  current,\n  workInProgress,\n  renderLanes\n) {\n  reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n  current = mountActivityChildren(workInProgress, workInProgress.pendingProps);\n  current.flags |= 2;\n  popSuspenseHandler(workInProgress);\n  workInProgress.memoizedState = null;\n  return current;\n}\nfunction updateActivityComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps,\n    didSuspend = 0 !== (workInProgress.flags & 128);\n  workInProgress.flags &= -129;\n  if (null === current) {\n    if (isHydrating) {\n      if (\"hidden\" === nextProps.mode)\n        return (\n          (current = mountActivityChildren(workInProgress, nextProps)),\n          (workInProgress.lanes = 536870912),\n          (current.memoizedState = { baseLanes: 0, cachePool: null }),\n          bailoutOffscreenComponent(null, current)\n        );\n      pushDehydratedActivitySuspenseHandler(workInProgress);\n      (current = nextHydratableInstance)\n        ? ((current = canHydrateHydrationBoundary(\n            current,\n            rootOrSingletonContext\n          )),\n          (current = null !== current && \"&\" === current.data ? current : null),\n          null !== current &&\n            ((workInProgress.memoizedState = {\n              dehydrated: current,\n              treeContext:\n                null !== treeContextProvider\n                  ? { id: treeContextId, overflow: treeContextOverflow }\n                  : null,\n              retryLane: 536870912,\n              hydrationErrors: null\n            }),\n            (renderLanes = createFiberFromDehydratedFragment(current)),\n            (renderLanes.return = workInProgress),\n            (workInProgress.child = renderLanes),\n            (hydrationParentFiber = workInProgress),\n            (nextHydratableInstance = null)))\n        : (current = null);\n      if (null === current) throw throwOnHydrationMismatch(workInProgress);\n      workInProgress.lanes = 536870912;\n      return null;\n    }\n    return mountActivityChildren(workInProgress, nextProps);\n  }\n  var prevState = current.memoizedState;\n  if (null !== prevState) {\n    var dehydrated = prevState.dehydrated;\n    pushDehydratedActivitySuspenseHandler(workInProgress);\n    if (didSuspend)\n      if (workInProgress.flags & 256)\n        (workInProgress.flags &= -257),\n          (workInProgress = retryActivityComponentWithoutHydrating(\n            current,\n            workInProgress,\n            renderLanes\n          ));\n      else if (null !== workInProgress.memoizedState)\n        (workInProgress.child = current.child),\n          (workInProgress.flags |= 128),\n          (workInProgress = null);\n      else throw Error(formatProdErrorMessage(558));\n    else if (\n      (didReceiveUpdate ||\n        propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n      (didSuspend = 0 !== (renderLanes & current.childLanes)),\n      didReceiveUpdate || didSuspend)\n    ) {\n      if (null === currentTreeHiddenStackCursor.current) {\n        nextProps = workInProgressRoot;\n        if (\n          null !== nextProps &&\n          ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),\n          0 !== dehydrated && dehydrated !== prevState.retryLane)\n        )\n          throw (\n            ((prevState.retryLane = dehydrated),\n            enqueueConcurrentRenderForLane(current, dehydrated),\n            scheduleUpdateOnFiber(nextProps, current, dehydrated),\n            SelectiveHydrationException)\n          );\n        renderDidSuspendDelayIfPossible();\n      }\n      workInProgress = retryActivityComponentWithoutHydrating(\n        current,\n        workInProgress,\n        renderLanes\n      );\n    } else\n      (current = prevState.treeContext),\n        (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),\n        (hydrationParentFiber = workInProgress),\n        (isHydrating = !0),\n        (hydrationErrors = null),\n        (rootOrSingletonContext = !1),\n        null !== current &&\n          restoreSuspendedTreeContext(workInProgress, current),\n        (workInProgress = mountActivityChildren(workInProgress, nextProps)),\n        (workInProgress.flags |= 134221824);\n    return workInProgress;\n  }\n  current = createWorkInProgress(current.child, {\n    mode: nextProps.mode,\n    children: nextProps.children\n  });\n  current.ref = workInProgress.ref;\n  workInProgress.child = current;\n  current.return = workInProgress;\n  return current;\n}\nfunction markRef(current, workInProgress) {\n  var ref = workInProgress.ref;\n  if (null === ref)\n    null !== current &&\n      null !== current.ref &&\n      (workInProgress.flags |= 4194816);\n  else {\n    if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n      throw Error(formatProdErrorMessage(284));\n    if (null === current || current.ref !== ref)\n      workInProgress.flags |= 4194816;\n  }\n}\nfunction updateFunctionComponent(\n  current,\n  workInProgress,\n  Component,\n  nextProps,\n  renderLanes\n) {\n  prepareToReadContext(workInProgress);\n  Component = renderWithHooks(\n    current,\n    workInProgress,\n    Component,\n    nextProps,\n    void 0,\n    renderLanes\n  );\n  nextProps = checkDidRenderIdHook();\n  if (null !== current && !didReceiveUpdate)\n    return (\n      bailoutHooks(current, workInProgress, renderLanes),\n      bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n    );\n  isHydrating && nextProps && pushMaterializedTreeId(workInProgress);\n  workInProgress.flags |= 1;\n  reconcileChildren(current, workInProgress, Component, renderLanes);\n  return workInProgress.child;\n}\nfunction replayFunctionComponent(\n  current,\n  workInProgress,\n  nextProps,\n  Component,\n  secondArg,\n  renderLanes\n) {\n  prepareToReadContext(workInProgress);\n  workInProgress.updateQueue = null;\n  nextProps = renderWithHooksAgain(\n    workInProgress,\n    Component,\n    nextProps,\n    secondArg\n  );\n  finishRenderingHooks(current);\n  Component = checkDidRenderIdHook();\n  if (null !== current && !didReceiveUpdate)\n    return (\n      bailoutHooks(current, workInProgress, renderLanes),\n      bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n    );\n  isHydrating && Component && pushMaterializedTreeId(workInProgress);\n  workInProgress.flags |= 1;\n  reconcileChildren(current, workInProgress, nextProps, renderLanes);\n  return workInProgress.child;\n}\nfunction updateClassComponent(\n  current,\n  workInProgress,\n  Component,\n  nextProps,\n  renderLanes\n) {\n  prepareToReadContext(workInProgress);\n  if (null === workInProgress.stateNode) {\n    var context = emptyContextObject,\n      contextType = Component.contextType;\n    \"object\" === typeof contextType &&\n      null !== contextType &&\n      (context = readContext(contextType));\n    context = new Component(nextProps, context);\n    workInProgress.memoizedState =\n      null !== context.state && void 0 !== context.state ? context.state : null;\n    context.updater = classComponentUpdater;\n    workInProgress.stateNode = context;\n    context._reactInternals = workInProgress;\n    context = workInProgress.stateNode;\n    context.props = nextProps;\n    context.state = workInProgress.memoizedState;\n    context.refs = {};\n    initializeUpdateQueue(workInProgress);\n    contextType = Component.contextType;\n    context.context =\n      \"object\" === typeof contextType && null !== contextType\n        ? readContext(contextType)\n        : emptyContextObject;\n    context.state = workInProgress.memoizedState;\n    contextType = Component.getDerivedStateFromProps;\n    \"function\" === typeof contextType &&\n      (applyDerivedStateFromProps(\n        workInProgress,\n        Component,\n        contextType,\n        nextProps\n      ),\n      (context.state = workInProgress.memoizedState));\n    \"function\" === typeof Component.getDerivedStateFromProps ||\n      \"function\" === typeof context.getSnapshotBeforeUpdate ||\n      (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n        \"function\" !== typeof context.componentWillMount) ||\n      ((contextType = context.state),\n      \"function\" === typeof context.componentWillMount &&\n        context.componentWillMount(),\n      \"function\" === typeof context.UNSAFE_componentWillMount &&\n        context.UNSAFE_componentWillMount(),\n      contextType !== context.state &&\n        classComponentUpdater.enqueueReplaceState(context, context.state, null),\n      processUpdateQueue(workInProgress, nextProps, context, renderLanes),\n      suspendIfUpdateReadFromEntangledAsyncAction(),\n      (context.state = workInProgress.memoizedState));\n    \"function\" === typeof context.componentDidMount &&\n      (workInProgress.flags |= 4194308);\n    nextProps = !0;\n  } else if (null === current) {\n    context = workInProgress.stateNode;\n    var unresolvedOldProps = workInProgress.memoizedProps,\n      oldProps = resolveClassComponentProps(Component, unresolvedOldProps);\n    context.props = oldProps;\n    var oldContext = context.context,\n      contextType$jscomp$0 = Component.contextType;\n    contextType = emptyContextObject;\n    \"object\" === typeof contextType$jscomp$0 &&\n      null !== contextType$jscomp$0 &&\n      (contextType = readContext(contextType$jscomp$0));\n    var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n    contextType$jscomp$0 =\n      \"function\" === typeof getDerivedStateFromProps ||\n      \"function\" === typeof context.getSnapshotBeforeUpdate;\n    unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;\n    contextType$jscomp$0 ||\n      (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n        \"function\" !== typeof context.componentWillReceiveProps) ||\n      ((unresolvedOldProps || oldContext !== contextType) &&\n        callComponentWillReceiveProps(\n          workInProgress,\n          context,\n          nextProps,\n          contextType\n        ));\n    hasForceUpdate = !1;\n    var oldState = workInProgress.memoizedState;\n    context.state = oldState;\n    processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n    suspendIfUpdateReadFromEntangledAsyncAction();\n    oldContext = workInProgress.memoizedState;\n    unresolvedOldProps || oldState !== oldContext || hasForceUpdate\n      ? (\"function\" === typeof getDerivedStateFromProps &&\n          (applyDerivedStateFromProps(\n            workInProgress,\n            Component,\n            getDerivedStateFromProps,\n            nextProps\n          ),\n          (oldContext = workInProgress.memoizedState)),\n        (oldProps =\n          hasForceUpdate ||\n          checkShouldComponentUpdate(\n            workInProgress,\n            Component,\n            oldProps,\n            nextProps,\n            oldState,\n            oldContext,\n            contextType\n          ))\n          ? (contextType$jscomp$0 ||\n              (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n                \"function\" !== typeof context.componentWillMount) ||\n              (\"function\" === typeof context.componentWillMount &&\n                context.componentWillMount(),\n              \"function\" === typeof context.UNSAFE_componentWillMount &&\n                context.UNSAFE_componentWillMount()),\n            \"function\" === typeof context.componentDidMount &&\n              (workInProgress.flags |= 4194308))\n          : (\"function\" === typeof context.componentDidMount &&\n              (workInProgress.flags |= 4194308),\n            (workInProgress.memoizedProps = nextProps),\n            (workInProgress.memoizedState = oldContext)),\n        (context.props = nextProps),\n        (context.state = oldContext),\n        (context.context = contextType),\n        (nextProps = oldProps))\n      : (\"function\" === typeof context.componentDidMount &&\n          (workInProgress.flags |= 4194308),\n        (nextProps = !1));\n  } else {\n    context = workInProgress.stateNode;\n    cloneUpdateQueue(current, workInProgress);\n    contextType = workInProgress.memoizedProps;\n    contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);\n    context.props = contextType$jscomp$0;\n    getDerivedStateFromProps = workInProgress.pendingProps;\n    oldState = context.context;\n    oldContext = Component.contextType;\n    oldProps = emptyContextObject;\n    \"object\" === typeof oldContext &&\n      null !== oldContext &&\n      (oldProps = readContext(oldContext));\n    unresolvedOldProps = Component.getDerivedStateFromProps;\n    (oldContext =\n      \"function\" === typeof unresolvedOldProps ||\n      \"function\" === typeof context.getSnapshotBeforeUpdate) ||\n      (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n        \"function\" !== typeof context.componentWillReceiveProps) ||\n      ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&\n        callComponentWillReceiveProps(\n          workInProgress,\n          context,\n          nextProps,\n          oldProps\n        ));\n    hasForceUpdate = !1;\n    oldState = workInProgress.memoizedState;\n    context.state = oldState;\n    processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n    suspendIfUpdateReadFromEntangledAsyncAction();\n    var newState = workInProgress.memoizedState;\n    contextType !== getDerivedStateFromProps ||\n    oldState !== newState ||\n    hasForceUpdate ||\n    (null !== current &&\n      null !== current.dependencies &&\n      checkIfContextChanged(current.dependencies))\n      ? (\"function\" === typeof unresolvedOldProps &&\n          (applyDerivedStateFromProps(\n            workInProgress,\n            Component,\n            unresolvedOldProps,\n            nextProps\n          ),\n          (newState = workInProgress.memoizedState)),\n        (contextType$jscomp$0 =\n          hasForceUpdate ||\n          checkShouldComponentUpdate(\n            workInProgress,\n            Component,\n            contextType$jscomp$0,\n            nextProps,\n            oldState,\n            newState,\n            oldProps\n          ) ||\n          (null !== current &&\n            null !== current.dependencies &&\n            checkIfContextChanged(current.dependencies)))\n          ? (oldContext ||\n              (\"function\" !== typeof context.UNSAFE_componentWillUpdate &&\n                \"function\" !== typeof context.componentWillUpdate) ||\n              (\"function\" === typeof context.componentWillUpdate &&\n                context.componentWillUpdate(nextProps, newState, oldProps),\n              \"function\" === typeof context.UNSAFE_componentWillUpdate &&\n                context.UNSAFE_componentWillUpdate(\n                  nextProps,\n                  newState,\n                  oldProps\n                )),\n            \"function\" === typeof context.componentDidUpdate &&\n              (workInProgress.flags |= 4),\n            \"function\" === typeof context.getSnapshotBeforeUpdate &&\n              (workInProgress.flags |= 1024))\n          : (\"function\" !== typeof context.componentDidUpdate ||\n              (contextType === current.memoizedProps &&\n                oldState === current.memoizedState) ||\n              (workInProgress.flags |= 4),\n            \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n              (contextType === current.memoizedProps &&\n                oldState === current.memoizedState) ||\n              (workInProgress.flags |= 1024),\n            (workInProgress.memoizedProps = nextProps),\n            (workInProgress.memoizedState = newState)),\n        (context.props = nextProps),\n        (context.state = newState),\n        (context.context = oldProps),\n        (nextProps = contextType$jscomp$0))\n      : (\"function\" !== typeof context.componentDidUpdate ||\n          (contextType === current.memoizedProps &&\n            oldState === current.memoizedState) ||\n          (workInProgress.flags |= 4),\n        \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n          (contextType === current.memoizedProps &&\n            oldState === current.memoizedState) ||\n          (workInProgress.flags |= 1024),\n        (nextProps = !1));\n  }\n  context = nextProps;\n  markRef(current, workInProgress);\n  nextProps = 0 !== (workInProgress.flags & 128);\n  context || nextProps\n    ? ((context = workInProgress.stateNode),\n      (Component =\n        nextProps && \"function\" !== typeof Component.getDerivedStateFromError\n          ? null\n          : context.render()),\n      (workInProgress.flags |= 1),\n      null !== current && nextProps\n        ? ((workInProgress.child = reconcileChildFibers(\n            workInProgress,\n            current.child,\n            null,\n            renderLanes\n          )),\n          (workInProgress.child = reconcileChildFibers(\n            workInProgress,\n            null,\n            Component,\n            renderLanes\n          )))\n        : reconcileChildren(current, workInProgress, Component, renderLanes),\n      (workInProgress.memoizedState = context.state),\n      (current = workInProgress.child))\n    : (current = bailoutOnAlreadyFinishedWork(\n        current,\n        workInProgress,\n        renderLanes\n      ));\n  return current;\n}\nfunction mountHostRootWithoutHydrating(\n  current,\n  workInProgress,\n  nextChildren,\n  renderLanes\n) {\n  resetHydrationState();\n  workInProgress.flags |= 256;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\nvar SUSPENDED_MARKER = {\n  dehydrated: null,\n  treeContext: null,\n  retryLane: 0,\n  hydrationErrors: null\n};\nfunction mountSuspenseOffscreenState(renderLanes) {\n  return { baseLanes: renderLanes, cachePool: getSuspendedCache() };\n}\nfunction getRemainingWorkInPrimaryTree(\n  current,\n  primaryTreeDidDefer,\n  renderLanes\n) {\n  current = null !== current ? current.childLanes & ~renderLanes : 0;\n  primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n  return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps,\n    showFallback = !1,\n    didSuspend = 0 !== (workInProgress.flags & 128),\n    JSCompiler_temp;\n  (JSCompiler_temp = didSuspend) ||\n    (JSCompiler_temp =\n      null !== current && null === current.memoizedState\n        ? !1\n        : 0 !== (suspenseStackCursor.current & 2));\n  JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n  JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n  workInProgress.flags &= -33;\n  if (null === current) {\n    if (isHydrating) {\n      showFallback\n        ? pushPrimaryTreeSuspenseHandler(workInProgress)\n        : reuseSuspenseHandlerOnStack();\n      (current = nextHydratableInstance)\n        ? ((current = canHydrateHydrationBoundary(\n            current,\n            rootOrSingletonContext\n          )),\n          (current = null !== current && \"&\" !== current.data ? current : null),\n          null !== current &&\n            ((workInProgress.memoizedState = {\n              dehydrated: current,\n              treeContext:\n                null !== treeContextProvider\n                  ? { id: treeContextId, overflow: treeContextOverflow }\n                  : null,\n              retryLane: 536870912,\n              hydrationErrors: null\n            }),\n            (renderLanes = createFiberFromDehydratedFragment(current)),\n            (renderLanes.return = workInProgress),\n            (workInProgress.child = renderLanes),\n            (hydrationParentFiber = workInProgress),\n            (nextHydratableInstance = null)))\n        : (current = null);\n      if (null === current) throw throwOnHydrationMismatch(workInProgress);\n      isSuspenseInstanceFallback(current)\n        ? (workInProgress.lanes = 32)\n        : (workInProgress.lanes = 536870912);\n      return null;\n    }\n    didSuspend = nextProps.children;\n    nextProps = nextProps.fallback;\n    if (showFallback)\n      return (\n        reuseSuspenseHandlerOnStack(),\n        (showFallback = workInProgress.mode),\n        (didSuspend = mountWorkInProgressOffscreenFiber(\n          { mode: \"hidden\", children: didSuspend },\n          showFallback\n        )),\n        (nextProps = createFiberFromFragment(\n          nextProps,\n          showFallback,\n          renderLanes,\n          null\n        )),\n        (didSuspend.return = workInProgress),\n        (nextProps.return = workInProgress),\n        (didSuspend.sibling = nextProps),\n        (workInProgress.child = didSuspend),\n        (nextProps = workInProgress.child),\n        (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),\n        (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n          current,\n          JSCompiler_temp,\n          renderLanes\n        )),\n        (workInProgress.memoizedState = SUSPENDED_MARKER),\n        bailoutOffscreenComponent(null, nextProps)\n      );\n    pushPrimaryTreeSuspenseHandler(workInProgress);\n    return mountSuspensePrimaryChildren(workInProgress, didSuspend);\n  }\n  var prevState = current.memoizedState;\n  if (null !== prevState) {\n    var dehydrated$96 = prevState.dehydrated;\n    if (null !== dehydrated$96)\n      return updateDehydratedSuspenseComponent(\n        current,\n        workInProgress,\n        didSuspend,\n        JSCompiler_temp,\n        nextProps,\n        dehydrated$96,\n        prevState,\n        renderLanes\n      );\n  }\n  if (showFallback)\n    return (\n      reuseSuspenseHandlerOnStack(),\n      (showFallback = nextProps.fallback),\n      (didSuspend = workInProgress.mode),\n      (prevState = current.child),\n      (dehydrated$96 = prevState.sibling),\n      (nextProps = createWorkInProgress(prevState, {\n        mode: \"hidden\",\n        children: nextProps.children\n      })),\n      (nextProps.subtreeFlags = prevState.subtreeFlags & 1206910976),\n      null !== dehydrated$96\n        ? (showFallback = createWorkInProgress(dehydrated$96, showFallback))\n        : ((showFallback = createFiberFromFragment(\n            showFallback,\n            didSuspend,\n            renderLanes,\n            null\n          )),\n          (showFallback.flags |= 2)),\n      (showFallback.return = workInProgress),\n      (nextProps.return = workInProgress),\n      (nextProps.sibling = showFallback),\n      (workInProgress.child = nextProps),\n      bailoutOffscreenComponent(null, nextProps),\n      (nextProps = workInProgress.child),\n      (showFallback = current.child.memoizedState),\n      null === showFallback\n        ? (showFallback = mountSuspenseOffscreenState(renderLanes))\n        : ((didSuspend = showFallback.cachePool),\n          null !== didSuspend\n            ? ((prevState = CacheContext._currentValue),\n              (didSuspend =\n                didSuspend.parent !== prevState\n                  ? { parent: prevState, pool: prevState }\n                  : didSuspend))\n            : (didSuspend = getSuspendedCache()),\n          (showFallback = {\n            baseLanes: showFallback.baseLanes | renderLanes,\n            cachePool: didSuspend\n          })),\n      (nextProps.memoizedState = showFallback),\n      (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n        current,\n        JSCompiler_temp,\n        renderLanes\n      )),\n      (workInProgress.memoizedState = SUSPENDED_MARKER),\n      bailoutOffscreenComponent(current.child, nextProps)\n    );\n  pushPrimaryTreeSuspenseHandler(workInProgress);\n  renderLanes = current.child;\n  current = renderLanes.sibling;\n  renderLanes = createWorkInProgress(renderLanes, {\n    mode: \"visible\",\n    children: nextProps.children\n  });\n  renderLanes.return = workInProgress;\n  renderLanes.sibling = null;\n  null !== current &&\n    ((JSCompiler_temp = workInProgress.deletions),\n    null === JSCompiler_temp\n      ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n      : JSCompiler_temp.push(current));\n  workInProgress.child = renderLanes;\n  workInProgress.memoizedState = null;\n  return renderLanes;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n  primaryChildren = mountWorkInProgressOffscreenFiber(\n    { mode: \"visible\", children: primaryChildren },\n    workInProgress.mode\n  );\n  primaryChildren.return = workInProgress;\n  return (workInProgress.child = primaryChildren);\n}\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode) {\n  offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);\n  offscreenProps.lanes = 0;\n  return offscreenProps;\n}\nfunction retrySuspenseComponentWithoutHydrating(\n  current,\n  workInProgress,\n  renderLanes\n) {\n  reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n  current = mountSuspensePrimaryChildren(\n    workInProgress,\n    workInProgress.pendingProps.children\n  );\n  current.flags |= 2;\n  workInProgress.memoizedState = null;\n  return current;\n}\nfunction updateDehydratedSuspenseComponent(\n  current,\n  workInProgress,\n  didSuspend,\n  didPrimaryChildrenDefer,\n  nextProps,\n  suspenseInstance,\n  suspenseState,\n  renderLanes\n) {\n  if (didSuspend) {\n    if (workInProgress.flags & 256)\n      return (\n        pushPrimaryTreeSuspenseHandler(workInProgress),\n        (workInProgress.flags &= -257),\n        retrySuspenseComponentWithoutHydrating(\n          current,\n          workInProgress,\n          renderLanes\n        )\n      );\n    if (null !== workInProgress.memoizedState)\n      return (\n        reuseSuspenseHandlerOnStack(),\n        (workInProgress.child = current.child),\n        (workInProgress.flags |= 128),\n        null\n      );\n    reuseSuspenseHandlerOnStack();\n    suspenseInstance = nextProps.fallback;\n    suspenseState = workInProgress.mode;\n    nextProps = mountWorkInProgressOffscreenFiber(\n      { mode: \"visible\", children: nextProps.children },\n      suspenseState\n    );\n    suspenseInstance = createFiberFromFragment(\n      suspenseInstance,\n      suspenseState,\n      renderLanes,\n      null\n    );\n    suspenseInstance.flags |= 2;\n    nextProps.return = workInProgress;\n    suspenseInstance.return = workInProgress;\n    nextProps.sibling = suspenseInstance;\n    workInProgress.child = nextProps;\n    reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n    nextProps = workInProgress.child;\n    nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes);\n    nextProps.childLanes = getRemainingWorkInPrimaryTree(\n      current,\n      didPrimaryChildrenDefer,\n      renderLanes\n    );\n    workInProgress.memoizedState = SUSPENDED_MARKER;\n    return bailoutOffscreenComponent(null, nextProps);\n  }\n  pushPrimaryTreeSuspenseHandler(workInProgress);\n  if (isSuspenseInstanceFallback(suspenseInstance)) {\n    didPrimaryChildrenDefer =\n      suspenseInstance.nextSibling && suspenseInstance.nextSibling.dataset;\n    if (didPrimaryChildrenDefer) var digest = didPrimaryChildrenDefer.dgst;\n    didPrimaryChildrenDefer = digest;\n    \"\" !== didPrimaryChildrenDefer &&\n      ((nextProps = Error(formatProdErrorMessage(419))),\n      (nextProps.stack = \"\"),\n      (nextProps.digest = didPrimaryChildrenDefer),\n      queueHydrationError({ value: nextProps, source: null, stack: null }));\n    return retrySuspenseComponentWithoutHydrating(\n      current,\n      workInProgress,\n      renderLanes\n    );\n  }\n  didReceiveUpdate ||\n    propagateParentContextChanges(current, workInProgress, renderLanes, !1);\n  didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes);\n  if (didReceiveUpdate || didPrimaryChildrenDefer) {\n    if (null !== currentTreeHiddenStackCursor.current)\n      return retrySuspenseComponentWithoutHydrating(\n        current,\n        workInProgress,\n        renderLanes\n      );\n    didPrimaryChildrenDefer = workInProgressRoot;\n    if (\n      null !== didPrimaryChildrenDefer &&\n      ((nextProps = getBumpedLaneForHydration(\n        didPrimaryChildrenDefer,\n        renderLanes\n      )),\n      0 !== nextProps && nextProps !== suspenseState.retryLane)\n    )\n      throw (\n        ((suspenseState.retryLane = nextProps),\n        enqueueConcurrentRenderForLane(current, nextProps),\n        scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps),\n        SelectiveHydrationException)\n      );\n    isSuspenseInstancePending(suspenseInstance) ||\n      renderDidSuspendDelayIfPossible();\n    return retrySuspenseComponentWithoutHydrating(\n      current,\n      workInProgress,\n      renderLanes\n    );\n  }\n  if (isSuspenseInstancePending(suspenseInstance))\n    return (\n      (workInProgress.flags |= 192),\n      (workInProgress.child = current.child),\n      null\n    );\n  current = suspenseState.treeContext;\n  nextHydratableInstance = getNextHydratable(suspenseInstance.nextSibling);\n  hydrationParentFiber = workInProgress;\n  isHydrating = !0;\n  hydrationErrors = null;\n  rootOrSingletonContext = !1;\n  null !== current && restoreSuspendedTreeContext(workInProgress, current);\n  workInProgress = mountSuspensePrimaryChildren(\n    workInProgress,\n    nextProps.children\n  );\n  workInProgress.flags |= 134221824;\n  return workInProgress;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n  fiber.lanes |= renderLanes;\n  var alternate = fiber.alternate;\n  null !== alternate && (alternate.lanes |= renderLanes);\n  scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction findLastContentRow(firstChild) {\n  for (var lastContentRow = null; null !== firstChild; ) {\n    var currentRow = firstChild.alternate;\n    null !== currentRow &&\n      null === findFirstSuspended(currentRow) &&\n      (lastContentRow = firstChild);\n    firstChild = firstChild.sibling;\n  }\n  return lastContentRow;\n}\nfunction initSuspenseListRenderState(\n  workInProgress,\n  isBackwards,\n  tail,\n  lastContentRow,\n  tailMode,\n  treeForkCount\n) {\n  var renderState = workInProgress.memoizedState;\n  null === renderState\n    ? (workInProgress.memoizedState = {\n        isBackwards: isBackwards,\n        rendering: null,\n        renderingStartTime: 0,\n        last: lastContentRow,\n        tail: tail,\n        tailMode: tailMode,\n        treeForkCount: treeForkCount\n      })\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      (renderState.treeForkCount = treeForkCount));\n}\nfunction reverseChildren(fiber) {\n  var row = fiber.child;\n  for (fiber.child = null; null !== row; ) {\n    var nextRow = row.sibling;\n    row.sibling = fiber.child;\n    fiber.child = row;\n    row = nextRow;\n  }\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps,\n    revealOrder = nextProps.revealOrder,\n    tailMode = nextProps.tail;\n  nextProps = nextProps.children;\n  var suspenseContext = suspenseStackCursor.current;\n  if (workInProgress.flags & 128)\n    return pushSuspenseListContext(workInProgress, suspenseContext), null;\n  var shouldForceFallback = 0 !== (suspenseContext & 2);\n  shouldForceFallback\n    ? ((suspenseContext = (suspenseContext & 1) | 2),\n      (workInProgress.flags |= 128))\n    : (suspenseContext &= 1);\n  pushSuspenseListContext(workInProgress, suspenseContext);\n  \"backwards\" === revealOrder && null !== current\n    ? (reverseChildren(current),\n      reconcileChildren(current, workInProgress, nextProps, renderLanes),\n      reverseChildren(current))\n    : reconcileChildren(current, workInProgress, nextProps, renderLanes);\n  nextProps = isHydrating ? treeForkCount : 0;\n  if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))\n    a: for (current = workInProgress.child; null !== current; ) {\n      if (13 === current.tag)\n        null !== current.memoizedState &&\n          scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n      else if (19 === current.tag)\n        scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n      else if (null !== current.child) {\n        current.child.return = current;\n        current = current.child;\n        continue;\n      }\n      if (current === workInProgress) break a;\n      for (; null === current.sibling; ) {\n        if (null === current.return || current.return === workInProgress)\n          break a;\n        current = current.return;\n      }\n      current.sibling.return = current.return;\n      current = current.sibling;\n    }\n  switch (revealOrder) {\n    case \"backwards\":\n      renderLanes = findLastContentRow(workInProgress.child);\n      null === renderLanes\n        ? ((revealOrder = workInProgress.child), (workInProgress.child = null))\n        : ((revealOrder = renderLanes.sibling),\n          (renderLanes.sibling = null),\n          reverseChildren(workInProgress));\n      initSuspenseListRenderState(\n        workInProgress,\n        !0,\n        revealOrder,\n        null,\n        tailMode,\n        nextProps\n      );\n      break;\n    case \"unstable_legacy-backwards\":\n      renderLanes = null;\n      revealOrder = workInProgress.child;\n      for (workInProgress.child = null; null !== revealOrder; ) {\n        current = revealOrder.alternate;\n        if (null !== current && null === findFirstSuspended(current)) {\n          workInProgress.child = revealOrder;\n          break;\n        }\n        current = revealOrder.sibling;\n        revealOrder.sibling = renderLanes;\n        renderLanes = revealOrder;\n        revealOrder = current;\n      }\n      initSuspenseListRenderState(\n        workInProgress,\n        !0,\n        renderLanes,\n        null,\n        tailMode,\n        nextProps\n      );\n      break;\n    case \"together\":\n      initSuspenseListRenderState(\n        workInProgress,\n        !1,\n        null,\n        null,\n        void 0,\n        nextProps\n      );\n      break;\n    case \"independent\":\n      workInProgress.memoizedState = null;\n      break;\n    default:\n      (renderLanes = findLastContentRow(workInProgress.child)),\n        null === renderLanes\n          ? ((revealOrder = workInProgress.child),\n            (workInProgress.child = null))\n          : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null)),\n        initSuspenseListRenderState(\n          workInProgress,\n          !1,\n          revealOrder,\n          renderLanes,\n          tailMode,\n          nextProps\n        );\n  }\n  return workInProgress.child;\n}\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n  var newProps = workInProgress.pendingProps;\n  pushProvider(workInProgress, workInProgress.type, newProps.value);\n  reconcileChildren(current, workInProgress, newProps.children, renderLanes);\n  return workInProgress.child;\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n  null !== current && (workInProgress.dependencies = current.dependencies);\n  workInProgressRootSkippedLanes |= workInProgress.lanes;\n  if (0 === (renderLanes & workInProgress.childLanes))\n    if (null !== current) {\n      if (\n        (propagateParentContextChanges(\n          current,\n          workInProgress,\n          renderLanes,\n          !1\n        ),\n        0 === (renderLanes & workInProgress.childLanes))\n      )\n        return null;\n    } else return null;\n  if (null !== current && workInProgress.child !== current.child)\n    throw Error(formatProdErrorMessage(153));\n  if (null !== workInProgress.child) {\n    current = workInProgress.child;\n    renderLanes = createWorkInProgress(current, current.pendingProps);\n    workInProgress.child = renderLanes;\n    for (renderLanes.return = workInProgress; null !== current.sibling; )\n      (current = current.sibling),\n        (renderLanes = renderLanes.sibling =\n          createWorkInProgress(current, current.pendingProps)),\n        (renderLanes.return = workInProgress);\n    renderLanes.sibling = null;\n  }\n  return workInProgress.child;\n}\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n  if (0 !== (current.lanes & renderLanes)) return !0;\n  current = current.dependencies;\n  return null !== current && checkIfContextChanged(current) ? !0 : !1;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n  current,\n  workInProgress,\n  renderLanes\n) {\n  switch (workInProgress.tag) {\n    case 3:\n      pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n      pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n      resetHydrationState();\n      break;\n    case 27:\n    case 5:\n      pushHostContext(workInProgress);\n      break;\n    case 4:\n      pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n      break;\n    case 10:\n      pushProvider(\n        workInProgress,\n        workInProgress.type,\n        workInProgress.memoizedProps.value\n      );\n      break;\n    case 31:\n      if (null !== workInProgress.memoizedState)\n        return (\n          (workInProgress.flags |= 128),\n          pushDehydratedActivitySuspenseHandler(workInProgress),\n          null\n        );\n      break;\n    case 13:\n      var state$108 = workInProgress.memoizedState;\n      if (null !== state$108) {\n        if (null !== state$108.dehydrated)\n          return (\n            pushPrimaryTreeSuspenseHandler(workInProgress),\n            (workInProgress.flags |= 128),\n            null\n          );\n        state$108 = propagateParentContextChanges(\n          current,\n          workInProgress,\n          renderLanes,\n          !1\n        );\n        var primaryChildLanes = workInProgress.child.childLanes;\n        if (state$108 || 0 !== (renderLanes & primaryChildLanes))\n          return updateSuspenseComponent(current, workInProgress, renderLanes);\n        pushPrimaryTreeSuspenseHandler(workInProgress);\n        current = bailoutOnAlreadyFinishedWork(\n          current,\n          workInProgress,\n          renderLanes\n        );\n        return null !== current ? current.sibling : null;\n      }\n      pushPrimaryTreeSuspenseHandler(workInProgress);\n      break;\n    case 19:\n      if (workInProgress.flags & 128)\n        return updateSuspenseListComponent(\n          current,\n          workInProgress,\n          renderLanes\n        );\n      primaryChildLanes = 0 !== (current.flags & 128);\n      state$108 = 0 !== (renderLanes & workInProgress.childLanes);\n      state$108 ||\n        (propagateParentContextChanges(\n          current,\n          workInProgress,\n          renderLanes,\n          !1\n        ),\n        (state$108 = 0 !== (renderLanes & workInProgress.childLanes)));\n      if (primaryChildLanes) {\n        if (state$108)\n          return updateSuspenseListComponent(\n            current,\n            workInProgress,\n            renderLanes\n          );\n        workInProgress.flags |= 128;\n      }\n      primaryChildLanes = workInProgress.memoizedState;\n      null !== primaryChildLanes &&\n        ((primaryChildLanes.rendering = null),\n        (primaryChildLanes.tail = null),\n        (primaryChildLanes.lastEffect = null));\n      pushSuspenseListContext(workInProgress, suspenseStackCursor.current);\n      if (state$108) break;\n      else return null;\n    case 22:\n      return (\n        (workInProgress.lanes = 0),\n        updateOffscreenComponent(\n          current,\n          workInProgress,\n          renderLanes,\n          workInProgress.pendingProps\n        )\n      );\n    case 24:\n      pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n  }\n  return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n  if (null !== current)\n    if (current.memoizedProps !== workInProgress.pendingProps)\n      didReceiveUpdate = !0;\n    else {\n      if (\n        !checkScheduledUpdateOrContext(current, renderLanes) &&\n        0 === (workInProgress.flags & 128)\n      )\n        return (\n          (didReceiveUpdate = !1),\n          attemptEarlyBailoutIfNoScheduledUpdate(\n            current,\n            workInProgress,\n            renderLanes\n          )\n        );\n      didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n    }\n  else\n    (didReceiveUpdate = !1),\n      isHydrating &&\n        0 !== (workInProgress.flags & 1048576) &&\n        pushTreeId(workInProgress, treeForkCount, workInProgress.index);\n  workInProgress.lanes = 0;\n  switch (workInProgress.tag) {\n    case 16:\n      a: {\n        var props = workInProgress.pendingProps;\n        current = resolveLazy(workInProgress.elementType);\n        workInProgress.type = current;\n        if (\"function\" === typeof current)\n          shouldConstruct(current)\n            ? ((props = resolveClassComponentProps(current, props)),\n              (workInProgress.tag = 1),\n              (workInProgress = updateClassComponent(\n                null,\n                workInProgress,\n                current,\n                props,\n                renderLanes\n              )))\n            : ((workInProgress.tag = 0),\n              (workInProgress = updateFunctionComponent(\n                null,\n                workInProgress,\n                current,\n                props,\n                renderLanes\n              )));\n        else {\n          if (void 0 !== current && null !== current) {\n            var $$typeof = current.$$typeof;\n            if ($$typeof === REACT_FORWARD_REF_TYPE) {\n              workInProgress.tag = 11;\n              workInProgress = updateForwardRef(\n                null,\n                workInProgress,\n                current,\n                props,\n                renderLanes\n              );\n              break a;\n            } else if ($$typeof === REACT_MEMO_TYPE) {\n              workInProgress.tag = 14;\n              workInProgress = updateMemoComponent(\n                null,\n                workInProgress,\n                current,\n                props,\n                renderLanes\n              );\n              break a;\n            } else if ($$typeof === REACT_CONTEXT_TYPE) {\n              workInProgress.tag = 10;\n              workInProgress.type = current;\n              workInProgress = updateContextProvider(\n                null,\n                workInProgress,\n                renderLanes\n              );\n              break a;\n            }\n          }\n          workInProgress = getComponentNameFromType(current) || current;\n          throw Error(formatProdErrorMessage(306, workInProgress, \"\"));\n        }\n      }\n      return workInProgress;\n    case 0:\n      return updateFunctionComponent(\n        current,\n        workInProgress,\n        workInProgress.type,\n        workInProgress.pendingProps,\n        renderLanes\n      );\n    case 1:\n      return (\n        (props = workInProgress.type),\n        ($$typeof = resolveClassComponentProps(\n          props,\n          workInProgress.pendingProps\n        )),\n        updateClassComponent(\n          current,\n          workInProgress,\n          props,\n          $$typeof,\n          renderLanes\n        )\n      );\n    case 3:\n      a: {\n        pushHostContainer(\n          workInProgress,\n          workInProgress.stateNode.containerInfo\n        );\n        if (null === current) throw Error(formatProdErrorMessage(387));\n        props = workInProgress.pendingProps;\n        var prevState = workInProgress.memoizedState;\n        $$typeof = prevState.element;\n        cloneUpdateQueue(current, workInProgress);\n        processUpdateQueue(workInProgress, props, null, renderLanes);\n        var nextState = workInProgress.memoizedState;\n        props = nextState.cache;\n        pushProvider(workInProgress, CacheContext, props);\n        props !== prevState.cache &&\n          propagateContextChanges(\n            workInProgress,\n            [CacheContext],\n            renderLanes,\n            !0\n          );\n        suspendIfUpdateReadFromEntangledAsyncAction();\n        props = nextState.element;\n        if (prevState.isDehydrated)\n          if (\n            ((prevState = {\n              element: props,\n              isDehydrated: !1,\n              cache: nextState.cache\n            }),\n            (workInProgress.updateQueue.baseState = prevState),\n            (workInProgress.memoizedState = prevState),\n            workInProgress.flags & 256)\n          ) {\n            workInProgress = mountHostRootWithoutHydrating(\n              current,\n              workInProgress,\n              props,\n              renderLanes\n            );\n            break a;\n          } else if (props !== $$typeof) {\n            $$typeof = createCapturedValueAtFiber(\n              Error(formatProdErrorMessage(424)),\n              workInProgress\n            );\n            queueHydrationError($$typeof);\n            workInProgress = mountHostRootWithoutHydrating(\n              current,\n              workInProgress,\n              props,\n              renderLanes\n            );\n            break a;\n          } else {\n            current = workInProgress.stateNode.containerInfo;\n            switch (current.nodeType) {\n              case 9:\n                current = current.body;\n                break;\n              default:\n                current =\n                  \"HTML\" === current.nodeName\n                    ? current.ownerDocument.body\n                    : current;\n            }\n            nextHydratableInstance = getNextHydratable(current.firstChild);\n            hydrationParentFiber = workInProgress;\n            isHydrating = !0;\n            hydrationErrors = null;\n            rootOrSingletonContext = !0;\n            renderLanes = mountChildFibers(\n              workInProgress,\n              null,\n              props,\n              renderLanes\n            );\n            for (workInProgress.child = renderLanes; renderLanes; )\n              (renderLanes.flags = (renderLanes.flags & -3) | 134221824),\n                (renderLanes = renderLanes.sibling);\n          }\n        else {\n          resetHydrationState();\n          if (props === $$typeof) {\n            workInProgress = bailoutOnAlreadyFinishedWork(\n              current,\n              workInProgress,\n              renderLanes\n            );\n            break a;\n          }\n          reconcileChildren(current, workInProgress, props, renderLanes);\n        }\n        workInProgress = workInProgress.child;\n      }\n      return workInProgress;\n    case 26:\n      return (\n        markRef(current, workInProgress),\n        null === current\n          ? (renderLanes = getResource(\n              workInProgress.type,\n              null,\n              workInProgress.pendingProps,\n              null\n            ))\n            ? (workInProgress.memoizedState = renderLanes)\n            : isHydrating ||\n              (workInProgress.stateNode = createHoistableInstance(\n                workInProgress.type,\n                workInProgress.pendingProps,\n                rootInstanceStackCursor.current,\n                workInProgress\n              ))\n          : (workInProgress.memoizedState = getResource(\n              workInProgress.type,\n              current.memoizedProps,\n              workInProgress.pendingProps,\n              current.memoizedState\n            )),\n        null\n      );\n    case 27:\n      return (\n        pushHostContext(workInProgress),\n        null === current &&\n          isHydrating &&\n          ((props = workInProgress.stateNode =\n            resolveSingletonInstance(\n              workInProgress.type,\n              workInProgress.pendingProps,\n              rootInstanceStackCursor.current\n            )),\n          (hydrationParentFiber = workInProgress),\n          (rootOrSingletonContext = !0),\n          ($$typeof = nextHydratableInstance),\n          isSingletonScope(workInProgress.type)\n            ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),\n              (nextHydratableInstance = getNextHydratable(props.firstChild)))\n            : (nextHydratableInstance = $$typeof)),\n        reconcileChildren(\n          current,\n          workInProgress,\n          workInProgress.pendingProps.children,\n          renderLanes\n        ),\n        markRef(current, workInProgress),\n        null === current && (workInProgress.flags |= 4194304),\n        workInProgress.child\n      );\n    case 5:\n      if (null === current && isHydrating) {\n        if (($$typeof = props = nextHydratableInstance))\n          (props = canHydrateInstance(\n            props,\n            workInProgress.type,\n            workInProgress.pendingProps,\n            rootOrSingletonContext\n          )),\n            null !== props\n              ? ((workInProgress.stateNode = props),\n                (hydrationParentFiber = workInProgress),\n                (nextHydratableInstance = getNextHydratable(props.firstChild)),\n                (rootOrSingletonContext = !1),\n                ($$typeof = !0))\n              : ($$typeof = !1);\n        $$typeof || throwOnHydrationMismatch(workInProgress);\n      }\n      pushHostContext(workInProgress);\n      $$typeof = workInProgress.type;\n      prevState = workInProgress.pendingProps;\n      nextState = null !== current ? current.memoizedProps : null;\n      props = prevState.children;\n      shouldSetTextContent($$typeof, prevState)\n        ? (props = null)\n        : null !== nextState &&\n          shouldSetTextContent($$typeof, nextState) &&\n          (workInProgress.flags |= 32);\n      null !== workInProgress.memoizedState &&\n        (($$typeof = renderWithHooks(\n          current,\n          workInProgress,\n          TransitionAwareHostComponent,\n          null,\n          null,\n          renderLanes\n        )),\n        (HostTransitionContext._currentValue = $$typeof));\n      markRef(current, workInProgress);\n      reconcileChildren(current, workInProgress, props, renderLanes);\n      return workInProgress.child;\n    case 6:\n      if (null === current && isHydrating) {\n        if ((current = renderLanes = nextHydratableInstance))\n          (renderLanes = canHydrateTextInstance(\n            renderLanes,\n            workInProgress.pendingProps,\n            rootOrSingletonContext\n          )),\n            null !== renderLanes\n              ? ((workInProgress.stateNode = renderLanes),\n                (hydrationParentFiber = workInProgress),\n                (nextHydratableInstance = null),\n                (current = !0))\n              : (current = !1);\n        current || throwOnHydrationMismatch(workInProgress);\n      }\n      return null;\n    case 13:\n      return updateSuspenseComponent(current, workInProgress, renderLanes);\n    case 4:\n      return (\n        pushHostContainer(\n          workInProgress,\n          workInProgress.stateNode.containerInfo\n        ),\n        (props = workInProgress.pendingProps),\n        null === current\n          ? (workInProgress.child = reconcileChildFibers(\n              workInProgress,\n              null,\n              props,\n              renderLanes\n            ))\n          : reconcileChildren(current, workInProgress, props, renderLanes),\n        workInProgress.child\n      );\n    case 11:\n      return updateForwardRef(\n        current,\n        workInProgress,\n        workInProgress.type,\n        workInProgress.pendingProps,\n        renderLanes\n      );\n    case 7:\n      return (\n        (props = workInProgress.pendingProps),\n        markRef(current, workInProgress),\n        reconcileChildren(current, workInProgress, props, renderLanes),\n        workInProgress.child\n      );\n    case 8:\n      return (\n        reconcileChildren(\n          current,\n          workInProgress,\n          workInProgress.pendingProps.children,\n          renderLanes\n        ),\n        workInProgress.child\n      );\n    case 12:\n      return (\n        reconcileChildren(\n          current,\n          workInProgress,\n          workInProgress.pendingProps.children,\n          renderLanes\n        ),\n        workInProgress.child\n      );\n    case 10:\n      return updateContextProvider(current, workInProgress, renderLanes);\n    case 9:\n      return (\n        ($$typeof = workInProgress.type._context),\n        (props = workInProgress.pendingProps.children),\n        prepareToReadContext(workInProgress),\n        ($$typeof = readContext($$typeof)),\n        (props = props($$typeof)),\n        (workInProgress.flags |= 1),\n        reconcileChildren(current, workInProgress, props, renderLanes),\n        workInProgress.child\n      );\n    case 14:\n      return updateMemoComponent(\n        current,\n        workInProgress,\n        workInProgress.type,\n        workInProgress.pendingProps,\n        renderLanes\n      );\n    case 15:\n      return updateSimpleMemoComponent(\n        current,\n        workInProgress,\n        workInProgress.type,\n        workInProgress.pendingProps,\n        renderLanes\n      );\n    case 19:\n      return updateSuspenseListComponent(current, workInProgress, renderLanes);\n    case 31:\n      return updateActivityComponent(current, workInProgress, renderLanes);\n    case 22:\n      return updateOffscreenComponent(\n        current,\n        workInProgress,\n        renderLanes,\n        workInProgress.pendingProps\n      );\n    case 24:\n      return (\n        prepareToReadContext(workInProgress),\n        (props = readContext(CacheContext)),\n        null === current\n          ? (($$typeof = peekCacheFromPool()),\n            null === $$typeof &&\n              (($$typeof = workInProgressRoot),\n              (prevState = createCache()),\n              ($$typeof.pooledCache = prevState),\n              prevState.refCount++,\n              null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),\n              ($$typeof = prevState)),\n            (workInProgress.memoizedState = { parent: props, cache: $$typeof }),\n            initializeUpdateQueue(workInProgress),\n            pushProvider(workInProgress, CacheContext, $$typeof))\n          : (0 !== (current.lanes & renderLanes) &&\n              (cloneUpdateQueue(current, workInProgress),\n              processUpdateQueue(workInProgress, null, null, renderLanes),\n              suspendIfUpdateReadFromEntangledAsyncAction()),\n            ($$typeof = current.memoizedState),\n            (prevState = workInProgress.memoizedState),\n            $$typeof.parent !== props\n              ? (($$typeof = { parent: props, cache: props }),\n                (workInProgress.memoizedState = $$typeof),\n                0 === workInProgress.lanes &&\n                  (workInProgress.memoizedState =\n                    workInProgress.updateQueue.baseState =\n                      $$typeof),\n                pushProvider(workInProgress, CacheContext, props))\n              : ((props = prevState.cache),\n                pushProvider(workInProgress, CacheContext, props),\n                props !== $$typeof.cache &&\n                  propagateContextChanges(\n                    workInProgress,\n                    [CacheContext],\n                    renderLanes,\n                    !0\n                  ))),\n        reconcileChildren(\n          current,\n          workInProgress,\n          workInProgress.pendingProps.children,\n          renderLanes\n        ),\n        workInProgress.child\n      );\n    case 30:\n      return (\n        null === workInProgress.stateNode &&\n          (workInProgress.stateNode = {\n            autoName: null,\n            paired: null,\n            clones: null,\n            ref: null\n          }),\n        (props = workInProgress.pendingProps),\n        null != props.name && \"auto\" !== props.name\n          ? (workInProgress.flags |= null === current ? 18882560 : 18874368)\n          : isHydrating && pushMaterializedTreeId(workInProgress),\n        null !== current && current.memoizedProps.name !== props.name\n          ? (workInProgress.flags |= 4194816)\n          : markRef(current, workInProgress),\n        reconcileChildren(current, workInProgress, props.children, renderLanes),\n        workInProgress.child\n      );\n    case 29:\n      throw workInProgress.pendingProps;\n  }\n  throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction markUpdate(workInProgress) {\n  workInProgress.flags |= 4;\n}\nfunction preloadInstanceAndSuspendIfNeeded(\n  workInProgress,\n  type,\n  oldProps,\n  newProps,\n  renderLanes\n) {\n  var JSCompiler_temp;\n  if ((JSCompiler_temp = 0 !== (workInProgress.mode & 32)))\n    JSCompiler_temp =\n      null === oldProps\n        ? maySuspendCommit(type, newProps)\n        : maySuspendCommit(type, newProps) &&\n          (newProps.src !== oldProps.src ||\n            newProps.srcSet !== oldProps.srcSet);\n  if (JSCompiler_temp) {\n    if (\n      ((workInProgress.flags |= 16777216),\n      (renderLanes & 335544128) === renderLanes)\n    )\n      if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;\n      else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n      else\n        throw (\n          ((suspendedThenable = noopSuspenseyCommitThenable),\n          SuspenseyCommitException)\n        );\n  } else workInProgress.flags &= -16777217;\n}\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource) {\n  if (\"stylesheet\" !== resource.type || 0 !== (resource.state.loading & 4))\n    workInProgress.flags &= -16777217;\n  else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))\n    if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n    else\n      throw (\n        ((suspendedThenable = noopSuspenseyCommitThenable),\n        SuspenseyCommitException)\n      );\n}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n  null !== retryQueue && (workInProgress.flags |= 4);\n  workInProgress.flags & 16384 &&\n    ((retryQueue =\n      22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n    (workInProgress.lanes |= retryQueue),\n    (workInProgressSuspendedRetryLanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n  if (!isHydrating)\n    switch (renderState.tailMode) {\n      case \"visible\":\n        break;\n      case \"collapsed\":\n        for (\n          var tailNode = renderState.tail, lastTailNode = null;\n          null !== tailNode;\n\n        )\n          null !== tailNode.alternate && (lastTailNode = tailNode),\n            (tailNode = tailNode.sibling);\n        null === lastTailNode\n          ? hasRenderedATailFallback || null === renderState.tail\n            ? (renderState.tail = null)\n            : (renderState.tail.sibling = null)\n          : (lastTailNode.sibling = null);\n        break;\n      default:\n        hasRenderedATailFallback = renderState.tail;\n        for (tailNode = null; null !== hasRenderedATailFallback; )\n          null !== hasRenderedATailFallback.alternate &&\n            (tailNode = hasRenderedATailFallback),\n            (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n        null === tailNode\n          ? (renderState.tail = null)\n          : (tailNode.sibling = null);\n    }\n}\nfunction bubbleProperties(completedWork) {\n  var didBailout =\n      null !== completedWork.alternate &&\n      completedWork.alternate.child === completedWork.child,\n    newChildLanes = 0,\n    subtreeFlags = 0;\n  if (didBailout)\n    for (var child$113 = completedWork.child; null !== child$113; )\n      (newChildLanes |= child$113.lanes | child$113.childLanes),\n        (subtreeFlags |= child$113.subtreeFlags & 1206910976),\n        (subtreeFlags |= child$113.flags & 1206910976),\n        (child$113.return = completedWork),\n        (child$113 = child$113.sibling);\n  else\n    for (child$113 = completedWork.child; null !== child$113; )\n      (newChildLanes |= child$113.lanes | child$113.childLanes),\n        (subtreeFlags |= child$113.subtreeFlags),\n        (subtreeFlags |= child$113.flags),\n        (child$113.return = completedWork),\n        (child$113 = child$113.sibling);\n  completedWork.subtreeFlags |= subtreeFlags;\n  completedWork.childLanes = newChildLanes;\n  return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n  var newProps = workInProgress.pendingProps;\n  popTreeContext(workInProgress);\n  switch (workInProgress.tag) {\n    case 16:\n    case 15:\n    case 0:\n    case 11:\n    case 7:\n    case 8:\n    case 12:\n    case 9:\n    case 14:\n      return bubbleProperties(workInProgress), null;\n    case 1:\n      return bubbleProperties(workInProgress), null;\n    case 3:\n      renderLanes = workInProgress.stateNode;\n      newProps = null;\n      null !== current && (newProps = current.memoizedState.cache);\n      workInProgress.memoizedState.cache !== newProps &&\n        (workInProgress.flags |= 2048);\n      popProvider(CacheContext);\n      popHostContainer();\n      renderLanes.pendingContext &&\n        ((renderLanes.context = renderLanes.pendingContext),\n        (renderLanes.pendingContext = null));\n      if (null === current || null === current.child)\n        popHydrationState(workInProgress)\n          ? markUpdate(workInProgress)\n          : null === current ||\n            (current.memoizedState.isDehydrated &&\n              0 === (workInProgress.flags & 256)) ||\n            ((workInProgress.flags |= 1024),\n            upgradeHydrationErrorsToRecoverable());\n      bubbleProperties(workInProgress);\n      return null;\n    case 26:\n      var type = workInProgress.type,\n        nextResource = workInProgress.memoizedState;\n      null === current\n        ? (markUpdate(workInProgress),\n          null !== nextResource\n            ? (bubbleProperties(workInProgress),\n              preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n            : (bubbleProperties(workInProgress),\n              preloadInstanceAndSuspendIfNeeded(\n                workInProgress,\n                type,\n                null,\n                newProps,\n                renderLanes\n              )))\n        : nextResource\n          ? nextResource !== current.memoizedState\n            ? (markUpdate(workInProgress),\n              bubbleProperties(workInProgress),\n              preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n            : (bubbleProperties(workInProgress),\n              (workInProgress.flags &= -16777217))\n          : ((current = current.memoizedProps),\n            current !== newProps && markUpdate(workInProgress),\n            bubbleProperties(workInProgress),\n            preloadInstanceAndSuspendIfNeeded(\n              workInProgress,\n              type,\n              current,\n              newProps,\n              renderLanes\n            ));\n      return null;\n    case 27:\n      popHostContext(workInProgress);\n      renderLanes = rootInstanceStackCursor.current;\n      type = workInProgress.type;\n      if (null !== current && null != workInProgress.stateNode)\n        current.memoizedProps !== newProps && markUpdate(workInProgress);\n      else {\n        if (!newProps) {\n          if (null === workInProgress.stateNode)\n            throw Error(formatProdErrorMessage(166));\n          bubbleProperties(workInProgress);\n          workInProgress.subtreeFlags &= -33554433;\n          return null;\n        }\n        current = contextStackCursor.current;\n        popHydrationState(workInProgress)\n          ? prepareToHydrateHostInstance(workInProgress, current)\n          : ((current = resolveSingletonInstance(type, newProps, renderLanes)),\n            (workInProgress.stateNode = current),\n            markUpdate(workInProgress));\n      }\n      bubbleProperties(workInProgress);\n      workInProgress.subtreeFlags &= -33554433;\n      return null;\n    case 5:\n      popHostContext(workInProgress);\n      type = workInProgress.type;\n      if (null !== current && null != workInProgress.stateNode)\n        current.memoizedProps !== newProps && markUpdate(workInProgress);\n      else {\n        if (!newProps) {\n          if (null === workInProgress.stateNode)\n            throw Error(formatProdErrorMessage(166));\n          bubbleProperties(workInProgress);\n          workInProgress.subtreeFlags &= -33554433;\n          return null;\n        }\n        nextResource = contextStackCursor.current;\n        if (popHydrationState(workInProgress))\n          prepareToHydrateHostInstance(workInProgress, nextResource);\n        else {\n          var ownerDocument = getOwnerDocumentFromRootContainer(\n            rootInstanceStackCursor.current\n          );\n          switch (nextResource) {\n            case 1:\n              nextResource = ownerDocument.createElementNS(\n                \"http://www.w3.org/2000/svg\",\n                type\n              );\n              break;\n            case 2:\n              nextResource = ownerDocument.createElementNS(\n                \"http://www.w3.org/1998/Math/MathML\",\n                type\n              );\n              break;\n            default:\n              switch (type) {\n                case \"svg\":\n                  nextResource = ownerDocument.createElementNS(\n                    \"http://www.w3.org/2000/svg\",\n                    type\n                  );\n                  break;\n                case \"math\":\n                  nextResource = ownerDocument.createElementNS(\n                    \"http://www.w3.org/1998/Math/MathML\",\n                    type\n                  );\n                  break;\n                case \"script\":\n                  nextResource = ownerDocument.createElement(\"div\");\n                  nextResource.innerHTML = \"<script>\\x3c/script>\";\n                  nextResource = nextResource.removeChild(\n                    nextResource.firstChild\n                  );\n                  break;\n                case \"select\":\n                  nextResource =\n                    \"string\" === typeof newProps.is\n                      ? ownerDocument.createElement(\"select\", {\n                          is: newProps.is\n                        })\n                      : ownerDocument.createElement(\"select\");\n                  newProps.multiple\n                    ? (nextResource.multiple = !0)\n                    : newProps.size && (nextResource.size = newProps.size);\n                  break;\n                default:\n                  nextResource =\n                    \"string\" === typeof newProps.is\n                      ? ownerDocument.createElement(type, { is: newProps.is })\n                      : ownerDocument.createElement(type);\n              }\n          }\n          nextResource[internalInstanceKey] = workInProgress;\n          nextResource[internalPropsKey] = newProps;\n          a: for (\n            ownerDocument = workInProgress.child;\n            null !== ownerDocument;\n\n          ) {\n            if (5 === ownerDocument.tag || 6 === ownerDocument.tag)\n              nextResource.appendChild(ownerDocument.stateNode);\n            else if (\n              4 !== ownerDocument.tag &&\n              27 !== ownerDocument.tag &&\n              null !== ownerDocument.child\n            ) {\n              ownerDocument.child.return = ownerDocument;\n              ownerDocument = ownerDocument.child;\n              continue;\n            }\n            if (ownerDocument === workInProgress) break a;\n            for (; null === ownerDocument.sibling; ) {\n              if (\n                null === ownerDocument.return ||\n                ownerDocument.return === workInProgress\n              )\n                break a;\n              ownerDocument = ownerDocument.return;\n            }\n            ownerDocument.sibling.return = ownerDocument.return;\n            ownerDocument = ownerDocument.sibling;\n          }\n          workInProgress.stateNode = nextResource;\n          a: switch (\n            (setInitialProperties(nextResource, type, newProps), type)\n          ) {\n            case \"button\":\n            case \"input\":\n            case \"select\":\n            case \"textarea\":\n              newProps = !!newProps.autoFocus;\n              break a;\n            case \"img\":\n              newProps = !0;\n              break a;\n            default:\n              newProps = !1;\n          }\n          newProps && markUpdate(workInProgress);\n        }\n      }\n      bubbleProperties(workInProgress);\n      workInProgress.subtreeFlags &= -33554433;\n      preloadInstanceAndSuspendIfNeeded(\n        workInProgress,\n        workInProgress.type,\n        null === current ? null : current.memoizedProps,\n        workInProgress.pendingProps,\n        renderLanes\n      );\n      return null;\n    case 6:\n      if (current && null != workInProgress.stateNode)\n        current.memoizedProps !== newProps && markUpdate(workInProgress);\n      else {\n        if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n          throw Error(formatProdErrorMessage(166));\n        current = rootInstanceStackCursor.current;\n        if (popHydrationState(workInProgress)) {\n          current = workInProgress.stateNode;\n          renderLanes = workInProgress.memoizedProps;\n          newProps = null;\n          type = hydrationParentFiber;\n          if (null !== type)\n            switch (type.tag) {\n              case 27:\n              case 5:\n                newProps = type.memoizedProps;\n            }\n          current[internalInstanceKey] = workInProgress;\n          current =\n            current.nodeValue === renderLanes ||\n            (null !== newProps && !0 === newProps.suppressHydrationWarning) ||\n            checkForUnmatchedText(current.nodeValue, renderLanes)\n              ? !0\n              : !1;\n          current || throwOnHydrationMismatch(workInProgress, !0);\n        } else\n          (current =\n            getOwnerDocumentFromRootContainer(current).createTextNode(\n              newProps\n            )),\n            (current[internalInstanceKey] = workInProgress),\n            (workInProgress.stateNode = current);\n      }\n      bubbleProperties(workInProgress);\n      return null;\n    case 31:\n      renderLanes = workInProgress.memoizedState;\n      if (null === current || null !== current.memoizedState) {\n        newProps = popHydrationState(workInProgress);\n        if (null !== renderLanes) {\n          if (null === current) {\n            if (!newProps) throw Error(formatProdErrorMessage(318));\n            current = workInProgress.memoizedState;\n            current = null !== current ? current.dehydrated : null;\n            if (!current) throw Error(formatProdErrorMessage(557));\n            current[internalInstanceKey] = workInProgress;\n          } else\n            resetHydrationState(),\n              0 === (workInProgress.flags & 128) &&\n                (workInProgress.memoizedState = null),\n              (workInProgress.flags |= 4);\n          bubbleProperties(workInProgress);\n          current = !1;\n        } else\n          (renderLanes = upgradeHydrationErrorsToRecoverable()),\n            null !== current &&\n              null !== current.memoizedState &&\n              (current.memoizedState.hydrationErrors = renderLanes),\n            (current = !0);\n        if (!current) {\n          if (workInProgress.flags & 256)\n            return popSuspenseHandler(workInProgress), workInProgress;\n          popSuspenseHandler(workInProgress);\n          return null;\n        }\n        if (0 !== (workInProgress.flags & 128))\n          throw Error(formatProdErrorMessage(558));\n      }\n      bubbleProperties(workInProgress);\n      return null;\n    case 13:\n      newProps = workInProgress.memoizedState;\n      if (\n        null === current ||\n        (null !== current.memoizedState &&\n          null !== current.memoizedState.dehydrated)\n      ) {\n        type = popHydrationState(workInProgress);\n        if (null !== newProps && null !== newProps.dehydrated) {\n          if (null === current) {\n            if (!type) throw Error(formatProdErrorMessage(318));\n            type = workInProgress.memoizedState;\n            type = null !== type ? type.dehydrated : null;\n            if (!type) throw Error(formatProdErrorMessage(317));\n            type[internalInstanceKey] = workInProgress;\n          } else\n            resetHydrationState(),\n              0 === (workInProgress.flags & 128) &&\n                (workInProgress.memoizedState = null),\n              (workInProgress.flags |= 4);\n          bubbleProperties(workInProgress);\n          type = !1;\n        } else\n          (type = upgradeHydrationErrorsToRecoverable()),\n            null !== current &&\n              null !== current.memoizedState &&\n              (current.memoizedState.hydrationErrors = type),\n            (type = !0);\n        if (!type) {\n          if (workInProgress.flags & 256)\n            return popSuspenseHandler(workInProgress), workInProgress;\n          popSuspenseHandler(workInProgress);\n          return null;\n        }\n      }\n      popSuspenseHandler(workInProgress);\n      if (0 !== (workInProgress.flags & 128))\n        return (workInProgress.lanes = renderLanes), workInProgress;\n      renderLanes = null !== newProps;\n      current = null !== current && null !== current.memoizedState;\n      renderLanes &&\n        ((newProps = workInProgress.child),\n        (type = null),\n        null !== newProps.alternate &&\n          null !== newProps.alternate.memoizedState &&\n          null !== newProps.alternate.memoizedState.cachePool &&\n          (type = newProps.alternate.memoizedState.cachePool.pool),\n        (nextResource = null),\n        null !== newProps.memoizedState &&\n          null !== newProps.memoizedState.cachePool &&\n          (nextResource = newProps.memoizedState.cachePool.pool),\n        nextResource !== type && (newProps.flags |= 2048));\n      renderLanes !== current &&\n        renderLanes &&\n        (workInProgress.child.flags |= 8192);\n      scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n      bubbleProperties(workInProgress);\n      return null;\n    case 4:\n      return (\n        popHostContainer(),\n        null === current &&\n          listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),\n        (workInProgress.flags |= 67108864),\n        bubbleProperties(workInProgress),\n        null\n      );\n    case 10:\n      return (\n        popProvider(workInProgress.type), bubbleProperties(workInProgress), null\n      );\n    case 19:\n      popSuspenseListContext(workInProgress);\n      newProps = workInProgress.memoizedState;\n      if (null === newProps) return bubbleProperties(workInProgress), null;\n      type = 0 !== (workInProgress.flags & 128);\n      nextResource = newProps.rendering;\n      if (null === nextResource)\n        if (type) cutOffTailIfNeeded(newProps, !1);\n        else {\n          if (\n            0 !== workInProgressRootExitStatus ||\n            (null !== current && 0 !== (current.flags & 128))\n          )\n            for (current = workInProgress.child; null !== current; ) {\n              nextResource = findFirstSuspended(current);\n              if (null !== nextResource) {\n                workInProgress.flags |= 128;\n                cutOffTailIfNeeded(newProps, !1);\n                current = nextResource.updateQueue;\n                workInProgress.updateQueue = current;\n                scheduleRetryEffect(workInProgress, current);\n                workInProgress.subtreeFlags = 0;\n                current = renderLanes;\n                for (renderLanes = workInProgress.child; null !== renderLanes; )\n                  resetWorkInProgress(renderLanes, current),\n                    (renderLanes = renderLanes.sibling);\n                pushSuspenseListContext(\n                  workInProgress,\n                  (suspenseStackCursor.current & 1) | 2\n                );\n                isHydrating &&\n                  pushTreeFork(workInProgress, newProps.treeForkCount);\n                return workInProgress.child;\n              }\n              current = current.sibling;\n            }\n          null !== newProps.tail &&\n            now() > workInProgressRootRenderTargetTime &&\n            ((workInProgress.flags |= 128),\n            (type = !0),\n            cutOffTailIfNeeded(newProps, !1),\n            (workInProgress.lanes = 4194304));\n        }\n      else {\n        if (!type)\n          if (\n            ((current = findFirstSuspended(nextResource)), null !== current)\n          ) {\n            if (\n              ((workInProgress.flags |= 128),\n              (type = !0),\n              (current = current.updateQueue),\n              (workInProgress.updateQueue = current),\n              scheduleRetryEffect(workInProgress, current),\n              cutOffTailIfNeeded(newProps, !0),\n              null === newProps.tail &&\n                \"collapsed\" !== newProps.tailMode &&\n                \"visible\" !== newProps.tailMode &&\n                !nextResource.alternate &&\n                !isHydrating)\n            )\n              return bubbleProperties(workInProgress), null;\n          } else\n            2 * now() - newProps.renderingStartTime >\n              workInProgressRootRenderTargetTime &&\n              536870912 !== renderLanes &&\n              ((workInProgress.flags |= 128),\n              (type = !0),\n              cutOffTailIfNeeded(newProps, !1),\n              (workInProgress.lanes = 4194304));\n        newProps.isBackwards\n          ? ((nextResource.sibling = workInProgress.child),\n            (workInProgress.child = nextResource))\n          : ((current = newProps.last),\n            null !== current\n              ? (current.sibling = nextResource)\n              : (workInProgress.child = nextResource),\n            (newProps.last = nextResource));\n      }\n      if (null !== newProps.tail) {\n        current = newProps.tail;\n        a: {\n          for (renderLanes = current; null !== renderLanes; ) {\n            if (null !== renderLanes.alternate) {\n              renderLanes = !1;\n              break a;\n            }\n            renderLanes = renderLanes.sibling;\n          }\n          renderLanes = !0;\n        }\n        newProps.rendering = current;\n        newProps.tail = current.sibling;\n        newProps.renderingStartTime = now();\n        current.sibling = null;\n        nextResource = suspenseStackCursor.current;\n        nextResource = type ? (nextResource & 1) | 2 : nextResource & 1;\n        \"visible\" === newProps.tailMode ||\n        \"collapsed\" === newProps.tailMode ||\n        !renderLanes ||\n        isHydrating\n          ? pushSuspenseListContext(workInProgress, nextResource)\n          : ((renderLanes = nextResource),\n            push(suspenseHandlerStackCursor, workInProgress),\n            push(suspenseStackCursor, renderLanes),\n            null === shellBoundary && (shellBoundary = workInProgress));\n        isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount);\n        return current;\n      }\n      bubbleProperties(workInProgress);\n      return null;\n    case 22:\n    case 23:\n      return (\n        popSuspenseHandler(workInProgress),\n        popHiddenContext(),\n        (newProps = null !== workInProgress.memoizedState),\n        null !== current\n          ? (null !== current.memoizedState) !== newProps &&\n            (workInProgress.flags |= 8192)\n          : newProps && (workInProgress.flags |= 8192),\n        newProps\n          ? 0 !== (renderLanes & 536870912) &&\n            0 === (workInProgress.flags & 128) &&\n            (bubbleProperties(workInProgress),\n            workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n          : bubbleProperties(workInProgress),\n        (renderLanes = workInProgress.updateQueue),\n        null !== renderLanes &&\n          scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n        (renderLanes = null),\n        null !== current &&\n          null !== current.memoizedState &&\n          null !== current.memoizedState.cachePool &&\n          (renderLanes = current.memoizedState.cachePool.pool),\n        (newProps = null),\n        null !== workInProgress.memoizedState &&\n          null !== workInProgress.memoizedState.cachePool &&\n          (newProps = workInProgress.memoizedState.cachePool.pool),\n        newProps !== renderLanes && (workInProgress.flags |= 2048),\n        null !== current && pop(resumedCache),\n        null\n      );\n    case 24:\n      return (\n        (renderLanes = null),\n        null !== current && (renderLanes = current.memoizedState.cache),\n        workInProgress.memoizedState.cache !== renderLanes &&\n          (workInProgress.flags |= 2048),\n        popProvider(CacheContext),\n        bubbleProperties(workInProgress),\n        null\n      );\n    case 25:\n      return null;\n    case 30:\n      return (\n        (workInProgress.flags |= 33554432),\n        bubbleProperties(workInProgress),\n        null\n      );\n  }\n  throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction unwindWork(current, workInProgress) {\n  popTreeContext(workInProgress);\n  switch (workInProgress.tag) {\n    case 1:\n      return (\n        (current = workInProgress.flags),\n        current & 65536\n          ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n          : null\n      );\n    case 3:\n      return (\n        popProvider(CacheContext),\n        popHostContainer(),\n        (current = workInProgress.flags),\n        0 !== (current & 65536) && 0 === (current & 128)\n          ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n          : null\n      );\n    case 26:\n    case 27:\n    case 5:\n      return popHostContext(workInProgress), null;\n    case 31:\n      if (null !== workInProgress.memoizedState) {\n        popSuspenseHandler(workInProgress);\n        if (null === workInProgress.alternate)\n          throw Error(formatProdErrorMessage(340));\n        resetHydrationState();\n      }\n      current = workInProgress.flags;\n      return current & 65536\n        ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n        : null;\n    case 13:\n      popSuspenseHandler(workInProgress);\n      current = workInProgress.memoizedState;\n      if (null !== current && null !== current.dehydrated) {\n        if (null === workInProgress.alternate)\n          throw Error(formatProdErrorMessage(340));\n        resetHydrationState();\n      }\n      current = workInProgress.flags;\n      return current & 65536\n        ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n        : null;\n    case 19:\n      return (\n        popSuspenseListContext(workInProgress),\n        (current = workInProgress.flags),\n        current & 65536\n          ? ((workInProgress.flags = (current & -65537) | 128),\n            (current = workInProgress.memoizedState),\n            null !== current &&\n              ((current.rendering = null), (current.tail = null)),\n            (workInProgress.flags |= 4),\n            workInProgress)\n          : null\n      );\n    case 4:\n      return popHostContainer(), null;\n    case 10:\n      return popProvider(workInProgress.type), null;\n    case 22:\n    case 23:\n      return (\n        popSuspenseHandler(workInProgress),\n        popHiddenContext(),\n        null !== current && pop(resumedCache),\n        (current = workInProgress.flags),\n        current & 65536\n          ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n          : null\n      );\n    case 24:\n      return popProvider(CacheContext), null;\n    case 25:\n      return null;\n    default:\n      return null;\n  }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n  popTreeContext(interruptedWork);\n  switch (interruptedWork.tag) {\n    case 3:\n      popProvider(CacheContext);\n      popHostContainer();\n      break;\n    case 26:\n    case 27:\n    case 5:\n      popHostContext(interruptedWork);\n      break;\n    case 4:\n      popHostContainer();\n      break;\n    case 31:\n      null !== interruptedWork.memoizedState &&\n        popSuspenseHandler(interruptedWork);\n      break;\n    case 13:\n      popSuspenseHandler(interruptedWork);\n      break;\n    case 19:\n      popSuspenseListContext(interruptedWork);\n      break;\n    case 10:\n      popProvider(interruptedWork.type);\n      break;\n    case 22:\n    case 23:\n      popSuspenseHandler(interruptedWork);\n      popHiddenContext();\n      null !== current && pop(resumedCache);\n      break;\n    case 24:\n      popProvider(CacheContext);\n  }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n  try {\n    var updateQueue = finishedWork.updateQueue,\n      lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n    if (null !== lastEffect) {\n      var firstEffect = lastEffect.next;\n      updateQueue = firstEffect;\n      do {\n        if ((updateQueue.tag & flags) === flags) {\n          lastEffect = void 0;\n          var create = updateQueue.create,\n            inst = updateQueue.inst;\n          lastEffect = create();\n          inst.destroy = lastEffect;\n        }\n        updateQueue = updateQueue.next;\n      } while (updateQueue !== firstEffect);\n    }\n  } catch (error) {\n    captureCommitPhaseError(finishedWork, finishedWork.return, error);\n  }\n}\nfunction commitHookEffectListUnmount(\n  flags,\n  finishedWork,\n  nearestMountedAncestor$jscomp$0\n) {\n  try {\n    var updateQueue = finishedWork.updateQueue,\n      lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n    if (null !== lastEffect) {\n      var firstEffect = lastEffect.next;\n      updateQueue = firstEffect;\n      do {\n        if ((updateQueue.tag & flags) === flags) {\n          var inst = updateQueue.inst,\n            destroy = inst.destroy;\n          if (void 0 !== destroy) {\n            inst.destroy = void 0;\n            lastEffect = finishedWork;\n            var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,\n              destroy_ = destroy;\n            try {\n              destroy_();\n            } catch (error) {\n              captureCommitPhaseError(\n                lastEffect,\n                nearestMountedAncestor,\n                error\n              );\n            }\n          }\n        }\n        updateQueue = updateQueue.next;\n      } while (updateQueue !== firstEffect);\n    }\n  } catch (error) {\n    captureCommitPhaseError(finishedWork, finishedWork.return, error);\n  }\n}\nfunction commitClassCallbacks(finishedWork) {\n  var updateQueue = finishedWork.updateQueue;\n  if (null !== updateQueue) {\n    var instance = finishedWork.stateNode;\n    try {\n      commitCallbacks(updateQueue, instance);\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    }\n  }\n}\nfunction safelyCallComponentWillUnmount(\n  current,\n  nearestMountedAncestor,\n  instance\n) {\n  instance.props = resolveClassComponentProps(\n    current.type,\n    current.memoizedProps\n  );\n  instance.state = current.memoizedState;\n  try {\n    instance.componentWillUnmount();\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n  try {\n    var ref = current.ref;\n    if (null !== ref) {\n      switch (current.tag) {\n        case 26:\n        case 27:\n        case 5:\n          var instanceToUse = current.stateNode;\n          break;\n        case 30:\n          var instance = current.stateNode,\n            name = getViewTransitionName(current.memoizedProps, instance);\n          if (null === instance.ref || instance.ref.name !== name)\n            instance.ref = createViewTransitionInstance(name);\n          instanceToUse = instance.ref;\n          break;\n        case 7:\n          if (null === current.stateNode) {\n            var fragmentInstance = new FragmentInstance(current);\n            traverseVisibleInstancesAndTextInstances(\n              current.child,\n              !1,\n              addFragmentHandleToFiber,\n              fragmentInstance,\n              void 0,\n              void 0\n            );\n            current.stateNode = fragmentInstance;\n          }\n          instanceToUse = current.stateNode;\n          break;\n        default:\n          instanceToUse = current.stateNode;\n      }\n      \"function\" === typeof ref\n        ? (current.refCleanup = ref(instanceToUse))\n        : (ref.current = instanceToUse);\n    }\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n  var ref = current.ref,\n    refCleanup = current.refCleanup;\n  if (null !== ref)\n    if (\"function\" === typeof refCleanup)\n      try {\n        refCleanup();\n      } catch (error) {\n        captureCommitPhaseError(current, nearestMountedAncestor, error);\n      } finally {\n        (current.refCleanup = null),\n          (current = current.alternate),\n          null != current && (current.refCleanup = null);\n      }\n    else if (\"function\" === typeof ref)\n      try {\n        ref(null);\n      } catch (error$148) {\n        captureCommitPhaseError(current, nearestMountedAncestor, error$148);\n      }\n    else ref.current = null;\n}\nfunction commitNewChildToFragmentInstances(fiber, parentFragmentInstances) {\n  if (\n    (5 === fiber.tag || 27 === fiber.tag || 6 === fiber.tag) &&\n    null === fiber.alternate &&\n    null !== parentFragmentInstances\n  )\n    for (var i = 0; i < parentFragmentInstances.length; i++)\n      commitNewChildToFragmentInstance(\n        fiber.stateNode,\n        parentFragmentInstances[i]\n      );\n}\nfunction commitFragmentInstanceInsertionEffects(fiber) {\n  for (var parent = fiber.return; null !== parent; ) {\n    isFragmentInstanceParent(parent) &&\n      commitNewChildToFragmentInstance(fiber.stateNode, parent.stateNode);\n    if (isFragmentInstanceHostBoundary(parent)) break;\n    parent = parent.return;\n  }\n}\nfunction commitFragmentInstanceDeletionEffects(fiber) {\n  for (var parent = fiber.return; null !== parent; ) {\n    isFragmentInstanceParent(parent) &&\n      deleteChildFromFragmentInstance(fiber.stateNode, parent.stateNode);\n    if (isFragmentInstanceHostBoundary(parent)) break;\n    parent = parent.return;\n  }\n}\nfunction isFragmentInstanceHostBoundary(fiber) {\n  return 5 === fiber.tag || 3 === fiber.tag || 27 === fiber.tag;\n}\nfunction isFragmentInstanceParent(fiber) {\n  return fiber && 7 === fiber.tag && null !== fiber.stateNode;\n}\nfunction commitHostMount(finishedWork) {\n  var type = finishedWork.type,\n    props = finishedWork.memoizedProps,\n    instance = finishedWork.stateNode;\n  try {\n    a: switch (type) {\n      case \"button\":\n      case \"input\":\n      case \"select\":\n      case \"textarea\":\n        props.autoFocus && instance.focus();\n        break a;\n      case \"img\":\n        props.src\n          ? (instance.src = props.src)\n          : props.srcSet && (instance.srcset = props.srcSet);\n    }\n  } catch (error) {\n    captureCommitPhaseError(finishedWork, finishedWork.return, error);\n  }\n}\nfunction commitHostUpdate(finishedWork, newProps, oldProps) {\n  try {\n    var domElement = finishedWork.stateNode;\n    updateProperties(domElement, finishedWork.type, oldProps, newProps);\n    domElement[internalPropsKey] = newProps;\n  } catch (error) {\n    captureCommitPhaseError(finishedWork, finishedWork.return, error);\n  }\n}\nfunction isHostParent(fiber) {\n  return (\n    5 === fiber.tag ||\n    3 === fiber.tag ||\n    26 === fiber.tag ||\n    (27 === fiber.tag && isSingletonScope(fiber.type)) ||\n    4 === fiber.tag\n  );\n}\nfunction getHostSibling(fiber) {\n  a: for (;;) {\n    for (; null === fiber.sibling; ) {\n      if (null === fiber.return || isHostParent(fiber.return)) return null;\n      fiber = fiber.return;\n    }\n    fiber.sibling.return = fiber.return;\n    for (\n      fiber = fiber.sibling;\n      5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n    ) {\n      if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;\n      if (fiber.flags & 2) continue a;\n      if (null === fiber.child || 4 === fiber.tag) continue a;\n      else (fiber.child.return = fiber), (fiber = fiber.child);\n    }\n    if (!(fiber.flags & 2)) return fiber.stateNode;\n  }\n}\nfunction insertOrAppendPlacementNodeIntoContainer(\n  node,\n  before,\n  parent,\n  parentFragmentInstances\n) {\n  var tag = node.tag;\n  if (5 === tag || 6 === tag)\n    (tag = node.stateNode),\n      before\n        ? (9 === parent.nodeType\n            ? parent.body\n            : \"HTML\" === parent.nodeName\n              ? parent.ownerDocument.body\n              : parent\n          ).insertBefore(tag, before)\n        : ((before =\n            9 === parent.nodeType\n              ? parent.body\n              : \"HTML\" === parent.nodeName\n                ? parent.ownerDocument.body\n                : parent),\n          before.appendChild(tag),\n          (parent = parent._reactRootContainer),\n          (null !== parent && void 0 !== parent) ||\n            null !== before.onclick ||\n            (before.onclick = noop$1)),\n      commitNewChildToFragmentInstances(node, parentFragmentInstances),\n      (viewTransitionMutationContext = !0);\n  else if (\n    4 !== tag &&\n    (27 === tag &&\n      (commitNewChildToFragmentInstances(node, parentFragmentInstances),\n      (parentFragmentInstances = null),\n      isSingletonScope(node.type) &&\n        ((parent = node.stateNode), (before = null))),\n    (node = node.child),\n    null !== node)\n  )\n    for (\n      insertOrAppendPlacementNodeIntoContainer(\n        node,\n        before,\n        parent,\n        parentFragmentInstances\n      ),\n        node = node.sibling;\n      null !== node;\n\n    )\n      insertOrAppendPlacementNodeIntoContainer(\n        node,\n        before,\n        parent,\n        parentFragmentInstances\n      ),\n        (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(\n  node,\n  before,\n  parent,\n  parentFragmentInstances\n) {\n  var tag = node.tag;\n  if (5 === tag || 6 === tag)\n    (tag = node.stateNode),\n      before ? parent.insertBefore(tag, before) : parent.appendChild(tag),\n      commitNewChildToFragmentInstances(node, parentFragmentInstances),\n      (viewTransitionMutationContext = !0);\n  else if (\n    4 !== tag &&\n    (27 === tag &&\n      (commitNewChildToFragmentInstances(node, parentFragmentInstances),\n      (parentFragmentInstances = null),\n      isSingletonScope(node.type) && (parent = node.stateNode)),\n    (node = node.child),\n    null !== node)\n  )\n    for (\n      insertOrAppendPlacementNode(\n        node,\n        before,\n        parent,\n        parentFragmentInstances\n      ),\n        node = node.sibling;\n      null !== node;\n\n    )\n      insertOrAppendPlacementNode(\n        node,\n        before,\n        parent,\n        parentFragmentInstances\n      ),\n        (node = node.sibling);\n}\nfunction commitHostSingletonAcquisition(finishedWork) {\n  var singleton = finishedWork.stateNode,\n    props = finishedWork.memoizedProps;\n  try {\n    for (\n      var type = finishedWork.type, attributes = singleton.attributes;\n      attributes.length;\n\n    )\n      singleton.removeAttributeNode(attributes[0]);\n    setInitialProperties(singleton, type, props);\n    singleton[internalInstanceKey] = finishedWork;\n    singleton[internalPropsKey] = props;\n  } catch (error) {\n    captureCommitPhaseError(finishedWork, finishedWork.return, error);\n  }\n}\nvar shouldStartViewTransition = !1,\n  appearingViewTransitions = null;\nfunction trackEnterViewTransitions(placement) {\n  if (30 === placement.tag || 0 !== (placement.subtreeFlags & 33554432))\n    shouldStartViewTransition = !0;\n}\nvar viewTransitionCancelableChildren = null;\nfunction pushViewTransitionCancelableScope() {\n  var prevChildren = viewTransitionCancelableChildren;\n  viewTransitionCancelableChildren = null;\n  return prevChildren;\n}\nvar viewTransitionHostInstanceIdx = 0;\nfunction applyViewTransitionToHostInstances(\n  fiber,\n  name,\n  className,\n  collectMeasurements,\n  stopAtNestedViewTransitions\n) {\n  viewTransitionHostInstanceIdx = 0;\n  return applyViewTransitionToHostInstancesRecursive(\n    fiber.child,\n    name,\n    className,\n    collectMeasurements,\n    stopAtNestedViewTransitions\n  );\n}\nfunction applyViewTransitionToHostInstancesRecursive(\n  child,\n  name,\n  className,\n  collectMeasurements,\n  stopAtNestedViewTransitions\n) {\n  for (var inViewport = !1; null !== child; ) {\n    if (5 === child.tag) {\n      var instance = child.stateNode;\n      if (null !== collectMeasurements) {\n        var measurement = measureInstance(instance);\n        collectMeasurements.push(measurement);\n        measurement.view && (inViewport = !0);\n      } else\n        inViewport || (measureInstance(instance).view && (inViewport = !0));\n      shouldStartViewTransition = !0;\n      applyViewTransitionName(\n        instance,\n        0 === viewTransitionHostInstanceIdx\n          ? name\n          : name + \"_\" + viewTransitionHostInstanceIdx,\n        className\n      );\n      viewTransitionHostInstanceIdx++;\n    } else if (22 !== child.tag || null === child.memoizedState)\n      (30 === child.tag && stopAtNestedViewTransitions) ||\n        (applyViewTransitionToHostInstancesRecursive(\n          child.child,\n          name,\n          className,\n          collectMeasurements,\n          stopAtNestedViewTransitions\n        ) &&\n          (inViewport = !0));\n    child = child.sibling;\n  }\n  return inViewport;\n}\nfunction restoreViewTransitionOnHostInstances(\n  child,\n  stopAtNestedViewTransitions\n) {\n  for (; null !== child; ) {\n    if (5 === child.tag)\n      restoreViewTransitionName(child.stateNode, child.memoizedProps);\n    else if (22 !== child.tag || null === child.memoizedState)\n      (30 === child.tag && stopAtNestedViewTransitions) ||\n        restoreViewTransitionOnHostInstances(\n          child.child,\n          stopAtNestedViewTransitions\n        );\n    child = child.sibling;\n  }\n}\nfunction commitAppearingPairViewTransitions(placement) {\n  if (0 !== (placement.subtreeFlags & 18874368))\n    for (placement = placement.child; null !== placement; ) {\n      if (22 !== placement.tag || null === placement.memoizedState)\n        if (\n          (commitAppearingPairViewTransitions(placement),\n          30 === placement.tag &&\n            0 !== (placement.flags & 18874368) &&\n            placement.stateNode.paired)\n        ) {\n          var props = placement.memoizedProps;\n          if (null == props.name || \"auto\" === props.name)\n            throw Error(formatProdErrorMessage(544));\n          var name = props.name;\n          props = getViewTransitionClassName(props.default, props.share);\n          \"none\" !== props &&\n            (applyViewTransitionToHostInstances(\n              placement,\n              name,\n              props,\n              null,\n              !1\n            ) ||\n              restoreViewTransitionOnHostInstances(placement.child, !1));\n        }\n      placement = placement.sibling;\n    }\n}\nfunction commitEnterViewTransitions(placement, gesture) {\n  if (30 === placement.tag) {\n    var state = placement.stateNode,\n      props = placement.memoizedProps,\n      name = getViewTransitionName(props, state),\n      className = getViewTransitionClassName(\n        props.default,\n        state.paired ? props.share : props.enter\n      );\n    \"none\" !== className\n      ? applyViewTransitionToHostInstances(placement, name, className, null, !1)\n        ? (commitAppearingPairViewTransitions(placement),\n          state.paired ||\n            gesture ||\n            scheduleViewTransitionEvent(placement, props.onEnter))\n        : restoreViewTransitionOnHostInstances(placement.child, !1)\n      : commitAppearingPairViewTransitions(placement);\n  } else if (0 !== (placement.subtreeFlags & 33554432))\n    for (placement = placement.child; null !== placement; )\n      commitEnterViewTransitions(placement, gesture),\n        (placement = placement.sibling);\n  else commitAppearingPairViewTransitions(placement);\n}\nfunction commitDeletedPairViewTransitions(deletion) {\n  if (\n    null !== appearingViewTransitions &&\n    0 !== appearingViewTransitions.size\n  ) {\n    var pairs = appearingViewTransitions;\n    if (0 !== (deletion.subtreeFlags & 18874368))\n      for (deletion = deletion.child; null !== deletion; ) {\n        if (22 !== deletion.tag || null === deletion.memoizedState) {\n          if (30 === deletion.tag && 0 !== (deletion.flags & 18874368)) {\n            var props = deletion.memoizedProps,\n              name = props.name;\n            if (null != name && \"auto\" !== name) {\n              var pair = pairs.get(name);\n              if (void 0 !== pair) {\n                var className = getViewTransitionClassName(\n                  props.default,\n                  props.share\n                );\n                \"none\" !== className &&\n                  (applyViewTransitionToHostInstances(\n                    deletion,\n                    name,\n                    className,\n                    null,\n                    !1\n                  )\n                    ? ((className = deletion.stateNode),\n                      (pair.paired = className),\n                      (className.paired = pair),\n                      scheduleViewTransitionEvent(deletion, props.onShare))\n                    : restoreViewTransitionOnHostInstances(deletion.child, !1));\n                pairs.delete(name);\n                if (0 === pairs.size) break;\n              }\n            }\n          }\n          commitDeletedPairViewTransitions(deletion);\n        }\n        deletion = deletion.sibling;\n      }\n  }\n}\nfunction commitExitViewTransitions(deletion) {\n  if (30 === deletion.tag) {\n    var props = deletion.memoizedProps,\n      name = getViewTransitionName(props, deletion.stateNode),\n      pair =\n        null !== appearingViewTransitions\n          ? appearingViewTransitions.get(name)\n          : void 0,\n      className = getViewTransitionClassName(\n        props.default,\n        void 0 !== pair ? props.share : props.exit\n      );\n    \"none\" !== className &&\n      (applyViewTransitionToHostInstances(deletion, name, className, null, !1)\n        ? void 0 !== pair\n          ? ((className = deletion.stateNode),\n            (pair.paired = className),\n            (className.paired = pair),\n            appearingViewTransitions.delete(name),\n            scheduleViewTransitionEvent(deletion, props.onShare))\n          : scheduleViewTransitionEvent(deletion, props.onExit)\n        : restoreViewTransitionOnHostInstances(deletion.child, !1));\n    null !== appearingViewTransitions &&\n      commitDeletedPairViewTransitions(deletion);\n  } else if (0 !== (deletion.subtreeFlags & 33554432))\n    for (deletion = deletion.child; null !== deletion; )\n      commitExitViewTransitions(deletion), (deletion = deletion.sibling);\n  else\n    null !== appearingViewTransitions &&\n      commitDeletedPairViewTransitions(deletion);\n}\nfunction commitNestedViewTransitions(changedParent) {\n  for (changedParent = changedParent.child; null !== changedParent; ) {\n    if (30 === changedParent.tag) {\n      var props = changedParent.memoizedProps,\n        name = getViewTransitionName(props, changedParent.stateNode);\n      props = getViewTransitionClassName(props.default, props.update);\n      changedParent.flags &= -5;\n      \"none\" !== props &&\n        applyViewTransitionToHostInstances(\n          changedParent,\n          name,\n          props,\n          (changedParent.memoizedState = []),\n          !1\n        );\n    } else\n      0 !== (changedParent.subtreeFlags & 33554432) &&\n        commitNestedViewTransitions(changedParent);\n    changedParent = changedParent.sibling;\n  }\n}\nfunction restorePairedViewTransitions(parent) {\n  if (0 !== (parent.subtreeFlags & 18874368))\n    for (parent = parent.child; null !== parent; ) {\n      if (22 !== parent.tag || null === parent.memoizedState) {\n        if (30 === parent.tag && 0 !== (parent.flags & 18874368)) {\n          var instance = parent.stateNode;\n          null !== instance.paired &&\n            ((instance.paired = null),\n            restoreViewTransitionOnHostInstances(parent.child, !1));\n        }\n        restorePairedViewTransitions(parent);\n      }\n      parent = parent.sibling;\n    }\n}\nfunction restoreEnterOrExitViewTransitions(fiber) {\n  if (30 === fiber.tag)\n    (fiber.stateNode.paired = null),\n      restoreViewTransitionOnHostInstances(fiber.child, !1),\n      restorePairedViewTransitions(fiber);\n  else if (0 !== (fiber.subtreeFlags & 33554432))\n    for (fiber = fiber.child; null !== fiber; )\n      restoreEnterOrExitViewTransitions(fiber), (fiber = fiber.sibling);\n  else restorePairedViewTransitions(fiber);\n}\nfunction restoreNestedViewTransitions(changedParent) {\n  for (changedParent = changedParent.child; null !== changedParent; )\n    30 === changedParent.tag\n      ? restoreViewTransitionOnHostInstances(changedParent.child, !1)\n      : 0 !== (changedParent.subtreeFlags & 33554432) &&\n        restoreNestedViewTransitions(changedParent),\n      (changedParent = changedParent.sibling);\n}\nfunction measureViewTransitionHostInstancesRecursive(\n  parentViewTransition,\n  child,\n  newName,\n  oldName,\n  className,\n  previousMeasurements,\n  stopAtNestedViewTransitions\n) {\n  for (var inViewport = !1; null !== child; ) {\n    if (5 === child.tag) {\n      var instance = child.stateNode;\n      if (\n        null !== previousMeasurements &&\n        viewTransitionHostInstanceIdx < previousMeasurements.length\n      ) {\n        var previousMeasurement =\n            previousMeasurements[viewTransitionHostInstanceIdx],\n          nextMeasurement = measureInstance(instance);\n        if (previousMeasurement.view || nextMeasurement.view) inViewport = !0;\n        var JSCompiler_temp;\n        if ((JSCompiler_temp = 0 === (parentViewTransition.flags & 4)))\n          if (nextMeasurement.clip) JSCompiler_temp = !0;\n          else {\n            JSCompiler_temp = previousMeasurement.rect;\n            var newRect = nextMeasurement.rect;\n            JSCompiler_temp =\n              JSCompiler_temp.y !== newRect.y ||\n              JSCompiler_temp.x !== newRect.x ||\n              JSCompiler_temp.height !== newRect.height ||\n              JSCompiler_temp.width !== newRect.width;\n          }\n        JSCompiler_temp && (parentViewTransition.flags |= 4);\n        nextMeasurement.abs\n          ? (nextMeasurement = !previousMeasurement.abs)\n          : ((previousMeasurement = previousMeasurement.rect),\n            (nextMeasurement = nextMeasurement.rect),\n            (nextMeasurement =\n              previousMeasurement.height !== nextMeasurement.height ||\n              previousMeasurement.width !== nextMeasurement.width));\n        nextMeasurement && (parentViewTransition.flags |= 32);\n      } else parentViewTransition.flags |= 32;\n      0 !== (parentViewTransition.flags & 4) &&\n        applyViewTransitionName(\n          instance,\n          0 === viewTransitionHostInstanceIdx\n            ? newName\n            : newName + \"_\" + viewTransitionHostInstanceIdx,\n          className\n        );\n      (inViewport && 0 !== (parentViewTransition.flags & 4)) ||\n        (null === viewTransitionCancelableChildren &&\n          (viewTransitionCancelableChildren = []),\n        viewTransitionCancelableChildren.push(\n          instance,\n          0 === viewTransitionHostInstanceIdx\n            ? oldName\n            : oldName + \"_\" + viewTransitionHostInstanceIdx,\n          child.memoizedProps\n        ));\n      viewTransitionHostInstanceIdx++;\n    } else if (22 !== child.tag || null === child.memoizedState)\n      30 === child.tag && stopAtNestedViewTransitions\n        ? (parentViewTransition.flags |= child.flags & 32)\n        : measureViewTransitionHostInstancesRecursive(\n            parentViewTransition,\n            child.child,\n            newName,\n            oldName,\n            className,\n            previousMeasurements,\n            stopAtNestedViewTransitions\n          ) && (inViewport = !0);\n    child = child.sibling;\n  }\n  return inViewport;\n}\nfunction measureNestedViewTransitions(changedParent, gesture) {\n  for (changedParent = changedParent.child; null !== changedParent; ) {\n    if (30 === changedParent.tag) {\n      var props = changedParent.memoizedProps,\n        state = changedParent.stateNode,\n        name = getViewTransitionName(props, state),\n        className = getViewTransitionClassName(props.default, props.update);\n      if (gesture) {\n        state = state.clones;\n        var previousMeasurements =\n          null === state ? null : state.map(measureClonedInstance);\n      } else\n        (previousMeasurements = changedParent.memoizedState),\n          (changedParent.memoizedState = null);\n      state = changedParent;\n      var child = changedParent.child;\n      viewTransitionHostInstanceIdx = 0;\n      name = measureViewTransitionHostInstancesRecursive(\n        state,\n        child,\n        name,\n        name,\n        className,\n        previousMeasurements,\n        !1\n      );\n      0 !== (changedParent.flags & 4) &&\n        name &&\n        (gesture || scheduleViewTransitionEvent(changedParent, props.onUpdate));\n    } else\n      0 !== (changedParent.subtreeFlags & 33554432) &&\n        measureNestedViewTransitions(changedParent, gesture);\n    changedParent = changedParent.sibling;\n  }\n}\nvar offscreenSubtreeIsHidden = !1,\n  offscreenSubtreeWasHidden = !1,\n  offscreenDirectParentIsHidden = !1,\n  needsFormReset = !1,\n  PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n  nextEffect = null,\n  viewTransitionContextChanged = !1,\n  inUpdateViewTransition = !1,\n  rootViewTransitionAffected = !1,\n  rootViewTransitionNameCanceled = !1;\nfunction commitBeforeMutationEffects(root, firstChild, committedLanes) {\n  root = root.containerInfo;\n  eventsEnabled = _enabled;\n  root = getActiveElementDeep(root);\n  if (hasSelectionCapabilities(root)) {\n    if (\"selectionStart\" in root)\n      var JSCompiler_temp = {\n        start: root.selectionStart,\n        end: root.selectionEnd\n      };\n    else\n      a: {\n        JSCompiler_temp =\n          ((JSCompiler_temp = root.ownerDocument) &&\n            JSCompiler_temp.defaultView) ||\n          window;\n        var selection =\n          JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();\n        if (selection && 0 !== selection.rangeCount) {\n          JSCompiler_temp = selection.anchorNode;\n          var anchorOffset = selection.anchorOffset,\n            focusNode = selection.focusNode;\n          selection = selection.focusOffset;\n          try {\n            JSCompiler_temp.nodeType, focusNode.nodeType;\n          } catch (e$21) {\n            JSCompiler_temp = null;\n            break a;\n          }\n          var length = 0,\n            start = -1,\n            end = -1,\n            indexWithinAnchor = 0,\n            indexWithinFocus = 0,\n            node = root,\n            parentNode = null;\n          b: for (;;) {\n            for (var next; ; ) {\n              node !== JSCompiler_temp ||\n                (0 !== anchorOffset && 3 !== node.nodeType) ||\n                (start = length + anchorOffset);\n              node !== focusNode ||\n                (0 !== selection && 3 !== node.nodeType) ||\n                (end = length + selection);\n              3 === node.nodeType && (length += node.nodeValue.length);\n              if (null === (next = node.firstChild)) break;\n              parentNode = node;\n              node = next;\n            }\n            for (;;) {\n              if (node === root) break b;\n              parentNode === JSCompiler_temp &&\n                ++indexWithinAnchor === anchorOffset &&\n                (start = length);\n              parentNode === focusNode &&\n                ++indexWithinFocus === selection &&\n                (end = length);\n              if (null !== (next = node.nextSibling)) break;\n              node = parentNode;\n              parentNode = node.parentNode;\n            }\n            node = next;\n          }\n          JSCompiler_temp =\n            -1 === start || -1 === end ? null : { start: start, end: end };\n        } else JSCompiler_temp = null;\n      }\n    JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };\n  } else JSCompiler_temp = null;\n  selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };\n  _enabled = !1;\n  committedLanes = (committedLanes & 335544064) === committedLanes;\n  nextEffect = firstChild;\n  for (firstChild = committedLanes ? 9270 : 1024; null !== nextEffect; ) {\n    root = nextEffect;\n    if (\n      committedLanes &&\n      ((JSCompiler_temp = root.deletions), null !== JSCompiler_temp)\n    )\n      for (\n        anchorOffset = 0;\n        anchorOffset < JSCompiler_temp.length;\n        anchorOffset++\n      )\n        committedLanes &&\n          commitExitViewTransitions(JSCompiler_temp[anchorOffset]);\n    if (null === root.alternate && 0 !== (root.flags & 2))\n      committedLanes && trackEnterViewTransitions(root),\n        commitBeforeMutationEffects_complete(committedLanes);\n    else {\n      if (22 === root.tag)\n        if (((JSCompiler_temp = root.alternate), null !== root.memoizedState)) {\n          null !== JSCompiler_temp &&\n            null === JSCompiler_temp.memoizedState &&\n            committedLanes &&\n            commitExitViewTransitions(JSCompiler_temp);\n          commitBeforeMutationEffects_complete(committedLanes);\n          continue;\n        } else if (\n          null !== JSCompiler_temp &&\n          null !== JSCompiler_temp.memoizedState\n        ) {\n          committedLanes && trackEnterViewTransitions(root);\n          commitBeforeMutationEffects_complete(committedLanes);\n          continue;\n        }\n      JSCompiler_temp = root.child;\n      0 !== (root.subtreeFlags & firstChild) && null !== JSCompiler_temp\n        ? ((JSCompiler_temp.return = root), (nextEffect = JSCompiler_temp))\n        : (committedLanes && commitNestedViewTransitions(root),\n          commitBeforeMutationEffects_complete(committedLanes));\n    }\n  }\n  appearingViewTransitions = null;\n}\nfunction commitBeforeMutationEffects_complete(\n  isViewTransitionEligible$jscomp$0\n) {\n  for (; null !== nextEffect; ) {\n    var fiber = nextEffect,\n      isViewTransitionEligible = isViewTransitionEligible$jscomp$0,\n      current = fiber.alternate,\n      flags = fiber.flags;\n    switch (fiber.tag) {\n      case 0:\n      case 11:\n      case 15:\n        break;\n      case 1:\n        if (0 !== (flags & 1024) && null !== current) {\n          isViewTransitionEligible = void 0;\n          flags = current.memoizedProps;\n          current = current.memoizedState;\n          var instance = fiber.stateNode;\n          try {\n            var resolvedPrevProps = resolveClassComponentProps(\n              fiber.type,\n              flags\n            );\n            isViewTransitionEligible = instance.getSnapshotBeforeUpdate(\n              resolvedPrevProps,\n              current\n            );\n            instance.__reactInternalSnapshotBeforeUpdate =\n              isViewTransitionEligible;\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n        }\n        break;\n      case 3:\n        if (0 !== (flags & 1024))\n          if (\n            ((current = fiber.stateNode.containerInfo),\n            (isViewTransitionEligible = current.nodeType),\n            9 === isViewTransitionEligible)\n          )\n            clearContainerSparingly(current);\n          else if (1 === isViewTransitionEligible)\n            switch (current.nodeName) {\n              case \"HEAD\":\n              case \"HTML\":\n              case \"BODY\":\n                clearContainerSparingly(current);\n                break;\n              default:\n                current.textContent = \"\";\n            }\n        break;\n      case 5:\n      case 26:\n      case 27:\n      case 6:\n      case 4:\n      case 17:\n        break;\n      case 30:\n        isViewTransitionEligible &&\n          null !== current &&\n          ((isViewTransitionEligible = getViewTransitionName(\n            current.memoizedProps,\n            current.stateNode\n          )),\n          (flags = fiber.memoizedProps),\n          (flags = getViewTransitionClassName(flags.default, flags.update)),\n          \"none\" !== flags &&\n            applyViewTransitionToHostInstances(\n              current,\n              isViewTransitionEligible,\n              flags,\n              (current.memoizedState = []),\n              !0\n            ));\n        break;\n      default:\n        if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163));\n    }\n    current = fiber.sibling;\n    if (null !== current) {\n      current.return = fiber.return;\n      nextEffect = current;\n      break;\n    }\n    nextEffect = fiber.return;\n  }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n  var flags = finishedWork.flags;\n  switch (finishedWork.tag) {\n    case 0:\n    case 11:\n    case 15:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      flags & 4 && commitHookEffectListMount(5, finishedWork);\n      break;\n    case 1:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      if (flags & 4)\n        if (((finishedRoot = finishedWork.stateNode), null === current))\n          try {\n            finishedRoot.componentDidMount();\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        else {\n          var prevProps = resolveClassComponentProps(\n            finishedWork.type,\n            current.memoizedProps\n          );\n          current = current.memoizedState;\n          try {\n            finishedRoot.componentDidUpdate(\n              prevProps,\n              current,\n              finishedRoot.__reactInternalSnapshotBeforeUpdate\n            );\n          } catch (error$146) {\n            captureCommitPhaseError(\n              finishedWork,\n              finishedWork.return,\n              error$146\n            );\n          }\n        }\n      flags & 64 && commitClassCallbacks(finishedWork);\n      flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n      break;\n    case 3:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      if (\n        flags & 64 &&\n        ((finishedRoot = finishedWork.updateQueue), null !== finishedRoot)\n      ) {\n        current = null;\n        if (null !== finishedWork.child)\n          switch (finishedWork.child.tag) {\n            case 27:\n            case 5:\n              current = finishedWork.child.stateNode;\n              break;\n            case 1:\n              current = finishedWork.child.stateNode;\n          }\n        try {\n          commitCallbacks(finishedRoot, current);\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      }\n      break;\n    case 27:\n      null === current &&\n        flags & 4 &&\n        commitHostSingletonAcquisition(finishedWork);\n    case 26:\n    case 5:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      null === current && flags & 4 && commitHostMount(finishedWork);\n      flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n      break;\n    case 12:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      break;\n    case 31:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n      break;\n    case 13:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n      flags & 64 &&\n        ((finishedRoot = finishedWork.memoizedState),\n        null !== finishedRoot &&\n          ((finishedRoot = finishedRoot.dehydrated),\n          null !== finishedRoot &&\n            ((finishedWork = retryDehydratedSuspenseBoundary.bind(\n              null,\n              finishedWork\n            )),\n            registerSuspenseInstanceRetry(finishedRoot, finishedWork))));\n      break;\n    case 22:\n      flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;\n      if (!flags) {\n        var newOffscreenSubtreeWasHidden =\n          (null !== current && null !== current.memoizedState) ||\n          offscreenSubtreeWasHidden;\n        current = offscreenSubtreeIsHidden;\n        prevProps = offscreenSubtreeWasHidden;\n        offscreenSubtreeIsHidden = flags;\n        (offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden) && !prevProps\n          ? ((flags = 2),\n            0 !== (finishedWork.subtreeFlags & 8772) && (flags |= 1),\n            recursivelyTraverseReappearLayoutEffects(\n              finishedRoot,\n              finishedWork,\n              flags\n            ))\n          : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n        offscreenSubtreeIsHidden = current;\n        offscreenSubtreeWasHidden = prevProps;\n      }\n      break;\n    case 30:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n      flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n      break;\n    case 7:\n      flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n    default:\n      recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n  }\n}\nfunction hideOrUnhideAllChildren(parentFiber, isHidden) {\n  for (parentFiber = parentFiber.child; null !== parentFiber; )\n    hideOrUnhideAllChildrenOnFiber(parentFiber, isHidden),\n      (parentFiber = parentFiber.sibling);\n}\nfunction hideOrUnhideAllChildrenOnFiber(fiber, isHidden) {\n  switch (fiber.tag) {\n    case 5:\n    case 26:\n      try {\n        var instance = fiber.stateNode;\n        if (isHidden) {\n          var style = instance.style;\n          \"function\" === typeof style.setProperty\n            ? style.setProperty(\"display\", \"none\", \"important\")\n            : (style.display = \"none\");\n        } else {\n          var instance$jscomp$0 = fiber.stateNode,\n            styleProp = fiber.memoizedProps.style,\n            display =\n              void 0 !== styleProp &&\n              null !== styleProp &&\n              styleProp.hasOwnProperty(\"display\")\n                ? styleProp.display\n                : null;\n          instance$jscomp$0.style.display =\n            null == display || \"boolean\" === typeof display\n              ? \"\"\n              : (\"\" + display).trim();\n        }\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n      hideOrUnhideNearestPortals(fiber, isHidden);\n      break;\n    case 6:\n      try {\n        (fiber.stateNode.nodeValue = isHidden ? \"\" : fiber.memoizedProps),\n          (viewTransitionMutationContext = !0);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n      break;\n    case 18:\n      try {\n        var instance$jscomp$1 = fiber.stateNode;\n        isHidden\n          ? hideOrUnhideDehydratedBoundary(instance$jscomp$1, !0)\n          : hideOrUnhideDehydratedBoundary(fiber.stateNode, !1);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n      break;\n    case 22:\n    case 23:\n      null === fiber.memoizedState && hideOrUnhideAllChildren(fiber, isHidden);\n      break;\n    default:\n      hideOrUnhideAllChildren(fiber, isHidden);\n  }\n}\nfunction hideOrUnhideNearestPortals(parentFiber, isHidden$jscomp$0) {\n  if (parentFiber.subtreeFlags & 67108864)\n    for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n      a: {\n        var fiber = parentFiber,\n          isHidden = isHidden$jscomp$0;\n        switch (fiber.tag) {\n          case 4:\n            hideOrUnhideAllChildrenOnFiber(fiber, isHidden);\n            break a;\n          case 22:\n            null === fiber.memoizedState &&\n              hideOrUnhideNearestPortals(fiber, isHidden);\n            break a;\n          default:\n            hideOrUnhideNearestPortals(fiber, isHidden);\n        }\n      }\n      parentFiber = parentFiber.sibling;\n    }\n}\nfunction detachFiberAfterEffects(fiber) {\n  var alternate = fiber.alternate;\n  null !== alternate &&\n    ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n  fiber.child = null;\n  fiber.deletions = null;\n  fiber.sibling = null;\n  5 === fiber.tag &&\n    ((alternate = fiber.stateNode),\n    null !== alternate && detachDeletedInstance(alternate));\n  fiber.stateNode = null;\n  fiber.return = null;\n  fiber.dependencies = null;\n  fiber.memoizedProps = null;\n  fiber.memoizedState = null;\n  fiber.pendingProps = null;\n  fiber.stateNode = null;\n  fiber.updateQueue = null;\n}\nvar hostParent = null,\n  hostParentIsContainer = !1;\nfunction recursivelyTraverseDeletionEffects(\n  finishedRoot,\n  nearestMountedAncestor,\n  parent\n) {\n  for (parent = parent.child; null !== parent; )\n    commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n      (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n  finishedRoot,\n  nearestMountedAncestor,\n  deletedFiber\n) {\n  if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n    try {\n      injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n    } catch (err) {}\n  switch (deletedFiber.tag) {\n    case 26:\n      offscreenSubtreeWasHidden ||\n        safelyDetachRef(deletedFiber, nearestMountedAncestor);\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      deletedFiber.memoizedState\n        ? deletedFiber.memoizedState.count--\n        : deletedFiber.stateNode &&\n          !offscreenSubtreeWasHidden &&\n          ((deletedFiber = deletedFiber.stateNode),\n          deletedFiber.parentNode.removeChild(deletedFiber));\n      break;\n    case 27:\n      offscreenSubtreeWasHidden ||\n        safelyDetachRef(deletedFiber, nearestMountedAncestor);\n      commitFragmentInstanceDeletionEffects(deletedFiber);\n      var prevHostParent = hostParent,\n        prevHostParentIsContainer = hostParentIsContainer;\n      isSingletonScope(deletedFiber.type) &&\n        ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      releaseSingletonInstance(\n        deletedFiber.stateNode,\n        deletedFiber.type,\n        deletedFiber.memoizedProps\n      );\n      hostParent = prevHostParent;\n      hostParentIsContainer = prevHostParentIsContainer;\n      break;\n    case 5:\n      offscreenSubtreeWasHidden ||\n        safelyDetachRef(deletedFiber, nearestMountedAncestor),\n        commitFragmentInstanceDeletionEffects(deletedFiber);\n    case 6:\n      6 === deletedFiber.tag &&\n        commitFragmentInstanceDeletionEffects(deletedFiber);\n      prevHostParent = hostParent;\n      prevHostParentIsContainer = hostParentIsContainer;\n      hostParent = null;\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      hostParent = prevHostParent;\n      hostParentIsContainer = prevHostParentIsContainer;\n      if (null !== hostParent)\n        if (hostParentIsContainer)\n          try {\n            (9 === hostParent.nodeType\n              ? hostParent.body\n              : \"HTML\" === hostParent.nodeName\n                ? hostParent.ownerDocument.body\n                : hostParent\n            ).removeChild(deletedFiber.stateNode),\n              (viewTransitionMutationContext = !0);\n          } catch (error) {\n            captureCommitPhaseError(\n              deletedFiber,\n              nearestMountedAncestor,\n              error\n            );\n          }\n        else\n          try {\n            hostParent.removeChild(deletedFiber.stateNode),\n              (viewTransitionMutationContext = !0);\n          } catch (error) {\n            captureCommitPhaseError(\n              deletedFiber,\n              nearestMountedAncestor,\n              error\n            );\n          }\n      break;\n    case 18:\n      null !== hostParent &&\n        (hostParentIsContainer\n          ? ((finishedRoot = hostParent),\n            clearHydrationBoundary(\n              9 === finishedRoot.nodeType\n                ? finishedRoot.body\n                : \"HTML\" === finishedRoot.nodeName\n                  ? finishedRoot.ownerDocument.body\n                  : finishedRoot,\n              deletedFiber.stateNode\n            ),\n            retryIfBlockedOn(finishedRoot))\n          : clearHydrationBoundary(hostParent, deletedFiber.stateNode));\n      break;\n    case 4:\n      prevHostParent = hostParent;\n      prevHostParentIsContainer = hostParentIsContainer;\n      hostParent = deletedFiber.stateNode.containerInfo;\n      hostParentIsContainer = !0;\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      hostParent = prevHostParent;\n      hostParentIsContainer = prevHostParentIsContainer;\n      break;\n    case 0:\n    case 11:\n    case 14:\n    case 15:\n      commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);\n      offscreenSubtreeWasHidden ||\n        commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      break;\n    case 1:\n      offscreenSubtreeWasHidden ||\n        (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n        (prevHostParent = deletedFiber.stateNode),\n        \"function\" === typeof prevHostParent.componentWillUnmount &&\n          safelyCallComponentWillUnmount(\n            deletedFiber,\n            nearestMountedAncestor,\n            prevHostParent\n          ));\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      break;\n    case 21:\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      break;\n    case 22:\n      offscreenSubtreeWasHidden =\n        (prevHostParent = offscreenSubtreeWasHidden) ||\n        null !== deletedFiber.memoizedState;\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      offscreenSubtreeWasHidden = prevHostParent;\n      break;\n    case 30:\n      safelyDetachRef(deletedFiber, nearestMountedAncestor);\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      break;\n    case 7:\n      offscreenSubtreeWasHidden ||\n        safelyDetachRef(deletedFiber, nearestMountedAncestor);\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n      break;\n    default:\n      recursivelyTraverseDeletionEffects(\n        finishedRoot,\n        nearestMountedAncestor,\n        deletedFiber\n      );\n  }\n}\nfunction commitActivityHydrationCallbacks(finishedRoot, finishedWork) {\n  if (\n    null === finishedWork.memoizedState &&\n    ((finishedRoot = finishedWork.alternate),\n    null !== finishedRoot &&\n      ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))\n  ) {\n    finishedRoot = finishedRoot.dehydrated;\n    try {\n      retryIfBlockedOn(finishedRoot);\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    }\n  }\n}\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n  if (\n    null === finishedWork.memoizedState &&\n    ((finishedRoot = finishedWork.alternate),\n    null !== finishedRoot &&\n      ((finishedRoot = finishedRoot.memoizedState),\n      null !== finishedRoot &&\n        ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))\n  )\n    try {\n      retryIfBlockedOn(finishedRoot);\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    }\n}\nfunction getRetryCache(finishedWork) {\n  switch (finishedWork.tag) {\n    case 31:\n    case 13:\n    case 19:\n      var retryCache = finishedWork.stateNode;\n      null === retryCache &&\n        (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n      return retryCache;\n    case 22:\n      return (\n        (finishedWork = finishedWork.stateNode),\n        (retryCache = finishedWork._retryCache),\n        null === retryCache &&\n          (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n        retryCache\n      );\n    default:\n      throw Error(formatProdErrorMessage(435, finishedWork.tag));\n  }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n  var retryCache = getRetryCache(finishedWork);\n  wakeables.forEach(function (wakeable) {\n    if (!retryCache.has(wakeable)) {\n      retryCache.add(wakeable);\n      var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n      wakeable.then(retry, retry);\n    }\n  });\n}\nfunction recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber, lanes) {\n  var deletions = parentFiber.deletions;\n  if (null !== deletions)\n    for (var i = 0; i < deletions.length; i++) {\n      var childToDelete = deletions[i],\n        root = root$jscomp$0,\n        returnFiber = parentFiber,\n        parent = returnFiber;\n      a: for (; null !== parent; ) {\n        switch (parent.tag) {\n          case 27:\n            if (isSingletonScope(parent.type)) {\n              hostParent = parent.stateNode;\n              hostParentIsContainer = !1;\n              break a;\n            }\n            break;\n          case 5:\n            hostParent = parent.stateNode;\n            hostParentIsContainer = !1;\n            break a;\n          case 3:\n          case 4:\n            hostParent = parent.stateNode.containerInfo;\n            hostParentIsContainer = !0;\n            break a;\n        }\n        parent = parent.return;\n      }\n      if (null === hostParent) throw Error(formatProdErrorMessage(160));\n      commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);\n      hostParent = null;\n      hostParentIsContainer = !1;\n      root = childToDelete.alternate;\n      null !== root && (root.return = null);\n      childToDelete.return = null;\n    }\n  if (parentFiber.subtreeFlags & 13886)\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      commitMutationEffectsOnFiber(parentFiber, root$jscomp$0, lanes),\n        (parentFiber = parentFiber.sibling);\n}\nvar currentHoistableRoot = null;\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n  var current = finishedWork.alternate,\n    flags = finishedWork.flags;\n  switch (finishedWork.tag) {\n    case 0:\n    case 11:\n    case 14:\n    case 15:\n      if (\n        flags & 4 &&\n        ((current = finishedWork.updateQueue),\n        (current = null !== current ? current.events : null),\n        null !== current)\n      )\n        for (var ii = 0; ii < current.length; ii++) {\n          var _eventPayloads$ii2 = current[ii];\n          _eventPayloads$ii2.ref.impl = _eventPayloads$ii2.nextImpl;\n        }\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 4 &&\n        (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n        commitHookEffectListMount(3, finishedWork),\n        commitHookEffectListUnmount(5, finishedWork, finishedWork.return));\n      break;\n    case 1:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return));\n      flags & 64 &&\n        offscreenSubtreeIsHidden &&\n        ((finishedWork = finishedWork.updateQueue),\n        null !== finishedWork &&\n          ((root = finishedWork.callbacks),\n          null !== root &&\n            ((lanes = finishedWork.shared.hiddenCallbacks),\n            (finishedWork.shared.hiddenCallbacks =\n              null === lanes ? root : lanes.concat(root)))));\n      break;\n    case 26:\n      ii = currentHoistableRoot;\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return));\n      if (flags & 4)\n        if (\n          ((flags = null !== current ? current.memoizedState : null),\n          (lanes = finishedWork.memoizedState),\n          null === current)\n        )\n          if (null === lanes)\n            if (null === finishedWork.stateNode)\n              if (offscreenSubtreeIsHidden)\n                finishedWork.stateNode = createHoistableInstance(\n                  finishedWork.type,\n                  finishedWork.memoizedProps,\n                  root.containerInfo,\n                  finishedWork\n                );\n              else {\n                a: {\n                  root = finishedWork.type;\n                  lanes = finishedWork.memoizedProps;\n                  flags = ii.ownerDocument || ii;\n                  b: switch (root) {\n                    case \"title\":\n                      current = flags.getElementsByTagName(\"title\")[0];\n                      if (\n                        !current ||\n                        current[internalHoistableMarker] ||\n                        current[internalInstanceKey] ||\n                        \"http://www.w3.org/2000/svg\" === current.namespaceURI ||\n                        current.hasAttribute(\"itemprop\")\n                      )\n                        (current = flags.createElement(root)),\n                          flags.head.insertBefore(\n                            current,\n                            flags.querySelector(\"head > title\")\n                          );\n                      setInitialProperties(current, root, lanes);\n                      current[internalInstanceKey] = finishedWork;\n                      markNodeAsHoistable(current);\n                      root = current;\n                      break a;\n                    case \"link\":\n                      if (\n                        (ii = getHydratableHoistableCache(\n                          \"link\",\n                          \"href\",\n                          flags\n                        ).get(root + (lanes.href || \"\")))\n                      )\n                        for (\n                          _eventPayloads$ii2 = 0;\n                          _eventPayloads$ii2 < ii.length;\n                          _eventPayloads$ii2++\n                        )\n                          if (\n                            ((current = ii[_eventPayloads$ii2]),\n                            current.getAttribute(\"href\") ===\n                              (null == lanes.href || \"\" === lanes.href\n                                ? null\n                                : lanes.href) &&\n                              current.getAttribute(\"rel\") ===\n                                (null == lanes.rel ? null : lanes.rel) &&\n                              current.getAttribute(\"title\") ===\n                                (null == lanes.title ? null : lanes.title) &&\n                              current.getAttribute(\"crossorigin\") ===\n                                (null == lanes.crossOrigin\n                                  ? null\n                                  : lanes.crossOrigin))\n                          ) {\n                            ii.splice(_eventPayloads$ii2, 1);\n                            break b;\n                          }\n                      current = flags.createElement(root);\n                      setInitialProperties(current, root, lanes);\n                      flags.head.appendChild(current);\n                      break;\n                    case \"meta\":\n                      if (\n                        (ii = getHydratableHoistableCache(\n                          \"meta\",\n                          \"content\",\n                          flags\n                        ).get(root + (lanes.content || \"\")))\n                      )\n                        for (\n                          _eventPayloads$ii2 = 0;\n                          _eventPayloads$ii2 < ii.length;\n                          _eventPayloads$ii2++\n                        )\n                          if (\n                            ((current = ii[_eventPayloads$ii2]),\n                            current.getAttribute(\"content\") ===\n                              (null == lanes.content\n                                ? null\n                                : \"\" + lanes.content) &&\n                              current.getAttribute(\"name\") ===\n                                (null == lanes.name ? null : lanes.name) &&\n                              current.getAttribute(\"property\") ===\n                                (null == lanes.property\n                                  ? null\n                                  : lanes.property) &&\n                              current.getAttribute(\"http-equiv\") ===\n                                (null == lanes.httpEquiv\n                                  ? null\n                                  : lanes.httpEquiv) &&\n                              current.getAttribute(\"charset\") ===\n                                (null == lanes.charSet ? null : lanes.charSet))\n                          ) {\n                            ii.splice(_eventPayloads$ii2, 1);\n                            break b;\n                          }\n                      current = flags.createElement(root);\n                      setInitialProperties(current, root, lanes);\n                      flags.head.appendChild(current);\n                      break;\n                    default:\n                      throw Error(formatProdErrorMessage(468, root));\n                  }\n                  current[internalInstanceKey] = finishedWork;\n                  markNodeAsHoistable(current);\n                  root = current;\n                }\n                finishedWork.stateNode = root;\n              }\n            else\n              offscreenSubtreeIsHidden ||\n                mountHoistable(ii, finishedWork.type, finishedWork.stateNode);\n          else\n            finishedWork.stateNode = acquireResource(\n              ii,\n              lanes,\n              finishedWork.memoizedProps\n            );\n        else\n          flags !== lanes\n            ? (null === flags\n                ? ((root = current.stateNode),\n                  null === root ||\n                    offscreenSubtreeWasHidden ||\n                    root.parentNode.removeChild(root))\n                : flags.count--,\n              null === lanes\n                ? offscreenSubtreeIsHidden ||\n                  mountHoistable(ii, finishedWork.type, finishedWork.stateNode)\n                : acquireResource(ii, lanes, finishedWork.memoizedProps))\n            : null === lanes &&\n              null !== finishedWork.stateNode &&\n              commitHostUpdate(\n                finishedWork,\n                finishedWork.memoizedProps,\n                current.memoizedProps\n              );\n      break;\n    case 27:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return));\n      null !== current &&\n        flags & 4 &&\n        commitHostUpdate(\n          finishedWork,\n          finishedWork.memoizedProps,\n          current.memoizedProps\n        );\n      break;\n    case 5:\n      ii = offscreenDirectParentIsHidden;\n      offscreenDirectParentIsHidden = !1;\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      offscreenDirectParentIsHidden = ii;\n      commitReconciliationEffects(finishedWork);\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return));\n      if (finishedWork.flags & 32) {\n        root = finishedWork.stateNode;\n        try {\n          setTextContent(root, \"\"), (viewTransitionMutationContext = !0);\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      }\n      flags & 4 &&\n        null != finishedWork.stateNode &&\n        ((root = finishedWork.memoizedProps),\n        commitHostUpdate(\n          finishedWork,\n          root,\n          null !== current ? current.memoizedProps : root\n        ));\n      flags & 1024 && (needsFormReset = !0);\n      break;\n    case 6:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      if (flags & 4) {\n        if (null === finishedWork.stateNode)\n          throw Error(formatProdErrorMessage(162));\n        root = finishedWork.memoizedProps;\n        lanes = finishedWork.stateNode;\n        try {\n          (lanes.nodeValue = root), (viewTransitionMutationContext = !0);\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      }\n      break;\n    case 3:\n      viewTransitionMutationContext = !1;\n      tagCaches = null;\n      ii = currentHoistableRoot;\n      currentHoistableRoot = getHoistableRoot(root.containerInfo);\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      currentHoistableRoot = ii;\n      commitReconciliationEffects(finishedWork);\n      if (flags & 4 && null !== current && current.memoizedState.isDehydrated)\n        try {\n          retryIfBlockedOn(root.containerInfo);\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      needsFormReset &&\n        ((needsFormReset = !1), recursivelyResetForms(finishedWork));\n      viewTransitionMutationContext = !1;\n      break;\n    case 4:\n      flags = offscreenDirectParentIsHidden;\n      offscreenDirectParentIsHidden = offscreenSubtreeIsHidden;\n      current = pushMutationContext();\n      ii = currentHoistableRoot;\n      currentHoistableRoot = getHoistableRoot(\n        finishedWork.stateNode.containerInfo\n      );\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      currentHoistableRoot = ii;\n      viewTransitionMutationContext &&\n        inUpdateViewTransition &&\n        (rootViewTransitionAffected = !0);\n      viewTransitionMutationContext = current;\n      offscreenDirectParentIsHidden = flags;\n      break;\n    case 12:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      break;\n    case 31:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 4 &&\n        ((root = finishedWork.updateQueue),\n        null !== root &&\n          ((finishedWork.updateQueue = null),\n          attachSuspenseRetryListeners(finishedWork, root)));\n      break;\n    case 13:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      finishedWork.child.flags & 8192 &&\n        (null !== finishedWork.memoizedState) !==\n          (null !== current && null !== current.memoizedState) &&\n        (globalMostRecentFallbackTime = now());\n      flags & 4 &&\n        ((root = finishedWork.updateQueue),\n        null !== root &&\n          ((finishedWork.updateQueue = null),\n          attachSuspenseRetryListeners(finishedWork, root)));\n      break;\n    case 22:\n      ii = null !== finishedWork.memoizedState;\n      _eventPayloads$ii2 = null !== current && null !== current.memoizedState;\n      var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n        prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden,\n        prevOffscreenDirectParentIsHidden$166 = offscreenDirectParentIsHidden;\n      offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || ii;\n      offscreenDirectParentIsHidden =\n        prevOffscreenDirectParentIsHidden$166 || ii;\n      offscreenSubtreeWasHidden =\n        prevOffscreenSubtreeWasHidden || _eventPayloads$ii2;\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n      offscreenDirectParentIsHidden = prevOffscreenDirectParentIsHidden$166;\n      offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n      commitReconciliationEffects(finishedWork);\n      flags & 8192 &&\n        ((root = finishedWork.stateNode),\n        (root._visibility = ii ? root._visibility & -2 : root._visibility | 1),\n        !ii ||\n          null === current ||\n          _eventPayloads$ii2 ||\n          offscreenSubtreeIsHidden ||\n          offscreenSubtreeWasHidden ||\n          ((root = _eventPayloads$ii2 || offscreenSubtreeWasHidden),\n          (lanes = offscreenSubtreeIsHidden),\n          (current = offscreenSubtreeWasHidden),\n          (offscreenSubtreeIsHidden = ii || offscreenSubtreeIsHidden),\n          (offscreenSubtreeWasHidden = root),\n          recursivelyTraverseDisappearLayoutEffects(finishedWork, 2),\n          (offscreenSubtreeIsHidden = lanes),\n          (offscreenSubtreeWasHidden = current)),\n        (!ii && offscreenDirectParentIsHidden) ||\n          hideOrUnhideAllChildren(finishedWork, ii));\n      flags & 4 &&\n        ((root = finishedWork.updateQueue),\n        null !== root &&\n          ((lanes = root.retryQueue),\n          null !== lanes &&\n            ((root.retryQueue = null),\n            attachSuspenseRetryListeners(finishedWork, lanes))));\n      break;\n    case 19:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      flags & 4 &&\n        ((root = finishedWork.updateQueue),\n        null !== root &&\n          ((finishedWork.updateQueue = null),\n          attachSuspenseRetryListeners(finishedWork, root)));\n      break;\n    case 30:\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return));\n      flags = pushMutationContext();\n      ii = inUpdateViewTransition;\n      _eventPayloads$ii2 = (lanes & 335544064) === lanes;\n      prevOffscreenSubtreeIsHidden = finishedWork.memoizedProps;\n      inUpdateViewTransition =\n        _eventPayloads$ii2 &&\n        \"none\" !==\n          getViewTransitionClassName(\n            prevOffscreenSubtreeIsHidden.default,\n            prevOffscreenSubtreeIsHidden.update\n          );\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes);\n      commitReconciliationEffects(finishedWork);\n      _eventPayloads$ii2 &&\n        null !== current &&\n        viewTransitionMutationContext &&\n        (finishedWork.flags |= 4);\n      inUpdateViewTransition = ii;\n      viewTransitionMutationContext = flags;\n      break;\n    case 21:\n      break;\n    case 7:\n      flags & 512 &&\n        (offscreenSubtreeWasHidden ||\n          null === current ||\n          safelyDetachRef(current, current.return)),\n        current &&\n          null !== current.stateNode &&\n          (current.stateNode._fragmentFiber = finishedWork);\n    default:\n      recursivelyTraverseMutationEffects(root, finishedWork, lanes),\n        commitReconciliationEffects(finishedWork);\n  }\n}\nfunction commitReconciliationEffects(finishedWork) {\n  var flags = finishedWork.flags;\n  if (flags & 2) {\n    try {\n      for (\n        var hostParentFiber, parentFiber = finishedWork.return;\n        null !== parentFiber;\n\n      ) {\n        if (isHostParent(parentFiber)) {\n          hostParentFiber = parentFiber;\n          break;\n        }\n        parentFiber = parentFiber.return;\n      }\n      parentFiber = null;\n      for (var parent = finishedWork.return; null !== parent; ) {\n        if (isFragmentInstanceParent(parent)) {\n          var fragmentInstance = parent.stateNode;\n          null === parentFiber\n            ? (parentFiber = [fragmentInstance])\n            : parentFiber.push(fragmentInstance);\n        }\n        if (isFragmentInstanceHostBoundary(parent)) break;\n        parent = parent.return;\n      }\n      var JSCompiler_inline_result = parentFiber;\n      if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));\n      switch (hostParentFiber.tag) {\n        case 27:\n          var parent$jscomp$0 = hostParentFiber.stateNode,\n            before = getHostSibling(finishedWork);\n          insertOrAppendPlacementNode(\n            finishedWork,\n            before,\n            parent$jscomp$0,\n            JSCompiler_inline_result\n          );\n          break;\n        case 5:\n          var parent$149 = hostParentFiber.stateNode;\n          hostParentFiber.flags & 32 &&\n            (setTextContent(parent$149, \"\"), (hostParentFiber.flags &= -33));\n          var before$150 = getHostSibling(finishedWork);\n          insertOrAppendPlacementNode(\n            finishedWork,\n            before$150,\n            parent$149,\n            JSCompiler_inline_result\n          );\n          break;\n        case 3:\n        case 4:\n          var parent$151 = hostParentFiber.stateNode.containerInfo,\n            before$152 = getHostSibling(finishedWork);\n          insertOrAppendPlacementNodeIntoContainer(\n            finishedWork,\n            before$152,\n            parent$151,\n            JSCompiler_inline_result\n          );\n          break;\n        default:\n          throw Error(formatProdErrorMessage(161));\n      }\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    }\n    finishedWork.flags &= -3;\n  }\n  flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyResetForms(parentFiber) {\n  if (parentFiber.subtreeFlags & 1024)\n    for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n      var fiber = parentFiber;\n      recursivelyResetForms(fiber);\n      5 === fiber.tag &&\n        fiber.flags & 1024 &&\n        ((fiber = fiber.stateNode),\n        (_enabled = !0),\n        fiber.reset(),\n        (_enabled = !1));\n      parentFiber = parentFiber.sibling;\n    }\n}\nfunction recursivelyTraverseAfterMutationEffects(root, parentFiber) {\n  if (parentFiber.subtreeFlags & 9270)\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      commitAfterMutationEffectsOnFiber(parentFiber, root),\n        (parentFiber = parentFiber.sibling);\n  else measureNestedViewTransitions(parentFiber, !1);\n}\nfunction commitAfterMutationEffectsOnFiber(finishedWork, root) {\n  var current = finishedWork.alternate;\n  if (null === current) commitEnterViewTransitions(finishedWork, !1);\n  else\n    switch (finishedWork.tag) {\n      case 3:\n        rootViewTransitionNameCanceled = viewTransitionContextChanged = !1;\n        pushViewTransitionCancelableScope();\n        recursivelyTraverseAfterMutationEffects(root, finishedWork);\n        if (!viewTransitionContextChanged && !rootViewTransitionAffected) {\n          finishedWork = viewTransitionCancelableChildren;\n          if (null !== finishedWork)\n            for (var i = 0; i < finishedWork.length; i += 3) {\n              current = finishedWork[i];\n              var oldName = finishedWork[i + 1];\n              restoreViewTransitionName(current, finishedWork[i + 2]);\n              current = current.ownerDocument.documentElement;\n              null !== current &&\n                current.animate(\n                  { opacity: [0, 0], pointerEvents: [\"none\", \"none\"] },\n                  {\n                    duration: 0,\n                    fill: \"forwards\",\n                    pseudoElement: \"::view-transition-group(\" + oldName + \")\"\n                  }\n                );\n            }\n          finishedWork = root.containerInfo;\n          finishedWork =\n            9 === finishedWork.nodeType\n              ? finishedWork.documentElement\n              : finishedWork.ownerDocument.documentElement;\n          null !== finishedWork &&\n            \"\" === finishedWork.style.viewTransitionName &&\n            ((finishedWork.style.viewTransitionName = \"none\"),\n            finishedWork.animate(\n              { opacity: [0, 0], pointerEvents: [\"none\", \"none\"] },\n              {\n                duration: 0,\n                fill: \"forwards\",\n                pseudoElement: \"::view-transition-group(root)\"\n              }\n            ),\n            finishedWork.animate(\n              { width: [0, 0], height: [0, 0] },\n              {\n                duration: 0,\n                fill: \"forwards\",\n                pseudoElement: \"::view-transition\"\n              }\n            ));\n          rootViewTransitionNameCanceled = !0;\n        }\n        viewTransitionCancelableChildren = null;\n        break;\n      case 5:\n        recursivelyTraverseAfterMutationEffects(root, finishedWork);\n        break;\n      case 4:\n        i = viewTransitionContextChanged;\n        viewTransitionContextChanged = !1;\n        recursivelyTraverseAfterMutationEffects(root, finishedWork);\n        viewTransitionContextChanged && (rootViewTransitionAffected = !0);\n        viewTransitionContextChanged = i;\n        break;\n      case 22:\n        null === finishedWork.memoizedState &&\n          (null !== current.memoizedState\n            ? commitEnterViewTransitions(finishedWork, !1)\n            : recursivelyTraverseAfterMutationEffects(root, finishedWork));\n        break;\n      case 30:\n        i = viewTransitionContextChanged;\n        oldName = pushViewTransitionCancelableScope();\n        viewTransitionContextChanged = !1;\n        recursivelyTraverseAfterMutationEffects(root, finishedWork);\n        viewTransitionContextChanged && (finishedWork.flags |= 4);\n        var props = finishedWork.memoizedProps,\n          state = finishedWork.stateNode;\n        root = getViewTransitionName(props, state);\n        state = getViewTransitionName(current.memoizedProps, state);\n        var className = getViewTransitionClassName(props.default, props.update);\n        \"none\" === className\n          ? (root = !1)\n          : ((props = current.memoizedState),\n            (current.memoizedState = null),\n            (current = finishedWork.child),\n            (viewTransitionHostInstanceIdx = 0),\n            (root = measureViewTransitionHostInstancesRecursive(\n              finishedWork,\n              current,\n              root,\n              state,\n              className,\n              props,\n              !0\n            )),\n            viewTransitionHostInstanceIdx !==\n              (null === props ? 0 : props.length) &&\n              (finishedWork.flags |= 32));\n        0 !== (finishedWork.flags & 4) && root\n          ? (scheduleViewTransitionEvent(\n              finishedWork,\n              finishedWork.memoizedProps.onUpdate\n            ),\n            (viewTransitionCancelableChildren = oldName))\n          : null !== oldName &&\n            (oldName.push.apply(oldName, viewTransitionCancelableChildren),\n            (viewTransitionCancelableChildren = oldName));\n        viewTransitionContextChanged = 0 !== (finishedWork.flags & 32) ? !0 : i;\n        break;\n      default:\n        recursivelyTraverseAfterMutationEffects(root, finishedWork);\n    }\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n  if (parentFiber.subtreeFlags & 8772)\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n        (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(\n  parentFiber,\n  layoutEffectTraversalFlags$jscomp$0\n) {\n  for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n    var finishedWork = parentFiber,\n      layoutEffectTraversalFlags = layoutEffectTraversalFlags$jscomp$0;\n    switch (finishedWork.tag) {\n      case 0:\n      case 11:\n      case 14:\n      case 15:\n        commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 1:\n        safelyDetachRef(finishedWork, finishedWork.return);\n        var instance = finishedWork.stateNode;\n        \"function\" === typeof instance.componentWillUnmount &&\n          safelyCallComponentWillUnmount(\n            finishedWork,\n            finishedWork.return,\n            instance\n          );\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 27:\n        0 !== (layoutEffectTraversalFlags & 2) &&\n          releaseSingletonInstance(\n            finishedWork.stateNode,\n            finishedWork.type,\n            finishedWork.memoizedProps\n          );\n      case 5:\n        safelyDetachRef(finishedWork, finishedWork.return);\n        (5 !== finishedWork.tag && 27 !== finishedWork.tag) ||\n          commitFragmentInstanceDeletionEffects(finishedWork);\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 6:\n        commitFragmentInstanceDeletionEffects(finishedWork);\n        break;\n      case 26:\n        safelyDetachRef(finishedWork, finishedWork.return);\n        instance = finishedWork.stateNode;\n        null !== finishedWork.memoizedState ||\n          null === instance ||\n          offscreenSubtreeWasHidden ||\n          instance.parentNode.removeChild(instance);\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 22:\n        null === finishedWork.memoizedState &&\n          recursivelyTraverseDisappearLayoutEffects(\n            finishedWork,\n            layoutEffectTraversalFlags\n          );\n        break;\n      case 30:\n        safelyDetachRef(finishedWork, finishedWork.return);\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 7:\n        safelyDetachRef(finishedWork, finishedWork.return);\n      default:\n        recursivelyTraverseDisappearLayoutEffects(\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n    }\n    parentFiber = parentFiber.sibling;\n  }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n  finishedRoot$jscomp$0,\n  parentFiber,\n  layoutEffectTraversalFlags\n) {\n  layoutEffectTraversalFlags =\n    0 !== (parentFiber.subtreeFlags & 8772)\n      ? layoutEffectTraversalFlags\n      : layoutEffectTraversalFlags & -2;\n  for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n    var current = parentFiber.alternate,\n      finishedRoot = finishedRoot$jscomp$0,\n      finishedWork = parentFiber,\n      flags = finishedWork.flags,\n      includeWorkInProgressEffects = 0 !== (layoutEffectTraversalFlags & 1);\n    switch (finishedWork.tag) {\n      case 0:\n      case 11:\n      case 15:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        commitHookEffectListMount(4, finishedWork);\n        break;\n      case 1:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        current = finishedWork;\n        finishedRoot = current.stateNode;\n        if (\"function\" === typeof finishedRoot.componentDidMount)\n          try {\n            finishedRoot.componentDidMount();\n          } catch (error) {\n            captureCommitPhaseError(current, current.return, error);\n          }\n        current = finishedWork;\n        finishedRoot = current.updateQueue;\n        if (null !== finishedRoot) {\n          var instance = current.stateNode;\n          try {\n            var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;\n            if (null !== hiddenCallbacks)\n              for (\n                finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;\n                finishedRoot < hiddenCallbacks.length;\n                finishedRoot++\n              )\n                callCallback(hiddenCallbacks[finishedRoot], instance);\n          } catch (error) {\n            captureCommitPhaseError(current, current.return, error);\n          }\n        }\n        includeWorkInProgressEffects &&\n          flags & 64 &&\n          commitClassCallbacks(finishedWork);\n        safelyAttachRef(finishedWork, finishedWork.return);\n        break;\n      case 27:\n        0 !== (layoutEffectTraversalFlags & 2) &&\n          commitHostSingletonAcquisition(finishedWork);\n      case 5:\n        (5 !== finishedWork.tag && 27 !== finishedWork.tag) ||\n          commitFragmentInstanceInsertionEffects(finishedWork);\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        includeWorkInProgressEffects &&\n          null === current &&\n          flags & 4 &&\n          commitHostMount(finishedWork);\n        safelyAttachRef(finishedWork, finishedWork.return);\n        break;\n      case 6:\n        commitFragmentInstanceInsertionEffects(finishedWork);\n        break;\n      case 26:\n        instance = finishedWork.stateNode;\n        null !== finishedWork.memoizedState ||\n          null === instance ||\n          offscreenSubtreeIsHidden ||\n          mountHoistable(\n            getHoistableRoot(instance.ownerDocument),\n            finishedWork.type,\n            instance\n          );\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        includeWorkInProgressEffects &&\n          null === current &&\n          flags & 4 &&\n          commitHostMount(finishedWork);\n        safelyAttachRef(finishedWork, finishedWork.return);\n        break;\n      case 12:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        break;\n      case 31:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        includeWorkInProgressEffects &&\n          flags & 4 &&\n          commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n        break;\n      case 13:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        includeWorkInProgressEffects &&\n          flags & 4 &&\n          commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n        break;\n      case 22:\n        null === finishedWork.memoizedState &&\n          recursivelyTraverseReappearLayoutEffects(\n            finishedRoot,\n            finishedWork,\n            layoutEffectTraversalFlags\n          );\n        safelyAttachRef(finishedWork, finishedWork.return);\n        break;\n      case 30:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n        safelyAttachRef(finishedWork, finishedWork.return);\n        break;\n      case 7:\n        safelyAttachRef(finishedWork, finishedWork.return);\n      default:\n        recursivelyTraverseReappearLayoutEffects(\n          finishedRoot,\n          finishedWork,\n          layoutEffectTraversalFlags\n        );\n    }\n    parentFiber = parentFiber.sibling;\n  }\n}\nfunction commitOffscreenPassiveMountEffects(current, finishedWork) {\n  var previousCache = null;\n  null !== current &&\n    null !== current.memoizedState &&\n    null !== current.memoizedState.cachePool &&\n    (previousCache = current.memoizedState.cachePool.pool);\n  current = null;\n  null !== finishedWork.memoizedState &&\n    null !== finishedWork.memoizedState.cachePool &&\n    (current = finishedWork.memoizedState.cachePool.pool);\n  current !== previousCache &&\n    (null != current && current.refCount++,\n    null != previousCache && releaseCache(previousCache));\n}\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n  current = null;\n  null !== finishedWork.alternate &&\n    (current = finishedWork.alternate.memoizedState.cache);\n  finishedWork = finishedWork.memoizedState.cache;\n  finishedWork !== current &&\n    (finishedWork.refCount++, null != current && releaseCache(current));\n}\nfunction recursivelyTraversePassiveMountEffects(\n  root,\n  parentFiber,\n  committedLanes,\n  committedTransitions\n) {\n  var isViewTransitionEligible =\n    (committedLanes & 335544064) === committedLanes;\n  if (parentFiber.subtreeFlags & (isViewTransitionEligible ? 10262 : 10256))\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      commitPassiveMountOnFiber(\n        root,\n        parentFiber,\n        committedLanes,\n        committedTransitions\n      ),\n        (parentFiber = parentFiber.sibling);\n  else isViewTransitionEligible && restoreNestedViewTransitions(parentFiber);\n}\nfunction commitPassiveMountOnFiber(\n  finishedRoot,\n  finishedWork,\n  committedLanes,\n  committedTransitions\n) {\n  var isViewTransitionEligible =\n    (committedLanes & 335544064) === committedLanes;\n  isViewTransitionEligible &&\n    null === finishedWork.alternate &&\n    null !== finishedWork.return &&\n    null !== finishedWork.return.alternate &&\n    restoreEnterOrExitViewTransitions(finishedWork);\n  var flags = finishedWork.flags;\n  switch (finishedWork.tag) {\n    case 0:\n    case 11:\n    case 15:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      flags & 2048 && commitHookEffectListMount(9, finishedWork);\n      break;\n    case 1:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      break;\n    case 3:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      isViewTransitionEligible &&\n        rootViewTransitionNameCanceled &&\n        ((finishedRoot = finishedRoot.containerInfo),\n        (finishedRoot =\n          9 === finishedRoot.nodeType\n            ? finishedRoot.body\n            : \"HTML\" === finishedRoot.nodeName\n              ? finishedRoot.ownerDocument.body\n              : finishedRoot),\n        \"root\" === finishedRoot.style.viewTransitionName &&\n          (finishedRoot.style.viewTransitionName = \"\"),\n        (finishedRoot = finishedRoot.ownerDocument.documentElement),\n        null !== finishedRoot &&\n          \"none\" === finishedRoot.style.viewTransitionName &&\n          (finishedRoot.style.viewTransitionName = \"\"));\n      flags & 2048 &&\n        ((flags = null),\n        null !== finishedWork.alternate &&\n          (flags = finishedWork.alternate.memoizedState.cache),\n        (finishedWork = finishedWork.memoizedState.cache),\n        finishedWork !== flags &&\n          (finishedWork.refCount++, null != flags && releaseCache(flags)));\n      break;\n    case 12:\n      if (flags & 2048) {\n        recursivelyTraversePassiveMountEffects(\n          finishedRoot,\n          finishedWork,\n          committedLanes,\n          committedTransitions\n        );\n        flags = finishedWork.stateNode;\n        try {\n          var _finishedWork$memoize2 = finishedWork.memoizedProps,\n            id = _finishedWork$memoize2.id,\n            onPostCommit = _finishedWork$memoize2.onPostCommit;\n          \"function\" === typeof onPostCommit &&\n            onPostCommit(\n              id,\n              null === finishedWork.alternate ? \"mount\" : \"update\",\n              flags.passiveEffectDuration,\n              -0\n            );\n        } catch (error) {\n          captureCommitPhaseError(finishedWork, finishedWork.return, error);\n        }\n      } else\n        recursivelyTraversePassiveMountEffects(\n          finishedRoot,\n          finishedWork,\n          committedLanes,\n          committedTransitions\n        );\n      break;\n    case 31:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      break;\n    case 13:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      break;\n    case 23:\n      break;\n    case 22:\n      _finishedWork$memoize2 = finishedWork.stateNode;\n      id = finishedWork.alternate;\n      null !== finishedWork.memoizedState\n        ? (isViewTransitionEligible &&\n            null !== id &&\n            null === id.memoizedState &&\n            restoreEnterOrExitViewTransitions(id),\n          _finishedWork$memoize2._visibility & 2\n            ? recursivelyTraversePassiveMountEffects(\n                finishedRoot,\n                finishedWork,\n                committedLanes,\n                committedTransitions\n              )\n            : recursivelyTraverseAtomicPassiveEffects(\n                finishedRoot,\n                finishedWork\n              ))\n        : (isViewTransitionEligible &&\n            null !== id &&\n            null !== id.memoizedState &&\n            restoreEnterOrExitViewTransitions(finishedWork),\n          _finishedWork$memoize2._visibility & 2\n            ? recursivelyTraversePassiveMountEffects(\n                finishedRoot,\n                finishedWork,\n                committedLanes,\n                committedTransitions\n              )\n            : ((_finishedWork$memoize2._visibility |= 2),\n              recursivelyTraverseReconnectPassiveEffects(\n                finishedRoot,\n                finishedWork,\n                committedLanes,\n                committedTransitions,\n                0 !== (finishedWork.subtreeFlags & 10256) || !1\n              )));\n      flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);\n      break;\n    case 24:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      flags & 2048 &&\n        commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n      break;\n    case 30:\n      isViewTransitionEligible &&\n        ((flags = finishedWork.alternate),\n        null !== flags &&\n          (restoreViewTransitionOnHostInstances(flags.child, !0),\n          restoreViewTransitionOnHostInstances(finishedWork.child, !0)));\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n      break;\n    default:\n      recursivelyTraversePassiveMountEffects(\n        finishedRoot,\n        finishedWork,\n        committedLanes,\n        committedTransitions\n      );\n  }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n  finishedRoot$jscomp$0,\n  parentFiber,\n  committedLanes$jscomp$0,\n  committedTransitions$jscomp$0,\n  includeWorkInProgressEffects\n) {\n  includeWorkInProgressEffects =\n    includeWorkInProgressEffects &&\n    (0 !== (parentFiber.subtreeFlags & 10256) || !1);\n  for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n    var finishedRoot = finishedRoot$jscomp$0,\n      finishedWork = parentFiber,\n      committedLanes = committedLanes$jscomp$0,\n      committedTransitions = committedTransitions$jscomp$0,\n      flags = finishedWork.flags;\n    switch (finishedWork.tag) {\n      case 0:\n      case 11:\n      case 15:\n        recursivelyTraverseReconnectPassiveEffects(\n          finishedRoot,\n          finishedWork,\n          committedLanes,\n          committedTransitions,\n          includeWorkInProgressEffects\n        );\n        commitHookEffectListMount(8, finishedWork);\n        break;\n      case 23:\n        break;\n      case 22:\n        var instance = finishedWork.stateNode;\n        null !== finishedWork.memoizedState\n          ? instance._visibility & 2\n            ? recursivelyTraverseReconnectPassiveEffects(\n                finishedRoot,\n                finishedWork,\n                committedLanes,\n                committedTransitions,\n                includeWorkInProgressEffects\n              )\n            : recursivelyTraverseAtomicPassiveEffects(\n                finishedRoot,\n                finishedWork\n              )\n          : ((instance._visibility |= 2),\n            recursivelyTraverseReconnectPassiveEffects(\n              finishedRoot,\n              finishedWork,\n              committedLanes,\n              committedTransitions,\n              includeWorkInProgressEffects\n            ));\n        includeWorkInProgressEffects &&\n          flags & 2048 &&\n          commitOffscreenPassiveMountEffects(\n            finishedWork.alternate,\n            finishedWork\n          );\n        break;\n      case 24:\n        recursivelyTraverseReconnectPassiveEffects(\n          finishedRoot,\n          finishedWork,\n          committedLanes,\n          committedTransitions,\n          includeWorkInProgressEffects\n        );\n        includeWorkInProgressEffects &&\n          flags & 2048 &&\n          commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n        break;\n      default:\n        recursivelyTraverseReconnectPassiveEffects(\n          finishedRoot,\n          finishedWork,\n          committedLanes,\n          committedTransitions,\n          includeWorkInProgressEffects\n        );\n    }\n    parentFiber = parentFiber.sibling;\n  }\n}\nfunction recursivelyTraverseAtomicPassiveEffects(\n  finishedRoot$jscomp$0,\n  parentFiber\n) {\n  if (parentFiber.subtreeFlags & 10256)\n    for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n      var finishedRoot = finishedRoot$jscomp$0,\n        finishedWork = parentFiber,\n        flags = finishedWork.flags;\n      switch (finishedWork.tag) {\n        case 22:\n          recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n          flags & 2048 &&\n            commitOffscreenPassiveMountEffects(\n              finishedWork.alternate,\n              finishedWork\n            );\n          break;\n        case 24:\n          recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n          flags & 2048 &&\n            commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n          break;\n        default:\n          recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n      }\n      parentFiber = parentFiber.sibling;\n    }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(\n  parentFiber,\n  committedLanes,\n  suspendedState\n) {\n  if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      accumulateSuspenseyCommitOnFiber(\n        parentFiber,\n        committedLanes,\n        suspendedState\n      ),\n        (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(\n  fiber,\n  committedLanes,\n  suspendedState\n) {\n  switch (fiber.tag) {\n    case 26:\n      recursivelyAccumulateSuspenseyCommit(\n        fiber,\n        committedLanes,\n        suspendedState\n      );\n      fiber.flags & suspenseyCommitFlag &&\n        (null !== fiber.memoizedState\n          ? suspendResource(\n              suspendedState,\n              currentHoistableRoot,\n              fiber.memoizedState,\n              fiber.memoizedProps\n            )\n          : ((fiber = fiber.stateNode),\n            (committedLanes & 335544128) === committedLanes &&\n              suspendInstance(suspendedState, fiber)));\n      break;\n    case 5:\n      recursivelyAccumulateSuspenseyCommit(\n        fiber,\n        committedLanes,\n        suspendedState\n      );\n      fiber.flags & suspenseyCommitFlag &&\n        ((fiber = fiber.stateNode),\n        (committedLanes & 335544128) === committedLanes &&\n          suspendInstance(suspendedState, fiber));\n      break;\n    case 3:\n    case 4:\n      var previousHoistableRoot = currentHoistableRoot;\n      currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);\n      recursivelyAccumulateSuspenseyCommit(\n        fiber,\n        committedLanes,\n        suspendedState\n      );\n      currentHoistableRoot = previousHoistableRoot;\n      break;\n    case 22:\n      null === fiber.memoizedState &&\n        ((previousHoistableRoot = fiber.alternate),\n        null !== previousHoistableRoot &&\n        null !== previousHoistableRoot.memoizedState\n          ? ((previousHoistableRoot = suspenseyCommitFlag),\n            (suspenseyCommitFlag = 16777216),\n            recursivelyAccumulateSuspenseyCommit(\n              fiber,\n              committedLanes,\n              suspendedState\n            ),\n            (suspenseyCommitFlag = previousHoistableRoot))\n          : recursivelyAccumulateSuspenseyCommit(\n              fiber,\n              committedLanes,\n              suspendedState\n            ));\n      break;\n    case 30:\n      if (\n        0 !== (fiber.flags & suspenseyCommitFlag) &&\n        ((previousHoistableRoot = fiber.memoizedProps.name),\n        null != previousHoistableRoot && \"auto\" !== previousHoistableRoot)\n      ) {\n        var state = fiber.stateNode;\n        state.paired = null;\n        null === appearingViewTransitions &&\n          (appearingViewTransitions = new Map());\n        appearingViewTransitions.set(previousHoistableRoot, state);\n      }\n      recursivelyAccumulateSuspenseyCommit(\n        fiber,\n        committedLanes,\n        suspendedState\n      );\n      break;\n    default:\n      recursivelyAccumulateSuspenseyCommit(\n        fiber,\n        committedLanes,\n        suspendedState\n      );\n  }\n}\nfunction detachAlternateSiblings(parentFiber) {\n  var previousFiber = parentFiber.alternate;\n  if (\n    null !== previousFiber &&\n    ((parentFiber = previousFiber.child), null !== parentFiber)\n  ) {\n    previousFiber.child = null;\n    do\n      (previousFiber = parentFiber.sibling),\n        (parentFiber.sibling = null),\n        (parentFiber = previousFiber);\n    while (null !== parentFiber);\n  }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n  var deletions = parentFiber.deletions;\n  if (0 !== (parentFiber.flags & 16)) {\n    if (null !== deletions)\n      for (var i = 0; i < deletions.length; i++) {\n        var childToDelete = deletions[i];\n        nextEffect = childToDelete;\n        commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n          childToDelete,\n          parentFiber\n        );\n      }\n    detachAlternateSiblings(parentFiber);\n  }\n  if (parentFiber.subtreeFlags & 10256)\n    for (parentFiber = parentFiber.child; null !== parentFiber; )\n      commitPassiveUnmountOnFiber(parentFiber),\n        (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n  switch (finishedWork.tag) {\n    case 0:\n    case 11:\n    case 15:\n      recursivelyTraversePassiveUnmountEffects(finishedWork);\n      finishedWork.flags & 2048 &&\n        commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n      break;\n    case 3:\n      recursivelyTraversePassiveUnmountEffects(finishedWork);\n      break;\n    case 12:\n      recursivelyTraversePassiveUnmountEffects(finishedWork);\n      break;\n    case 22:\n      var instance = finishedWork.stateNode;\n      null !== finishedWork.memoizedState &&\n      instance._visibility & 2 &&\n      (null === finishedWork.return || 13 !== finishedWork.return.tag)\n        ? ((instance._visibility &= -3),\n          recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n        : recursivelyTraversePassiveUnmountEffects(finishedWork);\n      break;\n    default:\n      recursivelyTraversePassiveUnmountEffects(finishedWork);\n  }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n  var deletions = parentFiber.deletions;\n  if (0 !== (parentFiber.flags & 16)) {\n    if (null !== deletions)\n      for (var i = 0; i < deletions.length; i++) {\n        var childToDelete = deletions[i];\n        nextEffect = childToDelete;\n        commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n          childToDelete,\n          parentFiber\n        );\n      }\n    detachAlternateSiblings(parentFiber);\n  }\n  for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n    deletions = parentFiber;\n    switch (deletions.tag) {\n      case 0:\n      case 11:\n      case 15:\n        commitHookEffectListUnmount(8, deletions, deletions.return);\n        recursivelyTraverseDisconnectPassiveEffects(deletions);\n        break;\n      case 22:\n        i = deletions.stateNode;\n        i._visibility & 2 &&\n          ((i._visibility &= -3),\n          recursivelyTraverseDisconnectPassiveEffects(deletions));\n        break;\n      default:\n        recursivelyTraverseDisconnectPassiveEffects(deletions);\n    }\n    parentFiber = parentFiber.sibling;\n  }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n  deletedSubtreeRoot,\n  nearestMountedAncestor\n) {\n  for (; null !== nextEffect; ) {\n    var fiber = nextEffect;\n    switch (fiber.tag) {\n      case 0:\n      case 11:\n      case 15:\n        commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n        break;\n      case 23:\n      case 22:\n        if (\n          null !== fiber.memoizedState &&\n          null !== fiber.memoizedState.cachePool\n        ) {\n          var cache = fiber.memoizedState.cachePool.pool;\n          null != cache && cache.refCount++;\n        }\n        break;\n      case 24:\n        releaseCache(fiber.memoizedState.cache);\n    }\n    cache = fiber.child;\n    if (null !== cache) (cache.return = fiber), (nextEffect = cache);\n    else\n      a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n        cache = nextEffect;\n        var sibling = cache.sibling,\n          returnFiber = cache.return;\n        detachFiberAfterEffects(cache);\n        if (cache === fiber) {\n          nextEffect = null;\n          break a;\n        }\n        if (null !== sibling) {\n          sibling.return = returnFiber;\n          nextEffect = sibling;\n          break a;\n        }\n        nextEffect = returnFiber;\n      }\n  }\n}\nvar DefaultAsyncDispatcher = {\n    getCacheForType: function (resourceType) {\n      var cache = readContext(CacheContext),\n        cacheForType = cache.data.get(resourceType);\n      void 0 === cacheForType &&\n        ((cacheForType = resourceType()),\n        cache.data.set(resourceType, cacheForType));\n      return cacheForType;\n    },\n    cacheSignal: function () {\n      return readContext(CacheContext).controller.signal;\n    }\n  },\n  PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n  executionContext = 0,\n  workInProgressRoot = null,\n  workInProgress = null,\n  workInProgressRootRenderLanes = 0,\n  workInProgressSuspendedReason = 0,\n  workInProgressThrownValue = null,\n  workInProgressRootDidSkipSuspendedSiblings = !1,\n  workInProgressRootIsPrerendering = !1,\n  workInProgressRootDidAttachPingListener = !1,\n  entangledRenderLanes = 0,\n  workInProgressRootExitStatus = 0,\n  workInProgressRootSkippedLanes = 0,\n  workInProgressRootInterleavedUpdatedLanes = 0,\n  workInProgressRootPingedLanes = 0,\n  workInProgressDeferredLane = 0,\n  workInProgressSuspendedRetryLanes = 0,\n  workInProgressRootConcurrentErrors = null,\n  workInProgressRootRecoverableErrors = null,\n  workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n  globalMostRecentFallbackTime = 0,\n  globalMostRecentTransitionTime = 0,\n  workInProgressRootRenderTargetTime = Infinity,\n  workInProgressTransitions = null,\n  legacyErrorBoundariesThatAlreadyFailed = null,\n  pendingEffectsStatus = 0,\n  pendingEffectsRoot = null,\n  pendingFinishedWork = null,\n  pendingEffectsLanes = 0,\n  pendingEffectsRemainingLanes = 0,\n  pendingPassiveTransitions = null,\n  pendingRecoverableErrors = null,\n  pendingViewTransition = null,\n  pendingViewTransitionEvents = null,\n  pendingTransitionTypes = null,\n  nestedUpdateCount = 0,\n  rootWithNestedUpdates = null;\nfunction requestUpdateLane() {\n  return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes\n    ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes\n    : null !== ReactSharedInternals.T\n      ? requestTransitionLane()\n      : resolveUpdatePriority();\n}\nfunction requestDeferredLane() {\n  if (0 === workInProgressDeferredLane)\n    if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {\n      var lane = nextTransitionDeferredLane;\n      nextTransitionDeferredLane <<= 1;\n      0 === (nextTransitionDeferredLane & 3932160) &&\n        (nextTransitionDeferredLane = 262144);\n      workInProgressDeferredLane = lane;\n    } else workInProgressDeferredLane = 536870912;\n  lane = suspenseHandlerStackCursor.current;\n  null !== lane && (lane.flags |= 32);\n  return workInProgressDeferredLane;\n}\nfunction scheduleViewTransitionEvent(fiber, callback) {\n  if (null != callback) {\n    var state = fiber.stateNode,\n      instance = state.ref;\n    null === instance &&\n      (instance = state.ref =\n        createViewTransitionInstance(\n          getViewTransitionName(fiber.memoizedProps, state)\n        ));\n    null === pendingViewTransitionEvents && (pendingViewTransitionEvents = []);\n    pendingViewTransitionEvents.push(callback.bind(null, instance));\n  }\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n  if (\n    (root === workInProgressRoot &&\n      (2 === workInProgressSuspendedReason ||\n        9 === workInProgressSuspendedReason)) ||\n    null !== root.cancelPendingCommit\n  )\n    prepareFreshStack(root, 0),\n      markRootSuspended(\n        root,\n        workInProgressRootRenderLanes,\n        workInProgressDeferredLane,\n        !1\n      );\n  markRootUpdated$1(root, lane);\n  if (0 === (executionContext & 2) || root !== workInProgressRoot)\n    root === workInProgressRoot &&\n      (0 === (executionContext & 2) &&\n        (workInProgressRootInterleavedUpdatedLanes |= lane),\n      4 === workInProgressRootExitStatus &&\n        markRootSuspended(\n          root,\n          workInProgressRootRenderLanes,\n          workInProgressDeferredLane,\n          !1\n        )),\n      ensureRootIsScheduled(root);\n}\nfunction performWorkOnRoot(root$jscomp$0, lanes, forceSync) {\n  if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n  var shouldTimeSlice =\n      (!forceSync &&\n        0 === (lanes & 127) &&\n        0 === (lanes & root$jscomp$0.expiredLanes)) ||\n      checkIfRootIsPrerendering(root$jscomp$0, lanes),\n    exitStatus = shouldTimeSlice\n      ? renderRootConcurrent(root$jscomp$0, lanes)\n      : renderRootSync(root$jscomp$0, lanes, !0),\n    renderWasConcurrent = shouldTimeSlice;\n  do {\n    if (0 === exitStatus) {\n      workInProgressRootIsPrerendering &&\n        !shouldTimeSlice &&\n        markRootSuspended(root$jscomp$0, lanes, 0, !1);\n      break;\n    } else {\n      forceSync = root$jscomp$0.current.alternate;\n      if (\n        renderWasConcurrent &&\n        !isRenderConsistentWithExternalStores(forceSync)\n      ) {\n        exitStatus = renderRootSync(root$jscomp$0, lanes, !1);\n        renderWasConcurrent = !1;\n        continue;\n      }\n      if (2 === exitStatus) {\n        renderWasConcurrent = lanes;\n        if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)\n          var JSCompiler_inline_result = 0;\n        else\n          (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),\n            (JSCompiler_inline_result =\n              0 !== JSCompiler_inline_result\n                ? JSCompiler_inline_result\n                : JSCompiler_inline_result & 536870912\n                  ? 536870912\n                  : 0);\n        if (0 !== JSCompiler_inline_result) {\n          lanes = JSCompiler_inline_result;\n          a: {\n            var root = root$jscomp$0;\n            exitStatus = workInProgressRootConcurrentErrors;\n            var wasRootDehydrated = root.current.memoizedState.isDehydrated;\n            wasRootDehydrated &&\n              (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);\n            JSCompiler_inline_result = renderRootSync(\n              root,\n              JSCompiler_inline_result,\n              !1\n            );\n            if (\n              2 !== JSCompiler_inline_result &&\n              6 !== JSCompiler_inline_result\n            ) {\n              if (\n                workInProgressRootDidAttachPingListener &&\n                !wasRootDehydrated\n              ) {\n                root.errorRecoveryDisabledLanes |= renderWasConcurrent;\n                workInProgressRootInterleavedUpdatedLanes |=\n                  renderWasConcurrent;\n                exitStatus = 4;\n                break a;\n              }\n              renderWasConcurrent = workInProgressRootRecoverableErrors;\n              workInProgressRootRecoverableErrors = exitStatus;\n              null !== renderWasConcurrent &&\n                (null === workInProgressRootRecoverableErrors\n                  ? (workInProgressRootRecoverableErrors = renderWasConcurrent)\n                  : workInProgressRootRecoverableErrors.push.apply(\n                      workInProgressRootRecoverableErrors,\n                      renderWasConcurrent\n                    ));\n            }\n            exitStatus = JSCompiler_inline_result;\n          }\n          renderWasConcurrent = !1;\n          if (2 !== exitStatus) continue;\n        }\n      }\n      if (1 === exitStatus) {\n        prepareFreshStack(root$jscomp$0, 0);\n        markRootSuspended(root$jscomp$0, lanes, 0, !0);\n        break;\n      }\n      a: {\n        shouldTimeSlice = root$jscomp$0;\n        renderWasConcurrent = exitStatus;\n        switch (renderWasConcurrent) {\n          case 0:\n          case 1:\n            throw Error(formatProdErrorMessage(345));\n          case 4:\n            if ((lanes & 4194048) !== lanes && (lanes & 62914560) !== lanes)\n              break;\n          case 6:\n            markRootSuspended(\n              shouldTimeSlice,\n              lanes,\n              workInProgressDeferredLane,\n              !workInProgressRootDidSkipSuspendedSiblings\n            );\n            break a;\n          case 2:\n            workInProgressRootRecoverableErrors = null;\n            break;\n          case 3:\n          case 5:\n            break;\n          default:\n            throw Error(formatProdErrorMessage(329));\n        }\n        if (\n          (lanes & 62914560) === lanes &&\n          ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n          10 < exitStatus)\n        ) {\n          markRootSuspended(\n            shouldTimeSlice,\n            lanes,\n            workInProgressDeferredLane,\n            !workInProgressRootDidSkipSuspendedSiblings\n          );\n          if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;\n          pendingEffectsLanes = lanes;\n          shouldTimeSlice.timeoutHandle = scheduleTimeout(\n            completeRootWhenReady.bind(\n              null,\n              shouldTimeSlice,\n              forceSync,\n              workInProgressRootRecoverableErrors,\n              workInProgressTransitions,\n              workInProgressRootDidIncludeRecursiveRenderUpdate,\n              lanes,\n              workInProgressDeferredLane,\n              workInProgressRootInterleavedUpdatedLanes,\n              workInProgressSuspendedRetryLanes,\n              workInProgressRootDidSkipSuspendedSiblings,\n              renderWasConcurrent,\n              \"Throttled\",\n              -0,\n              0\n            ),\n            exitStatus\n          );\n          break a;\n        }\n        completeRootWhenReady(\n          shouldTimeSlice,\n          forceSync,\n          workInProgressRootRecoverableErrors,\n          workInProgressTransitions,\n          workInProgressRootDidIncludeRecursiveRenderUpdate,\n          lanes,\n          workInProgressDeferredLane,\n          workInProgressRootInterleavedUpdatedLanes,\n          workInProgressSuspendedRetryLanes,\n          workInProgressRootDidSkipSuspendedSiblings,\n          renderWasConcurrent,\n          null,\n          -0,\n          0\n        );\n      }\n    }\n    break;\n  } while (1);\n  ensureRootIsScheduled(root$jscomp$0);\n}\nfunction completeRootWhenReady(\n  root,\n  finishedWork,\n  recoverableErrors,\n  transitions,\n  didIncludeRenderPhaseUpdate,\n  lanes,\n  spawnedLane,\n  updatedLanes,\n  suspendedRetryLanes,\n  didSkipSuspendedSiblings,\n  exitStatus,\n  suspendedCommitReason,\n  completedRenderStartTime,\n  completedRenderEndTime\n) {\n  root.timeoutHandle = -1;\n  var subtreeFlags = finishedWork.subtreeFlags,\n    isViewTransitionEligible = (lanes & 335544064) === lanes;\n  suspendedCommitReason = null;\n  if (\n    isViewTransitionEligible ||\n    subtreeFlags & 8192 ||\n    16785408 === (subtreeFlags & 16785408)\n  )\n    if (\n      ((suspendedCommitReason = {\n        stylesheets: null,\n        count: 0,\n        imgCount: 0,\n        imgBytes: 0,\n        suspenseyImages: [],\n        waitingForImages: !0,\n        waitingForViewTransition: !1,\n        unsuspend: noop$1\n      }),\n      (appearingViewTransitions = null),\n      accumulateSuspenseyCommitOnFiber(\n        finishedWork,\n        lanes,\n        suspendedCommitReason\n      ),\n      isViewTransitionEligible &&\n        ((subtreeFlags = suspendedCommitReason),\n        (isViewTransitionEligible = root.containerInfo),\n        (isViewTransitionEligible = (\n          9 === isViewTransitionEligible.nodeType\n            ? isViewTransitionEligible\n            : isViewTransitionEligible.ownerDocument\n        ).__reactViewTransition),\n        null != isViewTransitionEligible &&\n          (subtreeFlags.count++,\n          (subtreeFlags.waitingForViewTransition = !0),\n          (subtreeFlags = onUnsuspend.bind(subtreeFlags)),\n          isViewTransitionEligible.finished.then(subtreeFlags, subtreeFlags))),\n      (subtreeFlags =\n        (lanes & 62914560) === lanes\n          ? globalMostRecentFallbackTime - now()\n          : (lanes & 4194048) === lanes\n            ? globalMostRecentTransitionTime - now()\n            : 0),\n      (subtreeFlags = waitForCommitToBeReady(\n        suspendedCommitReason,\n        subtreeFlags\n      )),\n      null !== subtreeFlags)\n    ) {\n      pendingEffectsLanes = lanes;\n      root.cancelPendingCommit = subtreeFlags(\n        completeRoot.bind(\n          null,\n          root,\n          finishedWork,\n          lanes,\n          recoverableErrors,\n          transitions,\n          didIncludeRenderPhaseUpdate,\n          spawnedLane,\n          updatedLanes,\n          suspendedRetryLanes,\n          didSkipSuspendedSiblings,\n          exitStatus,\n          suspendedCommitReason,\n          null,\n          completedRenderStartTime,\n          completedRenderEndTime\n        )\n      );\n      markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);\n      return;\n    }\n  completeRoot(\n    root,\n    finishedWork,\n    lanes,\n    recoverableErrors,\n    transitions,\n    didIncludeRenderPhaseUpdate,\n    spawnedLane,\n    updatedLanes,\n    suspendedRetryLanes,\n    didSkipSuspendedSiblings,\n    exitStatus,\n    suspendedCommitReason\n  );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n  for (var node = finishedWork; ; ) {\n    var tag = node.tag;\n    if (\n      (0 === tag || 11 === tag || 15 === tag) &&\n      node.flags & 16384 &&\n      ((tag = node.updateQueue),\n      null !== tag && ((tag = tag.stores), null !== tag))\n    )\n      for (var i = 0; i < tag.length; i++) {\n        var check = tag[i],\n          getSnapshot = check.getSnapshot;\n        check = check.value;\n        try {\n          if (!objectIs(getSnapshot(), check)) return !1;\n        } catch (error) {\n          return !1;\n        }\n      }\n    tag = node.child;\n    if (node.subtreeFlags & 16384 && null !== tag)\n      (tag.return = node), (node = tag);\n    else {\n      if (node === finishedWork) break;\n      for (; null === node.sibling; ) {\n        if (null === node.return || node.return === finishedWork) return !0;\n        node = node.return;\n      }\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  }\n  return !0;\n}\nfunction markRootSuspended(\n  root,\n  suspendedLanes,\n  spawnedLane,\n  didAttemptEntireTree\n) {\n  suspendedLanes = getEntangledLanes(root, suspendedLanes);\n  suspendedLanes &= ~workInProgressRootPingedLanes;\n  suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n  root.suspendedLanes |= suspendedLanes;\n  root.pingedLanes &= ~suspendedLanes;\n  didAttemptEntireTree && (root.warmLanes |= suspendedLanes);\n  didAttemptEntireTree = root.expirationTimes;\n  for (var lanes = suspendedLanes; 0 < lanes; ) {\n    var index$6 = 31 - clz32(lanes),\n      lane = 1 << index$6;\n    didAttemptEntireTree[index$6] = -1;\n    lanes &= ~lane;\n  }\n  0 !== spawnedLane &&\n    markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction flushSyncWork$1() {\n  return 0 === (executionContext & 6)\n    ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)\n    : !0;\n}\nfunction resetWorkInProgressStack() {\n  if (null !== workInProgress) {\n    if (0 === workInProgressSuspendedReason)\n      var interruptedWork = workInProgress.return;\n    else\n      (interruptedWork = workInProgress),\n        (lastContextDependency = currentlyRenderingFiber$1 = null),\n        resetHooksOnUnwind(interruptedWork),\n        (thenableState$1 = null),\n        (thenableIndexCounter$1 = 0),\n        (interruptedWork = workInProgress);\n    for (; null !== interruptedWork; )\n      unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n        (interruptedWork = interruptedWork.return);\n    workInProgress = null;\n  }\n}\nfunction prepareFreshStack(root, lanes) {\n  var timeoutHandle = root.timeoutHandle;\n  -1 !== timeoutHandle &&\n    ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n  timeoutHandle = root.cancelPendingCommit;\n  null !== timeoutHandle &&\n    ((root.cancelPendingCommit = null), timeoutHandle());\n  pendingEffectsLanes = 0;\n  resetWorkInProgressStack();\n  workInProgressRoot = root;\n  workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n  workInProgressRootRenderLanes = lanes;\n  workInProgressSuspendedReason = 0;\n  workInProgressThrownValue = null;\n  workInProgressRootDidSkipSuspendedSiblings = !1;\n  workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);\n  workInProgressRootDidAttachPingListener = !1;\n  workInProgressSuspendedRetryLanes =\n    workInProgressDeferredLane =\n    workInProgressRootPingedLanes =\n    workInProgressRootInterleavedUpdatedLanes =\n    workInProgressRootSkippedLanes =\n    workInProgressRootExitStatus =\n      0;\n  workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n    null;\n  workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n  entangledRenderLanes = getEntangledLanes(root, lanes);\n  finishQueueingConcurrentUpdates();\n  return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n  currentlyRenderingFiber = null;\n  ReactSharedInternals.H = ContextOnlyDispatcher;\n  thrownValue === SuspenseException || thrownValue === SuspenseActionException\n    ? ((thrownValue = getSuspendedThenable()),\n      (workInProgressSuspendedReason = 3))\n    : thrownValue === SuspenseyCommitException\n      ? ((thrownValue = getSuspendedThenable()),\n        (workInProgressSuspendedReason = 4))\n      : (workInProgressSuspendedReason =\n          thrownValue === SelectiveHydrationException\n            ? 8\n            : null !== thrownValue &&\n                \"object\" === typeof thrownValue &&\n                \"function\" === typeof thrownValue.then\n              ? 6\n              : 1);\n  workInProgressThrownValue = thrownValue;\n  null === workInProgress &&\n    ((workInProgressRootExitStatus = 1),\n    logUncaughtError(\n      root,\n      createCapturedValueAtFiber(thrownValue, root.current)\n    ));\n}\nfunction shouldRemainOnPreviousScreen() {\n  var handler = suspenseHandlerStackCursor.current;\n  return null === handler\n    ? !0\n    : (workInProgressRootRenderLanes & 4194048) ===\n        workInProgressRootRenderLanes\n      ? null === shellBoundary\n        ? !0\n        : !1\n      : (workInProgressRootRenderLanes & 62914560) ===\n            workInProgressRootRenderLanes ||\n          0 !== (workInProgressRootRenderLanes & 536870912)\n        ? handler === shellBoundary\n        : !1;\n}\nfunction pushDispatcher() {\n  var prevDispatcher = ReactSharedInternals.H;\n  ReactSharedInternals.H = ContextOnlyDispatcher;\n  return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction pushAsyncDispatcher() {\n  var prevAsyncDispatcher = ReactSharedInternals.A;\n  ReactSharedInternals.A = DefaultAsyncDispatcher;\n  return prevAsyncDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n  workInProgressRootExitStatus = 4;\n  workInProgressRootDidSkipSuspendedSiblings ||\n    ((workInProgressRootRenderLanes & 4194048) !==\n      workInProgressRootRenderLanes &&\n      null !== suspenseHandlerStackCursor.current) ||\n    (workInProgressRootIsPrerendering = !0);\n  (0 === (workInProgressRootSkippedLanes & 134217727) &&\n    0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n    null === workInProgressRoot ||\n    markRootSuspended(\n      workInProgressRoot,\n      workInProgressRootRenderLanes,\n      workInProgressDeferredLane,\n      !1\n    );\n}\nfunction renderRootSync(root, lanes, shouldYieldForPrerendering) {\n  var prevExecutionContext = executionContext;\n  executionContext |= 2;\n  var prevDispatcher = pushDispatcher(),\n    prevAsyncDispatcher = pushAsyncDispatcher();\n  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n    (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n  lanes = !1;\n  var exitStatus = workInProgressRootExitStatus;\n  a: do\n    try {\n      if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n        var unitOfWork = workInProgress,\n          thrownValue = workInProgressThrownValue;\n        switch (workInProgressSuspendedReason) {\n          case 8:\n            resetWorkInProgressStack();\n            exitStatus = 6;\n            break a;\n          case 3:\n          case 2:\n          case 9:\n          case 6:\n            null === suspenseHandlerStackCursor.current && (lanes = !0);\n            var reason = workInProgressSuspendedReason;\n            workInProgressSuspendedReason = 0;\n            workInProgressThrownValue = null;\n            throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n            if (\n              shouldYieldForPrerendering &&\n              workInProgressRootIsPrerendering\n            ) {\n              exitStatus = 0;\n              break a;\n            }\n            break;\n          default:\n            (reason = workInProgressSuspendedReason),\n              (workInProgressSuspendedReason = 0),\n              (workInProgressThrownValue = null),\n              throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n        }\n      }\n      workLoopSync();\n      exitStatus = workInProgressRootExitStatus;\n      break;\n    } catch (thrownValue$184) {\n      handleThrow(root, thrownValue$184);\n    }\n  while (1);\n  lanes && root.shellSuspendCounter++;\n  lastContextDependency = currentlyRenderingFiber$1 = null;\n  executionContext = prevExecutionContext;\n  ReactSharedInternals.H = prevDispatcher;\n  ReactSharedInternals.A = prevAsyncDispatcher;\n  null === workInProgress &&\n    ((workInProgressRoot = null),\n    (workInProgressRootRenderLanes = 0),\n    finishQueueingConcurrentUpdates());\n  return exitStatus;\n}\nfunction workLoopSync() {\n  for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n  var prevExecutionContext = executionContext;\n  executionContext |= 2;\n  var prevDispatcher = pushDispatcher(),\n    prevAsyncDispatcher = pushAsyncDispatcher();\n  workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes\n    ? ((workInProgressTransitions = null),\n      (workInProgressRootRenderTargetTime = now() + 500),\n      prepareFreshStack(root, lanes))\n    : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(\n        root,\n        lanes\n      ));\n  a: do\n    try {\n      if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n        lanes = workInProgress;\n        var thrownValue = workInProgressThrownValue;\n        b: switch (workInProgressSuspendedReason) {\n          case 1:\n            workInProgressSuspendedReason = 0;\n            workInProgressThrownValue = null;\n            throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);\n            break;\n          case 2:\n          case 9:\n            if (isThenableResolved(thrownValue)) {\n              workInProgressSuspendedReason = 0;\n              workInProgressThrownValue = null;\n              replaySuspendedUnitOfWork(lanes);\n              break;\n            }\n            lanes = function () {\n              (2 !== workInProgressSuspendedReason &&\n                9 !== workInProgressSuspendedReason) ||\n                workInProgressRoot !== root ||\n                (workInProgressSuspendedReason = 7);\n              ensureRootIsScheduled(root);\n            };\n            thrownValue.then(lanes, lanes);\n            break a;\n          case 3:\n            workInProgressSuspendedReason = 7;\n            break a;\n          case 4:\n            workInProgressSuspendedReason = 5;\n            break a;\n          case 7:\n            isThenableResolved(thrownValue)\n              ? ((workInProgressSuspendedReason = 0),\n                (workInProgressThrownValue = null),\n                replaySuspendedUnitOfWork(lanes))\n              : ((workInProgressSuspendedReason = 0),\n                (workInProgressThrownValue = null),\n                throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));\n            break;\n          case 5:\n            var resource = null;\n            switch (workInProgress.tag) {\n              case 26:\n                resource = workInProgress.memoizedState;\n              case 5:\n              case 27:\n                var hostFiber = workInProgress;\n                if (\n                  resource\n                    ? preloadResource(resource)\n                    : hostFiber.stateNode.complete\n                ) {\n                  workInProgressSuspendedReason = 0;\n                  workInProgressThrownValue = null;\n                  var sibling = hostFiber.sibling;\n                  if (null !== sibling) workInProgress = sibling;\n                  else {\n                    var returnFiber = hostFiber.return;\n                    null !== returnFiber\n                      ? ((workInProgress = returnFiber),\n                        completeUnitOfWork(returnFiber))\n                      : (workInProgress = null);\n                  }\n                  break b;\n                }\n            }\n            workInProgressSuspendedReason = 0;\n            workInProgressThrownValue = null;\n            throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);\n            break;\n          case 6:\n            workInProgressSuspendedReason = 0;\n            workInProgressThrownValue = null;\n            throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);\n            break;\n          case 8:\n            resetWorkInProgressStack();\n            workInProgressRootExitStatus = 6;\n            break a;\n          default:\n            throw Error(formatProdErrorMessage(462));\n        }\n      }\n      workLoopConcurrentByScheduler();\n      break;\n    } catch (thrownValue$186) {\n      handleThrow(root, thrownValue$186);\n    }\n  while (1);\n  lastContextDependency = currentlyRenderingFiber$1 = null;\n  ReactSharedInternals.H = prevDispatcher;\n  ReactSharedInternals.A = prevAsyncDispatcher;\n  executionContext = prevExecutionContext;\n  if (null !== workInProgress) return 0;\n  workInProgressRoot = null;\n  workInProgressRootRenderLanes = 0;\n  finishQueueingConcurrentUpdates();\n  return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrentByScheduler() {\n  for (; null !== workInProgress && !shouldYield(); )\n    performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n  var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n  unitOfWork.memoizedProps = unitOfWork.pendingProps;\n  null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n  var next = unitOfWork;\n  var current = next.alternate;\n  switch (next.tag) {\n    case 15:\n    case 0:\n      next = replayFunctionComponent(\n        current,\n        next,\n        next.pendingProps,\n        next.type,\n        void 0,\n        workInProgressRootRenderLanes\n      );\n      break;\n    case 11:\n      next = replayFunctionComponent(\n        current,\n        next,\n        next.pendingProps,\n        next.type.render,\n        next.ref,\n        workInProgressRootRenderLanes\n      );\n      break;\n    case 5:\n      resetHooksOnUnwind(next);\n      var fiber = next;\n      fiber === hydrationParentFiber &&\n        (isHydrating\n          ? (popToNextHostParent(fiber),\n            5 === fiber.tag &&\n              null != fiber.stateNode &&\n              (nextHydratableInstance = fiber.stateNode))\n          : (popToNextHostParent(fiber), (isHydrating = !0)));\n    default:\n      unwindInterruptedWork(current, next),\n        (next = workInProgress =\n          resetWorkInProgress(next, entangledRenderLanes)),\n        (next = beginWork(current, next, entangledRenderLanes));\n  }\n  unitOfWork.memoizedProps = unitOfWork.pendingProps;\n  null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction throwAndUnwindWorkLoop(\n  root,\n  unitOfWork,\n  thrownValue,\n  suspendedReason\n) {\n  lastContextDependency = currentlyRenderingFiber$1 = null;\n  resetHooksOnUnwind(unitOfWork);\n  thenableState$1 = null;\n  thenableIndexCounter$1 = 0;\n  var returnFiber = unitOfWork.return;\n  try {\n    if (\n      throwException(\n        root,\n        returnFiber,\n        unitOfWork,\n        thrownValue,\n        workInProgressRootRenderLanes\n      )\n    ) {\n      workInProgressRootExitStatus = 1;\n      logUncaughtError(\n        root,\n        createCapturedValueAtFiber(thrownValue, root.current)\n      );\n      workInProgress = null;\n      return;\n    }\n  } catch (error) {\n    if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n    workInProgressRootExitStatus = 1;\n    logUncaughtError(\n      root,\n      createCapturedValueAtFiber(thrownValue, root.current)\n    );\n    workInProgress = null;\n    return;\n  }\n  if (unitOfWork.flags & 32768) {\n    if (isHydrating || 1 === suspendedReason) root = !0;\n    else if (\n      workInProgressRootIsPrerendering ||\n      0 !== (workInProgressRootRenderLanes & 536870912)\n    )\n      root = !1;\n    else if (\n      ((workInProgressRootDidSkipSuspendedSiblings = root = !0),\n      2 === suspendedReason ||\n        9 === suspendedReason ||\n        3 === suspendedReason ||\n        6 === suspendedReason)\n    )\n      (suspendedReason = suspenseHandlerStackCursor.current),\n        null !== suspendedReason &&\n          13 === suspendedReason.tag &&\n          (suspendedReason.flags |= 16384);\n    unwindUnitOfWork(unitOfWork, root);\n  } else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n  var completedWork = unitOfWork;\n  do {\n    if (0 !== (completedWork.flags & 32768)) {\n      unwindUnitOfWork(\n        completedWork,\n        workInProgressRootDidSkipSuspendedSiblings\n      );\n      return;\n    }\n    unitOfWork = completedWork.return;\n    var next = completeWork(\n      completedWork.alternate,\n      completedWork,\n      entangledRenderLanes\n    );\n    if (null !== next) {\n      workInProgress = next;\n      return;\n    }\n    completedWork = completedWork.sibling;\n    if (null !== completedWork) {\n      workInProgress = completedWork;\n      return;\n    }\n    workInProgress = completedWork = unitOfWork;\n  } while (null !== completedWork);\n  0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction unwindUnitOfWork(unitOfWork, skipSiblings) {\n  do {\n    var next = unwindWork(unitOfWork.alternate, unitOfWork);\n    if (null !== next) {\n      next.flags &= 32767;\n      workInProgress = next;\n      return;\n    }\n    next = unitOfWork.return;\n    null !== next &&\n      ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));\n    if (\n      !skipSiblings &&\n      ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)\n    ) {\n      workInProgress = unitOfWork;\n      return;\n    }\n    workInProgress = unitOfWork = next;\n  } while (null !== unitOfWork);\n  workInProgressRootExitStatus = 6;\n  workInProgress = null;\n}\nfunction completeRoot(\n  root,\n  finishedWork,\n  lanes,\n  recoverableErrors,\n  transitions,\n  didIncludeRenderPhaseUpdate,\n  spawnedLane,\n  updatedLanes,\n  suspendedRetryLanes,\n  didSkipSuspendedSiblings,\n  exitStatus,\n  suspendedState\n) {\n  root.cancelPendingCommit = null;\n  do flushPendingEffects();\n  while (0 !== pendingEffectsStatus);\n  if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n  if (null !== finishedWork) {\n    if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));\n    root === workInProgressRoot &&\n      ((workInProgress = workInProgressRoot = null),\n      (workInProgressRootRenderLanes = 0));\n    pendingFinishedWork = finishedWork;\n    pendingEffectsRoot = root;\n    pendingEffectsLanes = lanes;\n    pendingPassiveTransitions = transitions;\n    pendingRecoverableErrors = recoverableErrors;\n    commitRoot(\n      root,\n      finishedWork,\n      lanes,\n      spawnedLane,\n      updatedLanes,\n      suspendedRetryLanes,\n      suspendedState\n    );\n  }\n}\nfunction commitRoot(\n  root,\n  finishedWork,\n  lanes,\n  spawnedLane,\n  updatedLanes,\n  suspendedRetryLanes,\n  suspendedState\n) {\n  var remainingLanes = finishedWork.lanes | finishedWork.childLanes;\n  pendingEffectsRemainingLanes = remainingLanes;\n  remainingLanes |= concurrentlyUpdatedLanes;\n  markRootFinished(\n    root,\n    lanes,\n    remainingLanes,\n    spawnedLane,\n    updatedLanes,\n    suspendedRetryLanes\n  );\n  pendingViewTransitionEvents = null;\n  (lanes & 335544064) === lanes\n    ? ((pendingTransitionTypes = claimQueuedTransitionTypes(root)),\n      (spawnedLane = 10262))\n    : ((pendingTransitionTypes = null), (spawnedLane = 10256));\n  0 !== (finishedWork.subtreeFlags & spawnedLane) ||\n  0 !== (finishedWork.flags & spawnedLane)\n    ? ((root.callbackNode = null),\n      (root.callbackPriority = 0),\n      scheduleCallback$1(NormalPriority$1, function () {\n        flushPassiveEffects();\n        return null;\n      }))\n    : ((root.callbackNode = null), (root.callbackPriority = 0));\n  shouldStartViewTransition = !1;\n  spawnedLane = 0 !== (finishedWork.flags & 13878);\n  if (0 !== (finishedWork.subtreeFlags & 13878) || spawnedLane) {\n    spawnedLane = ReactSharedInternals.T;\n    ReactSharedInternals.T = null;\n    updatedLanes = ReactDOMSharedInternals.p;\n    ReactDOMSharedInternals.p = 2;\n    suspendedRetryLanes = executionContext;\n    executionContext |= 4;\n    try {\n      commitBeforeMutationEffects(root, finishedWork, lanes);\n    } finally {\n      (executionContext = suspendedRetryLanes),\n        (ReactDOMSharedInternals.p = updatedLanes),\n        (ReactSharedInternals.T = spawnedLane);\n    }\n  }\n  pendingEffectsStatus = 1;\n  shouldStartViewTransition\n    ? (pendingViewTransition = startViewTransition(\n        suspendedState,\n        root.containerInfo,\n        pendingTransitionTypes,\n        flushMutationEffects,\n        flushLayoutEffects,\n        flushAfterMutationEffects,\n        flushSpawnedWork,\n        flushPassiveEffects,\n        reportViewTransitionError,\n        null,\n        null\n      ))\n    : (flushMutationEffects(), flushLayoutEffects(), flushSpawnedWork());\n}\nfunction reportViewTransitionError(error) {\n  if (0 !== pendingEffectsStatus) {\n    var onRecoverableError = pendingEffectsRoot.onRecoverableError;\n    onRecoverableError(error, { componentStack: null });\n  }\n}\nfunction flushAfterMutationEffects() {\n  3 === pendingEffectsStatus &&\n    ((pendingEffectsStatus = 0),\n    commitAfterMutationEffectsOnFiber(pendingFinishedWork, pendingEffectsRoot),\n    (pendingEffectsStatus = 4));\n}\nfunction flushMutationEffects() {\n  if (1 === pendingEffectsStatus) {\n    pendingEffectsStatus = 0;\n    var root = pendingEffectsRoot,\n      finishedWork = pendingFinishedWork,\n      lanes = pendingEffectsLanes,\n      rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);\n    if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {\n      rootMutationHasEffect = ReactSharedInternals.T;\n      ReactSharedInternals.T = null;\n      var previousPriority = ReactDOMSharedInternals.p;\n      ReactDOMSharedInternals.p = 2;\n      var prevExecutionContext = executionContext;\n      executionContext |= 4;\n      try {\n        inUpdateViewTransition = rootViewTransitionAffected = !1;\n        commitMutationEffectsOnFiber(finishedWork, root, lanes);\n        lanes = selectionInformation;\n        var curFocusedElem = getActiveElementDeep(root.containerInfo),\n          priorFocusedElem = lanes.focusedElem,\n          priorSelectionRange = lanes.selectionRange;\n        if (\n          curFocusedElem !== priorFocusedElem &&\n          priorFocusedElem &&\n          priorFocusedElem.ownerDocument &&\n          containsNode(\n            priorFocusedElem.ownerDocument.documentElement,\n            priorFocusedElem\n          )\n        ) {\n          if (\n            null !== priorSelectionRange &&\n            hasSelectionCapabilities(priorFocusedElem)\n          ) {\n            var start = priorSelectionRange.start,\n              end = priorSelectionRange.end;\n            void 0 === end && (end = start);\n            if (\"selectionStart\" in priorFocusedElem)\n              (priorFocusedElem.selectionStart = start),\n                (priorFocusedElem.selectionEnd = Math.min(\n                  end,\n                  priorFocusedElem.value.length\n                ));\n            else {\n              var doc = priorFocusedElem.ownerDocument || document,\n                win = (doc && doc.defaultView) || window;\n              if (win.getSelection) {\n                var selection = win.getSelection(),\n                  length = priorFocusedElem.textContent.length,\n                  start$jscomp$0 = Math.min(priorSelectionRange.start, length),\n                  end$jscomp$0 =\n                    void 0 === priorSelectionRange.end\n                      ? start$jscomp$0\n                      : Math.min(priorSelectionRange.end, length);\n                !selection.extend &&\n                  start$jscomp$0 > end$jscomp$0 &&\n                  ((curFocusedElem = end$jscomp$0),\n                  (end$jscomp$0 = start$jscomp$0),\n                  (start$jscomp$0 = curFocusedElem));\n                var startMarker = getNodeForCharacterOffset(\n                    priorFocusedElem,\n                    start$jscomp$0\n                  ),\n                  endMarker = getNodeForCharacterOffset(\n                    priorFocusedElem,\n                    end$jscomp$0\n                  );\n                if (\n                  startMarker &&\n                  endMarker &&\n                  (1 !== selection.rangeCount ||\n                    selection.anchorNode !== startMarker.node ||\n                    selection.anchorOffset !== startMarker.offset ||\n                    selection.focusNode !== endMarker.node ||\n                    selection.focusOffset !== endMarker.offset)\n                ) {\n                  var range = doc.createRange();\n                  range.setStart(startMarker.node, startMarker.offset);\n                  selection.removeAllRanges();\n                  start$jscomp$0 > end$jscomp$0\n                    ? (selection.addRange(range),\n                      selection.extend(endMarker.node, endMarker.offset))\n                    : (range.setEnd(endMarker.node, endMarker.offset),\n                      selection.addRange(range));\n                }\n              }\n            }\n          }\n          doc = [];\n          for (\n            selection = priorFocusedElem;\n            (selection = selection.parentNode);\n\n          )\n            1 === selection.nodeType &&\n              doc.push({\n                element: selection,\n                left: selection.scrollLeft,\n                top: selection.scrollTop\n              });\n          \"function\" === typeof priorFocusedElem.focus &&\n            priorFocusedElem.focus();\n          for (\n            priorFocusedElem = 0;\n            priorFocusedElem < doc.length;\n            priorFocusedElem++\n          ) {\n            var info = doc[priorFocusedElem];\n            info.element.scrollLeft = info.left;\n            info.element.scrollTop = info.top;\n          }\n        }\n        _enabled = !!eventsEnabled;\n        selectionInformation = eventsEnabled = null;\n      } finally {\n        (executionContext = prevExecutionContext),\n          (ReactDOMSharedInternals.p = previousPriority),\n          (ReactSharedInternals.T = rootMutationHasEffect);\n      }\n    }\n    root.current = finishedWork;\n    pendingEffectsStatus = 2;\n  }\n}\nfunction flushLayoutEffects() {\n  if (2 === pendingEffectsStatus) {\n    pendingEffectsStatus = 0;\n    var root = pendingEffectsRoot,\n      finishedWork = pendingFinishedWork,\n      rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);\n    if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {\n      rootHasLayoutEffect = ReactSharedInternals.T;\n      ReactSharedInternals.T = null;\n      var previousPriority = ReactDOMSharedInternals.p;\n      ReactDOMSharedInternals.p = 2;\n      var prevExecutionContext = executionContext;\n      executionContext |= 4;\n      try {\n        commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);\n      } finally {\n        (executionContext = prevExecutionContext),\n          (ReactDOMSharedInternals.p = previousPriority),\n          (ReactSharedInternals.T = rootHasLayoutEffect);\n      }\n    }\n    pendingEffectsStatus = 3;\n  }\n}\nfunction flushSpawnedWork() {\n  if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {\n    pendingEffectsStatus = 0;\n    var committedViewTransition = pendingViewTransition;\n    pendingViewTransition = null;\n    requestPaint();\n    var root = pendingEffectsRoot,\n      finishedWork = pendingFinishedWork,\n      lanes = pendingEffectsLanes,\n      recoverableErrors = pendingRecoverableErrors,\n      passiveSubtreeMask = (lanes & 335544064) === lanes ? 10262 : 10256;\n    0 !== (finishedWork.subtreeFlags & passiveSubtreeMask) ||\n    0 !== (finishedWork.flags & passiveSubtreeMask)\n      ? (pendingEffectsStatus = 5)\n      : ((pendingEffectsStatus = 0),\n        (pendingFinishedWork = pendingEffectsRoot = null),\n        releaseRootPooledCache(root, root.pendingLanes));\n    passiveSubtreeMask = root.pendingLanes;\n    0 === passiveSubtreeMask && (legacyErrorBoundariesThatAlreadyFailed = null);\n    lanesToEventPriority(lanes);\n    finishedWork = finishedWork.stateNode;\n    if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n      try {\n        injectedHook.onCommitFiberRoot(\n          rendererID,\n          finishedWork,\n          void 0,\n          128 === (finishedWork.current.flags & 128)\n        );\n      } catch (err) {}\n    if (null !== recoverableErrors) {\n      finishedWork = ReactSharedInternals.T;\n      passiveSubtreeMask = ReactDOMSharedInternals.p;\n      ReactDOMSharedInternals.p = 2;\n      ReactSharedInternals.T = null;\n      try {\n        for (\n          var onRecoverableError = root.onRecoverableError, i = 0;\n          i < recoverableErrors.length;\n          i++\n        ) {\n          var recoverableError = recoverableErrors[i];\n          onRecoverableError(recoverableError.value, {\n            componentStack: recoverableError.stack\n          });\n        }\n      } finally {\n        (ReactSharedInternals.T = finishedWork),\n          (ReactDOMSharedInternals.p = passiveSubtreeMask);\n      }\n    }\n    recoverableErrors = pendingViewTransitionEvents;\n    onRecoverableError = pendingTransitionTypes;\n    pendingTransitionTypes = null;\n    if (\n      null !== recoverableErrors &&\n      ((pendingViewTransitionEvents = null),\n      null === onRecoverableError && (onRecoverableError = []),\n      null !== committedViewTransition)\n    )\n      for (\n        recoverableError = 0;\n        recoverableError < recoverableErrors.length;\n        recoverableError++\n      )\n        (finishedWork = (0, recoverableErrors[recoverableError])(\n          onRecoverableError\n        )),\n          void 0 !== finishedWork &&\n            committedViewTransition.finished.finally(finishedWork);\n    0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n    ensureRootIsScheduled(root);\n    passiveSubtreeMask = root.pendingLanes;\n    0 !== (lanes & 261930) && 0 !== (passiveSubtreeMask & 42)\n      ? root === rootWithNestedUpdates\n        ? nestedUpdateCount++\n        : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n      : ((nestedUpdateCount = 0), (rootWithNestedUpdates = null));\n    flushSyncWorkAcrossRoots_impl(0, !1);\n  }\n}\nfunction releaseRootPooledCache(root, remainingLanes) {\n  0 === (root.pooledCacheLanes &= remainingLanes) &&\n    ((remainingLanes = root.pooledCache),\n    null != remainingLanes &&\n      ((root.pooledCache = null), releaseCache(remainingLanes)));\n}\nfunction flushPendingEffects() {\n  null !== pendingViewTransition &&\n    (pendingViewTransition.skipTransition(), (pendingViewTransition = null));\n  flushMutationEffects();\n  flushLayoutEffects();\n  flushSpawnedWork();\n  return flushPassiveEffects();\n}\nfunction flushPassiveEffects() {\n  if (5 !== pendingEffectsStatus) return !1;\n  var root = pendingEffectsRoot,\n    remainingLanes = pendingEffectsRemainingLanes;\n  pendingEffectsRemainingLanes = 0;\n  var renderPriority = lanesToEventPriority(pendingEffectsLanes),\n    prevTransition = ReactSharedInternals.T,\n    previousPriority = ReactDOMSharedInternals.p;\n  try {\n    ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;\n    ReactSharedInternals.T = null;\n    renderPriority = pendingPassiveTransitions;\n    pendingPassiveTransitions = null;\n    var root$jscomp$0 = pendingEffectsRoot,\n      lanes = pendingEffectsLanes;\n    pendingEffectsStatus = 0;\n    pendingFinishedWork = pendingEffectsRoot = null;\n    pendingEffectsLanes = 0;\n    if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));\n    var prevExecutionContext = executionContext;\n    executionContext |= 4;\n    commitPassiveUnmountOnFiber(root$jscomp$0.current);\n    commitPassiveMountOnFiber(\n      root$jscomp$0,\n      root$jscomp$0.current,\n      lanes,\n      renderPriority\n    );\n    executionContext = prevExecutionContext;\n    flushSyncWorkAcrossRoots_impl(0, !1);\n    if (\n      injectedHook &&\n      \"function\" === typeof injectedHook.onPostCommitFiberRoot\n    )\n      try {\n        injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);\n      } catch (err) {}\n    return !0;\n  } finally {\n    (ReactDOMSharedInternals.p = previousPriority),\n      (ReactSharedInternals.T = prevTransition),\n      releaseRootPooledCache(root, remainingLanes);\n  }\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n  sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n  sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);\n  rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n  null !== rootFiber &&\n    (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n  if (3 === sourceFiber.tag)\n    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n  else\n    for (; null !== nearestMountedAncestor; ) {\n      if (3 === nearestMountedAncestor.tag) {\n        captureCommitPhaseErrorOnRoot(\n          nearestMountedAncestor,\n          sourceFiber,\n          error\n        );\n        break;\n      } else if (1 === nearestMountedAncestor.tag) {\n        var instance = nearestMountedAncestor.stateNode;\n        if (\n          \"function\" ===\n            typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n          (\"function\" === typeof instance.componentDidCatch &&\n            (null === legacyErrorBoundariesThatAlreadyFailed ||\n              !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n        ) {\n          sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n          error = createClassErrorUpdate(2);\n          instance = enqueueUpdate(nearestMountedAncestor, error, 2);\n          null !== instance &&\n            (initializeClassErrorUpdate(\n              error,\n              instance,\n              nearestMountedAncestor,\n              sourceFiber\n            ),\n            markRootUpdated$1(instance, 2),\n            ensureRootIsScheduled(instance));\n          break;\n        }\n      }\n      nearestMountedAncestor = nearestMountedAncestor.return;\n    }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n  var pingCache = root.pingCache;\n  if (null === pingCache) {\n    pingCache = root.pingCache = new PossiblyWeakMap();\n    var threadIDs = new Set();\n    pingCache.set(wakeable, threadIDs);\n  } else\n    (threadIDs = pingCache.get(wakeable)),\n      void 0 === threadIDs &&\n        ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n  threadIDs.has(lanes) ||\n    ((workInProgressRootDidAttachPingListener = !0),\n    threadIDs.add(lanes),\n    (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n    wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n  var pingCache = root.pingCache;\n  null !== pingCache && pingCache.delete(wakeable);\n  root.pingedLanes |= root.suspendedLanes & pingedLanes;\n  root.warmLanes &= ~pingedLanes;\n  workInProgressRoot === root &&\n    (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n    (4 === workInProgressRootExitStatus ||\n    (3 === workInProgressRootExitStatus &&\n      (workInProgressRootRenderLanes & 62914560) ===\n        workInProgressRootRenderLanes &&\n      300 > now() - globalMostRecentFallbackTime)\n      ? 0 === (executionContext & 2)\n        ? prepareFreshStack(root, 0)\n        : (workInProgressRootPingedLanes |= pingedLanes)\n      : (workInProgressRootPingedLanes |= pingedLanes),\n    workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&\n      (workInProgressSuspendedRetryLanes = 0));\n  ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n  0 === retryLane && (retryLane = claimNextRetryLane());\n  boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n  null !== boundaryFiber &&\n    (markRootUpdated$1(boundaryFiber, retryLane),\n    ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n  var suspenseState = boundaryFiber.memoizedState,\n    retryLane = 0;\n  null !== suspenseState && (retryLane = suspenseState.retryLane);\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n  var retryLane = 0;\n  switch (boundaryFiber.tag) {\n    case 31:\n    case 13:\n      var retryCache = boundaryFiber.stateNode;\n      var suspenseState = boundaryFiber.memoizedState;\n      null !== suspenseState && (retryLane = suspenseState.retryLane);\n      break;\n    case 19:\n      retryCache = boundaryFiber.stateNode;\n      break;\n    case 22:\n      retryCache = boundaryFiber.stateNode._retryCache;\n      break;\n    default:\n      throw Error(formatProdErrorMessage(314));\n  }\n  null !== retryCache && retryCache.delete(wakeable);\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback$1(priorityLevel, callback) {\n  return scheduleCallback$3(priorityLevel, callback);\n}\nvar firstScheduledRoot = null,\n  lastScheduledRoot = null,\n  didScheduleMicrotask = !1,\n  mightHavePendingSyncWork = !1,\n  isFlushingWork = !1,\n  currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n  root !== lastScheduledRoot &&\n    null === root.next &&\n    (null === lastScheduledRoot\n      ? (firstScheduledRoot = lastScheduledRoot = root)\n      : (lastScheduledRoot = lastScheduledRoot.next = root));\n  mightHavePendingSyncWork = !0;\n  didScheduleMicrotask ||\n    ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());\n}\nfunction flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {\n  if (!isFlushingWork && mightHavePendingSyncWork) {\n    isFlushingWork = !0;\n    do {\n      var didPerformSomeWork = !1;\n      for (var root$190 = firstScheduledRoot; null !== root$190; ) {\n        if (!onlyLegacy)\n          if (0 !== syncTransitionLanes) {\n            var pendingLanes = root$190.pendingLanes;\n            if (0 === pendingLanes) var JSCompiler_inline_result = 0;\n            else {\n              var suspendedLanes = root$190.suspendedLanes,\n                pingedLanes = root$190.pingedLanes;\n              JSCompiler_inline_result =\n                (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;\n              JSCompiler_inline_result &=\n                pendingLanes & ~(suspendedLanes & ~pingedLanes);\n              JSCompiler_inline_result =\n                JSCompiler_inline_result & 201326741\n                  ? (JSCompiler_inline_result & 201326741) | 1\n                  : JSCompiler_inline_result\n                    ? JSCompiler_inline_result | 2\n                    : 0;\n            }\n            0 !== JSCompiler_inline_result &&\n              ((didPerformSomeWork = !0),\n              performSyncWorkOnRoot(root$190, JSCompiler_inline_result));\n          } else\n            (JSCompiler_inline_result = workInProgressRootRenderLanes),\n              (JSCompiler_inline_result = getNextLanes(\n                root$190,\n                root$190 === workInProgressRoot ? JSCompiler_inline_result : 0,\n                null !== root$190.cancelPendingCommit ||\n                  -1 !== root$190.timeoutHandle\n              )),\n              0 === (JSCompiler_inline_result & 3) ||\n                checkIfRootIsPrerendering(root$190, JSCompiler_inline_result) ||\n                ((didPerformSomeWork = !0),\n                performSyncWorkOnRoot(root$190, JSCompiler_inline_result));\n        root$190 = root$190.next;\n      }\n    } while (didPerformSomeWork);\n    isFlushingWork = !1;\n  }\n}\nfunction processRootScheduleInImmediateTask() {\n  processRootScheduleInMicrotask();\n}\nfunction processRootScheduleInMicrotask() {\n  mightHavePendingSyncWork = didScheduleMicrotask = !1;\n  var syncTransitionLanes = 0;\n  0 !== currentEventTransitionLane &&\n    shouldAttemptEagerTransition() &&\n    (syncTransitionLanes = currentEventTransitionLane);\n  for (\n    var currentTime = now(), prev = null, root = firstScheduledRoot;\n    null !== root;\n\n  ) {\n    var next = root.next,\n      nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n    if (0 === nextLanes)\n      (root.next = null),\n        null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n        null === next && (lastScheduledRoot = prev);\n    else if (\n      ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))\n    )\n      mightHavePendingSyncWork = !0;\n    root = next;\n  }\n  (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||\n    flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);\n  0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n  for (\n    var suspendedLanes = root.suspendedLanes,\n      pingedLanes = root.pingedLanes,\n      expirationTimes = root.expirationTimes,\n      lanes = root.pendingLanes & -62914561;\n    0 < lanes;\n\n  ) {\n    var index$5 = 31 - clz32(lanes),\n      lane = 1 << index$5,\n      expirationTime = expirationTimes[index$5];\n    if (-1 === expirationTime) {\n      if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n        expirationTimes[index$5] = computeExpirationTime(lane, currentTime);\n    } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n    lanes &= ~lane;\n  }\n  currentTime = workInProgressRoot;\n  suspendedLanes = workInProgressRootRenderLanes;\n  suspendedLanes = getNextLanes(\n    root,\n    root === currentTime ? suspendedLanes : 0,\n    null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n  );\n  pingedLanes = root.callbackNode;\n  if (\n    0 === suspendedLanes ||\n    (root === currentTime &&\n      (2 === workInProgressSuspendedReason ||\n        9 === workInProgressSuspendedReason)) ||\n    null !== root.cancelPendingCommit\n  )\n    return (\n      null !== pingedLanes &&\n        null !== pingedLanes &&\n        cancelCallback$1(pingedLanes),\n      (root.callbackNode = null),\n      (root.callbackPriority = 0)\n    );\n  if (\n    0 === (suspendedLanes & 3) ||\n    checkIfRootIsPrerendering(root, suspendedLanes)\n  ) {\n    currentTime = suspendedLanes & -suspendedLanes;\n    if (currentTime === root.callbackPriority) return currentTime;\n    null !== pingedLanes && cancelCallback$1(pingedLanes);\n    switch (lanesToEventPriority(suspendedLanes)) {\n      case 2:\n      case 8:\n        suspendedLanes = UserBlockingPriority;\n        break;\n      case 32:\n        suspendedLanes = NormalPriority$1;\n        break;\n      case 268435456:\n        suspendedLanes = IdlePriority;\n        break;\n      default:\n        suspendedLanes = NormalPriority$1;\n    }\n    pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);\n    suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);\n    root.callbackPriority = currentTime;\n    root.callbackNode = suspendedLanes;\n    return currentTime;\n  }\n  null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);\n  root.callbackPriority = 2;\n  root.callbackNode = null;\n  return 2;\n}\nfunction performWorkOnRootViaSchedulerTask(root, didTimeout) {\n  if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)\n    return (root.callbackNode = null), (root.callbackPriority = 0), null;\n  var originalCallbackNode = root.callbackNode;\n  if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)\n    return null;\n  var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;\n  workInProgressRootRenderLanes$jscomp$0 = getNextLanes(\n    root,\n    root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,\n    null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n  );\n  if (0 === workInProgressRootRenderLanes$jscomp$0) return null;\n  performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);\n  scheduleTaskForRootDuringMicrotask(root, now());\n  return null != root.callbackNode && root.callbackNode === originalCallbackNode\n    ? performWorkOnRootViaSchedulerTask.bind(null, root)\n    : null;\n}\nfunction performSyncWorkOnRoot(root, lanes) {\n  if (flushPendingEffects()) return null;\n  performWorkOnRoot(root, lanes, !0);\n}\nfunction scheduleImmediateRootScheduleTask() {\n  scheduleMicrotask(function () {\n    0 !== (executionContext & 6)\n      ? scheduleCallback$3(\n          ImmediatePriority,\n          processRootScheduleInImmediateTask\n        )\n      : processRootScheduleInMicrotask();\n  });\n}\nfunction requestTransitionLane() {\n  if (0 === currentEventTransitionLane) {\n    var actionScopeLane = currentEntangledLane;\n    0 === actionScopeLane &&\n      ((actionScopeLane = nextTransitionUpdateLane),\n      (nextTransitionUpdateLane <<= 1),\n      0 === (nextTransitionUpdateLane & 261888) &&\n        (nextTransitionUpdateLane = 256));\n    currentEventTransitionLane = actionScopeLane;\n  }\n  return currentEventTransitionLane;\n}\nfunction coerceFormActionProp(actionProp) {\n  return null == actionProp ||\n    \"symbol\" === typeof actionProp ||\n    \"boolean\" === typeof actionProp\n    ? null\n    : \"function\" === typeof actionProp\n      ? actionProp\n      : sanitizeURL(actionProp);\n}\nfunction extractEvents$1(\n  dispatchQueue,\n  domEventName,\n  maybeTargetInst,\n  nativeEvent,\n  nativeEventTarget\n) {\n  if (\n    \"submit\" === domEventName &&\n    maybeTargetInst &&\n    maybeTargetInst.stateNode === nativeEventTarget\n  ) {\n    var action = coerceFormActionProp(\n        (nativeEventTarget[internalPropsKey] || null).action\n      ),\n      submitter = nativeEvent.submitter;\n    submitter &&\n      ((domEventName = (domEventName = submitter[internalPropsKey] || null)\n        ? coerceFormActionProp(domEventName.formAction)\n        : submitter.getAttribute(\"formAction\")),\n      null !== domEventName && ((action = domEventName), (submitter = null)));\n    var event = new SyntheticEvent(\n      \"action\",\n      \"action\",\n      null,\n      nativeEvent,\n      nativeEventTarget\n    );\n    dispatchQueue.push({\n      event: event,\n      listeners: [\n        {\n          instance: null,\n          listener: function () {\n            if (nativeEvent.defaultPrevented) {\n              if (0 !== currentEventTransitionLane) {\n                var formData = new FormData(nativeEventTarget, submitter);\n                startHostTransition(\n                  maybeTargetInst,\n                  {\n                    pending: !0,\n                    data: formData,\n                    method: nativeEventTarget.method,\n                    action: action\n                  },\n                  null,\n                  formData\n                );\n              }\n            } else\n              \"function\" === typeof action &&\n                (event.preventDefault(),\n                (formData = new FormData(nativeEventTarget, submitter)),\n                startHostTransition(\n                  maybeTargetInst,\n                  {\n                    pending: !0,\n                    data: formData,\n                    method: nativeEventTarget.method,\n                    action: action\n                  },\n                  action,\n                  formData\n                ));\n          },\n          currentTarget: nativeEventTarget\n        }\n      ]\n    });\n  }\n}\nfor (\n  var i$jscomp$inline_1667 = 0;\n  i$jscomp$inline_1667 < simpleEventPluginEvents.length;\n  i$jscomp$inline_1667++\n) {\n  var eventName$jscomp$inline_1668 =\n      simpleEventPluginEvents[i$jscomp$inline_1667],\n    domEventName$jscomp$inline_1669 =\n      eventName$jscomp$inline_1668.toLowerCase(),\n    capitalizedEvent$jscomp$inline_1670 =\n      eventName$jscomp$inline_1668[0].toUpperCase() +\n      eventName$jscomp$inline_1668.slice(1);\n  registerSimpleEvent(\n    domEventName$jscomp$inline_1669,\n    \"on\" + capitalizedEvent$jscomp$inline_1670\n  );\n}\nregisterSimpleEvent(ANIMATION_END, \"onAnimationEnd\");\nregisterSimpleEvent(ANIMATION_ITERATION, \"onAnimationIteration\");\nregisterSimpleEvent(ANIMATION_START, \"onAnimationStart\");\nregisterSimpleEvent(\"dblclick\", \"onDoubleClick\");\nregisterSimpleEvent(\"focusin\", \"onFocus\");\nregisterSimpleEvent(\"focusout\", \"onBlur\");\nregisterSimpleEvent(TRANSITION_RUN, \"onTransitionRun\");\nregisterSimpleEvent(TRANSITION_START, \"onTransitionStart\");\nregisterSimpleEvent(TRANSITION_CANCEL, \"onTransitionCancel\");\nregisterSimpleEvent(TRANSITION_END, \"onTransitionEnd\");\nregisterDirectEvent(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\nregisterDirectEvent(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\nregisterTwoPhaseEvent(\n  \"onChange\",\n  \"change click focusin focusout input keydown keyup selectionchange\".split(\" \")\n);\nregisterTwoPhaseEvent(\n  \"onSelect\",\n  \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\n    \" \"\n  )\n);\nregisterTwoPhaseEvent(\"onBeforeInput\", [\n  \"compositionend\",\n  \"keypress\",\n  \"textInput\",\n  \"paste\"\n]);\nregisterTwoPhaseEvent(\n  \"onCompositionEnd\",\n  \"compositionend focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n  \"onCompositionStart\",\n  \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n  \"onCompositionUpdate\",\n  \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \")\n);\nvar mediaEventTypes =\n    \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\n      \" \"\n    ),\n  nonDelegatedEvents = new Set(\n    \"beforetoggle cancel close invalid load scroll scrollend toggle\"\n      .split(\" \")\n      .concat(mediaEventTypes)\n  );\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n  eventSystemFlags = 0 !== (eventSystemFlags & 4);\n  for (var i = 0; i < dispatchQueue.length; i++) {\n    var _dispatchQueue$i = dispatchQueue[i],\n      event = _dispatchQueue$i.event;\n    _dispatchQueue$i = _dispatchQueue$i.listeners;\n    a: {\n      var previousInstance = void 0;\n      if (eventSystemFlags)\n        for (\n          var i$jscomp$0 = _dispatchQueue$i.length - 1;\n          0 <= i$jscomp$0;\n          i$jscomp$0--\n        ) {\n          var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],\n            instance = _dispatchListeners$i.instance,\n            currentTarget = _dispatchListeners$i.currentTarget;\n          _dispatchListeners$i = _dispatchListeners$i.listener;\n          if (instance !== previousInstance && event.isPropagationStopped())\n            break a;\n          previousInstance = _dispatchListeners$i;\n          event.currentTarget = currentTarget;\n          try {\n            previousInstance(event);\n          } catch (error) {\n            reportGlobalError(error);\n          }\n          event.currentTarget = null;\n          previousInstance = instance;\n        }\n      else\n        for (\n          i$jscomp$0 = 0;\n          i$jscomp$0 < _dispatchQueue$i.length;\n          i$jscomp$0++\n        ) {\n          _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];\n          instance = _dispatchListeners$i.instance;\n          currentTarget = _dispatchListeners$i.currentTarget;\n          _dispatchListeners$i = _dispatchListeners$i.listener;\n          if (instance !== previousInstance && event.isPropagationStopped())\n            break a;\n          previousInstance = _dispatchListeners$i;\n          event.currentTarget = currentTarget;\n          try {\n            previousInstance(event);\n          } catch (error) {\n            reportGlobalError(error);\n          }\n          event.currentTarget = null;\n          previousInstance = instance;\n        }\n    }\n  }\n}\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n  var JSCompiler_inline_result = targetElement[internalEventHandlersKey];\n  void 0 === JSCompiler_inline_result &&\n    (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =\n      new Set());\n  var listenerSetKey = domEventName + \"__bubble\";\n  JSCompiler_inline_result.has(listenerSetKey) ||\n    (addTrappedEventListener(targetElement, domEventName, 2, !1),\n    JSCompiler_inline_result.add(listenerSetKey));\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n  var eventSystemFlags = 0;\n  isCapturePhaseListener && (eventSystemFlags |= 4);\n  addTrappedEventListener(\n    target,\n    domEventName,\n    eventSystemFlags,\n    isCapturePhaseListener\n  );\n}\nvar listeningMarker = \"_reactListening\" + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n  if (!rootContainerElement[listeningMarker]) {\n    rootContainerElement[listeningMarker] = !0;\n    allNativeEvents.forEach(function (domEventName) {\n      \"selectionchange\" !== domEventName &&\n        (nonDelegatedEvents.has(domEventName) ||\n          listenToNativeEvent(domEventName, !1, rootContainerElement),\n        listenToNativeEvent(domEventName, !0, rootContainerElement));\n    });\n    var ownerDocument =\n      9 === rootContainerElement.nodeType\n        ? rootContainerElement\n        : rootContainerElement.ownerDocument;\n    null === ownerDocument ||\n      ownerDocument[listeningMarker] ||\n      ((ownerDocument[listeningMarker] = !0),\n      listenToNativeEvent(\"selectionchange\", !1, ownerDocument));\n  }\n}\nfunction addTrappedEventListener(\n  targetContainer,\n  domEventName,\n  eventSystemFlags,\n  isCapturePhaseListener\n) {\n  switch (getEventPriority(domEventName)) {\n    case 2:\n      var listenerWrapper = dispatchDiscreteEvent;\n      break;\n    case 8:\n      listenerWrapper = dispatchContinuousEvent;\n      break;\n    default:\n      listenerWrapper = dispatchEvent;\n  }\n  eventSystemFlags = listenerWrapper.bind(\n    null,\n    domEventName,\n    eventSystemFlags,\n    targetContainer\n  );\n  listenerWrapper = void 0;\n  !passiveBrowserEventsSupported ||\n    (\"touchstart\" !== domEventName &&\n      \"touchmove\" !== domEventName &&\n      \"wheel\" !== domEventName) ||\n    (listenerWrapper = !0);\n  isCapturePhaseListener\n    ? void 0 !== listenerWrapper\n      ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n          capture: !0,\n          passive: listenerWrapper\n        })\n      : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)\n    : void 0 !== listenerWrapper\n      ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n          passive: listenerWrapper\n        })\n      : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);\n}\nfunction dispatchEventForPluginEventSystem(\n  domEventName,\n  eventSystemFlags,\n  nativeEvent,\n  targetInst$jscomp$0,\n  targetContainer\n) {\n  var ancestorInst = targetInst$jscomp$0;\n  if (\n    0 === (eventSystemFlags & 1) &&\n    0 === (eventSystemFlags & 2) &&\n    null !== targetInst$jscomp$0\n  )\n    a: for (;;) {\n      if (null === targetInst$jscomp$0) return;\n      var nodeTag = targetInst$jscomp$0.tag;\n      if (3 === nodeTag || 4 === nodeTag) {\n        var container = targetInst$jscomp$0.stateNode.containerInfo;\n        if (container === targetContainer) break;\n        if (4 === nodeTag)\n          for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {\n            var grandTag = nodeTag.tag;\n            if (\n              (3 === grandTag || 4 === grandTag) &&\n              nodeTag.stateNode.containerInfo === targetContainer\n            )\n              return;\n            nodeTag = nodeTag.return;\n          }\n        for (; null !== container; ) {\n          nodeTag = getClosestInstanceFromNode(container);\n          if (null === nodeTag) return;\n          grandTag = nodeTag.tag;\n          if (\n            5 === grandTag ||\n            6 === grandTag ||\n            26 === grandTag ||\n            27 === grandTag\n          ) {\n            targetInst$jscomp$0 = ancestorInst = nodeTag;\n            continue a;\n          }\n          container = container.parentNode;\n        }\n      }\n      targetInst$jscomp$0 = targetInst$jscomp$0.return;\n    }\n  batchedUpdates$1(function () {\n    var targetInst = ancestorInst,\n      nativeEventTarget = getEventTarget(nativeEvent),\n      dispatchQueue = [];\n    a: {\n      var reactName = topLevelEventsToReactNames.get(domEventName);\n      if (void 0 !== reactName) {\n        var SyntheticEventCtor = SyntheticEvent,\n          reactEventType = domEventName;\n        switch (domEventName) {\n          case \"keypress\":\n            if (0 === getEventCharCode(nativeEvent)) break a;\n          case \"keydown\":\n          case \"keyup\":\n            SyntheticEventCtor = SyntheticKeyboardEvent;\n            break;\n          case \"focusin\":\n            reactEventType = \"focus\";\n            SyntheticEventCtor = SyntheticFocusEvent;\n            break;\n          case \"focusout\":\n            reactEventType = \"blur\";\n            SyntheticEventCtor = SyntheticFocusEvent;\n            break;\n          case \"beforeblur\":\n          case \"afterblur\":\n            SyntheticEventCtor = SyntheticFocusEvent;\n            break;\n          case \"click\":\n            if (2 === nativeEvent.button) break a;\n          case \"auxclick\":\n          case \"dblclick\":\n          case \"mousedown\":\n          case \"mousemove\":\n          case \"mouseup\":\n          case \"mouseout\":\n          case \"mouseover\":\n          case \"contextmenu\":\n            SyntheticEventCtor = SyntheticMouseEvent;\n            break;\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          case \"touchcancel\":\n          case \"touchend\":\n          case \"touchmove\":\n          case \"touchstart\":\n            SyntheticEventCtor = SyntheticTouchEvent;\n            break;\n          case ANIMATION_END:\n          case ANIMATION_ITERATION:\n          case ANIMATION_START:\n            SyntheticEventCtor = SyntheticAnimationEvent;\n            break;\n          case TRANSITION_END:\n            SyntheticEventCtor = SyntheticTransitionEvent;\n            break;\n          case \"scroll\":\n          case \"scrollend\":\n            SyntheticEventCtor = SyntheticUIEvent;\n            break;\n          case \"wheel\":\n            SyntheticEventCtor = SyntheticWheelEvent;\n            break;\n          case \"copy\":\n          case \"cut\":\n          case \"paste\":\n            SyntheticEventCtor = SyntheticClipboardEvent;\n            break;\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          case \"submit\":\n            SyntheticEventCtor = SyntheticSubmitEvent;\n            break;\n          case \"toggle\":\n          case \"beforetoggle\":\n            SyntheticEventCtor = SyntheticToggleEvent;\n        }\n        var inCapturePhase = 0 !== (eventSystemFlags & 4),\n          accumulateTargetOnly =\n            !inCapturePhase &&\n            (\"scroll\" === domEventName || \"scrollend\" === domEventName),\n          reactEventName = inCapturePhase\n            ? null !== reactName\n              ? reactName + \"Capture\"\n              : null\n            : reactName;\n        inCapturePhase = [];\n        for (\n          var instance = targetInst, lastHostComponent;\n          null !== instance;\n\n        ) {\n          var _instance = instance;\n          lastHostComponent = _instance.stateNode;\n          _instance = _instance.tag;\n          (5 !== _instance && 26 !== _instance && 27 !== _instance) ||\n            null === lastHostComponent ||\n            null === reactEventName ||\n            ((_instance = getListener(instance, reactEventName)),\n            null != _instance &&\n              inCapturePhase.push(\n                createDispatchListener(instance, _instance, lastHostComponent)\n              ));\n          if (accumulateTargetOnly) break;\n          instance = instance.return;\n        }\n        0 < inCapturePhase.length &&\n          ((reactName = new SyntheticEventCtor(\n            reactName,\n            reactEventType,\n            null,\n            nativeEvent,\n            nativeEventTarget\n          )),\n          dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));\n      }\n    }\n    if (0 === (eventSystemFlags & 7)) {\n      a: {\n        SyntheticEventCtor =\n          \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n        reactName =\n          \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n        if (\n          SyntheticEventCtor &&\n          nativeEvent !== currentReplayingEvent &&\n          (reactEventType =\n            nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n          (getClosestInstanceFromNode(reactEventType) ||\n            reactEventType[internalContainerInstanceKey])\n        )\n          break a;\n        if (reactName || SyntheticEventCtor) {\n          reactEventType =\n            nativeEventTarget.window === nativeEventTarget\n              ? nativeEventTarget\n              : (SyntheticEventCtor = nativeEventTarget.ownerDocument)\n                ? SyntheticEventCtor.defaultView ||\n                  SyntheticEventCtor.parentWindow\n                : window;\n          if (reactName) {\n            if (\n              ((SyntheticEventCtor =\n                nativeEvent.relatedTarget || nativeEvent.toElement),\n              (reactName = targetInst),\n              (SyntheticEventCtor = SyntheticEventCtor\n                ? getClosestInstanceFromNode(SyntheticEventCtor)\n                : null),\n              null !== SyntheticEventCtor &&\n                ((accumulateTargetOnly =\n                  getNearestMountedFiber(SyntheticEventCtor)),\n                (inCapturePhase = SyntheticEventCtor.tag),\n                SyntheticEventCtor !== accumulateTargetOnly ||\n                  (5 !== inCapturePhase &&\n                    27 !== inCapturePhase &&\n                    6 !== inCapturePhase)))\n            )\n              SyntheticEventCtor = null;\n          } else (reactName = null), (SyntheticEventCtor = targetInst);\n          if (reactName !== SyntheticEventCtor) {\n            inCapturePhase = SyntheticMouseEvent;\n            _instance = \"onMouseLeave\";\n            reactEventName = \"onMouseEnter\";\n            instance = \"mouse\";\n            if (\"pointerout\" === domEventName || \"pointerover\" === domEventName)\n              (inCapturePhase = SyntheticPointerEvent),\n                (_instance = \"onPointerLeave\"),\n                (reactEventName = \"onPointerEnter\"),\n                (instance = \"pointer\");\n            accumulateTargetOnly =\n              null == reactName\n                ? reactEventType\n                : getNodeFromInstance(reactName);\n            lastHostComponent =\n              null == SyntheticEventCtor\n                ? reactEventType\n                : getNodeFromInstance(SyntheticEventCtor);\n            reactEventType = new inCapturePhase(\n              _instance,\n              instance + \"leave\",\n              reactName,\n              nativeEvent,\n              nativeEventTarget\n            );\n            reactEventType.target = accumulateTargetOnly;\n            reactEventType.relatedTarget = lastHostComponent;\n            _instance = null;\n            getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n              ((inCapturePhase = new inCapturePhase(\n                reactEventName,\n                instance + \"enter\",\n                SyntheticEventCtor,\n                nativeEvent,\n                nativeEventTarget\n              )),\n              (inCapturePhase.target = lastHostComponent),\n              (inCapturePhase.relatedTarget = accumulateTargetOnly),\n              (_instance = inCapturePhase));\n            accumulateTargetOnly = _instance;\n            inCapturePhase =\n              reactName && SyntheticEventCtor\n                ? getLowestCommonAncestor(\n                    reactName,\n                    SyntheticEventCtor,\n                    getParent\n                  )\n                : null;\n            null !== reactName &&\n              accumulateEnterLeaveListenersForEvent(\n                dispatchQueue,\n                reactEventType,\n                reactName,\n                inCapturePhase,\n                !1\n              );\n            null !== SyntheticEventCtor &&\n              null !== accumulateTargetOnly &&\n              accumulateEnterLeaveListenersForEvent(\n                dispatchQueue,\n                accumulateTargetOnly,\n                SyntheticEventCtor,\n                inCapturePhase,\n                !0\n              );\n          }\n        }\n      }\n      a: {\n        reactName = targetInst ? getNodeFromInstance(targetInst) : window;\n        SyntheticEventCtor =\n          reactName.nodeName && reactName.nodeName.toLowerCase();\n        if (\n          \"select\" === SyntheticEventCtor ||\n          (\"input\" === SyntheticEventCtor && \"file\" === reactName.type)\n        )\n          var getTargetInstFunc = getTargetInstForChangeEvent;\n        else if (isTextInputElement(reactName))\n          if (isInputEventSupported)\n            getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n          else {\n            getTargetInstFunc = getTargetInstForInputEventPolyfill;\n            var handleEventFunc = handleEventsForInputEventPolyfill;\n          }\n        else\n          (SyntheticEventCtor = reactName.nodeName),\n            !SyntheticEventCtor ||\n            \"input\" !== SyntheticEventCtor.toLowerCase() ||\n            (\"checkbox\" !== reactName.type && \"radio\" !== reactName.type)\n              ? targetInst &&\n                isCustomElement(targetInst.elementType) &&\n                (getTargetInstFunc = getTargetInstForChangeEvent)\n              : (getTargetInstFunc = getTargetInstForClickEvent);\n        if (\n          getTargetInstFunc &&\n          (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))\n        ) {\n          createAndAccumulateChangeEvent(\n            dispatchQueue,\n            getTargetInstFunc,\n            nativeEvent,\n            nativeEventTarget\n          );\n          break a;\n        }\n        handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);\n      }\n      handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;\n      switch (domEventName) {\n        case \"focusin\":\n          if (\n            isTextInputElement(handleEventFunc) ||\n            \"true\" === handleEventFunc.contentEditable\n          )\n            (activeElement = handleEventFunc),\n              (activeElementInst = targetInst),\n              (lastSelection = null);\n          break;\n        case \"focusout\":\n          lastSelection = activeElementInst = activeElement = null;\n          break;\n        case \"mousedown\":\n          mouseDown = !0;\n          break;\n        case \"contextmenu\":\n        case \"mouseup\":\n        case \"dragend\":\n          mouseDown = !1;\n          constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n          break;\n        case \"selectionchange\":\n          if (skipSelectionChangeEvent) break;\n        case \"keydown\":\n        case \"keyup\":\n          constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n      }\n      var fallbackData;\n      if (canUseCompositionEvent)\n        b: {\n          switch (domEventName) {\n            case \"compositionstart\":\n              var eventType = \"onCompositionStart\";\n              break b;\n            case \"compositionend\":\n              eventType = \"onCompositionEnd\";\n              break b;\n            case \"compositionupdate\":\n              eventType = \"onCompositionUpdate\";\n              break b;\n          }\n          eventType = void 0;\n        }\n      else\n        isComposing\n          ? isFallbackCompositionEnd(domEventName, nativeEvent) &&\n            (eventType = \"onCompositionEnd\")\n          : \"keydown\" === domEventName &&\n            229 === nativeEvent.keyCode &&\n            (eventType = \"onCompositionStart\");\n      eventType &&\n        (useFallbackCompositionData &&\n          \"ko\" !== nativeEvent.locale &&\n          (isComposing || \"onCompositionStart\" !== eventType\n            ? \"onCompositionEnd\" === eventType &&\n              isComposing &&\n              (fallbackData = getData())\n            : ((root = nativeEventTarget),\n              (startText = \"value\" in root ? root.value : root.textContent),\n              (isComposing = !0))),\n        (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),\n        0 < handleEventFunc.length &&\n          ((eventType = new SyntheticCompositionEvent(\n            eventType,\n            domEventName,\n            null,\n            nativeEvent,\n            nativeEventTarget\n          )),\n          dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),\n          fallbackData\n            ? (eventType.data = fallbackData)\n            : ((fallbackData = getDataFromCustomEvent(nativeEvent)),\n              null !== fallbackData && (eventType.data = fallbackData))));\n      if (\n        (fallbackData = canUseTextInputEvent\n          ? getNativeBeforeInputChars(domEventName, nativeEvent)\n          : getFallbackBeforeInputChars(domEventName, nativeEvent))\n      )\n        (eventType = accumulateTwoPhaseListeners(targetInst, \"onBeforeInput\")),\n          0 < eventType.length &&\n            ((handleEventFunc = new SyntheticCompositionEvent(\n              \"onBeforeInput\",\n              \"beforeinput\",\n              null,\n              nativeEvent,\n              nativeEventTarget\n            )),\n            dispatchQueue.push({\n              event: handleEventFunc,\n              listeners: eventType\n            }),\n            (handleEventFunc.data = fallbackData));\n      extractEvents$1(\n        dispatchQueue,\n        domEventName,\n        targetInst,\n        nativeEvent,\n        nativeEventTarget\n      );\n    }\n    processDispatchQueue(dispatchQueue, eventSystemFlags);\n  });\n}\nfunction createDispatchListener(instance, listener, currentTarget) {\n  return {\n    instance: instance,\n    listener: listener,\n    currentTarget: currentTarget\n  };\n}\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n  for (\n    var captureName = reactName + \"Capture\", listeners = [];\n    null !== targetFiber;\n\n  ) {\n    var _instance2 = targetFiber,\n      stateNode = _instance2.stateNode;\n    _instance2 = _instance2.tag;\n    (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||\n      null === stateNode ||\n      ((_instance2 = getListener(targetFiber, captureName)),\n      null != _instance2 &&\n        listeners.unshift(\n          createDispatchListener(targetFiber, _instance2, stateNode)\n        ),\n      (_instance2 = getListener(targetFiber, reactName)),\n      null != _instance2 &&\n        listeners.push(\n          createDispatchListener(targetFiber, _instance2, stateNode)\n        ));\n    if (3 === targetFiber.tag) return listeners;\n    targetFiber = targetFiber.return;\n  }\n  return [];\n}\nfunction getParent(inst) {\n  if (null === inst) return null;\n  do inst = inst.return;\n  while (inst && 5 !== inst.tag && 27 !== inst.tag);\n  return inst ? inst : null;\n}\nfunction accumulateEnterLeaveListenersForEvent(\n  dispatchQueue,\n  event,\n  target,\n  common,\n  inCapturePhase\n) {\n  for (\n    var registrationName = event._reactName, listeners = [];\n    null !== target && target !== common;\n\n  ) {\n    var _instance3 = target,\n      alternate = _instance3.alternate,\n      stateNode = _instance3.stateNode;\n    _instance3 = _instance3.tag;\n    if (null !== alternate && alternate === common) break;\n    (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||\n      null === stateNode ||\n      ((alternate = stateNode),\n      inCapturePhase\n        ? ((stateNode = getListener(target, registrationName)),\n          null != stateNode &&\n            listeners.unshift(\n              createDispatchListener(target, stateNode, alternate)\n            ))\n        : inCapturePhase ||\n          ((stateNode = getListener(target, registrationName)),\n          null != stateNode &&\n            listeners.push(\n              createDispatchListener(target, stateNode, alternate)\n            )));\n    target = target.return;\n  }\n  0 !== listeners.length &&\n    dispatchQueue.push({ event: event, listeners: listeners });\n}\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g,\n  NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\nfunction normalizeMarkupForTextOrAttribute(markup) {\n  return (\"string\" === typeof markup ? markup : \"\" + markup)\n    .replace(NORMALIZE_NEWLINES_REGEX, \"\\n\")\n    .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, \"\");\n}\nfunction checkForUnmatchedText(serverText, clientText) {\n  clientText = normalizeMarkupForTextOrAttribute(clientText);\n  return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;\n}\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n  switch (key) {\n    case \"children\":\n      if (\"string\" === typeof value)\n        \"body\" === tag ||\n          (\"textarea\" === tag && \"\" === value) ||\n          setTextContent(domElement, value);\n      else if (\"number\" === typeof value || \"bigint\" === typeof value)\n        \"body\" !== tag && setTextContent(domElement, \"\" + value);\n      else return;\n      break;\n    case \"className\":\n      setValueForKnownAttribute(domElement, \"class\", value);\n      break;\n    case \"tabIndex\":\n      setValueForKnownAttribute(domElement, \"tabindex\", value);\n      break;\n    case \"dir\":\n    case \"role\":\n    case \"viewBox\":\n    case \"width\":\n    case \"height\":\n      setValueForKnownAttribute(domElement, key, value);\n      break;\n    case \"style\":\n      setValueForStyles(domElement, value, prevValue);\n      return;\n    case \"data\":\n      if (\"object\" !== tag) {\n        setValueForKnownAttribute(domElement, \"data\", value);\n        break;\n      }\n    case \"src\":\n    case \"href\":\n      if (\"\" === value && (\"a\" !== tag || \"href\" !== key)) {\n        domElement.removeAttribute(key);\n        break;\n      }\n      if (\n        null == value ||\n        \"function\" === typeof value ||\n        \"symbol\" === typeof value ||\n        \"boolean\" === typeof value\n      ) {\n        domElement.removeAttribute(key);\n        break;\n      }\n      value = sanitizeURL(value);\n      domElement.setAttribute(key, value);\n      break;\n    case \"action\":\n    case \"formAction\":\n      if (\"function\" === typeof value) {\n        domElement.setAttribute(\n          key,\n          \"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\"\n        );\n        break;\n      } else\n        \"function\" === typeof prevValue &&\n          (\"formAction\" === key\n            ? (\"input\" !== tag &&\n                setProp(domElement, tag, \"name\", props.name, props, null),\n              setProp(\n                domElement,\n                tag,\n                \"formEncType\",\n                props.formEncType,\n                props,\n                null\n              ),\n              setProp(\n                domElement,\n                tag,\n                \"formMethod\",\n                props.formMethod,\n                props,\n                null\n              ),\n              setProp(\n                domElement,\n                tag,\n                \"formTarget\",\n                props.formTarget,\n                props,\n                null\n              ))\n            : (setProp(domElement, tag, \"encType\", props.encType, props, null),\n              setProp(domElement, tag, \"method\", props.method, props, null),\n              setProp(domElement, tag, \"target\", props.target, props, null)));\n      if (\n        null == value ||\n        \"symbol\" === typeof value ||\n        \"boolean\" === typeof value\n      ) {\n        domElement.removeAttribute(key);\n        break;\n      }\n      value = sanitizeURL(value);\n      domElement.setAttribute(key, value);\n      break;\n    case \"onClick\":\n      null != value && (domElement.onclick = noop$1);\n      return;\n    case \"onScroll\":\n      null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n      return;\n    case \"onScrollEnd\":\n      null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n      return;\n    case \"dangerouslySetInnerHTML\":\n      if (null != value) {\n        if (\"object\" !== typeof value || !(\"__html\" in value))\n          throw Error(formatProdErrorMessage(61));\n        key = value.__html;\n        if (null != key) {\n          if (null != props.children) throw Error(formatProdErrorMessage(60));\n          (null != prevValue ? prevValue.__html : void 0) !== key &&\n            (domElement.innerHTML = key);\n        }\n      }\n      break;\n    case \"multiple\":\n      domElement.multiple =\n        value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n      break;\n    case \"muted\":\n      domElement.muted =\n        value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n      break;\n    case \"suppressContentEditableWarning\":\n    case \"suppressHydrationWarning\":\n    case \"defaultValue\":\n    case \"defaultChecked\":\n    case \"innerHTML\":\n    case \"ref\":\n      break;\n    case \"autoFocus\":\n      break;\n    case \"xlinkHref\":\n      if (\n        null == value ||\n        \"function\" === typeof value ||\n        \"boolean\" === typeof value ||\n        \"symbol\" === typeof value\n      ) {\n        domElement.removeAttribute(\"xlink:href\");\n        break;\n      }\n      key = sanitizeURL(value);\n      domElement.setAttributeNS(\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:href\",\n        key\n      );\n      break;\n    case \"contentEditable\":\n    case \"spellCheck\":\n    case \"draggable\":\n    case \"value\":\n    case \"autoReverse\":\n    case \"externalResourcesRequired\":\n    case \"focusable\":\n    case \"preserveAlpha\":\n      null != value && \"function\" !== typeof value && \"symbol\" !== typeof value\n        ? domElement.setAttribute(key, value)\n        : domElement.removeAttribute(key);\n      break;\n    case \"inert\":\n    case \"allowFullScreen\":\n    case \"async\":\n    case \"autoPlay\":\n    case \"controls\":\n    case \"credentialless\":\n    case \"default\":\n    case \"defer\":\n    case \"disabled\":\n    case \"disablePictureInPicture\":\n    case \"disableRemotePlayback\":\n    case \"formNoValidate\":\n    case \"hidden\":\n    case \"loop\":\n    case \"noModule\":\n    case \"noValidate\":\n    case \"open\":\n    case \"playsInline\":\n    case \"readOnly\":\n    case \"required\":\n    case \"reversed\":\n    case \"scoped\":\n    case \"seamless\":\n    case \"itemScope\":\n      value && \"function\" !== typeof value && \"symbol\" !== typeof value\n        ? domElement.setAttribute(key, \"\")\n        : domElement.removeAttribute(key);\n      break;\n    case \"capture\":\n    case \"download\":\n      !0 === value\n        ? domElement.setAttribute(key, \"\")\n        : !1 !== value &&\n            null != value &&\n            \"function\" !== typeof value &&\n            \"symbol\" !== typeof value\n          ? domElement.setAttribute(key, value)\n          : domElement.removeAttribute(key);\n      break;\n    case \"cols\":\n    case \"rows\":\n    case \"size\":\n    case \"span\":\n      null != value &&\n      \"function\" !== typeof value &&\n      \"symbol\" !== typeof value &&\n      !isNaN(value) &&\n      1 <= value\n        ? domElement.setAttribute(key, value)\n        : domElement.removeAttribute(key);\n      break;\n    case \"rowSpan\":\n    case \"start\":\n      null == value ||\n      \"function\" === typeof value ||\n      \"symbol\" === typeof value ||\n      isNaN(value)\n        ? domElement.removeAttribute(key)\n        : domElement.setAttribute(key, value);\n      break;\n    case \"popover\":\n      listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n      listenToNonDelegatedEvent(\"toggle\", domElement);\n      setValueForAttribute(domElement, \"popover\", value);\n      break;\n    case \"xlinkActuate\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:actuate\",\n        value\n      );\n      break;\n    case \"xlinkArcrole\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:arcrole\",\n        value\n      );\n      break;\n    case \"xlinkRole\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:role\",\n        value\n      );\n      break;\n    case \"xlinkShow\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:show\",\n        value\n      );\n      break;\n    case \"xlinkTitle\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:title\",\n        value\n      );\n      break;\n    case \"xlinkType\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/1999/xlink\",\n        \"xlink:type\",\n        value\n      );\n      break;\n    case \"xmlBase\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/XML/1998/namespace\",\n        \"xml:base\",\n        value\n      );\n      break;\n    case \"xmlLang\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/XML/1998/namespace\",\n        \"xml:lang\",\n        value\n      );\n      break;\n    case \"xmlSpace\":\n      setValueForNamespacedAttribute(\n        domElement,\n        \"http://www.w3.org/XML/1998/namespace\",\n        \"xml:space\",\n        value\n      );\n      break;\n    case \"is\":\n      setValueForAttribute(domElement, \"is\", value);\n      break;\n    case \"innerText\":\n    case \"textContent\":\n      return;\n    default:\n      if (\n        !(2 < key.length) ||\n        (\"o\" !== key[0] && \"O\" !== key[0]) ||\n        (\"n\" !== key[1] && \"N\" !== key[1])\n      )\n        (key = aliases.get(key) || key),\n          setValueForAttribute(domElement, key, value);\n      else return;\n  }\n  viewTransitionMutationContext = !0;\n}\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n  switch (key) {\n    case \"style\":\n      setValueForStyles(domElement, value, prevValue);\n      return;\n    case \"dangerouslySetInnerHTML\":\n      if (null != value) {\n        if (\"object\" !== typeof value || !(\"__html\" in value))\n          throw Error(formatProdErrorMessage(61));\n        key = value.__html;\n        if (null != key) {\n          if (null != props.children) throw Error(formatProdErrorMessage(60));\n          (null != prevValue ? prevValue.__html : void 0) !== key &&\n            (domElement.innerHTML = key);\n        }\n      }\n      break;\n    case \"children\":\n      if (\"string\" === typeof value) setTextContent(domElement, value);\n      else if (\"number\" === typeof value || \"bigint\" === typeof value)\n        setTextContent(domElement, \"\" + value);\n      else return;\n      break;\n    case \"onScroll\":\n      null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n      return;\n    case \"onScrollEnd\":\n      null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n      return;\n    case \"onClick\":\n      null != value && (domElement.onclick = noop$1);\n      return;\n    case \"suppressContentEditableWarning\":\n    case \"suppressHydrationWarning\":\n    case \"innerHTML\":\n    case \"ref\":\n      return;\n    case \"innerText\":\n    case \"textContent\":\n      return;\n    default:\n      if (!registrationNameDependencies.hasOwnProperty(key))\n        a: {\n          if (\n            \"o\" === key[0] &&\n            \"n\" === key[1] &&\n            ((props = key.endsWith(\"Capture\")),\n            (prevValue = key.slice(2, props ? key.length - 7 : void 0)),\n            (tag = domElement[internalPropsKey] || null),\n            (tag = null != tag ? tag[key] : null),\n            \"function\" === typeof tag &&\n              domElement.removeEventListener(prevValue, tag, props),\n            \"function\" === typeof value)\n          ) {\n            \"function\" !== typeof tag &&\n              null !== tag &&\n              (key in domElement\n                ? (domElement[key] = null)\n                : domElement.hasAttribute(key) &&\n                  domElement.removeAttribute(key));\n            domElement.addEventListener(prevValue, value, props);\n            break a;\n          }\n          viewTransitionMutationContext = !0;\n          key in domElement\n            ? (domElement[key] = value)\n            : !0 === value\n              ? domElement.setAttribute(key, \"\")\n              : setValueForAttribute(domElement, key, value);\n        }\n      return;\n  }\n  viewTransitionMutationContext = !0;\n}\nfunction setInitialProperties(domElement, tag, props) {\n  switch (tag) {\n    case \"div\":\n    case \"span\":\n    case \"svg\":\n    case \"path\":\n    case \"a\":\n    case \"g\":\n    case \"p\":\n    case \"li\":\n      break;\n    case \"img\":\n      listenToNonDelegatedEvent(\"error\", domElement);\n      listenToNonDelegatedEvent(\"load\", domElement);\n      var hasSrc = !1,\n        hasSrcSet = !1,\n        propKey;\n      for (propKey in props)\n        if (props.hasOwnProperty(propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"src\":\n                hasSrc = !0;\n                break;\n              case \"srcSet\":\n                hasSrcSet = !0;\n                break;\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(formatProdErrorMessage(137, tag));\n              default:\n                setProp(domElement, tag, propKey, propValue, props, null);\n            }\n        }\n      hasSrcSet &&\n        setProp(domElement, tag, \"srcSet\", props.srcSet, props, null);\n      hasSrc && setProp(domElement, tag, \"src\", props.src, props, null);\n      return;\n    case \"input\":\n      listenToNonDelegatedEvent(\"invalid\", domElement);\n      var defaultValue = (propKey = propValue = hasSrcSet = null),\n        checked = null,\n        defaultChecked = null;\n      for (hasSrc in props)\n        if (props.hasOwnProperty(hasSrc)) {\n          var propValue$204 = props[hasSrc];\n          if (null != propValue$204)\n            switch (hasSrc) {\n              case \"name\":\n                hasSrcSet = propValue$204;\n                break;\n              case \"type\":\n                propValue = propValue$204;\n                break;\n              case \"checked\":\n                checked = propValue$204;\n                break;\n              case \"defaultChecked\":\n                defaultChecked = propValue$204;\n                break;\n              case \"value\":\n                propKey = propValue$204;\n                break;\n              case \"defaultValue\":\n                defaultValue = propValue$204;\n                break;\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                if (null != propValue$204)\n                  throw Error(formatProdErrorMessage(137, tag));\n                break;\n              default:\n                setProp(domElement, tag, hasSrc, propValue$204, props, null);\n            }\n        }\n      initInput(\n        domElement,\n        propKey,\n        defaultValue,\n        checked,\n        defaultChecked,\n        propValue,\n        hasSrcSet,\n        !1\n      );\n      return;\n    case \"select\":\n      listenToNonDelegatedEvent(\"invalid\", domElement);\n      hasSrc = propValue = propKey = null;\n      for (hasSrcSet in props)\n        if (\n          props.hasOwnProperty(hasSrcSet) &&\n          ((defaultValue = props[hasSrcSet]), null != defaultValue)\n        )\n          switch (hasSrcSet) {\n            case \"value\":\n              propKey = defaultValue;\n              break;\n            case \"defaultValue\":\n              propValue = defaultValue;\n              break;\n            case \"multiple\":\n              hasSrc = defaultValue;\n            default:\n              setProp(domElement, tag, hasSrcSet, defaultValue, props, null);\n          }\n      tag = propKey;\n      props = propValue;\n      domElement.multiple = !!hasSrc;\n      null != tag\n        ? updateOptions(domElement, !!hasSrc, tag, !1)\n        : null != props && updateOptions(domElement, !!hasSrc, props, !0);\n      return;\n    case \"textarea\":\n      listenToNonDelegatedEvent(\"invalid\", domElement);\n      propKey = hasSrcSet = hasSrc = null;\n      for (propValue in props)\n        if (\n          props.hasOwnProperty(propValue) &&\n          ((defaultValue = props[propValue]), null != defaultValue)\n        )\n          switch (propValue) {\n            case \"value\":\n              hasSrc = defaultValue;\n              break;\n            case \"defaultValue\":\n              hasSrcSet = defaultValue;\n              break;\n            case \"children\":\n              propKey = defaultValue;\n              break;\n            case \"dangerouslySetInnerHTML\":\n              if (null != defaultValue) throw Error(formatProdErrorMessage(91));\n              break;\n            default:\n              setProp(domElement, tag, propValue, defaultValue, props, null);\n          }\n      initTextarea(domElement, hasSrc, hasSrcSet, propKey);\n      return;\n    case \"option\":\n      for (checked in props)\n        if (\n          props.hasOwnProperty(checked) &&\n          ((hasSrc = props[checked]), null != hasSrc)\n        )\n          switch (checked) {\n            case \"selected\":\n              domElement.selected =\n                hasSrc &&\n                \"function\" !== typeof hasSrc &&\n                \"symbol\" !== typeof hasSrc;\n              break;\n            default:\n              setProp(domElement, tag, checked, hasSrc, props, null);\n          }\n      return;\n    case \"dialog\":\n      listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n      listenToNonDelegatedEvent(\"toggle\", domElement);\n      listenToNonDelegatedEvent(\"cancel\", domElement);\n      listenToNonDelegatedEvent(\"close\", domElement);\n      break;\n    case \"iframe\":\n    case \"object\":\n      listenToNonDelegatedEvent(\"load\", domElement);\n      break;\n    case \"video\":\n    case \"audio\":\n      for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)\n        listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);\n      break;\n    case \"image\":\n      listenToNonDelegatedEvent(\"error\", domElement);\n      listenToNonDelegatedEvent(\"load\", domElement);\n      break;\n    case \"details\":\n      listenToNonDelegatedEvent(\"toggle\", domElement);\n      break;\n    case \"embed\":\n    case \"source\":\n    case \"link\":\n      listenToNonDelegatedEvent(\"error\", domElement),\n        listenToNonDelegatedEvent(\"load\", domElement);\n    case \"area\":\n    case \"base\":\n    case \"br\":\n    case \"col\":\n    case \"hr\":\n    case \"keygen\":\n    case \"meta\":\n    case \"param\":\n    case \"track\":\n    case \"wbr\":\n    case \"menuitem\":\n      for (defaultChecked in props)\n        if (\n          props.hasOwnProperty(defaultChecked) &&\n          ((hasSrc = props[defaultChecked]), null != hasSrc)\n        )\n          switch (defaultChecked) {\n            case \"children\":\n            case \"dangerouslySetInnerHTML\":\n              throw Error(formatProdErrorMessage(137, tag));\n            default:\n              setProp(domElement, tag, defaultChecked, hasSrc, props, null);\n          }\n      return;\n    default:\n      if (isCustomElement(tag)) {\n        for (propValue$204 in props)\n          props.hasOwnProperty(propValue$204) &&\n            ((hasSrc = props[propValue$204]),\n            void 0 !== hasSrc &&\n              setPropOnCustomElement(\n                domElement,\n                tag,\n                propValue$204,\n                hasSrc,\n                props,\n                void 0\n              ));\n        return;\n      }\n  }\n  for (defaultValue in props)\n    props.hasOwnProperty(defaultValue) &&\n      ((hasSrc = props[defaultValue]),\n      null != hasSrc &&\n        setProp(domElement, tag, defaultValue, hasSrc, props, null));\n}\nvar emptyProps = {};\nfunction updateProperties(domElement, tag, lastProps, nextProps) {\n  switch (tag) {\n    case \"div\":\n    case \"span\":\n    case \"svg\":\n    case \"path\":\n    case \"a\":\n    case \"g\":\n    case \"p\":\n    case \"li\":\n      break;\n    case \"input\":\n      var name = null,\n        type = null,\n        value = null,\n        defaultValue = null,\n        lastDefaultValue = null,\n        checked = null,\n        defaultChecked = null;\n      for (propKey in lastProps) {\n        var lastProp = lastProps[propKey];\n        if (lastProps.hasOwnProperty(propKey) && null != lastProp)\n          switch (propKey) {\n            case \"checked\":\n              break;\n            case \"value\":\n              break;\n            case \"defaultValue\":\n              lastDefaultValue = lastProp;\n            default:\n              nextProps.hasOwnProperty(propKey) ||\n                setProp(domElement, tag, propKey, null, nextProps, lastProp);\n          }\n      }\n      for (var propKey$221 in nextProps) {\n        var propKey = nextProps[propKey$221];\n        lastProp = lastProps[propKey$221];\n        if (\n          nextProps.hasOwnProperty(propKey$221) &&\n          (null != propKey || null != lastProp)\n        )\n          switch (propKey$221) {\n            case \"type\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              type = propKey;\n              break;\n            case \"name\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              name = propKey;\n              break;\n            case \"checked\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              checked = propKey;\n              break;\n            case \"defaultChecked\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              defaultChecked = propKey;\n              break;\n            case \"value\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              value = propKey;\n              break;\n            case \"defaultValue\":\n              propKey !== lastProp && (viewTransitionMutationContext = !0);\n              defaultValue = propKey;\n              break;\n            case \"children\":\n            case \"dangerouslySetInnerHTML\":\n              if (null != propKey)\n                throw Error(formatProdErrorMessage(137, tag));\n              break;\n            default:\n              propKey !== lastProp &&\n                setProp(\n                  domElement,\n                  tag,\n                  propKey$221,\n                  propKey,\n                  nextProps,\n                  lastProp\n                );\n          }\n      }\n      updateInput(\n        domElement,\n        value,\n        defaultValue,\n        lastDefaultValue,\n        checked,\n        defaultChecked,\n        type,\n        name\n      );\n      return;\n    case \"select\":\n      propKey = value = defaultValue = propKey$221 = null;\n      for (type in lastProps)\n        if (\n          ((lastDefaultValue = lastProps[type]),\n          lastProps.hasOwnProperty(type) && null != lastDefaultValue)\n        )\n          switch (type) {\n            case \"value\":\n              break;\n            case \"multiple\":\n              propKey = lastDefaultValue;\n            default:\n              nextProps.hasOwnProperty(type) ||\n                setProp(\n                  domElement,\n                  tag,\n                  type,\n                  null,\n                  nextProps,\n                  lastDefaultValue\n                );\n          }\n      for (name in nextProps)\n        if (\n          ((type = nextProps[name]),\n          (lastDefaultValue = lastProps[name]),\n          nextProps.hasOwnProperty(name) &&\n            (null != type || null != lastDefaultValue))\n        )\n          switch (name) {\n            case \"value\":\n              type !== lastDefaultValue && (viewTransitionMutationContext = !0);\n              propKey$221 = type;\n              break;\n            case \"defaultValue\":\n              type !== lastDefaultValue && (viewTransitionMutationContext = !0);\n              defaultValue = type;\n              break;\n            case \"multiple\":\n              type !== lastDefaultValue && (viewTransitionMutationContext = !0),\n                (value = type);\n            default:\n              type !== lastDefaultValue &&\n                setProp(\n                  domElement,\n                  tag,\n                  name,\n                  type,\n                  nextProps,\n                  lastDefaultValue\n                );\n          }\n      tag = defaultValue;\n      lastProps = value;\n      nextProps = propKey;\n      null != propKey$221\n        ? updateOptions(domElement, !!lastProps, propKey$221, !1)\n        : !!nextProps !== !!lastProps &&\n          (null != tag\n            ? updateOptions(domElement, !!lastProps, tag, !0)\n            : updateOptions(domElement, !!lastProps, lastProps ? [] : \"\", !1));\n      return;\n    case \"textarea\":\n      propKey = propKey$221 = null;\n      for (defaultValue in lastProps)\n        if (\n          ((name = lastProps[defaultValue]),\n          lastProps.hasOwnProperty(defaultValue) &&\n            null != name &&\n            !nextProps.hasOwnProperty(defaultValue))\n        )\n          switch (defaultValue) {\n            case \"value\":\n              break;\n            case \"children\":\n              break;\n            default:\n              setProp(domElement, tag, defaultValue, null, nextProps, name);\n          }\n      for (value in nextProps)\n        if (\n          ((name = nextProps[value]),\n          (type = lastProps[value]),\n          nextProps.hasOwnProperty(value) && (null != name || null != type))\n        )\n          switch (value) {\n            case \"value\":\n              name !== type && (viewTransitionMutationContext = !0);\n              propKey$221 = name;\n              break;\n            case \"defaultValue\":\n              name !== type && (viewTransitionMutationContext = !0);\n              propKey = name;\n              break;\n            case \"children\":\n              break;\n            case \"dangerouslySetInnerHTML\":\n              if (null != name) throw Error(formatProdErrorMessage(91));\n              break;\n            default:\n              name !== type &&\n                setProp(domElement, tag, value, name, nextProps, type);\n          }\n      updateTextarea(domElement, propKey$221, propKey);\n      return;\n    case \"option\":\n      for (var propKey$237 in lastProps)\n        if (\n          ((propKey$221 = lastProps[propKey$237]),\n          lastProps.hasOwnProperty(propKey$237) &&\n            null != propKey$221 &&\n            !nextProps.hasOwnProperty(propKey$237))\n        )\n          switch (propKey$237) {\n            case \"selected\":\n              domElement.selected = !1;\n              break;\n            default:\n              setProp(\n                domElement,\n                tag,\n                propKey$237,\n                null,\n                nextProps,\n                propKey$221\n              );\n          }\n      for (lastDefaultValue in nextProps)\n        if (\n          ((propKey$221 = nextProps[lastDefaultValue]),\n          (propKey = lastProps[lastDefaultValue]),\n          nextProps.hasOwnProperty(lastDefaultValue) &&\n            propKey$221 !== propKey &&\n            (null != propKey$221 || null != propKey))\n        )\n          switch (lastDefaultValue) {\n            case \"selected\":\n              propKey$221 !== propKey && (viewTransitionMutationContext = !0);\n              domElement.selected =\n                propKey$221 &&\n                \"function\" !== typeof propKey$221 &&\n                \"symbol\" !== typeof propKey$221;\n              break;\n            default:\n              setProp(\n                domElement,\n                tag,\n                lastDefaultValue,\n                propKey$221,\n                nextProps,\n                propKey\n              );\n          }\n      return;\n    case \"img\":\n    case \"link\":\n    case \"area\":\n    case \"base\":\n    case \"br\":\n    case \"col\":\n    case \"embed\":\n    case \"hr\":\n    case \"keygen\":\n    case \"meta\":\n    case \"param\":\n    case \"source\":\n    case \"track\":\n    case \"wbr\":\n    case \"menuitem\":\n      for (var propKey$242 in lastProps)\n        (propKey$221 = lastProps[propKey$242]),\n          lastProps.hasOwnProperty(propKey$242) &&\n            null != propKey$221 &&\n            !nextProps.hasOwnProperty(propKey$242) &&\n            setProp(domElement, tag, propKey$242, null, nextProps, propKey$221);\n      for (checked in nextProps)\n        if (\n          ((propKey$221 = nextProps[checked]),\n          (propKey = lastProps[checked]),\n          nextProps.hasOwnProperty(checked) &&\n            propKey$221 !== propKey &&\n            (null != propKey$221 || null != propKey))\n        )\n          switch (checked) {\n            case \"children\":\n            case \"dangerouslySetInnerHTML\":\n              if (null != propKey$221)\n                throw Error(formatProdErrorMessage(137, tag));\n              break;\n            default:\n              setProp(\n                domElement,\n                tag,\n                checked,\n                propKey$221,\n                nextProps,\n                propKey\n              );\n          }\n      return;\n    default:\n      if (isCustomElement(tag)) {\n        for (var propKey$247 in lastProps)\n          (propKey$221 = lastProps[propKey$247]),\n            lastProps.hasOwnProperty(propKey$247) &&\n              void 0 !== propKey$221 &&\n              !nextProps.hasOwnProperty(propKey$247) &&\n              setPropOnCustomElement(\n                domElement,\n                tag,\n                propKey$247,\n                void 0,\n                nextProps,\n                propKey$221\n              );\n        for (defaultChecked in nextProps)\n          (propKey$221 = nextProps[defaultChecked]),\n            (propKey = lastProps[defaultChecked]),\n            !nextProps.hasOwnProperty(defaultChecked) ||\n              propKey$221 === propKey ||\n              (void 0 === propKey$221 && void 0 === propKey) ||\n              setPropOnCustomElement(\n                domElement,\n                tag,\n                defaultChecked,\n                propKey$221,\n                nextProps,\n                propKey\n              );\n        return;\n      }\n  }\n  for (var propKey$252 in lastProps)\n    (propKey$221 = lastProps[propKey$252]),\n      lastProps.hasOwnProperty(propKey$252) &&\n        null != propKey$221 &&\n        !nextProps.hasOwnProperty(propKey$252) &&\n        setProp(domElement, tag, propKey$252, null, nextProps, propKey$221);\n  for (lastProp in nextProps)\n    (propKey$221 = nextProps[lastProp]),\n      (propKey = lastProps[lastProp]),\n      !nextProps.hasOwnProperty(lastProp) ||\n        propKey$221 === propKey ||\n        (null == propKey$221 && null == propKey) ||\n        setProp(domElement, tag, lastProp, propKey$221, nextProps, propKey);\n}\nfunction isLikelyStaticResource(initiatorType) {\n  switch (initiatorType) {\n    case \"css\":\n    case \"script\":\n    case \"font\":\n    case \"img\":\n    case \"image\":\n    case \"input\":\n    case \"link\":\n      return !0;\n    default:\n      return !1;\n  }\n}\nfunction estimateBandwidth() {\n  if (\"function\" === typeof performance.getEntriesByType) {\n    for (\n      var count = 0,\n        bits = 0,\n        resourceEntries = performance.getEntriesByType(\"resource\"),\n        i = 0;\n      i < resourceEntries.length;\n      i++\n    ) {\n      var entry = resourceEntries[i],\n        transferSize = entry.transferSize,\n        initiatorType = entry.initiatorType,\n        duration = entry.duration;\n      if (transferSize && duration && isLikelyStaticResource(initiatorType)) {\n        initiatorType = 0;\n        duration = entry.responseEnd;\n        for (i += 1; i < resourceEntries.length; i++) {\n          var overlapEntry = resourceEntries[i],\n            overlapStartTime = overlapEntry.startTime;\n          if (overlapStartTime > duration) break;\n          var overlapTransferSize = overlapEntry.transferSize,\n            overlapInitiatorType = overlapEntry.initiatorType;\n          overlapTransferSize &&\n            isLikelyStaticResource(overlapInitiatorType) &&\n            ((overlapEntry = overlapEntry.responseEnd),\n            (initiatorType +=\n              overlapTransferSize *\n              (overlapEntry < duration\n                ? 1\n                : (duration - overlapStartTime) /\n                  (overlapEntry - overlapStartTime))));\n        }\n        --i;\n        bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);\n        count++;\n        if (10 < count) break;\n      }\n    }\n    if (0 < count) return bits / count / 1e6;\n  }\n  return navigator.connection &&\n    ((count = navigator.connection.downlink), \"number\" === typeof count)\n    ? count\n    : 5;\n}\nvar eventsEnabled = null,\n  selectionInformation = null;\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n  return 9 === rootContainerElement.nodeType\n    ? rootContainerElement\n    : rootContainerElement.ownerDocument;\n}\nfunction getOwnHostContext(namespaceURI) {\n  switch (namespaceURI) {\n    case \"http://www.w3.org/2000/svg\":\n      return 1;\n    case \"http://www.w3.org/1998/Math/MathML\":\n      return 2;\n    default:\n      return 0;\n  }\n}\nfunction getChildHostContextProd(parentNamespace, type) {\n  if (0 === parentNamespace)\n    switch (type) {\n      case \"svg\":\n        return 1;\n      case \"math\":\n        return 2;\n      default:\n        return 0;\n    }\n  return 1 === parentNamespace && \"foreignObject\" === type\n    ? 0\n    : parentNamespace;\n}\nfunction createHoistableInstance(\n  type,\n  props,\n  rootContainerInstance,\n  internalInstanceHandle\n) {\n  rootContainerInstance = getOwnerDocumentFromRootContainer(\n    rootContainerInstance\n  ).createElement(type);\n  rootContainerInstance[internalInstanceKey] = internalInstanceHandle;\n  rootContainerInstance[internalPropsKey] = props;\n  setInitialProperties(rootContainerInstance, type, props);\n  markNodeAsHoistable(rootContainerInstance);\n  return rootContainerInstance;\n}\nfunction shouldSetTextContent(type, props) {\n  return (\n    \"textarea\" === type ||\n    \"noscript\" === type ||\n    \"string\" === typeof props.children ||\n    \"number\" === typeof props.children ||\n    \"bigint\" === typeof props.children ||\n    (\"object\" === typeof props.dangerouslySetInnerHTML &&\n      null !== props.dangerouslySetInnerHTML &&\n      null != props.dangerouslySetInnerHTML.__html)\n  );\n}\nvar currentPopstateTransitionEvent = null;\nfunction shouldAttemptEagerTransition() {\n  var event = window.event;\n  if (event && \"popstate\" === event.type) {\n    if (event === currentPopstateTransitionEvent) return !1;\n    currentPopstateTransitionEvent = event;\n    return !0;\n  }\n  currentPopstateTransitionEvent = null;\n  return !1;\n}\nvar scheduleTimeout = \"function\" === typeof setTimeout ? setTimeout : void 0,\n  cancelTimeout = \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n  localPromise = \"function\" === typeof Promise ? Promise : void 0,\n  localRequestAnimationFrame =\n    \"function\" === typeof requestAnimationFrame\n      ? requestAnimationFrame\n      : scheduleTimeout,\n  scheduleMicrotask =\n    \"function\" === typeof queueMicrotask\n      ? queueMicrotask\n      : \"undefined\" !== typeof localPromise\n        ? function (callback) {\n            return localPromise\n              .resolve(null)\n              .then(callback)\n              .catch(handleErrorInNextTick);\n          }\n        : scheduleTimeout;\nfunction handleErrorInNextTick(error) {\n  setTimeout(function () {\n    throw error;\n  });\n}\nfunction isSingletonScope(type) {\n  return \"head\" === type;\n}\nfunction clearHydrationBoundary(parentInstance, hydrationInstance) {\n  var node = hydrationInstance,\n    depth = 0;\n  do {\n    var nextNode = node.nextSibling;\n    parentInstance.removeChild(node);\n    if (nextNode && 8 === nextNode.nodeType)\n      if (((node = nextNode.data), \"/$\" === node || \"/&\" === node)) {\n        if (0 === depth) {\n          parentInstance.removeChild(nextNode);\n          retryIfBlockedOn(hydrationInstance);\n          return;\n        }\n        depth--;\n      } else if (\n        \"$\" === node ||\n        \"$?\" === node ||\n        \"$~\" === node ||\n        \"$!\" === node ||\n        \"&\" === node\n      )\n        depth++;\n      else if (\"html\" === node)\n        clearSingletonPreambleContribution(\n          parentInstance.ownerDocument.documentElement\n        );\n      else if (\"head\" === node) {\n        node = parentInstance.ownerDocument.head;\n        clearSingletonPreambleContribution(node);\n        for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {\n          var nextNode$jscomp$0 = node$jscomp$0.nextSibling,\n            nodeName = node$jscomp$0.nodeName;\n          node$jscomp$0[internalHoistableMarker] ||\n            \"SCRIPT\" === nodeName ||\n            \"STYLE\" === nodeName ||\n            (\"LINK\" === nodeName &&\n              \"stylesheet\" === node$jscomp$0.rel.toLowerCase()) ||\n            node.removeChild(node$jscomp$0);\n          node$jscomp$0 = nextNode$jscomp$0;\n        }\n      } else\n        \"body\" === node &&\n          clearSingletonPreambleContribution(parentInstance.ownerDocument.body);\n    node = nextNode;\n  } while (node);\n  retryIfBlockedOn(hydrationInstance);\n}\nfunction hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {\n  var node = suspenseInstance;\n  suspenseInstance = 0;\n  do {\n    var nextNode = node.nextSibling;\n    1 === node.nodeType\n      ? isHidden\n        ? ((node._stashedDisplay = node.style.display),\n          (node.style.display = \"none\"))\n        : ((node.style.display = node._stashedDisplay || \"\"),\n          \"\" === node.getAttribute(\"style\") && node.removeAttribute(\"style\"))\n      : 3 === node.nodeType &&\n        (isHidden\n          ? ((node._stashedText = node.nodeValue), (node.nodeValue = \"\"))\n          : (node.nodeValue = node._stashedText || \"\"));\n    if (nextNode && 8 === nextNode.nodeType)\n      if (((node = nextNode.data), \"/$\" === node))\n        if (0 === suspenseInstance) break;\n        else suspenseInstance--;\n      else\n        (\"$\" !== node && \"$?\" !== node && \"$~\" !== node && \"$!\" !== node) ||\n          suspenseInstance++;\n    node = nextNode;\n  } while (node);\n}\nfunction applyViewTransitionName(instance, name, className) {\n  name = CSS.escape(name) !== name ? \"r-\" + btoa(name).replace(/=/g, \"\") : name;\n  instance.style.viewTransitionName = name;\n  null != className && (instance.style.viewTransitionClass = className);\n  className = getComputedStyle(instance);\n  if (\"inline\" === className.display) {\n    name = instance.getClientRects();\n    if (1 === name.length) var JSCompiler_inline_result = 1;\n    else\n      for (var i = (JSCompiler_inline_result = 0); i < name.length; i++) {\n        var rect = name[i];\n        0 < rect.width && 0 < rect.height && JSCompiler_inline_result++;\n      }\n    1 === JSCompiler_inline_result &&\n      ((instance = instance.style),\n      (instance.display = 1 === name.length ? \"inline-block\" : \"block\"),\n      (instance.marginTop = \"-\" + className.paddingTop),\n      (instance.marginBottom = \"-\" + className.paddingBottom));\n  }\n}\nfunction restoreViewTransitionName(instance, props) {\n  instance = instance.style;\n  props = props.style;\n  var viewTransitionName =\n    null != props\n      ? props.hasOwnProperty(\"viewTransitionName\")\n        ? props.viewTransitionName\n        : props.hasOwnProperty(\"view-transition-name\")\n          ? props[\"view-transition-name\"]\n          : null\n      : null;\n  instance.viewTransitionName =\n    null == viewTransitionName || \"boolean\" === typeof viewTransitionName\n      ? \"\"\n      : (\"\" + viewTransitionName).trim();\n  viewTransitionName =\n    null != props\n      ? props.hasOwnProperty(\"viewTransitionClass\")\n        ? props.viewTransitionClass\n        : props.hasOwnProperty(\"view-transition-class\")\n          ? props[\"view-transition-class\"]\n          : null\n      : null;\n  instance.viewTransitionClass =\n    null == viewTransitionName || \"boolean\" === typeof viewTransitionName\n      ? \"\"\n      : (\"\" + viewTransitionName).trim();\n  \"inline-block\" === instance.display &&\n    (null == props\n      ? (instance.display = instance.margin = \"\")\n      : ((viewTransitionName = props.display),\n        (instance.display =\n          null == viewTransitionName || \"boolean\" === typeof viewTransitionName\n            ? \"\"\n            : viewTransitionName),\n        (viewTransitionName = props.margin),\n        null != viewTransitionName\n          ? (instance.margin = viewTransitionName)\n          : ((viewTransitionName = props.hasOwnProperty(\"marginTop\")\n              ? props.marginTop\n              : props[\"margin-top\"]),\n            (instance.marginTop =\n              null == viewTransitionName ||\n              \"boolean\" === typeof viewTransitionName\n                ? \"\"\n                : viewTransitionName),\n            (props = props.hasOwnProperty(\"marginBottom\")\n              ? props.marginBottom\n              : props[\"margin-bottom\"]),\n            (instance.marginBottom =\n              null == props || \"boolean\" === typeof props ? \"\" : props))));\n}\nfunction createMeasurement(rect, computedStyle, element) {\n  element = element.ownerDocument.defaultView;\n  return {\n    rect: rect,\n    abs:\n      \"absolute\" === computedStyle.position ||\n      \"fixed\" === computedStyle.position,\n    clip:\n      \"none\" !== computedStyle.clipPath ||\n      \"visible\" !== computedStyle.overflow ||\n      \"none\" !== computedStyle.filter ||\n      \"none\" !== computedStyle.mask ||\n      \"none\" !== computedStyle.mask ||\n      \"0px\" !== computedStyle.borderRadius,\n    view:\n      0 <= rect.bottom &&\n      0 <= rect.right &&\n      rect.top <= element.innerHeight &&\n      rect.left <= element.innerWidth\n  };\n}\nfunction measureInstance(instance) {\n  var rect = instance.getBoundingClientRect(),\n    computedStyle = getComputedStyle(instance);\n  return createMeasurement(rect, computedStyle, instance);\n}\nfunction measureClonedInstance(instance) {\n  var measuredRect = instance.getBoundingClientRect();\n  measuredRect = new DOMRect(\n    measuredRect.x + 2e4,\n    measuredRect.y + 2e4,\n    measuredRect.width,\n    measuredRect.height\n  );\n  var computedStyle = getComputedStyle(instance);\n  return createMeasurement(measuredRect, computedStyle, instance);\n}\nfunction forceLayout(ownerDocument) {\n  return ownerDocument.documentElement.clientHeight;\n}\nfunction waitForImageToLoad(resolve) {\n  this.addEventListener(\"load\", resolve);\n  this.addEventListener(\"error\", resolve);\n}\nfunction startViewTransition(\n  suspendedState,\n  rootContainer,\n  transitionTypes,\n  mutationCallback,\n  layoutCallback,\n  afterMutationCallback,\n  spawnedWorkCallback,\n  passiveCallback,\n  errorCallback\n) {\n  var ownerDocument =\n    9 === rootContainer.nodeType ? rootContainer : rootContainer.ownerDocument;\n  try {\n    var transition = ownerDocument.startViewTransition({\n      update: function () {\n        var ownerWindow = ownerDocument.defaultView,\n          pendingNavigation =\n            ownerWindow.navigation && ownerWindow.navigation.transition,\n          previousFontLoadingStatus = ownerDocument.fonts.status;\n        mutationCallback();\n        var blockingPromises = [];\n        \"loaded\" === previousFontLoadingStatus &&\n          (forceLayout(ownerDocument),\n          \"loading\" === ownerDocument.fonts.status &&\n            blockingPromises.push(ownerDocument.fonts.ready));\n        previousFontLoadingStatus = blockingPromises.length;\n        if (null !== suspendedState)\n          for (\n            var suspenseyImages = suspendedState.suspenseyImages,\n              imgBytes = 0,\n              i = 0;\n            i < suspenseyImages.length;\n            i++\n          ) {\n            var suspenseyImage = suspenseyImages[i];\n            if (!suspenseyImage.complete) {\n              var rect = suspenseyImage.getBoundingClientRect();\n              if (\n                0 < rect.bottom &&\n                0 < rect.right &&\n                rect.top < ownerWindow.innerHeight &&\n                rect.left < ownerWindow.innerWidth\n              ) {\n                imgBytes += estimateImageBytes(suspenseyImage);\n                if (imgBytes > estimatedBytesWithinLimit) {\n                  blockingPromises.length = previousFontLoadingStatus;\n                  break;\n                }\n                suspenseyImage = new Promise(\n                  waitForImageToLoad.bind(suspenseyImage)\n                );\n                blockingPromises.push(suspenseyImage);\n              }\n            }\n          }\n        if (0 < blockingPromises.length)\n          return (\n            (ownerWindow = Promise.race([\n              Promise.all(blockingPromises),\n              new Promise(function (resolve) {\n                return setTimeout(resolve, 500);\n              })\n            ]).then(layoutCallback, layoutCallback)),\n            (pendingNavigation\n              ? Promise.allSettled([pendingNavigation.finished, ownerWindow])\n              : ownerWindow\n            ).then(afterMutationCallback, afterMutationCallback)\n          );\n        layoutCallback();\n        if (pendingNavigation)\n          return pendingNavigation.finished.then(\n            afterMutationCallback,\n            afterMutationCallback\n          );\n        afterMutationCallback();\n      },\n      types: transitionTypes\n    });\n    ownerDocument.__reactViewTransition = transition;\n    var viewTransitionAnimations = [];\n    transition.ready.then(\n      function () {\n        for (\n          var animations = ownerDocument.documentElement.getAnimations({\n              subtree: !0\n            }),\n            i = 0;\n          i < animations.length;\n          i++\n        ) {\n          var animation = animations[i],\n            effect = animation.effect,\n            pseudoElement = effect.pseudoElement;\n          if (\n            null != pseudoElement &&\n            pseudoElement.startsWith(\"::view-transition\")\n          ) {\n            viewTransitionAnimations.push(animation);\n            animation = effect.getKeyframes();\n            for (\n              var height = (pseudoElement = void 0),\n                unchangedDimensions = !0,\n                j = 0;\n              j < animation.length;\n              j++\n            ) {\n              var keyframe = animation[j],\n                w = keyframe.width;\n              if (void 0 === pseudoElement) pseudoElement = w;\n              else if (pseudoElement !== w) {\n                unchangedDimensions = !1;\n                break;\n              }\n              w = keyframe.height;\n              if (void 0 === height) height = w;\n              else if (height !== w) {\n                unchangedDimensions = !1;\n                break;\n              }\n              delete keyframe.width;\n              delete keyframe.height;\n              \"none\" === keyframe.transform && delete keyframe.transform;\n            }\n            unchangedDimensions &&\n              void 0 !== pseudoElement &&\n              void 0 !== height &&\n              (effect.setKeyframes(animation),\n              (unchangedDimensions = getComputedStyle(\n                effect.target,\n                effect.pseudoElement\n              )),\n              unchangedDimensions.width !== pseudoElement ||\n                unchangedDimensions.height !== height) &&\n              ((unchangedDimensions = animation[0]),\n              (unchangedDimensions.width = pseudoElement),\n              (unchangedDimensions.height = height),\n              (unchangedDimensions = animation[animation.length - 1]),\n              (unchangedDimensions.width = pseudoElement),\n              (unchangedDimensions.height = height),\n              effect.setKeyframes(animation));\n          }\n        }\n        spawnedWorkCallback();\n      },\n      function (error) {\n        ownerDocument.__reactViewTransition === transition &&\n          (ownerDocument.__reactViewTransition = null);\n        try {\n          if (\"object\" === typeof error && null !== error)\n            switch (error.name) {\n              case \"InvalidStateError\":\n                if (\n                  \"View transition was skipped because document visibility state is hidden.\" ===\n                    error.message ||\n                  \"Skipping view transition because document visibility state has become hidden.\" ===\n                    error.message ||\n                  \"Skipping view transition because viewport size changed.\" ===\n                    error.message ||\n                  \"Transition was aborted because of invalid state\" ===\n                    error.message\n                )\n                  error = null;\n            }\n          null !== error && errorCallback(error);\n        } finally {\n          mutationCallback(), layoutCallback(), spawnedWorkCallback();\n        }\n      }\n    );\n    transition.finished.finally(function () {\n      for (var i = 0; i < viewTransitionAnimations.length; i++)\n        viewTransitionAnimations[i].cancel();\n      ownerDocument.__reactViewTransition === transition &&\n        (ownerDocument.__reactViewTransition = null);\n      passiveCallback();\n    });\n    return transition;\n  } catch (x) {\n    return mutationCallback(), layoutCallback(), spawnedWorkCallback(), null;\n  }\n}\nfunction ViewTransitionPseudoElement(pseudo, name) {\n  this._scope = document.documentElement;\n  this._selector = \"::view-transition-\" + pseudo + \"(\" + name + \")\";\n}\nViewTransitionPseudoElement.prototype.animate = function (keyframes, options) {\n  options =\n    \"number\" === typeof options ? { duration: options } : assign({}, options);\n  options.pseudoElement = this._selector;\n  return this._scope.animate(keyframes, options);\n};\nViewTransitionPseudoElement.prototype.getAnimations = function () {\n  for (\n    var scope = this._scope,\n      selector = this._selector,\n      animations = scope.getAnimations({ subtree: !0 }),\n      result = [],\n      i = 0;\n    i < animations.length;\n    i++\n  ) {\n    var effect = animations[i].effect;\n    null !== effect &&\n      effect.target === scope &&\n      effect.pseudoElement === selector &&\n      result.push(animations[i]);\n  }\n  return result;\n};\nViewTransitionPseudoElement.prototype.getComputedStyle = function () {\n  return getComputedStyle(this._scope, this._selector);\n};\nfunction createViewTransitionInstance(name) {\n  return {\n    name: name,\n    group: new ViewTransitionPseudoElement(\"group\", name),\n    imagePair: new ViewTransitionPseudoElement(\"image-pair\", name),\n    old: new ViewTransitionPseudoElement(\"old\", name),\n    new: new ViewTransitionPseudoElement(\"new\", name)\n  };\n}\nfunction FragmentInstance(fragmentFiber) {\n  this._fragmentFiber = fragmentFiber;\n  this._observers = this._eventListeners = null;\n}\nFragmentInstance.prototype.addEventListener = function (\n  type,\n  listener,\n  optionsOrUseCapture\n) {\n  var signal = null,\n    cleanup = null;\n  if (\n    null != optionsOrUseCapture &&\n    \"boolean\" !== typeof optionsOrUseCapture &&\n    ((signal = optionsOrUseCapture.signal || null),\n    null !== signal && signal.aborted)\n  )\n    return;\n  null === this._eventListeners && (this._eventListeners = []);\n  var listeners = this._eventListeners;\n  if (\n    -1 === indexOfEventListener(listeners, type, listener, optionsOrUseCapture)\n  ) {\n    var fragmentInstance = this,\n      attachedListener = listener;\n    null != optionsOrUseCapture &&\n      \"boolean\" !== typeof optionsOrUseCapture &&\n      !0 === optionsOrUseCapture.once &&\n      (attachedListener = function (event) {\n        fragmentInstance.removeEventListener(\n          type,\n          listener,\n          optionsOrUseCapture\n        );\n        \"function\" === typeof listener\n          ? listener.call(this, event)\n          : listener.handleEvent(event);\n      });\n    null !== signal &&\n      ((cleanup = fragmentInstance.removeEventListener.bind(\n        fragmentInstance,\n        type,\n        listener,\n        optionsOrUseCapture\n      )),\n      signal.addEventListener(\"abort\", cleanup, { once: !0 }),\n      (cleanup = signal.removeEventListener.bind(signal, \"abort\", cleanup)));\n    signal = getAttachOptions(optionsOrUseCapture);\n    listeners.push({\n      type: type,\n      listener: listener,\n      optionsOrUseCapture: optionsOrUseCapture,\n      attachedListener: attachedListener,\n      cleanup: cleanup\n    });\n    traverseVisibleInstancesAndTextInstances(\n      this._fragmentFiber.child,\n      !1,\n      addEventListenerToChild,\n      type,\n      attachedListener,\n      signal\n    );\n  }\n  this._eventListeners = listeners;\n};\nfunction addEventListenerToChild(child, type, listener, optionsOrUseCapture) {\n  getInstanceFromHostFiber(child).addEventListener(\n    type,\n    listener,\n    optionsOrUseCapture\n  );\n  return !1;\n}\nFragmentInstance.prototype.removeEventListener = function (\n  type,\n  listener,\n  optionsOrUseCapture\n) {\n  var listeners = this._eventListeners;\n  if (\n    null !== listeners &&\n    ((listener = indexOfEventListener(\n      listeners,\n      type,\n      listener,\n      optionsOrUseCapture\n    )),\n    -1 !== listener)\n  ) {\n    var _listeners$index = listeners[listener];\n    optionsOrUseCapture = _listeners$index.attachedListener;\n    var cleanup = _listeners$index.cleanup;\n    _listeners$index = getAttachOptions(_listeners$index.optionsOrUseCapture);\n    traverseVisibleInstancesAndTextInstances(\n      this._fragmentFiber.child,\n      !1,\n      removeEventListenerFromChild,\n      type,\n      optionsOrUseCapture,\n      _listeners$index\n    );\n    listeners.splice(listener, 1);\n    null !== cleanup && cleanup();\n  }\n};\nfunction removeEventListenerFromChild(\n  child,\n  type,\n  listener,\n  optionsOrUseCapture\n) {\n  getInstanceFromHostFiber(child).removeEventListener(\n    type,\n    listener,\n    optionsOrUseCapture\n  );\n  return !1;\n}\nfunction getAttachOptions(opts) {\n  return null != opts &&\n    \"boolean\" !== typeof opts &&\n    (!0 === opts.once || opts.signal instanceof AbortSignal)\n    ? { capture: opts.capture, passive: opts.passive }\n    : opts;\n}\nfunction normalizeListenerOptions(opts) {\n  return null == opts\n    ? \"c=0\"\n    : \"boolean\" === typeof opts\n      ? \"c=\" + (opts ? \"1\" : \"0\")\n      : \"c=\" + (opts.capture ? \"1\" : \"0\");\n}\nfunction indexOfEventListener(\n  eventListeners,\n  type,\n  listener,\n  optionsOrUseCapture\n) {\n  if (0 === eventListeners.length) return -1;\n  optionsOrUseCapture = normalizeListenerOptions(optionsOrUseCapture);\n  for (var i = 0; i < eventListeners.length; i++) {\n    var item = eventListeners[i];\n    if (\n      item.type === type &&\n      item.listener === listener &&\n      normalizeListenerOptions(item.optionsOrUseCapture) === optionsOrUseCapture\n    )\n      return i;\n  }\n  return -1;\n}\nFragmentInstance.prototype.dispatchEvent = function (event) {\n  var parentHostFiber = getFragmentParentInstanceOrContainerFiber(\n    this._fragmentFiber\n  );\n  if (null === parentHostFiber) return !0;\n  parentHostFiber = getInstanceFromHostFiber(parentHostFiber);\n  var eventListeners = this._eventListeners;\n  if (\n    (null !== eventListeners && 0 < eventListeners.length) ||\n    !event.bubbles\n  ) {\n    var temp =\n      9 === parentHostFiber.nodeType\n        ? parentHostFiber.createComment(\"\")\n        : document.createTextNode(\"\");\n    if (eventListeners)\n      for (var i = 0; i < eventListeners.length; i++) {\n        var _eventListeners$i = eventListeners[i];\n        temp.addEventListener(\n          _eventListeners$i.type,\n          _eventListeners$i.attachedListener,\n          getAttachOptions(_eventListeners$i.optionsOrUseCapture)\n        );\n      }\n    parentHostFiber.appendChild(temp);\n    event = temp.dispatchEvent(event);\n    if (eventListeners)\n      for (i = 0; i < eventListeners.length; i++)\n        (_eventListeners$i = eventListeners[i]),\n          temp.removeEventListener(\n            _eventListeners$i.type,\n            _eventListeners$i.attachedListener,\n            getAttachOptions(_eventListeners$i.optionsOrUseCapture)\n          );\n    parentHostFiber.removeChild(temp);\n    return event;\n  }\n  return parentHostFiber.dispatchEvent(event);\n};\nFragmentInstance.prototype.focus = function (focusOptions) {\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !0,\n    setFocusOnFiberIfFocusable,\n    focusOptions,\n    void 0,\n    void 0\n  );\n};\nfunction setFocusOnFiberIfFocusable(fiber, focusOptions) {\n  if (6 === fiber.tag) return !1;\n  fiber = getInstanceFromHostFiber(fiber);\n  return setFocusIfFocusable(fiber, focusOptions);\n}\nFragmentInstance.prototype.focusLast = function (focusOptions) {\n  var children = [];\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !0,\n    collectChildren,\n    children,\n    void 0,\n    void 0\n  );\n  for (\n    var i = children.length - 1;\n    0 <= i && !setFocusOnFiberIfFocusable(children[i], focusOptions);\n    i--\n  );\n};\nfunction collectChildren(child, collection) {\n  collection.push(child);\n  return !1;\n}\nFragmentInstance.prototype.blur = function () {\n  var parentHostFiber = getFragmentParentInstanceOrContainerFiber(\n    this._fragmentFiber\n  );\n  null !== parentHostFiber &&\n    ((parentHostFiber = getInstanceFromHostFiber(parentHostFiber)),\n    (parentHostFiber =\n      getOwnerDocumentFromRootContainer(parentHostFiber).activeElement),\n    null !== parentHostFiber &&\n      traverseVisibleInstancesAndTextInstances(\n        this._fragmentFiber.child,\n        !1,\n        blurActiveElementWithinFragment,\n        parentHostFiber,\n        void 0,\n        void 0\n      ));\n};\nfunction blurActiveElementWithinFragment(child, activeElement) {\n  if (6 === child.tag) return !1;\n  child = getInstanceFromHostFiber(child);\n  return child === activeElement || child.contains(activeElement)\n    ? (activeElement.blur(), !0)\n    : !1;\n}\nFragmentInstance.prototype.observeUsing = function (observer) {\n  null === this._observers && (this._observers = new Set());\n  this._observers.add(observer);\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !1,\n    observeChild,\n    observer,\n    void 0,\n    void 0\n  );\n};\nfunction observeChild(child, observer) {\n  if (6 === child.tag) return !1;\n  child = getInstanceFromHostFiber(child);\n  observer.observe(child);\n  return !1;\n}\nFragmentInstance.prototype.unobserveUsing = function (observer) {\n  var observers = this._observers;\n  if (null !== observers && observers.has(observer)) {\n    observers.delete(observer);\n    traverseVisibleInstancesAndTextInstances(\n      this._fragmentFiber.child,\n      !1,\n      unobserveChild,\n      observer,\n      void 0,\n      void 0\n    );\n    for (\n      var i = (observers = 0);\n      i < pendingIntersectionUnobserves.length;\n      i++\n    ) {\n      var pending = pendingIntersectionUnobserves[i];\n      pending.fragmentInstance === this && pending.observer === observer\n        ? observer.unobserve(pending.instance)\n        : (pendingIntersectionUnobserves[observers++] = pending);\n    }\n    pendingIntersectionUnobserves.length = observers;\n  }\n};\nfunction unobserveChild(child, observer) {\n  if (6 === child.tag) return !1;\n  child = getInstanceFromHostFiber(child);\n  observer.unobserve(child);\n  return !1;\n}\nvar pendingIntersectionUnobserves = [],\n  intersectionUnobserveScheduled = !1;\nfunction schedulePendingIntersectionUnobserve(\n  fragmentInstance,\n  observer,\n  instance\n) {\n  pendingIntersectionUnobserves.push({\n    fragmentInstance: fragmentInstance,\n    observer: observer,\n    instance: instance\n  });\n  intersectionUnobserveScheduled ||\n    ((intersectionUnobserveScheduled = !0),\n    requestPostPaintCallback(function () {\n      intersectionUnobserveScheduled = !1;\n      var pending = pendingIntersectionUnobserves;\n      pendingIntersectionUnobserves = [];\n      for (var i = 0; i < pending.length; i++) {\n        var item = pending[i];\n        item.observer.unobserve(item.instance);\n      }\n    }));\n}\nFragmentInstance.prototype.getClientRects = function () {\n  var rects = [];\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !1,\n    collectClientRects,\n    rects,\n    void 0,\n    void 0\n  );\n  return rects;\n};\nfunction collectClientRects(child, rects) {\n  if (6 === child.tag) {\n    child = child.stateNode;\n    var range = child.ownerDocument.createRange();\n    range.selectNodeContents(child);\n    rects.push.apply(rects, range.getClientRects());\n  } else\n    (child = getInstanceFromHostFiber(child)),\n      rects.push.apply(rects, child.getClientRects());\n  return !1;\n}\nFragmentInstance.prototype.getRootNode = function (getRootNodeOptions) {\n  var parentHostFiber = getFragmentParentInstanceOrContainerFiber(\n    this._fragmentFiber\n  );\n  return null === parentHostFiber\n    ? this\n    : getInstanceFromHostFiber(parentHostFiber).getRootNode(getRootNodeOptions);\n};\nFragmentInstance.prototype.compareDocumentPosition = function (otherNode) {\n  var parentHostFiber = getFragmentParentInstanceOrContainerFiber(\n    this._fragmentFiber\n  );\n  if (null === parentHostFiber) return Node.DOCUMENT_POSITION_DISCONNECTED;\n  var children = [];\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !1,\n    collectChildren,\n    children,\n    void 0,\n    void 0\n  );\n  var parentHostInstance = getInstanceFromHostFiber(parentHostFiber);\n  if (0 === children.length) {\n    children = parentHostInstance;\n    if (fiberIsPortaledIntoHost(this._fragmentFiber)) {\n      a: {\n        for (\n          parentHostFiber = this._fragmentFiber.return;\n          null !== parentHostFiber;\n\n        ) {\n          if (4 === parentHostFiber.tag) {\n            parentHostFiber = parentHostFiber.stateNode.containerInfo;\n            break a;\n          }\n          if (\n            3 === parentHostFiber.tag ||\n            5 === parentHostFiber.tag ||\n            27 === parentHostFiber.tag\n          )\n            break;\n          parentHostFiber = parentHostFiber.return;\n        }\n        parentHostFiber = null;\n      }\n      null != parentHostFiber && (children = parentHostFiber);\n    }\n    parentHostFiber = this._fragmentFiber;\n    var result = (parentHostInstance =\n      children.compareDocumentPosition(otherNode));\n    children === otherNode\n      ? (result = Node.DOCUMENT_POSITION_CONTAINS)\n      : parentHostInstance & Node.DOCUMENT_POSITION_CONTAINED_BY &&\n        ((children =\n          getFragmentInstanceOrTextInstanceSiblings(parentHostFiber)[1]),\n        null === children\n          ? (result = Node.DOCUMENT_POSITION_PRECEDING)\n          : ((otherNode =\n              getInstanceFromHostFiber(children).compareDocumentPosition(\n                otherNode\n              )),\n            (result =\n              0 === otherNode || otherNode & Node.DOCUMENT_POSITION_FOLLOWING\n                ? Node.DOCUMENT_POSITION_FOLLOWING\n                : Node.DOCUMENT_POSITION_PRECEDING)));\n    return (result |= Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC);\n  }\n  parentHostFiber = getInstanceFromHostFiber(children[0]);\n  result = getInstanceFromHostFiber(children[children.length - 1]);\n  var parentHostInstanceFromDOM = fiberIsPortaledIntoHost(this._fragmentFiber)\n    ? parentHostFiber.parentElement\n    : parentHostInstance;\n  if (null == parentHostInstanceFromDOM)\n    return Node.DOCUMENT_POSITION_DISCONNECTED;\n  parentHostInstance =\n    parentHostInstanceFromDOM.compareDocumentPosition(parentHostFiber) &\n    Node.DOCUMENT_POSITION_CONTAINED_BY;\n  parentHostInstanceFromDOM =\n    parentHostInstanceFromDOM.compareDocumentPosition(result) &\n    Node.DOCUMENT_POSITION_CONTAINED_BY;\n  var firstResult = parentHostFiber.compareDocumentPosition(otherNode),\n    lastResult = result.compareDocumentPosition(otherNode),\n    otherNodeIsWithinFirstOrLastChild =\n      firstResult & Node.DOCUMENT_POSITION_CONTAINED_BY ||\n      lastResult & Node.DOCUMENT_POSITION_CONTAINED_BY;\n  lastResult =\n    parentHostInstance &&\n    parentHostInstanceFromDOM &&\n    firstResult & Node.DOCUMENT_POSITION_FOLLOWING &&\n    lastResult & Node.DOCUMENT_POSITION_PRECEDING;\n  parentHostFiber =\n    (parentHostInstance && parentHostFiber === otherNode) ||\n    (parentHostInstanceFromDOM && result === otherNode) ||\n    otherNodeIsWithinFirstOrLastChild ||\n    lastResult\n      ? Node.DOCUMENT_POSITION_CONTAINED_BY\n      : (!parentHostInstance && parentHostFiber === otherNode) ||\n          (!parentHostInstanceFromDOM && result === otherNode)\n        ? Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC\n        : firstResult;\n  return parentHostFiber & Node.DOCUMENT_POSITION_DISCONNECTED ||\n    parentHostFiber & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC ||\n    validateDocumentPositionWithFiberTree(\n      parentHostFiber,\n      this._fragmentFiber,\n      children[0],\n      children[children.length - 1],\n      otherNode\n    )\n    ? parentHostFiber\n    : Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;\n};\nfunction validateDocumentPositionWithFiberTree(\n  documentPosition,\n  fragmentFiber,\n  precedingBoundaryFiber,\n  followingBoundaryFiber,\n  otherNode\n) {\n  var otherFiber = getClosestInstanceFromNode(otherNode);\n  if (documentPosition & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n    if ((precedingBoundaryFiber = !!otherFiber))\n      a: {\n        for (; null !== otherFiber; ) {\n          if (\n            7 === otherFiber.tag &&\n            (otherFiber === fragmentFiber ||\n              otherFiber.alternate === fragmentFiber)\n          ) {\n            precedingBoundaryFiber = !0;\n            break a;\n          }\n          otherFiber = otherFiber.return;\n        }\n        precedingBoundaryFiber = !1;\n      }\n    return precedingBoundaryFiber;\n  }\n  if (documentPosition & Node.DOCUMENT_POSITION_CONTAINS) {\n    if (null === otherFiber)\n      return (\n        (otherFiber = otherNode.ownerDocument),\n        otherNode === otherFiber ||\n          otherNode === otherFiber.documentElement ||\n          otherNode === otherFiber.body\n      );\n    a: {\n      otherFiber = fragmentFiber;\n      for (\n        fragmentFiber =\n          getFragmentParentInstanceOrContainerFiber(fragmentFiber);\n        null !== otherFiber;\n\n      ) {\n        if (\n          !(\n            (5 !== otherFiber.tag &&\n              3 !== otherFiber.tag &&\n              27 !== otherFiber.tag) ||\n            (otherFiber !== fragmentFiber &&\n              otherFiber.alternate !== fragmentFiber)\n          )\n        ) {\n          otherFiber = !0;\n          break a;\n        }\n        otherFiber = otherFiber.return;\n      }\n      otherFiber = !1;\n    }\n    return otherFiber;\n  }\n  return documentPosition & Node.DOCUMENT_POSITION_PRECEDING\n    ? ((fragmentFiber = !!otherFiber) &&\n        !(fragmentFiber = otherFiber === precedingBoundaryFiber) &&\n        ((fragmentFiber = getLowestCommonAncestor(\n          precedingBoundaryFiber,\n          otherFiber,\n          getParentForFragmentAncestors\n        )),\n        null === fragmentFiber\n          ? (fragmentFiber = !1)\n          : (traverseVisibleInstancesAndTextInstances(\n              fragmentFiber,\n              !0,\n              isFiberPrecedingCheck,\n              otherFiber,\n              precedingBoundaryFiber\n            ),\n            (otherFiber = searchTarget),\n            (searchTarget = null),\n            (fragmentFiber = null !== otherFiber))),\n      fragmentFiber)\n    : documentPosition & Node.DOCUMENT_POSITION_FOLLOWING\n      ? ((fragmentFiber = !!otherFiber) &&\n          !(fragmentFiber = otherFiber === followingBoundaryFiber) &&\n          ((fragmentFiber = getLowestCommonAncestor(\n            followingBoundaryFiber,\n            otherFiber,\n            getParentForFragmentAncestors\n          )),\n          null === fragmentFiber\n            ? (fragmentFiber = !1)\n            : (traverseVisibleInstancesAndTextInstances(\n                fragmentFiber,\n                !0,\n                isFiberFollowingCheck,\n                otherFiber,\n                followingBoundaryFiber\n              ),\n              (otherFiber = searchTarget),\n              (searchBoundary = searchTarget = null),\n              (fragmentFiber = null !== otherFiber))),\n        fragmentFiber)\n      : !1;\n}\nfunction scrollTextNodeIntoView(textNode, resolvedAlignToTop) {\n  var range = textNode.ownerDocument.createRange();\n  range.selectNodeContents(textNode);\n  textNode = range.getBoundingClientRect();\n  window.scrollTo(\n    window.scrollX + textNode.left,\n    resolvedAlignToTop\n      ? window.scrollY + textNode.top\n      : window.scrollY + textNode.bottom - window.innerHeight\n  );\n}\nFragmentInstance.prototype.scrollIntoView = function (alignToTop) {\n  if (\"object\" === typeof alignToTop) throw Error(formatProdErrorMessage(566));\n  var children = [];\n  traverseVisibleInstancesAndTextInstances(\n    this._fragmentFiber.child,\n    !1,\n    collectChildren,\n    children,\n    void 0,\n    void 0\n  );\n  var resolvedAlignToTop = !1 !== alignToTop;\n  if (0 === children.length) {\n    var hostSiblings = getFragmentInstanceOrTextInstanceSiblings(\n      this._fragmentFiber\n    );\n    hostSiblings = resolvedAlignToTop\n      ? hostSiblings[1] ||\n        hostSiblings[0] ||\n        getFragmentParentInstanceOrContainerFiber(this._fragmentFiber)\n      : hostSiblings[0] || hostSiblings[1];\n    if (null === hostSiblings) return;\n    if (6 === hostSiblings.tag) {\n      alignToTop = getInstanceFromHostFiber(hostSiblings);\n      scrollTextNodeIntoView(alignToTop, resolvedAlignToTop);\n      return;\n    }\n    hostSiblings = getInstanceFromHostFiber(hostSiblings);\n    if (9 !== hostSiblings.nodeType) {\n      if (11 === hostSiblings.nodeType) {\n        resolvedAlignToTop = \"host\" in hostSiblings ? hostSiblings.host : null;\n        null !== resolvedAlignToTop &&\n          resolvedAlignToTop.scrollIntoView(alignToTop);\n        return;\n      }\n      hostSiblings.scrollIntoView(alignToTop);\n    }\n  }\n  for (\n    hostSiblings = resolvedAlignToTop ? children.length - 1 : 0;\n    hostSiblings !== (resolvedAlignToTop ? -1 : children.length);\n\n  ) {\n    var child = children[hostSiblings];\n    6 === child.tag\n      ? ((child = getInstanceFromHostFiber(child)),\n        scrollTextNodeIntoView(child, resolvedAlignToTop))\n      : getInstanceFromHostFiber(child).scrollIntoView(alignToTop);\n    hostSiblings += resolvedAlignToTop ? -1 : 1;\n  }\n};\nfunction addFragmentHandleToFiber(child, fragmentInstance) {\n  child = getInstanceFromHostFiber(child);\n  addFragmentHandleToInstance(child, fragmentInstance);\n  return !1;\n}\nfunction addFragmentHandleToInstance(instance, fragmentInstance) {\n  null == instance.reactFragments && (instance.reactFragments = new Set());\n  instance.reactFragments.add(fragmentInstance);\n}\nfunction commitNewChildToFragmentInstance(childInstance, fragmentInstance) {\n  var eventListeners = fragmentInstance._eventListeners;\n  if (null !== eventListeners)\n    for (var i$jscomp$0 = 0; i$jscomp$0 < eventListeners.length; i$jscomp$0++) {\n      var _eventListeners$i3 = eventListeners[i$jscomp$0];\n      childInstance.addEventListener(\n        _eventListeners$i3.type,\n        _eventListeners$i3.attachedListener,\n        getAttachOptions(_eventListeners$i3.optionsOrUseCapture)\n      );\n    }\n  3 !== childInstance.nodeType &&\n    ((eventListeners = fragmentInstance._observers),\n    null !== eventListeners &&\n      eventListeners.forEach(function (observer) {\n        for (\n          var writeIdx = 0, i = 0;\n          i < pendingIntersectionUnobserves.length;\n          i++\n        ) {\n          var pending = pendingIntersectionUnobserves[i];\n          if (\n            pending.fragmentInstance !== fragmentInstance ||\n            pending.observer !== observer ||\n            pending.instance !== childInstance\n          )\n            pendingIntersectionUnobserves[writeIdx++] = pending;\n        }\n        pendingIntersectionUnobserves.length = writeIdx;\n        observer.observe(childInstance);\n      }),\n    addFragmentHandleToInstance(childInstance, fragmentInstance));\n}\nfunction deleteChildFromFragmentInstance(childInstance, fragmentInstance) {\n  var eventListeners = fragmentInstance._eventListeners;\n  if (null !== eventListeners)\n    for (var i = 0; i < eventListeners.length; i++) {\n      var _eventListeners$i4 = eventListeners[i];\n      childInstance.removeEventListener(\n        _eventListeners$i4.type,\n        _eventListeners$i4.attachedListener,\n        getAttachOptions(_eventListeners$i4.optionsOrUseCapture)\n      );\n    }\n  3 !== childInstance.nodeType &&\n    ((eventListeners = fragmentInstance._observers),\n    null !== eventListeners &&\n      eventListeners.forEach(function (observer) {\n        \"string\" === typeof observer.rootMargin\n          ? schedulePendingIntersectionUnobserve(\n              fragmentInstance,\n              observer,\n              childInstance\n            )\n          : observer.unobserve(childInstance);\n      }),\n    null != childInstance.reactFragments &&\n      childInstance.reactFragments.delete(fragmentInstance));\n}\nfunction clearContainerSparingly(container) {\n  var nextNode = container.firstChild;\n  nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);\n  for (; nextNode; ) {\n    var node = nextNode;\n    nextNode = nextNode.nextSibling;\n    switch (node.nodeName) {\n      case \"HTML\":\n      case \"HEAD\":\n      case \"BODY\":\n        clearContainerSparingly(node);\n        detachDeletedInstance(node);\n        continue;\n      case \"SCRIPT\":\n      case \"STYLE\":\n        continue;\n      case \"LINK\":\n        if (\"stylesheet\" === node.rel.toLowerCase()) continue;\n    }\n    container.removeChild(node);\n  }\n}\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n  for (; 1 === instance.nodeType; ) {\n    var anyProps = props;\n    if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {\n      if (\n        !inRootOrSingleton &&\n        (\"INPUT\" !== instance.nodeName || \"hidden\" !== instance.type)\n      )\n        break;\n    } else if (!inRootOrSingleton)\n      if (\"input\" === type && \"hidden\" === instance.type) {\n        var name = null == anyProps.name ? null : \"\" + anyProps.name;\n        if (\n          \"hidden\" === anyProps.type &&\n          instance.getAttribute(\"name\") === name\n        )\n          return instance;\n      } else return instance;\n    else if (!instance[internalHoistableMarker])\n      switch (type) {\n        case \"meta\":\n          if (!instance.hasAttribute(\"itemprop\")) break;\n          return instance;\n        case \"link\":\n          name = instance.getAttribute(\"rel\");\n          if (\"stylesheet\" === name && instance.hasAttribute(\"data-precedence\"))\n            break;\n          else if (\n            name !== anyProps.rel ||\n            instance.getAttribute(\"href\") !==\n              (null == anyProps.href || \"\" === anyProps.href\n                ? null\n                : anyProps.href) ||\n            instance.getAttribute(\"crossorigin\") !==\n              (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||\n            instance.getAttribute(\"title\") !==\n              (null == anyProps.title ? null : anyProps.title)\n          )\n            break;\n          return instance;\n        case \"style\":\n          if (instance.hasAttribute(\"data-precedence\")) break;\n          return instance;\n        case \"script\":\n          name = instance.getAttribute(\"src\");\n          if (\n            (name !== (null == anyProps.src ? null : anyProps.src) ||\n              instance.getAttribute(\"type\") !==\n                (null == anyProps.type ? null : anyProps.type) ||\n              instance.getAttribute(\"crossorigin\") !==\n                (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&\n            name &&\n            instance.hasAttribute(\"async\") &&\n            !instance.hasAttribute(\"itemprop\")\n          )\n            break;\n          return instance;\n        default:\n          return instance;\n      }\n    instance = getNextHydratable(instance.nextSibling);\n    if (null === instance) break;\n  }\n  return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n  if (\"\" === text) return null;\n  for (; 3 !== instance.nodeType; ) {\n    if (\n      (1 !== instance.nodeType ||\n        \"INPUT\" !== instance.nodeName ||\n        \"hidden\" !== instance.type) &&\n      !inRootOrSingleton\n    )\n      return null;\n    instance = getNextHydratable(instance.nextSibling);\n    if (null === instance) return null;\n  }\n  return instance;\n}\nfunction canHydrateHydrationBoundary(instance, inRootOrSingleton) {\n  for (; 8 !== instance.nodeType; ) {\n    if (\n      (1 !== instance.nodeType ||\n        \"INPUT\" !== instance.nodeName ||\n        \"hidden\" !== instance.type) &&\n      !inRootOrSingleton\n    )\n      return null;\n    instance = getNextHydratable(instance.nextSibling);\n    if (null === instance) return null;\n  }\n  return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n  return \"$?\" === instance.data || \"$~\" === instance.data;\n}\nfunction isSuspenseInstanceFallback(instance) {\n  return (\n    \"$!\" === instance.data ||\n    (\"$?\" === instance.data && \"loading\" !== instance.ownerDocument.readyState)\n  );\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n  var ownerDocument = instance.ownerDocument;\n  if (\"$~\" === instance.data) instance._reactRetry = callback;\n  else if (\"$?\" !== instance.data || \"loading\" !== ownerDocument.readyState)\n    callback();\n  else {\n    var listener = function () {\n      callback();\n      ownerDocument.removeEventListener(\"DOMContentLoaded\", listener);\n    };\n    ownerDocument.addEventListener(\"DOMContentLoaded\", listener);\n    instance._reactRetry = listener;\n  }\n}\nfunction getNextHydratable(node) {\n  for (; null != node; node = node.nextSibling) {\n    var nodeType = node.nodeType;\n    if (1 === nodeType || 3 === nodeType) break;\n    if (8 === nodeType) {\n      nodeType = node.data;\n      if (\n        \"$\" === nodeType ||\n        \"$!\" === nodeType ||\n        \"$?\" === nodeType ||\n        \"$~\" === nodeType ||\n        \"&\" === nodeType ||\n        \"F!\" === nodeType ||\n        \"F\" === nodeType\n      )\n        break;\n      if (\"/$\" === nodeType || \"/&\" === nodeType) return null;\n    }\n  }\n  return node;\n}\nvar previousHydratableOnEnteringScopedSingleton = null;\nfunction getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {\n  hydrationInstance = hydrationInstance.nextSibling;\n  for (var depth = 0; hydrationInstance; ) {\n    if (8 === hydrationInstance.nodeType) {\n      var data = hydrationInstance.data;\n      if (\"/$\" === data || \"/&\" === data) {\n        if (0 === depth)\n          return getNextHydratable(hydrationInstance.nextSibling);\n        depth--;\n      } else\n        (\"$\" !== data &&\n          \"$!\" !== data &&\n          \"$?\" !== data &&\n          \"$~\" !== data &&\n          \"&\" !== data) ||\n          depth++;\n    }\n    hydrationInstance = hydrationInstance.nextSibling;\n  }\n  return null;\n}\nfunction getParentHydrationBoundary(targetInstance) {\n  targetInstance = targetInstance.previousSibling;\n  for (var depth = 0; targetInstance; ) {\n    if (8 === targetInstance.nodeType) {\n      var data = targetInstance.data;\n      if (\n        \"$\" === data ||\n        \"$!\" === data ||\n        \"$?\" === data ||\n        \"$~\" === data ||\n        \"&\" === data\n      ) {\n        if (0 === depth) return targetInstance;\n        depth--;\n      } else (\"/$\" !== data && \"/&\" !== data) || depth++;\n    }\n    targetInstance = targetInstance.previousSibling;\n  }\n  return null;\n}\nfunction setFocusIfFocusable(node, focusOptions) {\n  function handleFocus() {\n    didFocus = !0;\n  }\n  if (node.ownerDocument.activeElement === node) return !0;\n  var didFocus = !1;\n  try {\n    node.ownerDocument.addEventListener(\"focus\", handleFocus, !0),\n      (node.focus || HTMLElement.prototype.focus).call(node, focusOptions);\n  } finally {\n    node.ownerDocument.removeEventListener(\"focus\", handleFocus, !0);\n  }\n  return didFocus;\n}\nfunction requestPostPaintCallback(callback) {\n  localRequestAnimationFrame(function () {\n    localRequestAnimationFrame(function (time) {\n      return callback(time);\n    });\n  });\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance) {\n  props = getOwnerDocumentFromRootContainer(rootContainerInstance);\n  switch (type) {\n    case \"html\":\n      type = props.documentElement;\n      if (!type) throw Error(formatProdErrorMessage(452));\n      return type;\n    case \"head\":\n      type = props.head;\n      if (!type) throw Error(formatProdErrorMessage(453));\n      return type;\n    case \"body\":\n      type = props.body;\n      if (!type) throw Error(formatProdErrorMessage(454));\n      return type;\n    default:\n      throw Error(formatProdErrorMessage(451));\n  }\n}\nfunction releaseSingletonInstance(instance, type, props) {\n  for (var propKey in props) {\n    var propValue = props[propKey];\n    props.hasOwnProperty(propKey) &&\n      null != propValue &&\n      setProp(instance, type, propKey, null, emptyProps, propValue);\n  }\n  null != props.dangerouslySetInnerHTML && (instance.textContent = \"\");\n  instance.onclick === noop$1 && (instance.onclick = null);\n  detachDeletedInstance(instance);\n}\nfunction clearSingletonPreambleContribution(instance) {\n  for (var attributes = instance.attributes; attributes.length; )\n    instance.removeAttributeNode(attributes[0]);\n  detachDeletedInstance(instance);\n}\nvar preloadPropsMap = new Map(),\n  preconnectsSet = new Set();\nfunction getHoistableRoot(container) {\n  if (\"function\" === typeof container.getRootNode) {\n    var rootNode = container.getRootNode();\n    if (9 === rootNode.nodeType || 11 === rootNode.nodeType) return rootNode;\n  }\n  return 9 === container.nodeType ? container : container.ownerDocument;\n}\nvar previousDispatcher = ReactDOMSharedInternals.d;\nReactDOMSharedInternals.d = {\n  f: flushSyncWork,\n  r: requestFormReset,\n  D: prefetchDNS,\n  C: preconnect,\n  L: preload,\n  m: preloadModule,\n  X: preinitScript,\n  S: preinitStyle,\n  M: preinitModuleScript\n};\nfunction flushSyncWork() {\n  var previousWasRendering = previousDispatcher.f(),\n    wasRendering = flushSyncWork$1();\n  return previousWasRendering || wasRendering;\n}\nfunction requestFormReset(form) {\n  var formInst = getInstanceFromNode(form);\n  null !== formInst && 5 === formInst.tag && \"form\" === formInst.type\n    ? requestFormReset$1(formInst)\n    : previousDispatcher.r(form);\n}\nvar globalDocument = \"undefined\" === typeof document ? null : document;\nfunction preconnectAs(rel, href, crossOrigin) {\n  var ownerDocument = globalDocument;\n  if (ownerDocument && \"string\" === typeof href && href) {\n    var limitedEscapedHref =\n      escapeSelectorAttributeValueInsideDoubleQuotes(href);\n    limitedEscapedHref =\n      'link[rel=\"' + rel + '\"][href=\"' + limitedEscapedHref + '\"]';\n    \"string\" === typeof crossOrigin &&\n      (limitedEscapedHref += '[crossorigin=\"' + crossOrigin + '\"]');\n    preconnectsSet.has(limitedEscapedHref) ||\n      (preconnectsSet.add(limitedEscapedHref),\n      (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),\n      null === ownerDocument.querySelector(limitedEscapedHref) &&\n        ((href = ownerDocument.createElement(\"link\")),\n        setInitialProperties(href, \"link\", rel),\n        markNodeAsHoistable(href),\n        ownerDocument.head.appendChild(href)));\n  }\n}\nfunction prefetchDNS(href) {\n  previousDispatcher.D(href);\n  preconnectAs(\"dns-prefetch\", href, null);\n}\nfunction preconnect(href, crossOrigin) {\n  previousDispatcher.C(href, crossOrigin);\n  preconnectAs(\"preconnect\", href, crossOrigin);\n}\nfunction preload(href, as, options) {\n  previousDispatcher.L(href, as, options);\n  var ownerDocument = globalDocument;\n  if (ownerDocument && href && as) {\n    var preloadSelector =\n      'link[rel=\"preload\"][as=\"' +\n      escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n      '\"]';\n    \"image\" === as\n      ? options && options.imageSrcSet\n        ? ((preloadSelector +=\n            '[imagesrcset=\"' +\n            escapeSelectorAttributeValueInsideDoubleQuotes(\n              options.imageSrcSet\n            ) +\n            '\"]'),\n          \"string\" === typeof options.imageSizes &&\n            (preloadSelector +=\n              '[imagesizes=\"' +\n              escapeSelectorAttributeValueInsideDoubleQuotes(\n                options.imageSizes\n              ) +\n              '\"]'))\n        : (preloadSelector +=\n            '[href=\"' +\n            escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n            '\"]')\n      : (preloadSelector +=\n          '[href=\"' +\n          escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n          '\"]');\n    var key = preloadSelector;\n    switch (as) {\n      case \"style\":\n        key = getStyleKey(href);\n        break;\n      case \"script\":\n        key = getScriptKey(href);\n    }\n    if (\n      !(\n        preloadPropsMap.has(key) ||\n        ((href = assign(\n          {\n            rel: \"preload\",\n            href:\n              \"image\" === as && options && options.imageSrcSet ? void 0 : href,\n            as: as\n          },\n          options\n        )),\n        preloadPropsMap.set(key, href),\n        null !== ownerDocument.querySelector(preloadSelector) ||\n          (\"style\" === as &&\n            ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||\n          (\"script\" === as &&\n            ownerDocument.querySelector(getScriptSelectorFromKey(key))))\n      )\n    ) {\n      var instance = ownerDocument.createElement(\"link\");\n      setInitialProperties(instance, \"link\", href);\n      \"style\" === as &&\n        ((instance[internalLoadPendingKey] = !0),\n        (instance.onload = instance.onerror =\n          function () {\n            clearPendingLoadOnNode(instance);\n          }));\n      markNodeAsHoistable(instance);\n      ownerDocument.head.appendChild(instance);\n    }\n  }\n}\nfunction preloadModule(href, options) {\n  previousDispatcher.m(href, options);\n  var ownerDocument = globalDocument;\n  if (ownerDocument && href) {\n    var as = options && \"string\" === typeof options.as ? options.as : \"script\",\n      preloadSelector =\n        'link[rel=\"modulepreload\"][as=\"' +\n        escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n        '\"][href=\"' +\n        escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n        '\"]',\n      key = preloadSelector;\n    switch (as) {\n      case \"audioworklet\":\n      case \"paintworklet\":\n      case \"serviceworker\":\n      case \"sharedworker\":\n      case \"worker\":\n      case \"script\":\n        key = getScriptKey(href);\n    }\n    if (\n      !preloadPropsMap.has(key) &&\n      ((href = assign({ rel: \"modulepreload\", href: href }, options)),\n      preloadPropsMap.set(key, href),\n      null === ownerDocument.querySelector(preloadSelector))\n    ) {\n      switch (as) {\n        case \"audioworklet\":\n        case \"paintworklet\":\n        case \"serviceworker\":\n        case \"sharedworker\":\n        case \"worker\":\n        case \"script\":\n          if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))\n            return;\n      }\n      as = ownerDocument.createElement(\"link\");\n      setInitialProperties(as, \"link\", href);\n      markNodeAsHoistable(as);\n      ownerDocument.head.appendChild(as);\n    }\n  }\n}\nfunction preinitStyle(href, precedence, options) {\n  previousDispatcher.S(href, precedence, options);\n  var ownerDocument = globalDocument;\n  if (ownerDocument && href) {\n    var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,\n      key = getStyleKey(href);\n    precedence = precedence || \"default\";\n    var resource = styles.get(key);\n    if (!resource) {\n      var state = { loading: 0, preload: null };\n      if (\n        (resource = ownerDocument.querySelector(\n          getStylesheetSelectorFromKey(key)\n        ))\n      )\n        state.loading = 5;\n      else {\n        href = assign(\n          { rel: \"stylesheet\", href: href, \"data-precedence\": precedence },\n          options\n        );\n        (options = preloadPropsMap.get(key)) &&\n          adoptPreloadPropsForStylesheet(href, options);\n        var link = (resource = ownerDocument.createElement(\"link\"));\n        markNodeAsHoistable(link);\n        setInitialProperties(link, \"link\", href);\n        link._p = new Promise(function (resolve, reject) {\n          link.onload = resolve;\n          link.onerror = reject;\n        });\n        link.addEventListener(\"load\", function () {\n          state.loading |= 1;\n        });\n        link.addEventListener(\"error\", function () {\n          state.loading |= 2;\n        });\n        state.loading |= 4;\n        insertStylesheet(resource, precedence, ownerDocument);\n      }\n      resource = {\n        type: \"stylesheet\",\n        instance: resource,\n        count: 1,\n        state: state\n      };\n      styles.set(key, resource);\n    }\n  }\n}\nfunction preinitScript(src, options) {\n  previousDispatcher.X(src, options);\n  var ownerDocument = globalDocument;\n  if (ownerDocument && src) {\n    var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n      key = getScriptKey(src),\n      resource = scripts.get(key);\n    resource ||\n      ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n      resource ||\n        ((src = assign({ src: src, async: !0 }, options)),\n        (options = preloadPropsMap.get(key)) &&\n          adoptPreloadPropsForScript(src, options),\n        (resource = ownerDocument.createElement(\"script\")),\n        markNodeAsHoistable(resource),\n        setInitialProperties(resource, \"link\", src),\n        ownerDocument.head.appendChild(resource)),\n      (resource = {\n        type: \"script\",\n        instance: resource,\n        count: 1,\n        state: null\n      }),\n      scripts.set(key, resource));\n  }\n}\nfunction preinitModuleScript(src, options) {\n  previousDispatcher.M(src, options);\n  var ownerDocument = globalDocument;\n  if (ownerDocument && src) {\n    var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n      key = getScriptKey(src),\n      resource = scripts.get(key);\n    resource ||\n      ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n      resource ||\n        ((src = assign({ src: src, async: !0, type: \"module\" }, options)),\n        (options = preloadPropsMap.get(key)) &&\n          adoptPreloadPropsForScript(src, options),\n        (resource = ownerDocument.createElement(\"script\")),\n        markNodeAsHoistable(resource),\n        setInitialProperties(resource, \"link\", src),\n        ownerDocument.head.appendChild(resource)),\n      (resource = {\n        type: \"script\",\n        instance: resource,\n        count: 1,\n        state: null\n      }),\n      scripts.set(key, resource));\n  }\n}\nfunction getResource(type, currentProps, pendingProps, currentResource) {\n  var JSCompiler_inline_result = (JSCompiler_inline_result =\n    rootInstanceStackCursor.current)\n    ? getHoistableRoot(JSCompiler_inline_result)\n    : null;\n  if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));\n  switch (type) {\n    case \"meta\":\n    case \"title\":\n      return null;\n    case \"style\":\n      return \"string\" === typeof pendingProps.precedence &&\n        \"string\" === typeof pendingProps.href\n        ? ((pendingProps = getStyleKey(pendingProps.href)),\n          (currentProps = getResourcesFromRoot(\n            JSCompiler_inline_result\n          ).hoistableStyles),\n          (currentResource = currentProps.get(pendingProps)),\n          currentResource ||\n            ((currentResource = {\n              type: \"style\",\n              instance: null,\n              count: 0,\n              state: null\n            }),\n            currentProps.set(pendingProps, currentResource)),\n          currentResource)\n        : { type: \"void\", instance: null, count: 0, state: null };\n    case \"link\":\n      if (\n        \"stylesheet\" === pendingProps.rel &&\n        \"string\" === typeof pendingProps.href &&\n        \"string\" === typeof pendingProps.precedence\n      ) {\n        type = getStyleKey(pendingProps.href);\n        var styles$268 = getResourcesFromRoot(\n            JSCompiler_inline_result\n          ).hoistableStyles,\n          resource$269 = styles$268.get(type);\n        resource$269 ||\n          ((JSCompiler_inline_result =\n            JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),\n          (resource$269 = {\n            type: \"stylesheet\",\n            instance: null,\n            count: 0,\n            state: { loading: 0, preload: null }\n          }),\n          styles$268.set(type, resource$269),\n          (styles$268 = JSCompiler_inline_result.querySelector(\n            getStylesheetSelectorFromKey(type)\n          ))\n            ? styles$268._p ||\n              ((resource$269.instance = styles$268),\n              (resource$269.state.loading = 5))\n            : ((styles$268 = preloadPropsMap.get(type)),\n              styles$268 ||\n                ((styles$268 = {\n                  rel: \"preload\",\n                  as: \"style\",\n                  href: pendingProps.href,\n                  crossOrigin: pendingProps.crossOrigin,\n                  integrity: pendingProps.integrity,\n                  media: pendingProps.media,\n                  hrefLang: pendingProps.hrefLang,\n                  referrerPolicy: pendingProps.referrerPolicy\n                }),\n                preloadPropsMap.set(type, styles$268)),\n              preloadStylesheet(\n                JSCompiler_inline_result,\n                type,\n                styles$268,\n                resource$269.state\n              )));\n        if (currentProps && null === currentResource)\n          throw Error(formatProdErrorMessage(528, \"\"));\n        return resource$269;\n      }\n      if (currentProps && null !== currentResource)\n        throw Error(formatProdErrorMessage(529, \"\"));\n      return null;\n    case \"script\":\n      return (\n        (currentProps = pendingProps.async),\n        (pendingProps = pendingProps.src),\n        \"string\" === typeof pendingProps &&\n        currentProps &&\n        \"function\" !== typeof currentProps &&\n        \"symbol\" !== typeof currentProps\n          ? ((pendingProps = getScriptKey(pendingProps)),\n            (currentProps = getResourcesFromRoot(\n              JSCompiler_inline_result\n            ).hoistableScripts),\n            (currentResource = currentProps.get(pendingProps)),\n            currentResource ||\n              ((currentResource = {\n                type: \"script\",\n                instance: null,\n                count: 0,\n                state: null\n              }),\n              currentProps.set(pendingProps, currentResource)),\n            currentResource)\n          : { type: \"void\", instance: null, count: 0, state: null }\n      );\n    default:\n      throw Error(formatProdErrorMessage(444, type));\n  }\n}\nfunction getStyleKey(href) {\n  return 'href=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '\"';\n}\nfunction getStylesheetSelectorFromKey(key) {\n  return 'link[rel=\"stylesheet\"][' + key + \"]\";\n}\nfunction stylesheetPropsFromRawProps(rawProps) {\n  return assign({}, rawProps, {\n    \"data-precedence\": rawProps.precedence,\n    precedence: null\n  });\n}\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n  if (\n    (key = ownerDocument.querySelector(\n      'link[rel=\"preload\"][as=\"style\"][' + key + \"]\"\n    ))\n  ) {\n    if (!0 !== key[internalLoadPendingKey]) {\n      state.loading = 1;\n      return;\n    }\n  } else\n    (key = ownerDocument.createElement(\"link\")),\n      (key[internalLoadPendingKey] = !0),\n      (key.onload = key.onerror = clearPendingLoadOnNode.bind(null, key)),\n      setInitialProperties(key, \"link\", preloadProps),\n      markNodeAsHoistable(key),\n      ownerDocument.head.appendChild(key);\n  state.preload = key;\n  key.addEventListener(\"load\", function () {\n    return (state.loading |= 1);\n  });\n  key.addEventListener(\"error\", function () {\n    return (state.loading |= 2);\n  });\n}\nfunction getScriptKey(src) {\n  return '[src=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '\"]';\n}\nfunction getScriptSelectorFromKey(key) {\n  return \"script[async]\" + key;\n}\nfunction acquireResource(hoistableRoot, resource, props) {\n  resource.count++;\n  if (null === resource.instance)\n    switch (resource.type) {\n      case \"style\":\n        var instance = hoistableRoot.querySelector(\n          'style[data-href~=\"' +\n            escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +\n            '\"]'\n        );\n        if (instance)\n          return (\n            (resource.instance = instance),\n            markNodeAsHoistable(instance),\n            instance\n          );\n        var styleProps = assign({}, props, {\n          \"data-href\": props.href,\n          \"data-precedence\": props.precedence,\n          href: null,\n          precedence: null\n        });\n        instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(\n          \"style\"\n        );\n        markNodeAsHoistable(instance);\n        setInitialProperties(instance, \"style\", styleProps);\n        insertStylesheet(instance, props.precedence, hoistableRoot);\n        return (resource.instance = instance);\n      case \"stylesheet\":\n        styleProps = getStyleKey(props.href);\n        var instance$274 = hoistableRoot.querySelector(\n          getStylesheetSelectorFromKey(styleProps)\n        );\n        if (instance$274)\n          return (\n            (resource.state.loading |= 4),\n            (resource.instance = instance$274),\n            markNodeAsHoistable(instance$274),\n            instance$274\n          );\n        instance = stylesheetPropsFromRawProps(props);\n        (styleProps = preloadPropsMap.get(styleProps)) &&\n          adoptPreloadPropsForStylesheet(instance, styleProps);\n        instance$274 = (\n          hoistableRoot.ownerDocument || hoistableRoot\n        ).createElement(\"link\");\n        markNodeAsHoistable(instance$274);\n        var linkInstance = instance$274;\n        linkInstance._p = new Promise(function (resolve, reject) {\n          linkInstance.onload = resolve;\n          linkInstance.onerror = reject;\n        });\n        setInitialProperties(instance$274, \"link\", instance);\n        resource.state.loading |= 4;\n        insertStylesheet(instance$274, props.precedence, hoistableRoot);\n        return (resource.instance = instance$274);\n      case \"script\":\n        instance$274 = getScriptKey(props.src);\n        if (\n          (styleProps = hoistableRoot.querySelector(\n            getScriptSelectorFromKey(instance$274)\n          ))\n        )\n          return (\n            (resource.instance = styleProps),\n            markNodeAsHoistable(styleProps),\n            styleProps\n          );\n        instance = props;\n        if ((styleProps = preloadPropsMap.get(instance$274)))\n          (instance = assign({}, props)),\n            adoptPreloadPropsForScript(instance, styleProps);\n        hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n        styleProps = hoistableRoot.createElement(\"script\");\n        markNodeAsHoistable(styleProps);\n        setInitialProperties(styleProps, \"link\", instance);\n        hoistableRoot.head.appendChild(styleProps);\n        return (resource.instance = styleProps);\n      case \"void\":\n        return null;\n      default:\n        throw Error(formatProdErrorMessage(443, resource.type));\n    }\n  else\n    \"stylesheet\" === resource.type &&\n      0 === (resource.state.loading & 4) &&\n      ((instance = resource.instance),\n      (resource.state.loading |= 4),\n      insertStylesheet(instance, props.precedence, hoistableRoot));\n  return resource.instance;\n}\nfunction insertStylesheet(instance, precedence, root) {\n  for (\n    var nodes = root.querySelectorAll(\n        'link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'\n      ),\n      last = nodes.length ? nodes[nodes.length - 1] : null,\n      prior = last,\n      i = 0;\n    i < nodes.length;\n    i++\n  ) {\n    var node = nodes[i];\n    if (node.dataset.precedence === precedence) prior = node;\n    else if (prior !== last) break;\n  }\n  prior\n    ? prior.parentNode.insertBefore(instance, prior.nextSibling)\n    : ((precedence = 9 === root.nodeType ? root.head : root),\n      precedence.insertBefore(instance, precedence.firstChild));\n}\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n  null == stylesheetProps.crossOrigin &&\n    (stylesheetProps.crossOrigin = preloadProps.crossOrigin);\n  null == stylesheetProps.referrerPolicy &&\n    (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);\n  null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);\n}\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n  null == scriptProps.crossOrigin &&\n    (scriptProps.crossOrigin = preloadProps.crossOrigin);\n  null == scriptProps.referrerPolicy &&\n    (scriptProps.referrerPolicy = preloadProps.referrerPolicy);\n  null == scriptProps.integrity &&\n    (scriptProps.integrity = preloadProps.integrity);\n}\nvar tagCaches = null;\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n  if (null === tagCaches) {\n    var cache = new Map();\n    var caches = (tagCaches = new Map());\n    caches.set(ownerDocument, cache);\n  } else\n    (caches = tagCaches),\n      (cache = caches.get(ownerDocument)),\n      cache || ((cache = new Map()), caches.set(ownerDocument, cache));\n  if (cache.has(type)) return cache;\n  cache.set(type, null);\n  ownerDocument = ownerDocument.getElementsByTagName(type);\n  for (caches = 0; caches < ownerDocument.length; caches++) {\n    var node = ownerDocument[caches];\n    if (\n      !(\n        node[internalHoistableMarker] ||\n        node[internalInstanceKey] ||\n        (\"link\" === type && \"stylesheet\" === node.getAttribute(\"rel\"))\n      ) &&\n      \"http://www.w3.org/2000/svg\" !== node.namespaceURI\n    ) {\n      var nodeKey = node.getAttribute(keyAttribute) || \"\";\n      nodeKey = type + nodeKey;\n      var existing = cache.get(nodeKey);\n      existing ? existing.push(node) : cache.set(nodeKey, [node]);\n    }\n  }\n  return cache;\n}\nfunction mountHoistable(hoistableRoot, type, instance) {\n  hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n  hoistableRoot.head.insertBefore(\n    instance,\n    \"title\" === type ? hoistableRoot.querySelector(\"head > title\") : null\n  );\n}\nfunction isHostHoistableType(type, props, hostContext) {\n  if (1 === hostContext || null != props.itemProp) return !1;\n  switch (type) {\n    case \"meta\":\n    case \"title\":\n      return !0;\n    case \"style\":\n      if (\n        \"string\" !== typeof props.precedence ||\n        \"string\" !== typeof props.href ||\n        \"\" === props.href\n      )\n        break;\n      return !0;\n    case \"link\":\n      if (\n        \"string\" !== typeof props.rel ||\n        \"string\" !== typeof props.href ||\n        \"\" === props.href ||\n        props.onLoad ||\n        props.onError\n      )\n        break;\n      switch (props.rel) {\n        case \"stylesheet\":\n          return (\n            (type = props.disabled),\n            \"string\" === typeof props.precedence && null == type\n          );\n        default:\n          return !0;\n      }\n    case \"script\":\n      if (\n        props.async &&\n        \"function\" !== typeof props.async &&\n        \"symbol\" !== typeof props.async &&\n        !props.onLoad &&\n        !props.onError &&\n        props.src &&\n        \"string\" === typeof props.src\n      )\n        return !0;\n  }\n  return !1;\n}\nfunction maySuspendCommit(type, props) {\n  return (\n    \"img\" === type &&\n    null != props.src &&\n    \"\" !== props.src &&\n    null == props.onLoad &&\n    \"lazy\" !== props.loading\n  );\n}\nfunction preloadResource(resource) {\n  return \"stylesheet\" === resource.type && 0 === (resource.state.loading & 3)\n    ? !1\n    : !0;\n}\nfunction estimateImageBytes(instance) {\n  return (\n    (instance.width || 100) *\n    (instance.height || 100) *\n    (\"number\" === typeof devicePixelRatio ? devicePixelRatio : 1) *\n    0.25\n  );\n}\nfunction suspendInstance(state, instance) {\n  \"function\" === typeof instance.decode &&\n    (state.imgCount++,\n    instance.complete ||\n      ((state.imgBytes += estimateImageBytes(instance)),\n      state.suspenseyImages.push(instance)),\n    (state = onUnsuspendImg.bind(state)),\n    instance.decode().then(state, state));\n}\nfunction suspendResource(state, hoistableRoot, resource, props) {\n  if (\n    \"stylesheet\" === resource.type &&\n    (\"string\" !== typeof props.media ||\n      !1 !== matchMedia(props.media).matches) &&\n    0 === (resource.state.loading & 4)\n  ) {\n    if (null === resource.instance) {\n      var key = getStyleKey(props.href),\n        instance = hoistableRoot.querySelector(\n          getStylesheetSelectorFromKey(key)\n        );\n      if (instance) {\n        hoistableRoot = instance._p;\n        null !== hoistableRoot &&\n          \"object\" === typeof hoistableRoot &&\n          \"function\" === typeof hoistableRoot.then &&\n          (state.count++,\n          (state = onUnsuspend.bind(state)),\n          hoistableRoot.then(state, state));\n        resource.state.loading |= 4;\n        resource.instance = instance;\n        markNodeAsHoistable(instance);\n        return;\n      }\n      instance = hoistableRoot.ownerDocument || hoistableRoot;\n      props = stylesheetPropsFromRawProps(props);\n      (key = preloadPropsMap.get(key)) &&\n        adoptPreloadPropsForStylesheet(props, key);\n      instance = instance.createElement(\"link\");\n      markNodeAsHoistable(instance);\n      var linkInstance = instance;\n      linkInstance._p = new Promise(function (resolve, reject) {\n        linkInstance.onload = resolve;\n        linkInstance.onerror = reject;\n      });\n      setInitialProperties(instance, \"link\", props);\n      resource.instance = instance;\n    }\n    null === state.stylesheets && (state.stylesheets = new Map());\n    state.stylesheets.set(resource, hoistableRoot);\n    (hoistableRoot = resource.state.preload) &&\n      0 === (resource.state.loading & 3) &&\n      (state.count++,\n      (resource = onUnsuspend.bind(state)),\n      hoistableRoot.addEventListener(\"load\", resource),\n      hoistableRoot.addEventListener(\"error\", resource));\n  }\n}\nvar estimatedBytesWithinLimit = 0;\nfunction waitForCommitToBeReady(state, timeoutOffset) {\n  state.stylesheets &&\n    0 === state.count &&\n    insertSuspendedStylesheets(state, state.stylesheets);\n  return 0 < state.count || 0 < state.imgCount\n    ? function (commit) {\n        var stylesheetTimer = setTimeout(function () {\n          state.stylesheets &&\n            insertSuspendedStylesheets(state, state.stylesheets);\n          if (state.unsuspend) {\n            var unsuspend = state.unsuspend;\n            state.unsuspend = null;\n            unsuspend();\n          }\n        }, 6e4 + timeoutOffset);\n        0 < state.imgBytes &&\n          0 === estimatedBytesWithinLimit &&\n          (estimatedBytesWithinLimit = 62500 * estimateBandwidth());\n        var imgTimer = setTimeout(\n          function () {\n            state.waitingForImages = !1;\n            if (\n              0 === state.count &&\n              (state.stylesheets &&\n                insertSuspendedStylesheets(state, state.stylesheets),\n              state.unsuspend)\n            ) {\n              var unsuspend = state.unsuspend;\n              state.unsuspend = null;\n              unsuspend();\n            }\n          },\n          (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +\n            timeoutOffset\n        );\n        state.unsuspend = commit;\n        return function () {\n          state.unsuspend = null;\n          clearTimeout(stylesheetTimer);\n          clearTimeout(imgTimer);\n        };\n      }\n    : null;\n}\nfunction checkIfFullyUnsuspended(state) {\n  if (0 === state.count && (0 === state.imgCount || !state.waitingForImages))\n    if (state.stylesheets) insertSuspendedStylesheets(state, state.stylesheets);\n    else if (state.unsuspend) {\n      var unsuspend = state.unsuspend;\n      state.unsuspend = null;\n      unsuspend();\n    }\n}\nfunction onUnsuspend() {\n  this.count--;\n  checkIfFullyUnsuspended(this);\n}\nfunction onUnsuspendImg() {\n  this.imgCount--;\n  checkIfFullyUnsuspended(this);\n}\nvar precedencesByRoot = null;\nfunction insertSuspendedStylesheets(state, resources) {\n  state.stylesheets = null;\n  null !== state.unsuspend &&\n    (state.count++,\n    (precedencesByRoot = new Map()),\n    resources.forEach(insertStylesheetIntoRoot, state),\n    (precedencesByRoot = null),\n    onUnsuspend.call(state));\n}\nfunction insertStylesheetIntoRoot(root, resource) {\n  if (!(resource.state.loading & 4)) {\n    var precedences = precedencesByRoot.get(root);\n    if (precedences) var last = precedences.get(null);\n    else {\n      precedences = new Map();\n      precedencesByRoot.set(root, precedences);\n      for (\n        var nodes = root.querySelectorAll(\n            \"link[data-precedence],style[data-precedence]\"\n          ),\n          i = 0;\n        i < nodes.length;\n        i++\n      ) {\n        var node = nodes[i];\n        if (\n          \"LINK\" === node.nodeName ||\n          \"not all\" !== node.getAttribute(\"media\")\n        )\n          precedences.set(node.dataset.precedence, node), (last = node);\n      }\n      last && precedences.set(null, last);\n    }\n    nodes = resource.instance;\n    node = nodes.getAttribute(\"data-precedence\");\n    i = precedences.get(node) || last;\n    i === last && precedences.set(null, nodes);\n    precedences.set(node, nodes);\n    this.count++;\n    last = onUnsuspend.bind(this);\n    nodes.addEventListener(\"load\", last);\n    nodes.addEventListener(\"error\", last);\n    i\n      ? i.parentNode.insertBefore(nodes, i.nextSibling)\n      : ((root = 9 === root.nodeType ? root.head : root),\n        root.insertBefore(nodes, root.firstChild));\n    resource.state.loading |= 4;\n  }\n}\nvar HostTransitionContext = {\n  $$typeof: REACT_CONTEXT_TYPE,\n  Provider: null,\n  Consumer: null,\n  _currentValue: sharedNotPendingObject,\n  _currentValue2: sharedNotPendingObject,\n  _threadCount: 0\n};\nfunction FiberRootNode(\n  containerInfo,\n  tag,\n  hydrate,\n  identifierPrefix,\n  onUncaughtError,\n  onCaughtError,\n  onRecoverableError,\n  onDefaultTransitionIndicator,\n  formState\n) {\n  this.tag = 1;\n  this.containerInfo = containerInfo;\n  this.pingCache = this.current = this.pendingChildren = null;\n  this.timeoutHandle = -1;\n  this.callbackNode =\n    this.next =\n    this.pendingContext =\n    this.context =\n    this.cancelPendingCommit =\n      null;\n  this.callbackPriority = 0;\n  this.expirationTimes = createLaneMap(-1);\n  this.entangledLanes =\n    this.shellSuspendCounter =\n    this.errorRecoveryDisabledLanes =\n    this.expiredLanes =\n    this.warmLanes =\n    this.pingedLanes =\n    this.suspendedLanes =\n    this.pendingLanes =\n      0;\n  this.entanglements = createLaneMap(0);\n  this.hiddenUpdates = createLaneMap(null);\n  this.identifierPrefix = identifierPrefix;\n  this.onUncaughtError = onUncaughtError;\n  this.onCaughtError = onCaughtError;\n  this.onRecoverableError = onRecoverableError;\n  this.pooledCache = null;\n  this.pooledCacheLanes = 0;\n  this.formState = formState;\n  this.transitionTypes = null;\n  this.incompleteTransitions = new Map();\n}\nfunction createFiberRoot(\n  containerInfo,\n  tag,\n  hydrate,\n  initialChildren,\n  hydrationCallbacks,\n  isStrictMode,\n  identifierPrefix,\n  formState,\n  onUncaughtError,\n  onCaughtError,\n  onRecoverableError,\n  onDefaultTransitionIndicator\n) {\n  containerInfo = new FiberRootNode(\n    containerInfo,\n    tag,\n    hydrate,\n    identifierPrefix,\n    onUncaughtError,\n    onCaughtError,\n    onRecoverableError,\n    onDefaultTransitionIndicator,\n    formState\n  );\n  tag = 1;\n  !0 === isStrictMode && (tag |= 24);\n  isStrictMode = createFiberImplClass(3, null, null, tag);\n  containerInfo.current = isStrictMode;\n  isStrictMode.stateNode = containerInfo;\n  tag = createCache();\n  tag.refCount++;\n  containerInfo.pooledCache = tag;\n  tag.refCount++;\n  isStrictMode.memoizedState = {\n    element: initialChildren,\n    isDehydrated: hydrate,\n    cache: tag\n  };\n  initializeUpdateQueue(isStrictMode);\n  return containerInfo;\n}\nfunction getContextForSubtree(parentComponent) {\n  if (!parentComponent) return emptyContextObject;\n  parentComponent = emptyContextObject;\n  return parentComponent;\n}\nfunction updateContainerImpl(\n  rootFiber,\n  lane,\n  element,\n  container,\n  parentComponent,\n  callback\n) {\n  parentComponent = getContextForSubtree(parentComponent);\n  null === container.context\n    ? (container.context = parentComponent)\n    : (container.pendingContext = parentComponent);\n  container = createUpdate(lane);\n  container.payload = { element: element };\n  callback = void 0 === callback ? null : callback;\n  null !== callback && (container.callback = callback);\n  element = enqueueUpdate(rootFiber, container, lane);\n  null !== element &&\n    (scheduleUpdateOnFiber(element, rootFiber, lane),\n    entangleTransitions(element, rootFiber, lane));\n}\nfunction markRetryLaneImpl(fiber, retryLane) {\n  fiber = fiber.memoizedState;\n  if (null !== fiber && null !== fiber.dehydrated) {\n    var a = fiber.retryLane;\n    fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;\n  }\n}\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n  markRetryLaneImpl(fiber, retryLane);\n  (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);\n}\nfunction attemptContinuousHydration(fiber) {\n  if (13 === fiber.tag || 31 === fiber.tag) {\n    var root = enqueueConcurrentRenderForLane(fiber, 67108864);\n    null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);\n    markRetryLaneIfNotHydrated(fiber, 67108864);\n  }\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n  if (13 === fiber.tag || 31 === fiber.tag) {\n    var lane = requestUpdateLane();\n    lane = getBumpedLaneForHydrationByLane(lane);\n    var root = enqueueConcurrentRenderForLane(fiber, lane);\n    null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n    markRetryLaneIfNotHydrated(fiber, lane);\n  }\n}\nvar _enabled = !0;\nfunction dispatchDiscreteEvent(\n  domEventName,\n  eventSystemFlags,\n  container,\n  nativeEvent\n) {\n  var prevTransition = ReactSharedInternals.T;\n  ReactSharedInternals.T = null;\n  var previousPriority = ReactDOMSharedInternals.p;\n  try {\n    (ReactDOMSharedInternals.p = 2),\n      dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    (ReactDOMSharedInternals.p = previousPriority),\n      (ReactSharedInternals.T = prevTransition);\n  }\n}\nfunction dispatchContinuousEvent(\n  domEventName,\n  eventSystemFlags,\n  container,\n  nativeEvent\n) {\n  var prevTransition = ReactSharedInternals.T;\n  ReactSharedInternals.T = null;\n  var previousPriority = ReactDOMSharedInternals.p;\n  try {\n    (ReactDOMSharedInternals.p = 8),\n      dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    (ReactDOMSharedInternals.p = previousPriority),\n      (ReactSharedInternals.T = prevTransition);\n  }\n}\nfunction dispatchEvent(\n  domEventName,\n  eventSystemFlags,\n  targetContainer,\n  nativeEvent\n) {\n  if (_enabled) {\n    var blockedOn = findInstanceBlockingEvent(nativeEvent);\n    if (null === blockedOn)\n      dispatchEventForPluginEventSystem(\n        domEventName,\n        eventSystemFlags,\n        nativeEvent,\n        return_targetInst,\n        targetContainer\n      ),\n        clearIfContinuousEvent(domEventName, nativeEvent);\n    else if (\n      queueIfContinuousEvent(\n        blockedOn,\n        domEventName,\n        eventSystemFlags,\n        targetContainer,\n        nativeEvent\n      )\n    )\n      nativeEvent.stopPropagation();\n    else if (\n      (clearIfContinuousEvent(domEventName, nativeEvent),\n      eventSystemFlags & 4 &&\n        -1 < discreteReplayableEvents.indexOf(domEventName))\n    ) {\n      for (; null !== blockedOn; ) {\n        var fiber = getInstanceFromNode(blockedOn);\n        if (null !== fiber)\n          switch (fiber.tag) {\n            case 3:\n              fiber = fiber.stateNode;\n              if (fiber.current.memoizedState.isDehydrated) {\n                var lanes = getHighestPriorityLanes(fiber.pendingLanes);\n                if (0 !== lanes) {\n                  var root = fiber;\n                  root.pendingLanes |= 2;\n                  for (root.entangledLanes |= 2; lanes; ) {\n                    var lane = 1 << (31 - clz32(lanes));\n                    root.entanglements[1] |= lane;\n                    lanes &= ~lane;\n                  }\n                  ensureRootIsScheduled(fiber);\n                  0 === (executionContext & 6) &&\n                    ((workInProgressRootRenderTargetTime = now() + 500),\n                    flushSyncWorkAcrossRoots_impl(0, !1));\n                }\n              }\n              break;\n            case 31:\n            case 13:\n              (root = enqueueConcurrentRenderForLane(fiber, 2)),\n                null !== root && scheduleUpdateOnFiber(root, fiber, 2),\n                flushSyncWork$1(),\n                markRetryLaneIfNotHydrated(fiber, 2);\n          }\n        fiber = findInstanceBlockingEvent(nativeEvent);\n        null === fiber &&\n          dispatchEventForPluginEventSystem(\n            domEventName,\n            eventSystemFlags,\n            nativeEvent,\n            return_targetInst,\n            targetContainer\n          );\n        if (fiber === blockedOn) break;\n        blockedOn = fiber;\n      }\n      null !== blockedOn && nativeEvent.stopPropagation();\n    } else\n      dispatchEventForPluginEventSystem(\n        domEventName,\n        eventSystemFlags,\n        nativeEvent,\n        null,\n        targetContainer\n      );\n  }\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n  nativeEvent = getEventTarget(nativeEvent);\n  return findInstanceBlockingTarget(nativeEvent);\n}\nvar return_targetInst = null;\nfunction findInstanceBlockingTarget(targetNode) {\n  return_targetInst = null;\n  targetNode = getClosestInstanceFromNode(targetNode);\n  if (null !== targetNode) {\n    var nearestMounted = getNearestMountedFiber(targetNode);\n    if (null === nearestMounted) targetNode = null;\n    else {\n      var tag = nearestMounted.tag;\n      if (13 === tag) {\n        targetNode = getSuspenseInstanceFromFiber(nearestMounted);\n        if (null !== targetNode) return targetNode;\n        targetNode = null;\n      } else if (31 === tag) {\n        targetNode = getActivityInstanceFromFiber(nearestMounted);\n        if (null !== targetNode) return targetNode;\n        targetNode = null;\n      } else if (3 === tag) {\n        if (nearestMounted.stateNode.current.memoizedState.isDehydrated)\n          return 3 === nearestMounted.tag\n            ? nearestMounted.stateNode.containerInfo\n            : null;\n        targetNode = null;\n      } else nearestMounted !== targetNode && (targetNode = null);\n    }\n  }\n  return_targetInst = targetNode;\n  return null;\n}\nfunction getEventPriority(domEventName) {\n  switch (domEventName) {\n    case \"beforetoggle\":\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 \"seeked\":\n    case \"submit\":\n    case \"toggle\":\n    case \"touchcancel\":\n    case \"touchend\":\n    case \"touchstart\":\n    case \"volumechange\":\n    case \"change\":\n    case \"selectionchange\":\n    case \"textInput\":\n    case \"compositionstart\":\n    case \"compositionend\":\n    case \"compositionupdate\":\n    case \"beforeblur\":\n    case \"afterblur\":\n    case \"beforeinput\":\n    case \"blur\":\n    case \"fullscreenchange\":\n    case \"fullscreenerror\":\n    case \"focus\":\n    case \"hashchange\":\n    case \"popstate\":\n    case \"select\":\n    case \"selectstart\":\n      return 2;\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 \"resize\":\n    case \"scroll\":\n    case \"touchmove\":\n    case \"wheel\":\n    case \"mouseenter\":\n    case \"mouseleave\":\n    case \"pointerenter\":\n    case \"pointerleave\":\n      return 8;\n    case \"message\":\n      switch (getCurrentPriorityLevel()) {\n        case ImmediatePriority:\n          return 2;\n        case UserBlockingPriority:\n          return 8;\n        case NormalPriority$1:\n        case LowPriority:\n          return 32;\n        case IdlePriority:\n          return 268435456;\n        default:\n          return 32;\n      }\n    default:\n      return 32;\n  }\n}\nvar hasScheduledReplayAttempt = !1,\n  queuedFocus = null,\n  queuedDrag = null,\n  queuedMouse = null,\n  queuedPointers = new Map(),\n  queuedPointerCaptures = new Map(),\n  queuedExplicitHydrationTargets = [],\n  discreteReplayableEvents =\n    \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\n      \" \"\n    );\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case \"focusin\":\n    case \"focusout\":\n      queuedFocus = null;\n      break;\n    case \"dragenter\":\n    case \"dragleave\":\n      queuedDrag = null;\n      break;\n    case \"mouseover\":\n    case \"mouseout\":\n      queuedMouse = null;\n      break;\n    case \"pointerover\":\n    case \"pointerout\":\n      queuedPointers.delete(nativeEvent.pointerId);\n      break;\n    case \"gotpointercapture\":\n    case \"lostpointercapture\":\n      queuedPointerCaptures.delete(nativeEvent.pointerId);\n  }\n}\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(\n  existingQueuedEvent,\n  blockedOn,\n  domEventName,\n  eventSystemFlags,\n  targetContainer,\n  nativeEvent\n) {\n  if (\n    null === existingQueuedEvent ||\n    existingQueuedEvent.nativeEvent !== nativeEvent\n  )\n    return (\n      (existingQueuedEvent = {\n        blockedOn: blockedOn,\n        domEventName: domEventName,\n        eventSystemFlags: eventSystemFlags,\n        nativeEvent: nativeEvent,\n        targetContainers: [targetContainer]\n      }),\n      null !== blockedOn &&\n        ((blockedOn = getInstanceFromNode(blockedOn)),\n        null !== blockedOn && attemptContinuousHydration(blockedOn)),\n      existingQueuedEvent\n    );\n  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n  blockedOn = existingQueuedEvent.targetContainers;\n  null !== targetContainer &&\n    -1 === blockedOn.indexOf(targetContainer) &&\n    blockedOn.push(targetContainer);\n  return existingQueuedEvent;\n}\nfunction queueIfContinuousEvent(\n  blockedOn,\n  domEventName,\n  eventSystemFlags,\n  targetContainer,\n  nativeEvent\n) {\n  switch (domEventName) {\n    case \"focusin\":\n      return (\n        (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(\n          queuedFocus,\n          blockedOn,\n          domEventName,\n          eventSystemFlags,\n          targetContainer,\n          nativeEvent\n        )),\n        !0\n      );\n    case \"dragenter\":\n      return (\n        (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(\n          queuedDrag,\n          blockedOn,\n          domEventName,\n          eventSystemFlags,\n          targetContainer,\n          nativeEvent\n        )),\n        !0\n      );\n    case \"mouseover\":\n      return (\n        (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(\n          queuedMouse,\n          blockedOn,\n          domEventName,\n          eventSystemFlags,\n          targetContainer,\n          nativeEvent\n        )),\n        !0\n      );\n    case \"pointerover\":\n      var pointerId = nativeEvent.pointerId;\n      queuedPointers.set(\n        pointerId,\n        accumulateOrCreateContinuousQueuedReplayableEvent(\n          queuedPointers.get(pointerId) || null,\n          blockedOn,\n          domEventName,\n          eventSystemFlags,\n          targetContainer,\n          nativeEvent\n        )\n      );\n      return !0;\n    case \"gotpointercapture\":\n      return (\n        (pointerId = nativeEvent.pointerId),\n        queuedPointerCaptures.set(\n          pointerId,\n          accumulateOrCreateContinuousQueuedReplayableEvent(\n            queuedPointerCaptures.get(pointerId) || null,\n            blockedOn,\n            domEventName,\n            eventSystemFlags,\n            targetContainer,\n            nativeEvent\n          )\n        ),\n        !0\n      );\n  }\n  return !1;\n}\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n  var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n  if (null !== targetInst) {\n    var nearestMounted = getNearestMountedFiber(targetInst);\n    if (null !== nearestMounted)\n      if (((targetInst = nearestMounted.tag), 13 === targetInst)) {\n        if (\n          ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),\n          null !== targetInst)\n        ) {\n          queuedTarget.blockedOn = targetInst;\n          runWithPriority(queuedTarget.priority, function () {\n            attemptHydrationAtCurrentPriority(nearestMounted);\n          });\n          return;\n        }\n      } else if (31 === targetInst) {\n        if (\n          ((targetInst = getActivityInstanceFromFiber(nearestMounted)),\n          null !== targetInst)\n        ) {\n          queuedTarget.blockedOn = targetInst;\n          runWithPriority(queuedTarget.priority, function () {\n            attemptHydrationAtCurrentPriority(nearestMounted);\n          });\n          return;\n        }\n      } else if (\n        3 === targetInst &&\n        nearestMounted.stateNode.current.memoizedState.isDehydrated\n      ) {\n        queuedTarget.blockedOn =\n          3 === nearestMounted.tag\n            ? nearestMounted.stateNode.containerInfo\n            : null;\n        return;\n      }\n  }\n  queuedTarget.blockedOn = null;\n}\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n  if (null !== queuedEvent.blockedOn) return !1;\n  for (\n    var targetContainers = queuedEvent.targetContainers;\n    0 < targetContainers.length;\n\n  ) {\n    var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n    if (null === nextBlockedOn) {\n      nextBlockedOn = queuedEvent.nativeEvent;\n      var nativeEventClone = new nextBlockedOn.constructor(\n        nextBlockedOn.type,\n        nextBlockedOn\n      );\n      currentReplayingEvent = nativeEventClone;\n      nextBlockedOn.target.dispatchEvent(nativeEventClone);\n      currentReplayingEvent = null;\n    } else\n      return (\n        (targetContainers = getInstanceFromNode(nextBlockedOn)),\n        null !== targetContainers &&\n          attemptContinuousHydration(targetContainers),\n        (queuedEvent.blockedOn = nextBlockedOn),\n        !1\n      );\n    targetContainers.shift();\n  }\n  return !0;\n}\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n  attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);\n}\nfunction replayUnblockedEvents() {\n  hasScheduledReplayAttempt = !1;\n  null !== queuedFocus &&\n    attemptReplayContinuousQueuedEvent(queuedFocus) &&\n    (queuedFocus = null);\n  null !== queuedDrag &&\n    attemptReplayContinuousQueuedEvent(queuedDrag) &&\n    (queuedDrag = null);\n  null !== queuedMouse &&\n    attemptReplayContinuousQueuedEvent(queuedMouse) &&\n    (queuedMouse = null);\n  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n  queuedEvent.blockedOn === unblocked &&\n    ((queuedEvent.blockedOn = null),\n    hasScheduledReplayAttempt ||\n      ((hasScheduledReplayAttempt = !0),\n      Scheduler.unstable_scheduleCallback(\n        Scheduler.unstable_NormalPriority,\n        replayUnblockedEvents\n      )));\n}\nvar lastScheduledReplayQueue = null;\nfunction scheduleReplayQueueIfNeeded(formReplayingQueue) {\n  lastScheduledReplayQueue !== formReplayingQueue &&\n    ((lastScheduledReplayQueue = formReplayingQueue),\n    Scheduler.unstable_scheduleCallback(\n      Scheduler.unstable_NormalPriority,\n      function () {\n        lastScheduledReplayQueue === formReplayingQueue &&\n          (lastScheduledReplayQueue = null);\n        for (var i = 0; i < formReplayingQueue.length; i += 3) {\n          var form = formReplayingQueue[i],\n            submitterOrAction = formReplayingQueue[i + 1],\n            formData = formReplayingQueue[i + 2];\n          if (\"function\" !== typeof submitterOrAction)\n            if (null === findInstanceBlockingTarget(submitterOrAction || form))\n              continue;\n            else break;\n          var formInst = getInstanceFromNode(form);\n          null !== formInst &&\n            (formReplayingQueue.splice(i, 3),\n            (i -= 3),\n            startHostTransition(\n              formInst,\n              {\n                pending: !0,\n                data: formData,\n                method: form.method,\n                action: submitterOrAction\n              },\n              submitterOrAction,\n              formData\n            ));\n        }\n      }\n    ));\n}\nfunction retryIfBlockedOn(unblocked) {\n  function unblock(queuedEvent) {\n    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n  }\n  null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n  null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n  null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n  queuedPointers.forEach(unblock);\n  queuedPointerCaptures.forEach(unblock);\n  for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n    var queuedTarget = queuedExplicitHydrationTargets[i];\n    queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);\n  }\n  for (\n    ;\n    0 < queuedExplicitHydrationTargets.length &&\n    ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);\n\n  )\n    attemptExplicitHydrationTarget(i),\n      null === i.blockedOn && queuedExplicitHydrationTargets.shift();\n  i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;\n  if (null != i)\n    for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {\n      var form = i[queuedTarget],\n        submitterOrAction = i[queuedTarget + 1],\n        formProps = form[internalPropsKey] || null;\n      if (\"function\" === typeof submitterOrAction)\n        formProps || scheduleReplayQueueIfNeeded(i);\n      else if (formProps) {\n        var action = null;\n        if (submitterOrAction && submitterOrAction.hasAttribute(\"formAction\"))\n          if (\n            ((form = submitterOrAction),\n            (formProps = submitterOrAction[internalPropsKey] || null))\n          )\n            action = formProps.formAction;\n          else {\n            if (null !== findInstanceBlockingTarget(form)) continue;\n          }\n        else action = formProps.action;\n        \"function\" === typeof action\n          ? (i[queuedTarget + 1] = action)\n          : (i.splice(queuedTarget, 3), (queuedTarget -= 3));\n        scheduleReplayQueueIfNeeded(i);\n      }\n    }\n}\nfunction defaultOnDefaultTransitionIndicator() {\n  function handleNavigate(event) {\n    event.canIntercept &&\n      \"react-transition\" === event.info &&\n      event.intercept({\n        handler: function () {\n          return new Promise(function (resolve) {\n            return (pendingResolve = resolve);\n          });\n        },\n        focusReset: \"manual\",\n        scroll: \"manual\"\n      });\n  }\n  function handleNavigateComplete() {\n    null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n    isCancelled || setTimeout(startFakeNavigation, 20);\n  }\n  function startFakeNavigation() {\n    if (!isCancelled && !navigation.transition) {\n      var currentEntry = navigation.currentEntry;\n      currentEntry &&\n        null != currentEntry.url &&\n        navigation.navigate(currentEntry.url, {\n          state: currentEntry.getState(),\n          info: \"react-transition\",\n          history: \"replace\"\n        });\n    }\n  }\n  if (\"object\" === typeof navigation) {\n    var isCancelled = !1,\n      pendingResolve = null;\n    navigation.addEventListener(\"navigate\", handleNavigate);\n    navigation.addEventListener(\"navigatesuccess\", handleNavigateComplete);\n    navigation.addEventListener(\"navigateerror\", handleNavigateComplete);\n    setTimeout(startFakeNavigation, 100);\n    return function () {\n      isCancelled = !0;\n      navigation.removeEventListener(\"navigate\", handleNavigate);\n      navigation.removeEventListener(\"navigatesuccess\", handleNavigateComplete);\n      navigation.removeEventListener(\"navigateerror\", handleNavigateComplete);\n      null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n    };\n  }\n}\nfunction ReactDOMRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =\n  function (children) {\n    var root = this._internalRoot;\n    if (null === root) throw Error(formatProdErrorMessage(409));\n    var current = root.current,\n      lane = requestUpdateLane();\n    updateContainerImpl(current, lane, children, root, null, null);\n  };\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =\n  function () {\n    var root = this._internalRoot;\n    if (null !== root) {\n      this._internalRoot = null;\n      var container = root.containerInfo;\n      updateContainerImpl(root.current, 2, null, root, null, null);\n      flushSyncWork$1();\n      container[internalContainerInstanceKey] = null;\n    }\n  };\nfunction ReactDOMHydrationRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {\n  if (target) {\n    var updatePriority = resolveUpdatePriority();\n    target = { blockedOn: null, target: target, priority: updatePriority };\n    for (\n      var i = 0;\n      i < queuedExplicitHydrationTargets.length &&\n      0 !== updatePriority &&\n      updatePriority < queuedExplicitHydrationTargets[i].priority;\n      i++\n    );\n    queuedExplicitHydrationTargets.splice(i, 0, target);\n    0 === i && attemptExplicitHydrationTarget(target);\n  }\n};\nvar isomorphicReactPackageVersion$jscomp$inline_2043 = React.version;\nif (\n  \"19.3.1\" !==\n  isomorphicReactPackageVersion$jscomp$inline_2043\n)\n  throw Error(\n    formatProdErrorMessage(\n      527,\n      isomorphicReactPackageVersion$jscomp$inline_2043,\n      \"19.3.1\"\n    )\n  );\nReactDOMSharedInternals.findDOMNode = function (componentOrElement) {\n  var fiber = componentOrElement._reactInternals;\n  if (void 0 === fiber) {\n    if (\"function\" === typeof componentOrElement.render)\n      throw Error(formatProdErrorMessage(188));\n    componentOrElement = Object.keys(componentOrElement).join(\",\");\n    throw Error(formatProdErrorMessage(268, componentOrElement));\n  }\n  componentOrElement = findCurrentFiberUsingSlowPath(fiber);\n  componentOrElement =\n    null !== componentOrElement\n      ? findCurrentHostFiberImpl(componentOrElement)\n      : null;\n  componentOrElement =\n    null === componentOrElement ? null : componentOrElement.stateNode;\n  return componentOrElement;\n};\nvar internals$jscomp$inline_2586 = {\n  bundleType: 0,\n  version: \"19.3.1\",\n  rendererPackageName: \"react-dom\",\n  currentDispatcherRef: ReactSharedInternals,\n  reconcilerVersion: \"19.3.1\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n  var hook$jscomp$inline_2587 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n  if (\n    !hook$jscomp$inline_2587.isDisabled &&\n    hook$jscomp$inline_2587.supportsFiber\n  )\n    try {\n      (rendererID = hook$jscomp$inline_2587.inject(\n        internals$jscomp$inline_2586\n      )),\n        (injectedHook = hook$jscomp$inline_2587);\n    } catch (err) {}\n}\nexports.createRoot = function (container, options) {\n  if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n  var isStrictMode = !1,\n    identifierPrefix = \"\",\n    onUncaughtError = defaultOnUncaughtError,\n    onCaughtError = defaultOnCaughtError,\n    onRecoverableError = defaultOnRecoverableError;\n  null !== options &&\n    void 0 !== options &&\n    (!0 === options.unstable_strictMode && (isStrictMode = !0),\n    void 0 !== options.identifierPrefix &&\n      (identifierPrefix = options.identifierPrefix),\n    void 0 !== options.onUncaughtError &&\n      (onUncaughtError = options.onUncaughtError),\n    void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n    void 0 !== options.onRecoverableError &&\n      (onRecoverableError = options.onRecoverableError));\n  options = createFiberRoot(\n    container,\n    1,\n    !1,\n    null,\n    null,\n    isStrictMode,\n    identifierPrefix,\n    null,\n    onUncaughtError,\n    onCaughtError,\n    onRecoverableError,\n    defaultOnDefaultTransitionIndicator\n  );\n  container[internalContainerInstanceKey] = options.current;\n  listenToAllSupportedEvents(container);\n  return new ReactDOMRoot(options);\n};\nexports.hydrateRoot = function (container, initialChildren, options) {\n  if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n  var isStrictMode = !1,\n    identifierPrefix = \"\",\n    onUncaughtError = defaultOnUncaughtError,\n    onCaughtError = defaultOnCaughtError,\n    onRecoverableError = defaultOnRecoverableError,\n    formState = null;\n  null !== options &&\n    void 0 !== options &&\n    (!0 === options.unstable_strictMode && (isStrictMode = !0),\n    void 0 !== options.identifierPrefix &&\n      (identifierPrefix = options.identifierPrefix),\n    void 0 !== options.onUncaughtError &&\n      (onUncaughtError = options.onUncaughtError),\n    void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n    void 0 !== options.onRecoverableError &&\n      (onRecoverableError = options.onRecoverableError),\n    void 0 !== options.formState && (formState = options.formState));\n  initialChildren = createFiberRoot(\n    container,\n    1,\n    !0,\n    initialChildren,\n    null != options ? options : null,\n    isStrictMode,\n    identifierPrefix,\n    formState,\n    onUncaughtError,\n    onCaughtError,\n    onRecoverableError,\n    defaultOnDefaultTransitionIndicator\n  );\n  initialChildren.context = getContextForSubtree(null);\n  options = initialChildren.current;\n  isStrictMode = requestUpdateLane();\n  isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);\n  identifierPrefix = createUpdate(isStrictMode);\n  identifierPrefix.callback = null;\n  enqueueUpdate(options, identifierPrefix, isStrictMode);\n  options = isStrictMode;\n  initialChildren.current.lanes = options;\n  markRootUpdated$1(initialChildren, options);\n  ensureRootIsScheduled(initialChildren);\n  container[internalContainerInstanceKey] = initialChildren.current;\n  listenToAllSupportedEvents(container);\n  return new ReactDOMHydrationRoot(initialChildren);\n};\nexports.version = \"19.3.1\";\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-client.production.js');\n} else {\n  module.exports = require('./cjs/react-dom-client.development.js');\n}\n", "/**\n * @license React\n * use-sync-external-store-with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n  return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n  useSyncExternalStore = React.useSyncExternalStore,\n  useRef = React.useRef,\n  useEffect = React.useEffect,\n  useMemo = React.useMemo,\n  useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n  subscribe,\n  getSnapshot,\n  getServerSnapshot,\n  selector,\n  isEqual\n) {\n  var instRef = useRef(null);\n  if (null === instRef.current) {\n    var inst = { hasValue: !1, value: null };\n    instRef.current = inst;\n  } else inst = instRef.current;\n  instRef = useMemo(\n    function () {\n      function memoizedSelector(nextSnapshot) {\n        if (!hasMemo) {\n          hasMemo = !0;\n          memoizedSnapshot = nextSnapshot;\n          nextSnapshot = selector(nextSnapshot);\n          if (void 0 !== isEqual && inst.hasValue) {\n            var currentSelection = inst.value;\n            if (isEqual(currentSelection, nextSnapshot))\n              return (memoizedSelection = currentSelection);\n          }\n          return (memoizedSelection = nextSnapshot);\n        }\n        currentSelection = memoizedSelection;\n        if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n        var nextSelection = selector(nextSnapshot);\n        if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n          return (memoizedSnapshot = nextSnapshot), currentSelection;\n        memoizedSnapshot = nextSnapshot;\n        return (memoizedSelection = nextSelection);\n      }\n      var hasMemo = !1,\n        memoizedSnapshot,\n        memoizedSelection,\n        maybeGetServerSnapshot =\n          void 0 === getServerSnapshot ? null : getServerSnapshot;\n      return [\n        function () {\n          return memoizedSelector(getSnapshot());\n        },\n        null === maybeGetServerSnapshot\n          ? void 0\n          : function () {\n              return memoizedSelector(maybeGetServerSnapshot());\n            }\n      ];\n    },\n    [getSnapshot, getServerSnapshot, selector, isEqual]\n  );\n  var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n  useEffect(\n    function () {\n      inst.hasValue = !0;\n      inst.value = value;\n    },\n    [value]\n  );\n  useDebugValue(value);\n  return value;\n};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/use-sync-external-store-with-selector.production.js');\n} else {\n  module.exports = require('./cjs/use-sync-external-store-with-selector.development.js');\n}\n", "/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n  REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n  var key = null;\n  void 0 !== maybeKey && (key = \"\" + maybeKey);\n  void 0 !== config.key && (key = \"\" + config.key);\n  if (\"key\" in config) {\n    maybeKey = {};\n    for (var propName in config)\n      \"key\" !== propName && (maybeKey[propName] = config[propName]);\n  } else maybeKey = config;\n  config = maybeKey.ref;\n  return {\n    $$typeof: REACT_ELEMENT_TYPE,\n    type: type,\n    key: key,\n    ref: void 0 !== config ? config : null,\n    props: maybeKey\n  };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bigint: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\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\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n", "'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = require('react');\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n  if (typeof reducePropsToState !== 'function') {\n    throw new Error('Expected reducePropsToState to be a function.');\n  }\n\n  if (typeof handleStateChangeOnClient !== 'function') {\n    throw new Error('Expected handleStateChangeOnClient to be a function.');\n  }\n\n  if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n    throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n  }\n\n  function getDisplayName(WrappedComponent) {\n    return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n  }\n\n  return function wrap(WrappedComponent) {\n    if (typeof WrappedComponent !== 'function') {\n      throw new Error('Expected WrappedComponent to be a React component.');\n    }\n\n    var mountedInstances = [];\n    var state;\n\n    function emitChange() {\n      state = reducePropsToState(mountedInstances.map(function (instance) {\n        return instance.props;\n      }));\n\n      if (SideEffect.canUseDOM) {\n        handleStateChangeOnClient(state);\n      } else if (mapStateOnServer) {\n        state = mapStateOnServer(state);\n      }\n    }\n\n    var SideEffect =\n    /*#__PURE__*/\n    function (_PureComponent) {\n      _inheritsLoose(SideEffect, _PureComponent);\n\n      function SideEffect() {\n        return _PureComponent.apply(this, arguments) || this;\n      }\n\n      // Try to use displayName of wrapped component\n      // Expose canUseDOM so tests can monkeypatch it\n      SideEffect.peek = function peek() {\n        return state;\n      };\n\n      SideEffect.rewind = function rewind() {\n        if (SideEffect.canUseDOM) {\n          throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n        }\n\n        var recordedState = state;\n        state = undefined;\n        mountedInstances = [];\n        return recordedState;\n      };\n\n      var _proto = SideEffect.prototype;\n\n      _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n        mountedInstances.push(this);\n        emitChange();\n      };\n\n      _proto.componentDidUpdate = function componentDidUpdate() {\n        emitChange();\n      };\n\n      _proto.componentWillUnmount = function componentWillUnmount() {\n        var index = mountedInstances.indexOf(this);\n        mountedInstances.splice(index, 1);\n        emitChange();\n      };\n\n      _proto.render = function render() {\n        return React__default.createElement(WrappedComponent, this.props);\n      };\n\n      return SideEffect;\n    }(React.PureComponent);\n\n    _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n    _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n    return SideEffect;\n  };\n}\n\nmodule.exports = withSideEffect;\n", "/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n  // START: fast-deep-equal es6/index.js 3.1.3\n  if (a === b) return true;\n\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\n    if (a.constructor !== b.constructor) return false;\n\n    var length, i, keys;\n    if (Array.isArray(a)) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (!equal(a[i], b[i])) return false;\n      return true;\n    }\n\n    // START: Modifications:\n    // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n    //    to co-exist with es5.\n    // 2. Replace `for of` with es5 compliant iteration using `for`.\n    //    Basically, take:\n    //\n    //    ```js\n    //    for (i of a.entries())\n    //      if (!b.has(i[0])) return false;\n    //    ```\n    //\n    //    ... and convert to:\n    //\n    //    ```js\n    //    it = a.entries();\n    //    while (!(i = it.next()).done)\n    //      if (!b.has(i.value[0])) return false;\n    //    ```\n    //\n    //    **Note**: `i` access switches to `i.value`.\n    var it;\n    if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n      if (a.size !== b.size) return false;\n      it = a.entries();\n      while (!(i = it.next()).done)\n        if (!b.has(i.value[0])) return false;\n      it = a.entries();\n      while (!(i = it.next()).done)\n        if (!equal(i.value[1], b.get(i.value[0]))) return false;\n      return true;\n    }\n\n    if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n      if (a.size !== b.size) return false;\n      it = a.entries();\n      while (!(i = it.next()).done)\n        if (!b.has(i.value[0])) return false;\n      return true;\n    }\n    // END: Modifications\n\n    if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (a[i] !== b[i]) return false;\n      return true;\n    }\n\n    if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n    // START: Modifications:\n    // Apply guards for `Object.create(null)` handling. See:\n    // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n    // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n    if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n    if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n    // END: Modifications\n\n    keys = Object.keys(a);\n    length = keys.length;\n    if (length !== Object.keys(b).length) return false;\n\n    for (i = length; i-- !== 0;)\n      if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n    // END: fast-deep-equal\n\n    // START: react-fast-compare\n    // custom handling for DOM elements\n    if (hasElementType && a instanceof Element) return false;\n\n    // custom handling for React/Preact\n    for (i = length; i-- !== 0;) {\n      if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n        // React-specific: avoid traversing React elements' _owner\n        // Preact-specific: avoid traversing Preact elements' __v and __o\n        //    __v = $_original / $_vnode\n        //    __o = $_owner\n        // These properties contain circular references and are not needed when\n        // comparing the actual elements (and not their owners)\n        // .$$typeof and ._store on just reasonable markers of elements\n\n        continue;\n      }\n\n      // all other properties should be traversed as usual\n      if (!equal(a[keys[i]], b[keys[i]])) return false;\n    }\n    // END: react-fast-compare\n\n    // START: fast-deep-equal\n    return true;\n  }\n\n  return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n  try {\n    return equal(a, b);\n  } catch (error) {\n    if (((error.message || '').match(/stack|recursion/i))) {\n      // warn on circular references, don't crash\n      // browsers give this different errors name and messages:\n      // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n      // firefox: \"InternalError\", too much recursion\"\n      // edge: \"Error\", \"Out of stack space\"\n      console.warn('react-fast-compare cannot handle circular refs');\n      return false;\n    }\n    // some other error. we should definitely know about these\n    throw error;\n  }\n};\n", "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n", "/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.18.1';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',\n      INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * **Security:** See\n     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)\n     * \u2014 `_.template` is insecure and will be removed in v5.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            };\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n\n      // Prevent prototype pollution:\n      // https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg\n      // https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh\n      var index = -1,\n          length = path.length;\n\n      if (!length) {\n        return true;\n      }\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n\n        // Always block \"__proto__\" anywhere in the path if it's not expected\n        if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {\n          return false;\n        }\n\n        // Block constructor/prototype as non-terminal traversal keys to prevent\n        // escaping the object graph into built-in constructors and prototypes.\n        if ((key === 'constructor' || key === 'prototype') && index < length - 1) {\n          return false;\n        }\n      }\n\n      var obj = parent(object, path);\n      return obj == null || delete obj[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `-0`, `0n`, `\"\"`, `undefined`, and `NaN` are falsy.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        baseAssignValue(result, pair[0], pair[1]);\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * **Note:** If `lower` is greater than `upper`, the values are swapped.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * // when lower is greater than upper the values are swapped\n     * _.random(5, 0);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(-5);\n     * // => an integer between -5 and 0\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('d\u00E9j\u00E0 vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Security:** `_.template` is insecure and should not be used. It will be\n     * removed in Lodash v5. Avoid untrusted input. See\n     * [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      arrayEach(importsKeys, function(key) {\n        if (reForbiddenIdentifierChars.test(key)) {\n          throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);\n        }\n      });\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n", "// Client hydration entry (bundled to public/js/client.mjs).\n//\n// Mirrors nsbp's client entry (Theme + Redux Provider + BrowserRouter +\n// hydrateRoot) but reads the state the node SSR backend injected as a\n// <script type=\"application/json\" id=\"__NSBP_CONTEXT__\"> data block. The Lume\n// engine relays page routes to the resident node SSR backend, which renders\n// the shared route tree (StaticRouter) and injects the prefetched state. If\n// #root already has markup we hydrate; otherwise we mount fresh (opened\n// without the backend).\n\nimport React, { useMemo } from \"react\";\nimport { createRoot, hydrateRoot } from \"react-dom/client\";\nimport { BrowserRouter, Routes, Route } from \"react-router-dom\";\nimport { Provider } from \"react-redux\";\nimport Theme from \"@components/Theme\";\n// Tailwind pipeline entry: expands to public/js/client.css (postcss +\n// tailwindcss + autoprefixer run after esbuild; see scripts/build-ssr.js).\n// Carries all the ported visuals that used to be styled-components.\nimport \"../css/tailwind.css\";\nimport getStore from \"@store\";\nimport routers from \"../Routers\";\n\n// Read the server-prefetched state from the JSON data block. Kept out of the\n// render path so a malformed / missing block degrades to a fresh store instead\n// of crashing hydration.\nfunction readPrefetchedState(): { state?: Record<string, unknown> } | null {\n  try {\n    const el = document.getElementById(\"__NSBP_CONTEXT__\");\n    if (!el) return null;\n    return JSON.parse(el.textContent || \"null\") as { state?: Record<string, unknown> } | null;\n  } catch {\n    return null;\n  }\n}\n\nfunction App() {\n  const store = useMemo(() => {\n    // Seed the store from server-prefetched state so the first client render\n    // matches the SSR markup exactly (no flicker / refetch on mount).\n    const ctx = readPrefetchedState();\n    if (ctx && ctx.state) {\n      return getStore(ctx.state);\n    }\n    return getStore();\n  }, []);\n\n  return (\n    <Theme>\n      <Provider store={store}>\n        <BrowserRouter>\n          <Routes>\n            {routers.map((router) => (\n              <Route\n                key={router.key}\n                path={router.path}\n                element={router.element}\n              />\n            ))}\n          </Routes>\n        </BrowserRouter>\n      </Provider>\n    </Theme>\n  );\n}\n\nconst container = document.getElementById(\"root\");\nif (container) {\n  const app = <App />;\n  if (container.hasChildNodes()) {\n    hydrateRoot(container, app);\n  } else {\n    createRoot(container).render(app);\n  }\n}\n\n// \u8BBF\u5BA2\u6253\u70B9(\u7EAF\u6570\u636E\u4E0A\u62A5, \u65E0 UI; \u6570\u636E\u7531 cicdkit \u5E73\u53F0 /api/visits?pin= \u6293\u53D6\u5C55\u793A)\u3002\n// \u4EC5\u6D4F\u89C8\u5668\u6C34\u5408\u540E\u4E0A\u62A5: \u9875\u9762\u6587\u6863\u59CB\u7EC8\u662F SSR \u7684, \u5BA2\u6237\u7AEF\u6C34\u5408\u624D\u4EE3\u8868\u4E00\u6B21\u771F\u5B9E\u8BBF\u95EE\u3002\n// sendBeacon \u4F18\u5148, \u9875\u9762\u5378\u8F7D\u65F6\u4E5F\u4E0D\u4E22; \u5931\u8D25\u9759\u9ED8, \u7EDD\u4E0D\u5F71\u54CD\u9996\u5C4F\u3002\nfunction fireVisitBeacon(): void {\n  try {\n    let visitor = localStorage.getItem(\"nsbp_visitor\") || \"\";\n    if (!visitor) {\n      visitor =\n        \"v-\" + Math.random().toString(36).slice(2) + Date.now().toString(36);\n      localStorage.setItem(\"nsbp_visitor\", visitor);\n    }\n    // \u9690\u79C1: \u53EA\u5B58\u8DEF\u5F84/\u6765\u6E90, \u7EDD\u4E0D\u5E26 query \u2014\u2014 \u5206\u4EAB\u94FE\u63A5 ?tk= \u91CC\u7684\u8BBF\u95EE\u4EE4\u724C\u6216\n    // ?pin= \u91CC\u7684\u7EDF\u8BA1 PIN \u7EDD\u4E0D\u80FD\u968F\u6253\u70B9\u843D\u76D8(\u670D\u52A1\u7AEF /api/visit \u4E5F\u6709\u4E00\u9053\u515C\u5E95\u6E05\u6D17)\u3002\n    let referrer = document.referrer;\n    if (referrer) {\n      referrer = referrer.split(\"?\")[0].split(\"#\")[0];\n    }\n    const payload = JSON.stringify({\n      path: window.location.pathname,\n      referrer,\n      ua: navigator.userAgent,\n      visitor: visitor || \"anon\",\n      wd: String(\n        !!(navigator as unknown as { webdriver?: boolean }).webdriver\n      ),\n    });\n    if (\n      typeof navigator.sendBeacon === \"function\" &&\n      navigator.sendBeacon(\"/api/visit\", payload)\n    ) {\n      return;\n    }\n    fetch(\"/api/visit\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application/json\" },\n      body: payload,\n      keepalive: true,\n    }).catch(() => {});\n  } catch {\n    /* never block page load */\n  }\n}\n\nif (typeof window !== \"undefined\" && typeof document !== \"undefined\") {\n  fireVisitBeacon();\n}\n", "/**\n * react-router v7.18.5\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nvar __typeError = (msg) => {\n  throw TypeError(msg);\n};\nvar __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg);\nvar __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj));\nvar __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\nvar __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value);\n\n// lib/router/url.ts\nvar ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|[\\\\/]{2})/i;\nvar PROTOCOL_RELATIVE_URL_REGEX = /^[\\\\/]{2}/;\nfunction normalizeProtocolRelativeUrl(url, protocol) {\n  return protocol + url.replace(/\\\\/g, \"/\");\n}\n\n// lib/router/history.ts\nvar Action = /* @__PURE__ */ ((Action2) => {\n  Action2[\"Pop\"] = \"POP\";\n  Action2[\"Push\"] = \"PUSH\";\n  Action2[\"Replace\"] = \"REPLACE\";\n  return Action2;\n})(Action || {});\nvar PopStateEventType = \"popstate\";\nfunction isLocation(obj) {\n  return typeof obj === \"object\" && obj != null && \"pathname\" in obj && \"search\" in obj && \"hash\" in obj && \"state\" in obj && \"key\" in obj;\n}\nfunction createMemoryHistory(options = {}) {\n  let { initialEntries = [\"/\"], initialIndex, v5Compat = false } = options;\n  let entries;\n  entries = initialEntries.map(\n    (entry, index2) => createMemoryLocation(\n      entry,\n      typeof entry === \"string\" ? null : entry.state,\n      index2 === 0 ? \"default\" : void 0,\n      typeof entry === \"string\" ? void 0 : entry.mask\n    )\n  );\n  let index = clampIndex(\n    initialIndex == null ? entries.length - 1 : initialIndex\n  );\n  let action = \"POP\" /* Pop */;\n  let listener = null;\n  function clampIndex(n) {\n    return Math.min(Math.max(n, 0), entries.length - 1);\n  }\n  function getCurrentLocation() {\n    return entries[index];\n  }\n  function createMemoryLocation(to, state = null, key, mask) {\n    let location = createLocation(\n      entries ? getCurrentLocation().pathname : \"/\",\n      to,\n      state,\n      key,\n      mask\n    );\n    warning(\n      location.pathname.charAt(0) === \"/\",\n      `relative pathnames are not supported in memory history: ${JSON.stringify(\n        to\n      )}`\n    );\n    return location;\n  }\n  function createHref2(to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  let history = {\n    get index() {\n      return index;\n    },\n    get action() {\n      return action;\n    },\n    get location() {\n      return getCurrentLocation();\n    },\n    createHref: createHref2,\n    createURL(to) {\n      return new URL(createHref2(to), \"http://localhost\");\n    },\n    encodeLocation(to) {\n      let path = typeof to === \"string\" ? parsePath(to) : to;\n      return {\n        pathname: path.pathname || \"\",\n        search: path.search || \"\",\n        hash: path.hash || \"\"\n      };\n    },\n    push(to, state) {\n      action = \"PUSH\" /* Push */;\n      let nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n      index += 1;\n      entries.splice(index, entries.length, nextLocation);\n      if (v5Compat && listener) {\n        listener({ action, location: nextLocation, delta: 1 });\n      }\n    },\n    replace(to, state) {\n      action = \"REPLACE\" /* Replace */;\n      let nextLocation = isLocation(to) ? to : createMemoryLocation(to, state);\n      entries[index] = nextLocation;\n      if (v5Compat && listener) {\n        listener({ action, location: nextLocation, delta: 0 });\n      }\n    },\n    go(delta) {\n      action = \"POP\" /* Pop */;\n      let nextIndex = clampIndex(index + delta);\n      let nextLocation = entries[nextIndex];\n      index = nextIndex;\n      if (listener) {\n        listener({ action, location: nextLocation, delta });\n      }\n    },\n    listen(fn) {\n      listener = fn;\n      return () => {\n        listener = null;\n      };\n    }\n  };\n  return history;\n}\nfunction createBrowserHistory(options = {}) {\n  function createBrowserLocation(window2, globalHistory) {\n    let maskedLocation = globalHistory.state?.masked;\n    let { pathname, search, hash } = maskedLocation || window2.location;\n    return createLocation(\n      \"\",\n      { pathname, search, hash },\n      // state defaults to `null` because `window.history.state` does\n      globalHistory.state && globalHistory.state.usr || null,\n      globalHistory.state && globalHistory.state.key || \"default\",\n      maskedLocation ? {\n        pathname: window2.location.pathname,\n        search: window2.location.search,\n        hash: window2.location.hash\n      } : void 0\n    );\n  }\n  function createBrowserHref(window2, to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  return getUrlBasedHistory(\n    createBrowserLocation,\n    createBrowserHref,\n    null,\n    options\n  );\n}\nfunction createHashHistory(options = {}) {\n  function createHashLocation(window2, globalHistory) {\n    let {\n      pathname = \"/\",\n      search = \"\",\n      hash = \"\"\n    } = parsePath(window2.location.hash.substring(1));\n    if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n      pathname = \"/\" + pathname;\n    }\n    return createLocation(\n      \"\",\n      { pathname, search, hash },\n      // state defaults to `null` because `window.history.state` does\n      globalHistory.state && globalHistory.state.usr || null,\n      globalHistory.state && globalHistory.state.key || \"default\"\n    );\n  }\n  function createHashHref(window2, to) {\n    let base = window2.document.querySelector(\"base\");\n    let href = \"\";\n    if (base && base.getAttribute(\"href\")) {\n      let url = window2.location.href;\n      let hashIndex = url.indexOf(\"#\");\n      href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n    }\n    return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n  }\n  function validateHashLocation(location, to) {\n    warning(\n      location.pathname.charAt(0) === \"/\",\n      `relative pathnames are not supported in hash history.push(${JSON.stringify(\n        to\n      )})`\n    );\n  }\n  return getUrlBasedHistory(\n    createHashLocation,\n    createHashHref,\n    validateHashLocation,\n    options\n  );\n}\nfunction invariant(value, message) {\n  if (value === false || value === null || typeof value === \"undefined\") {\n    throw new Error(message);\n  }\n}\nfunction warning(cond, message) {\n  if (!cond) {\n    if (typeof console !== \"undefined\") console.warn(message);\n    try {\n      throw new Error(message);\n    } catch (e) {\n    }\n  }\n}\nfunction createKey() {\n  return Math.random().toString(36).substring(2, 10);\n}\nfunction getHistoryState(location, index) {\n  return {\n    usr: location.state,\n    key: location.key,\n    idx: index,\n    masked: location.mask ? {\n      pathname: location.pathname,\n      search: location.search,\n      hash: location.hash\n    } : void 0\n  };\n}\nfunction createLocation(current, to, state = null, key, mask) {\n  let location = {\n    pathname: typeof current === \"string\" ? current : current.pathname,\n    search: \"\",\n    hash: \"\",\n    ...typeof to === \"string\" ? parsePath(to) : to,\n    state,\n    // TODO: This could be cleaned up.  push/replace should probably just take\n    // full Locations now and avoid the need to run through this flow at all\n    // But that's a pretty big refactor to the current test suite so going to\n    // keep as is for the time being and just let any incoming keys take precedence\n    key: to && to.key || key || createKey(),\n    mask\n  };\n  return location;\n}\nfunction createPath({\n  pathname = \"/\",\n  search = \"\",\n  hash = \"\"\n}) {\n  if (search && search !== \"?\")\n    pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n  if (hash && hash !== \"#\")\n    pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n  return pathname;\n}\nfunction parsePath(path) {\n  let parsedPath = {};\n  if (path) {\n    let hashIndex = path.indexOf(\"#\");\n    if (hashIndex >= 0) {\n      parsedPath.hash = path.substring(hashIndex);\n      path = path.substring(0, hashIndex);\n    }\n    let searchIndex = path.indexOf(\"?\");\n    if (searchIndex >= 0) {\n      parsedPath.search = path.substring(searchIndex);\n      path = path.substring(0, searchIndex);\n    }\n    if (path) {\n      parsedPath.pathname = path;\n    }\n  }\n  return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref2, validateLocation, options = {}) {\n  let { window: window2 = document.defaultView, v5Compat = false } = options;\n  let globalHistory = window2.history;\n  let action = \"POP\" /* Pop */;\n  let listener = null;\n  let index = getIndex();\n  if (index == null) {\n    index = 0;\n    globalHistory.replaceState({ ...globalHistory.state, idx: index }, \"\");\n  }\n  function getIndex() {\n    let state = globalHistory.state || { idx: null };\n    return state.idx;\n  }\n  function handlePop() {\n    action = \"POP\" /* Pop */;\n    let nextIndex = getIndex();\n    let delta = nextIndex == null ? null : nextIndex - index;\n    index = nextIndex;\n    if (listener) {\n      listener({ action, location: history.location, delta });\n    }\n  }\n  function push(to, state) {\n    action = \"PUSH\" /* Push */;\n    let location = isLocation(to) ? to : createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex() + 1;\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location.mask || location);\n    try {\n      globalHistory.pushState(historyState, \"\", url);\n    } catch (error) {\n      if (error instanceof DOMException && error.name === \"DataCloneError\") {\n        throw error;\n      }\n      window2.location.assign(url);\n    }\n    if (v5Compat && listener) {\n      listener({ action, location: history.location, delta: 1 });\n    }\n  }\n  function replace2(to, state) {\n    action = \"REPLACE\" /* Replace */;\n    let location = isLocation(to) ? to : createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex();\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location.mask || location);\n    globalHistory.replaceState(historyState, \"\", url);\n    if (v5Compat && listener) {\n      listener({ action, location: history.location, delta: 0 });\n    }\n  }\n  function createURL(to) {\n    return createBrowserURLImpl(window2, to);\n  }\n  let history = {\n    get action() {\n      return action;\n    },\n    get location() {\n      return getLocation(window2, globalHistory);\n    },\n    listen(fn) {\n      if (listener) {\n        throw new Error(\"A history only accepts one active listener\");\n      }\n      window2.addEventListener(PopStateEventType, handlePop);\n      listener = fn;\n      return () => {\n        window2.removeEventListener(PopStateEventType, handlePop);\n        listener = null;\n      };\n    },\n    createHref(to) {\n      return createHref2(window2, to);\n    },\n    createURL,\n    encodeLocation(to) {\n      let url = createURL(to);\n      return {\n        pathname: url.pathname,\n        search: url.search,\n        hash: url.hash\n      };\n    },\n    push,\n    replace: replace2,\n    go(n) {\n      return globalHistory.go(n);\n    }\n  };\n  return history;\n}\nfunction createBrowserURLImpl(windowImpl, to, isAbsolute = false) {\n  let base = \"http://localhost\";\n  if (windowImpl) {\n    base = windowImpl.location.origin !== \"null\" ? windowImpl.location.origin : windowImpl.location.href;\n  }\n  invariant(base, \"No window.location.(origin|href) available to create URL\");\n  let href = typeof to === \"string\" ? to : createPath(to);\n  href = href.replace(/ $/, \"%20\");\n  if (!isAbsolute && PROTOCOL_RELATIVE_URL_REGEX.test(href)) {\n    href = base + href;\n  }\n  return new URL(href, base);\n}\n\n// lib/router/utils.ts\nfunction createContext(defaultValue) {\n  return { defaultValue };\n}\nvar _map;\nvar RouterContextProvider = class {\n  /**\n   * Create a new `RouterContextProvider` instance\n   * @param init An optional initial context map to populate the provider with\n   */\n  constructor(init) {\n    __privateAdd(this, _map, /* @__PURE__ */ new Map());\n    if (init) {\n      for (let [context, value] of init) {\n        this.set(context, value);\n      }\n    }\n  }\n  /**\n   * Access a value from the context. If no value has been set for the context,\n   * it will return the context's `defaultValue` if provided, or throw an error\n   * if no `defaultValue` was set.\n   * @param context The context to get the value for\n   * @returns The value for the context, or the context's `defaultValue` if no\n   * value was set\n   */\n  get(context) {\n    if (__privateGet(this, _map).has(context)) {\n      return __privateGet(this, _map).get(context);\n    }\n    if (context.defaultValue !== void 0) {\n      return context.defaultValue;\n    }\n    throw new Error(\"No value found for context\");\n  }\n  /**\n   * Set a value for the context. If the context already has a value set, this\n   * will overwrite it.\n   *\n   * @param context The context to set the value for\n   * @param value The value to set for the context\n   * @returns {void}\n   */\n  set(context, value) {\n    __privateGet(this, _map).set(context, value);\n  }\n};\n_map = new WeakMap();\nvar unsupportedLazyRouteObjectKeys = /* @__PURE__ */ new Set([\n  \"lazy\",\n  \"caseSensitive\",\n  \"path\",\n  \"id\",\n  \"index\",\n  \"children\"\n]);\nfunction isUnsupportedLazyRouteObjectKey(key) {\n  return unsupportedLazyRouteObjectKeys.has(\n    key\n  );\n}\nvar unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([\n  \"lazy\",\n  \"caseSensitive\",\n  \"path\",\n  \"id\",\n  \"index\",\n  \"middleware\",\n  \"children\"\n]);\nfunction isUnsupportedLazyRouteFunctionKey(key) {\n  return unsupportedLazyRouteFunctionKeys.has(\n    key\n  );\n}\nfunction isIndexRoute(route) {\n  return route.index === true;\n}\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties2, parentPath = [], manifest = {}, allowInPlaceMutations = false) {\n  return routes.map((route, index) => {\n    let treePath = [...parentPath, String(index)];\n    let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n    invariant(\n      route.index !== true || !route.children,\n      `Cannot specify children on an index route`\n    );\n    invariant(\n      allowInPlaceMutations || !manifest[id],\n      `Found a route id collision on id \"${id}\".  Route id's must be globally unique within Data Router usages`\n    );\n    if (isIndexRoute(route)) {\n      let indexRoute = {\n        ...route,\n        id\n      };\n      manifest[id] = mergeRouteUpdates(\n        indexRoute,\n        mapRouteProperties2(indexRoute)\n      );\n      return indexRoute;\n    } else {\n      let pathOrLayoutRoute = {\n        ...route,\n        id,\n        children: void 0\n      };\n      manifest[id] = mergeRouteUpdates(\n        pathOrLayoutRoute,\n        mapRouteProperties2(pathOrLayoutRoute)\n      );\n      if (route.children) {\n        pathOrLayoutRoute.children = convertRoutesToDataRoutes(\n          route.children,\n          mapRouteProperties2,\n          treePath,\n          manifest,\n          allowInPlaceMutations\n        );\n      }\n      return pathOrLayoutRoute;\n    }\n  });\n}\nfunction mergeRouteUpdates(route, updates) {\n  return Object.assign(route, {\n    ...updates,\n    ...typeof updates.lazy === \"object\" && updates.lazy != null ? {\n      lazy: {\n        ...route.lazy,\n        ...updates.lazy\n      }\n    } : {}\n  });\n}\nfunction matchRoutes(routes, locationArg, basename = \"/\") {\n  return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial, precomputedBranches) {\n  let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n  let pathname = stripBasename(location.pathname || \"/\", basename);\n  if (pathname == null) {\n    return null;\n  }\n  let branches = precomputedBranches ?? flattenAndRankRoutes(routes);\n  let matches = null;\n  let decoded = decodePath(pathname);\n  for (let i = 0; matches == null && i < branches.length; ++i) {\n    matches = matchRouteBranch(\n      branches[i],\n      decoded,\n      allowPartial\n    );\n  }\n  return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n  let { route, pathname, params } = match;\n  return {\n    id: route.id,\n    pathname,\n    params,\n    data: loaderData[route.id],\n    loaderData: loaderData[route.id],\n    handle: route.handle\n  };\n}\nfunction flattenAndRankRoutes(routes) {\n  let branches = flattenRoutes(routes);\n  rankRouteBranches(branches);\n  return branches;\n}\nfunction flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = \"\", _hasParentOptionalSegments = false) {\n  let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {\n    let meta = {\n      relativePath: relativePath === void 0 ? route.path || \"\" : relativePath,\n      caseSensitive: route.caseSensitive === true,\n      childrenIndex: index,\n      route\n    };\n    if (meta.relativePath.startsWith(\"/\")) {\n      if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {\n        return;\n      }\n      invariant(\n        meta.relativePath.startsWith(parentPath),\n        `Absolute route path \"${meta.relativePath}\" nested under path \"${parentPath}\" is not valid. An absolute child route path must start with the combined path of all its parent routes.`\n      );\n      meta.relativePath = meta.relativePath.slice(parentPath.length);\n    }\n    let path = joinPaths([parentPath, meta.relativePath]);\n    let routesMeta = parentsMeta.concat(meta);\n    if (route.children && route.children.length > 0) {\n      invariant(\n        // Our types know better, but runtime JS may not!\n        // @ts-expect-error\n        route.index !== true,\n        `Index routes must not have child routes. Please remove all child routes from route path \"${path}\".`\n      );\n      flattenRoutes(\n        route.children,\n        branches,\n        routesMeta,\n        path,\n        hasParentOptionalSegments\n      );\n    }\n    if (route.path == null && !route.index) {\n      return;\n    }\n    branches.push({\n      path,\n      score: computeScore(path, route.index),\n      routesMeta: routesMeta.map((meta2, i) => {\n        let [matcher, params] = compilePath(\n          meta2.relativePath,\n          meta2.caseSensitive,\n          i === routesMeta.length - 1\n        );\n        return {\n          ...meta2,\n          matcher,\n          compiledParams: params\n        };\n      })\n    });\n  };\n  routes.forEach((route, index) => {\n    if (route.path === \"\" || !route.path?.includes(\"?\")) {\n      flattenRoute(route, index);\n    } else {\n      for (let exploded of explodeOptionalSegments(route.path)) {\n        flattenRoute(route, index, true, exploded);\n      }\n    }\n  });\n  return branches;\n}\nfunction explodeOptionalSegments(path) {\n  let segments = path.split(\"/\");\n  if (segments.length === 0) return [];\n  let [first, ...rest] = segments;\n  let isOptional = first.endsWith(\"?\");\n  let required = first.replace(/\\?$/, \"\");\n  if (rest.length === 0) {\n    return isOptional ? [required, \"\"] : [required];\n  }\n  let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n  let result = [];\n  result.push(\n    ...restExploded.map(\n      (subpath) => subpath === \"\" ? required : [required, subpath].join(\"/\")\n    )\n  );\n  if (isOptional) {\n    result.push(...restExploded);\n  }\n  return result.map(\n    (exploded) => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded\n  );\n}\nfunction rankRouteBranches(branches) {\n  branches.sort(\n    (a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(\n      a.routesMeta.map((meta) => meta.childrenIndex),\n      b.routesMeta.map((meta) => meta.childrenIndex)\n    )\n  );\n}\nvar paramRe = /^:[\\w-]+$/;\nvar dynamicSegmentValue = 3;\nvar indexRouteValue = 2;\nvar emptySegmentValue = 1;\nvar staticSegmentValue = 10;\nvar splatPenalty = -2;\nvar isSplat = (s) => s === \"*\";\nfunction computeScore(path, index) {\n  let segments = path.split(\"/\");\n  let initialScore = segments.length;\n  if (segments.some(isSplat)) {\n    initialScore += splatPenalty;\n  }\n  if (index) {\n    initialScore += indexRouteValue;\n  }\n  return segments.filter((s) => !isSplat(s)).reduce(\n    (score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue),\n    initialScore\n  );\n}\nfunction compareIndexes(a, b) {\n  let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n  return siblings ? (\n    // If two routes are siblings, we should try to match the earlier sibling\n    // first. This allows people to have fine-grained control over the matching\n    // behavior by simply putting routes with identical paths in the order they\n    // want them tried.\n    a[a.length - 1] - b[b.length - 1]\n  ) : (\n    // Otherwise, it doesn't really make sense to rank non-siblings by index,\n    // so they sort equally.\n    0\n  );\n}\nfunction matchRouteBranch(branch, pathname, allowPartial = false) {\n  let { routesMeta } = branch;\n  let matchedParams = {};\n  let matchedPathname = \"/\";\n  let matches = [];\n  for (let i = 0; i < routesMeta.length; ++i) {\n    let meta = routesMeta[i];\n    let end = i === routesMeta.length - 1;\n    let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n    let pattern = {\n      path: meta.relativePath,\n      caseSensitive: meta.caseSensitive,\n      end\n    };\n    let match = (\n      // Use precomputed matcher if it exists\n      meta.matcher && meta.compiledParams ? matchPathImpl(\n        pattern,\n        remainingPathname,\n        meta.matcher,\n        meta.compiledParams\n      ) : matchPath(pattern, remainingPathname)\n    );\n    let route = meta.route;\n    if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n      match = matchPath(\n        {\n          path: meta.relativePath,\n          caseSensitive: meta.caseSensitive,\n          end: false\n        },\n        remainingPathname\n      );\n    }\n    if (!match) {\n      return null;\n    }\n    Object.assign(matchedParams, match.params);\n    matches.push({\n      // TODO: Can this as be avoided?\n      params: matchedParams,\n      pathname: joinPaths([matchedPathname, match.pathname]),\n      pathnameBase: normalizePathname(\n        joinPaths([matchedPathname, match.pathnameBase])\n      ),\n      route\n    });\n    if (match.pathnameBase !== \"/\") {\n      matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n    }\n  }\n  return matches;\n}\nfunction generatePath(originalPath, params = {}) {\n  let path = originalPath;\n  if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n    warning(\n      false,\n      `Route path \"${path}\" will be treated as if it were \"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n    );\n    path = path.replace(/\\*$/, \"/*\");\n  }\n  const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n  const stringify2 = (p) => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n  const segments = path.split(/\\/+/).map((segment, index, array) => {\n    const isLastSegment = index === array.length - 1;\n    if (isLastSegment && segment === \"*\") {\n      return stringify2(params[\"*\"]);\n    }\n    const keyMatch = segment.match(/^:([\\w-]+)(\\??)(.*)/);\n    if (keyMatch) {\n      const [, key, optional, suffix] = keyMatch;\n      let param = params[key];\n      invariant(optional === \"?\" || param != null, `Missing \":${key}\" param`);\n      return encodeURIComponent(stringify2(param)) + suffix;\n    }\n    return segment.replace(/\\?$/g, \"\");\n  }).filter((segment) => !!segment);\n  return prefix + segments.join(\"/\");\n}\nfunction matchPath(pattern, pathname) {\n  if (typeof pattern === \"string\") {\n    pattern = { path: pattern, caseSensitive: false, end: true };\n  }\n  let [matcher, compiledParams] = compilePath(\n    pattern.path,\n    pattern.caseSensitive,\n    pattern.end\n  );\n  return matchPathImpl(pattern, pathname, matcher, compiledParams);\n}\nfunction matchPathImpl(pattern, pathname, matcher, compiledParams) {\n  let match = pathname.match(matcher);\n  if (!match) return null;\n  let matchedPathname = match[0];\n  let pathnameBase = removeTrailingSlash(matchedPathname, 1);\n  let captureGroups = match.slice(1);\n  let params = compiledParams.reduce(\n    (memo2, { paramName, isOptional }, index) => {\n      if (paramName === \"*\") {\n        let splatValue = captureGroups[index] || \"\";\n        pathnameBase = removeTrailingSlash(\n          matchedPathname.slice(0, matchedPathname.length - splatValue.length),\n          1\n        );\n      }\n      const value = captureGroups[index];\n      if (isOptional && !value) {\n        memo2[paramName] = void 0;\n      } else {\n        memo2[paramName] = (value || \"\").replace(/%2F/g, \"/\");\n      }\n      return memo2;\n    },\n    {}\n  );\n  return {\n    params,\n    pathname: matchedPathname,\n    pathnameBase,\n    pattern\n  };\n}\nfunction compilePath(path, caseSensitive = false, end = true) {\n  warning(\n    path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"),\n    `Route path \"${path}\" will be treated as if it were \"${path.replace(/\\*$/, \"/*\")}\" because the \\`*\\` character must always follow a \\`/\\` in the pattern. To get rid of this warning, please change the route path to \"${path.replace(/\\*$/, \"/*\")}\".`\n  );\n  let params = [];\n  let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\").replace(/^\\/*/, \"/\").replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\").replace(\n    /\\/:([\\w-]+)(\\?)?/g,\n    (match, paramName, isOptional, index, str) => {\n      params.push({ paramName, isOptional: isOptional != null });\n      if (isOptional) {\n        let nextChar = str.charAt(index + match.length);\n        if (nextChar && nextChar !== \"/\") {\n          return \"/([^\\\\/]*)\";\n        }\n        return \"(?:/([^\\\\/]*))?\";\n      }\n      return \"/([^\\\\/]+)\";\n    }\n  ).replace(/\\/([\\w-]+)\\?(\\/|$)/g, \"(/$1)?$2\");\n  if (path.endsWith(\"*\")) {\n    params.push({ paramName: \"*\" });\n    regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" : \"(?:\\\\/(.+)|\\\\/*)$\";\n  } else if (end) {\n    regexpSource += \"\\\\/*$\";\n  } else if (path !== \"\" && path !== \"/\") {\n    regexpSource += \"(?:(?=\\\\/|$))\";\n  } else {\n  }\n  let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : \"i\");\n  return [matcher, params];\n}\nfunction decodePath(value) {\n  try {\n    return value.split(\"/\").map((v) => decodeURIComponent(v).replace(/\\//g, \"%2F\")).join(\"/\");\n  } catch (error) {\n    warning(\n      false,\n      `The URL path \"${value}\" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${error}).`\n    );\n    return value;\n  }\n}\nfunction stripBasename(pathname, basename) {\n  if (basename === \"/\") return pathname;\n  if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n    return null;\n  }\n  let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n  let nextChar = pathname.charAt(startIndex);\n  if (nextChar && nextChar !== \"/\") {\n    return null;\n  }\n  return pathname.slice(startIndex) || \"/\";\n}\nfunction prependBasename({\n  basename,\n  pathname\n}) {\n  return pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n}\nvar isAbsoluteUrl = (url) => ABSOLUTE_URL_REGEX.test(url);\nfunction resolvePath(to, fromPathname = \"/\") {\n  let {\n    pathname: toPathname,\n    search = \"\",\n    hash = \"\"\n  } = typeof to === \"string\" ? parsePath(to) : to;\n  let pathname;\n  if (toPathname) {\n    toPathname = removeDoubleSlashes(toPathname);\n    if (toPathname.startsWith(\"/\") || toPathname.startsWith(\"\\\\\")) {\n      pathname = resolvePathname(toPathname.substring(1), \"/\");\n    } else {\n      pathname = resolvePathname(toPathname, fromPathname);\n    }\n  } else {\n    pathname = fromPathname;\n  }\n  return {\n    pathname,\n    search: normalizeSearch(search),\n    hash: normalizeHash(hash)\n  };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n  let segments = removeTrailingSlash(fromPathname).split(\"/\");\n  let relativeSegments = relativePath.split(\"/\");\n  relativeSegments.forEach((segment) => {\n    if (segment === \"..\") {\n      if (segments.length > 1) segments.pop();\n    } else if (segment !== \".\") {\n      segments.push(segment);\n    }\n  });\n  return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n  return `Cannot include a '${char}' character in a manually specified \\`to.${field}\\` field [${JSON.stringify(\n    path\n  )}].  Please separate it out to the \\`to.${dest}\\` field. Alternatively you may provide the full path as a string in <Link to=\"...\"> and the router will parse it for you.`;\n}\nfunction getPathContributingMatches(matches) {\n  return matches.filter(\n    (match, index) => index === 0 || match.route.path && match.route.path.length > 0\n  );\n}\nfunction getResolveToMatches(matches) {\n  let pathMatches = getPathContributingMatches(matches);\n  return pathMatches.map(\n    (match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase\n  );\n}\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative = false) {\n  let to;\n  if (typeof toArg === \"string\") {\n    to = parsePath(toArg);\n  } else {\n    to = { ...toArg };\n    invariant(\n      !to.pathname || !to.pathname.includes(\"?\"),\n      getInvalidPathError(\"?\", \"pathname\", \"search\", to)\n    );\n    invariant(\n      !to.pathname || !to.pathname.includes(\"#\"),\n      getInvalidPathError(\"#\", \"pathname\", \"hash\", to)\n    );\n    invariant(\n      !to.search || !to.search.includes(\"#\"),\n      getInvalidPathError(\"#\", \"search\", \"hash\", to)\n    );\n  }\n  let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n  let toPathname = isEmptyPath ? \"/\" : to.pathname;\n  let from;\n  if (toPathname == null) {\n    from = locationPathname;\n  } else {\n    let routePathnameIndex = routePathnames.length - 1;\n    if (!isPathRelative && toPathname.startsWith(\"..\")) {\n      let toSegments = toPathname.split(\"/\");\n      while (toSegments[0] === \"..\") {\n        toSegments.shift();\n        routePathnameIndex -= 1;\n      }\n      to.pathname = toSegments.join(\"/\");\n    }\n    from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n  }\n  let path = resolvePath(to, from);\n  let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n  let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n  if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n    path.pathname += \"/\";\n  }\n  return path;\n}\nvar removeDoubleSlashes = (path) => path.replace(/[\\\\/]{2,}/g, \"/\");\nvar joinPaths = (paths) => removeDoubleSlashes(paths.join(\"/\"));\nfunction removeTrailingSlash(path, minLength = 0) {\n  let end = path.length;\n  while (end > minLength && path.charCodeAt(end - 1) === 47) {\n    end--;\n  }\n  return end === path.length ? path : path.slice(0, end);\n}\nvar normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\\/*/, \"/\");\nvar normalizeSearch = (search) => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\nvar normalizeHash = (hash) => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\nvar DataWithResponseInit = class {\n  constructor(data2, init) {\n    this.type = \"DataWithResponseInit\";\n    this.data = data2;\n    this.init = init || null;\n  }\n};\nfunction data(data2, init) {\n  return new DataWithResponseInit(\n    data2,\n    typeof init === \"number\" ? { status: init } : init\n  );\n}\nvar redirect = (url, init = 302) => {\n  let responseInit = init;\n  if (typeof responseInit === \"number\") {\n    responseInit = { status: responseInit };\n  } else if (typeof responseInit.status === \"undefined\") {\n    responseInit.status = 302;\n  }\n  let headers = new Headers(responseInit.headers);\n  headers.set(\"Location\", url);\n  return new Response(null, { ...responseInit, headers });\n};\nvar redirectDocument = (url, init) => {\n  let response = redirect(url, init);\n  response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n  return response;\n};\nvar replace = (url, init) => {\n  let response = redirect(url, init);\n  response.headers.set(\"X-Remix-Replace\", \"true\");\n  return response;\n};\nvar SUPPORTED_ERROR_TYPES = [\n  \"EvalError\",\n  \"RangeError\",\n  \"ReferenceError\",\n  \"SyntaxError\",\n  \"TypeError\",\n  \"URIError\"\n];\nvar ErrorResponseImpl = class {\n  constructor(status, statusText, data2, internal = false) {\n    this.status = status;\n    this.statusText = statusText || \"\";\n    this.internal = internal;\n    if (data2 instanceof Error) {\n      this.data = data2.toString();\n      this.error = data2;\n    } else {\n      this.data = data2;\n    }\n  }\n};\nfunction isRouteErrorResponse(error) {\n  return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\nfunction getRoutePattern(matches) {\n  let parts = matches.map((m) => m.route.path).filter(Boolean);\n  return joinPaths(parts) || \"/\";\n}\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nfunction parseToInfo(_to, basename) {\n  let to = _to;\n  if (typeof to !== \"string\" || !ABSOLUTE_URL_REGEX.test(to)) {\n    return {\n      absoluteURL: void 0,\n      isExternal: false,\n      to\n    };\n  }\n  let absoluteURL = to;\n  let isExternal = false;\n  if (isBrowser) {\n    try {\n      let currentUrl = new URL(window.location.href);\n      let targetUrl = PROTOCOL_RELATIVE_URL_REGEX.test(to) ? new URL(normalizeProtocolRelativeUrl(to, currentUrl.protocol)) : new URL(to);\n      let path = stripBasename(targetUrl.pathname, basename);\n      if (targetUrl.origin === currentUrl.origin && path != null) {\n        to = path + targetUrl.search + targetUrl.hash;\n      } else {\n        isExternal = true;\n      }\n    } catch (e) {\n      warning(\n        false,\n        `<Link to=\"${to}\"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`\n      );\n    }\n  }\n  return {\n    absoluteURL,\n    isExternal,\n    to\n  };\n}\n\n// lib/router/instrumentation.ts\nvar UninstrumentedSymbol = Symbol(\"Uninstrumented\");\nfunction getRouteInstrumentationUpdates(fns, route) {\n  let aggregated = {\n    lazy: [],\n    \"lazy.loader\": [],\n    \"lazy.action\": [],\n    \"lazy.middleware\": [],\n    middleware: [],\n    loader: [],\n    action: []\n  };\n  fns.forEach(\n    (fn) => fn({\n      id: route.id,\n      index: route.index,\n      path: route.path,\n      instrument(i) {\n        let keys = Object.keys(aggregated);\n        for (let key of keys) {\n          if (i[key]) {\n            aggregated[key].push(i[key]);\n          }\n        }\n      }\n    })\n  );\n  let updates = {};\n  if (typeof route.lazy === \"function\" && aggregated.lazy.length > 0) {\n    let instrumented = wrapImpl(aggregated.lazy, route.lazy, () => void 0);\n    if (instrumented) {\n      updates.lazy = instrumented;\n    }\n  }\n  if (typeof route.lazy === \"object\") {\n    let lazyObject = route.lazy;\n    [\"middleware\", \"loader\", \"action\"].forEach((key) => {\n      let lazyFn = lazyObject[key];\n      let instrumentations = aggregated[`lazy.${key}`];\n      if (typeof lazyFn === \"function\" && instrumentations.length > 0) {\n        let instrumented = wrapImpl(instrumentations, lazyFn, () => void 0);\n        if (instrumented) {\n          updates.lazy = Object.assign(updates.lazy || {}, {\n            [key]: instrumented\n          });\n        }\n      }\n    });\n  }\n  [\"loader\", \"action\"].forEach((key) => {\n    let handler = route[key];\n    if (typeof handler === \"function\" && aggregated[key].length > 0) {\n      let original = handler[UninstrumentedSymbol] ?? handler;\n      let instrumented = wrapImpl(\n        aggregated[key],\n        original,\n        (...args) => getHandlerInfo(args[0])\n      );\n      if (instrumented) {\n        if (key === \"loader\" && original.hydrate === true) {\n          instrumented.hydrate = true;\n        }\n        instrumented[UninstrumentedSymbol] = original;\n        updates[key] = instrumented;\n      }\n    }\n  });\n  if (route.middleware && route.middleware.length > 0 && aggregated.middleware.length > 0) {\n    updates.middleware = route.middleware.map((middleware) => {\n      let original = middleware[UninstrumentedSymbol] ?? middleware;\n      let instrumented = wrapImpl(\n        aggregated.middleware,\n        original,\n        (...args) => getHandlerInfo(args[0])\n      );\n      if (instrumented) {\n        instrumented[UninstrumentedSymbol] = original;\n        return instrumented;\n      }\n      return middleware;\n    });\n  }\n  return updates;\n}\nfunction instrumentClientSideRouter(router, fns) {\n  let aggregated = {\n    navigate: [],\n    fetch: []\n  };\n  fns.forEach(\n    (fn) => fn({\n      instrument(i) {\n        let keys = Object.keys(i);\n        for (let key of keys) {\n          if (i[key]) {\n            aggregated[key].push(i[key]);\n          }\n        }\n      }\n    })\n  );\n  if (aggregated.navigate.length > 0) {\n    let navigate = router.navigate[UninstrumentedSymbol] ?? router.navigate;\n    let instrumentedNavigate = wrapImpl(\n      aggregated.navigate,\n      navigate,\n      (...args) => {\n        let [to, opts] = args;\n        return {\n          to: typeof to === \"number\" || typeof to === \"string\" ? to : to ? createPath(to) : \".\",\n          ...getRouterInfo(router, opts ?? {})\n        };\n      }\n    );\n    if (instrumentedNavigate) {\n      instrumentedNavigate[UninstrumentedSymbol] = navigate;\n      router.navigate = instrumentedNavigate;\n    }\n  }\n  if (aggregated.fetch.length > 0) {\n    let fetch2 = router.fetch[UninstrumentedSymbol] ?? router.fetch;\n    let instrumentedFetch = wrapImpl(aggregated.fetch, fetch2, (...args) => {\n      let [key, , href, opts] = args;\n      return {\n        href: href ?? \".\",\n        fetcherKey: key,\n        ...getRouterInfo(router, opts ?? {})\n      };\n    });\n    if (instrumentedFetch) {\n      instrumentedFetch[UninstrumentedSymbol] = fetch2;\n      router.fetch = instrumentedFetch;\n    }\n  }\n  return router;\n}\nfunction instrumentHandler(handler, fns) {\n  let aggregated = {\n    request: []\n  };\n  fns.forEach(\n    (fn) => fn({\n      instrument(i) {\n        let keys = Object.keys(i);\n        for (let key of keys) {\n          if (i[key]) {\n            aggregated[key].push(i[key]);\n          }\n        }\n      }\n    })\n  );\n  let instrumentedHandler = handler;\n  if (aggregated.request.length > 0) {\n    instrumentedHandler = wrapImpl(aggregated.request, handler, (...args) => {\n      let [request, context] = args;\n      return {\n        request: getReadonlyRequest(request),\n        context: context != null ? getReadonlyContext(context) : context\n      };\n    });\n  }\n  return instrumentedHandler;\n}\nfunction wrapImpl(impls, handler, getInfo) {\n  if (impls.length === 0) {\n    return null;\n  }\n  return async (...args) => {\n    let result = await recurseRight(\n      impls,\n      getInfo(...args),\n      () => handler(...args),\n      impls.length - 1\n    );\n    if (result.type === \"error\") {\n      throw result.value;\n    }\n    return result.value;\n  };\n}\nasync function recurseRight(impls, info, handler, index) {\n  let impl = impls[index];\n  let result;\n  if (!impl) {\n    try {\n      let value = await handler();\n      result = { type: \"success\", value };\n    } catch (e) {\n      result = { type: \"error\", value: e };\n    }\n  } else {\n    let handlerPromise = void 0;\n    let callHandler = async () => {\n      if (handlerPromise) {\n        console.error(\"You cannot call instrumented handlers more than once\");\n      } else {\n        handlerPromise = recurseRight(impls, info, handler, index - 1);\n      }\n      result = await handlerPromise;\n      invariant(result, \"Expected a result\");\n      if (result.type === \"error\" && result.value instanceof Error) {\n        return { status: \"error\", error: result.value };\n      }\n      return { status: \"success\", error: void 0 };\n    };\n    try {\n      await impl(callHandler, info);\n    } catch (e) {\n      console.error(\"An instrumentation function threw an error:\", e);\n    }\n    if (!handlerPromise) {\n      await callHandler();\n    }\n    await handlerPromise;\n  }\n  if (result) {\n    return result;\n  }\n  return {\n    type: \"error\",\n    value: new Error(\"No result assigned in instrumentation chain.\")\n  };\n}\nfunction getHandlerInfo(args) {\n  let { request, context, params, pattern } = args;\n  return {\n    request: getReadonlyRequest(request),\n    params: { ...params },\n    pattern,\n    context: getReadonlyContext(context)\n  };\n}\nfunction getRouterInfo(router, opts) {\n  return {\n    currentUrl: createPath(router.state.location),\n    ...\"formMethod\" in opts ? { formMethod: opts.formMethod } : {},\n    ...\"formEncType\" in opts ? { formEncType: opts.formEncType } : {},\n    ...\"formData\" in opts ? { formData: opts.formData } : {},\n    ...\"body\" in opts ? { body: opts.body } : {}\n  };\n}\nfunction getReadonlyRequest(request) {\n  return {\n    method: request.method,\n    url: request.url,\n    headers: {\n      get: (...args) => request.headers.get(...args)\n    }\n  };\n}\nfunction getReadonlyContext(context) {\n  if (isPlainObject(context)) {\n    let frozen = { ...context };\n    Object.freeze(frozen);\n    return frozen;\n  } else {\n    return {\n      get: (ctx) => context.get(ctx)\n    };\n  }\n}\nvar objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction isPlainObject(thing) {\n  if (thing === null || typeof thing !== \"object\") {\n    return false;\n  }\n  const proto = Object.getPrototypeOf(thing);\n  return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === objectProtoNames;\n}\n\n// lib/router/navigation.ts\nvar DEFAULT_NAVIGATION_URL = new URL(\"http://localhost\");\nfunction getNavigatorCurrentUrl(navigator) {\n  if (navigator.createURL) {\n    return navigator.createURL(\"/\");\n  }\n  try {\n    return new URL(navigator.createHref(\"/\"), DEFAULT_NAVIGATION_URL);\n  } catch {\n    return DEFAULT_NAVIGATION_URL;\n  }\n}\nfunction isSameOrigin(a, b) {\n  return a.origin === b.origin && (a.origin !== \"null\" || a.protocol === b.protocol && a.host === b.host);\n}\nfunction isExplicitUrl(destination, target) {\n  if (destination.startsWith(\"//\")) {\n    return true;\n  }\n  let protocol = target.protocol.toLowerCase();\n  if (!destination.toLowerCase().startsWith(protocol)) {\n    return false;\n  }\n  return target.host === \"\" || destination.slice(protocol.length).startsWith(\"//\");\n}\nfunction validateNavigationTarget(original, resolved, currentUrl, externalPolicy) {\n  let originalUrl = null;\n  try {\n    originalUrl = original == null ? null : new URL(original, currentUrl);\n  } catch {\n  }\n  let resolvedUrl = new URL(resolved, currentUrl);\n  let originalIsExternal = originalUrl != null && !isSameOrigin(originalUrl, currentUrl);\n  let resolvedIsExternal = !isSameOrigin(resolvedUrl, currentUrl);\n  if (externalPolicy === \"reject\") {\n    if (originalIsExternal || resolvedIsExternal) {\n      throw new Error(\"External navigation is not allowed\");\n    }\n  } else if (resolvedIsExternal) {\n    if (originalUrl == null || !isExplicitUrl(original, originalUrl) || !isSameOrigin(originalUrl, resolvedUrl)) {\n      throw new Error(\"External navigation is not allowed\");\n    }\n  }\n}\n\n// lib/router/router.ts\nvar validMutationMethodsArr = [\n  \"POST\",\n  \"PUT\",\n  \"PATCH\",\n  \"DELETE\"\n];\nvar validMutationMethods = new Set(\n  validMutationMethodsArr\n);\nvar validRequestMethodsArr = [\n  \"GET\",\n  ...validMutationMethodsArr\n];\nvar validRequestMethods = new Set(validRequestMethodsArr);\nvar redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);\nvar redirectPreserveMethodStatusCodes = /* @__PURE__ */ new Set([307, 308]);\nvar IDLE_NAVIGATION = {\n  state: \"idle\",\n  location: void 0,\n  matches: void 0,\n  historyAction: void 0,\n  formMethod: void 0,\n  formAction: void 0,\n  formEncType: void 0,\n  formData: void 0,\n  json: void 0,\n  text: void 0\n};\nvar IDLE_FETCHER = {\n  state: \"idle\",\n  data: void 0,\n  formMethod: void 0,\n  formAction: void 0,\n  formEncType: void 0,\n  formData: void 0,\n  json: void 0,\n  text: void 0\n};\nvar IDLE_BLOCKER = {\n  state: \"unblocked\",\n  proceed: void 0,\n  reset: void 0,\n  location: void 0\n};\nvar defaultMapRouteProperties = (route) => ({\n  hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nvar TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\nvar ResetLoaderDataSymbol = Symbol(\"ResetLoaderData\");\nvar _routes, _branches, _hmrRoutes, _hmrBranches;\nvar DataRoutes = class {\n  constructor(routes) {\n    __privateAdd(this, _routes);\n    __privateAdd(this, _branches);\n    __privateAdd(this, _hmrRoutes);\n    __privateAdd(this, _hmrBranches);\n    __privateSet(this, _routes, routes);\n    __privateSet(this, _branches, flattenAndRankRoutes(routes));\n  }\n  /** The stable route tree */\n  get stableRoutes() {\n    return __privateGet(this, _routes);\n  }\n  /** The in-flight route tree if one is active, otherwise the stable tree */\n  get activeRoutes() {\n    return __privateGet(this, _hmrRoutes) ?? __privateGet(this, _routes);\n  }\n  /** Pre-computed branches */\n  get branches() {\n    return __privateGet(this, _hmrBranches) ?? __privateGet(this, _branches);\n  }\n  get hasHMRRoutes() {\n    return __privateGet(this, _hmrRoutes) != null;\n  }\n  /** Replace the stable route tree and recompute its branches */\n  setRoutes(routes) {\n    __privateSet(this, _routes, routes);\n    __privateSet(this, _branches, flattenAndRankRoutes(routes));\n  }\n  /** Set a new in-flight route tree and recompute its branches */\n  setHmrRoutes(routes) {\n    __privateSet(this, _hmrRoutes, routes);\n    __privateSet(this, _hmrBranches, flattenAndRankRoutes(routes));\n  }\n  /** Commit in-flight routes/branches to the stable slot and clear in-flight */\n  commitHmrRoutes() {\n    if (__privateGet(this, _hmrRoutes)) {\n      __privateSet(this, _routes, __privateGet(this, _hmrRoutes));\n      __privateSet(this, _branches, __privateGet(this, _hmrBranches));\n      __privateSet(this, _hmrRoutes, void 0);\n      __privateSet(this, _hmrBranches, void 0);\n    }\n  }\n};\n_routes = new WeakMap();\n_branches = new WeakMap();\n_hmrRoutes = new WeakMap();\n_hmrBranches = new WeakMap();\nfunction createRouter(init) {\n  const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : void 0;\n  const isBrowser3 = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n  invariant(\n    init.routes.length > 0,\n    \"You must provide a non-empty routes array to createRouter\"\n  );\n  let hydrationRouteProperties2 = init.hydrationRouteProperties || [];\n  let _mapRouteProperties = init.mapRouteProperties || defaultMapRouteProperties;\n  let mapRouteProperties2 = _mapRouteProperties;\n  if (init.instrumentations) {\n    let instrumentations = init.instrumentations;\n    mapRouteProperties2 = (route) => {\n      return {\n        ..._mapRouteProperties(route),\n        ...getRouteInstrumentationUpdates(\n          instrumentations.map((i) => i.route).filter(Boolean),\n          route\n        )\n      };\n    };\n  }\n  let manifest = {};\n  let dataRoutes = new DataRoutes(\n    convertRoutesToDataRoutes(\n      init.routes,\n      mapRouteProperties2,\n      void 0,\n      manifest\n    )\n  );\n  let basename = init.basename || \"/\";\n  if (!basename.startsWith(\"/\")) {\n    basename = `/${basename}`;\n  }\n  let dataStrategyImpl = init.dataStrategy || defaultDataStrategyWithMiddleware;\n  let future = {\n    ...init.future\n  };\n  let unlistenHistory = null;\n  let subscribers = /* @__PURE__ */ new Set();\n  let bufferedInitialStateUpdate = null;\n  let savedScrollPositions2 = null;\n  let getScrollRestorationKey2 = null;\n  let getScrollPosition = null;\n  let initialScrollRestored = init.hydrationData != null;\n  let initialMatches = matchRoutesImpl(\n    dataRoutes.activeRoutes,\n    init.history.location,\n    basename,\n    false,\n    dataRoutes.branches\n  );\n  let initialMatchesIsFOW = false;\n  let initialErrors = null;\n  let initialized;\n  let renderFallback;\n  if (initialMatches == null && !init.patchRoutesOnNavigation) {\n    let error = getInternalRouterError(404, {\n      pathname: init.history.location.pathname\n    });\n    let { matches, route } = getShortCircuitMatches(dataRoutes.activeRoutes);\n    initialized = true;\n    renderFallback = !initialized;\n    initialMatches = matches;\n    initialErrors = { [route.id]: error };\n  } else {\n    if (initialMatches && !init.hydrationData) {\n      let fogOfWar = checkFogOfWar(\n        initialMatches,\n        dataRoutes.activeRoutes,\n        init.history.location.pathname\n      );\n      if (fogOfWar.active) {\n        initialMatches = null;\n      }\n    }\n    if (!initialMatches) {\n      initialized = false;\n      renderFallback = !initialized;\n      initialMatches = [];\n      let fogOfWar = checkFogOfWar(\n        null,\n        dataRoutes.activeRoutes,\n        init.history.location.pathname\n      );\n      if (fogOfWar.active && fogOfWar.matches) {\n        initialMatchesIsFOW = true;\n        initialMatches = fogOfWar.matches;\n      }\n    } else if (initialMatches.some((m) => m.route.lazy)) {\n      initialized = false;\n      renderFallback = !initialized;\n    } else if (!initialMatches.some((m) => routeHasLoaderOrMiddleware(m.route))) {\n      initialized = true;\n      renderFallback = !initialized;\n    } else {\n      let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n      let errors = init.hydrationData ? init.hydrationData.errors : null;\n      let relevantMatches = initialMatches;\n      if (errors) {\n        let idx = initialMatches.findIndex(\n          (m) => errors[m.route.id] !== void 0\n        );\n        relevantMatches = relevantMatches.slice(0, idx + 1);\n      }\n      renderFallback = false;\n      initialized = true;\n      relevantMatches.forEach((m) => {\n        let status = getRouteHydrationStatus(m.route, loaderData, errors);\n        renderFallback = renderFallback || status.renderFallback;\n        initialized = initialized && !status.shouldLoad;\n      });\n    }\n  }\n  let router;\n  let state = {\n    historyAction: init.history.action,\n    location: init.history.location,\n    matches: initialMatches,\n    initialized,\n    renderFallback,\n    navigation: IDLE_NAVIGATION,\n    // Don't restore on initial updateState() if we were SSR'd\n    restoreScrollPosition: init.hydrationData != null ? false : null,\n    preventScrollReset: false,\n    revalidation: \"idle\",\n    loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n    actionData: init.hydrationData && init.hydrationData.actionData || null,\n    errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n    fetchers: /* @__PURE__ */ new Map(),\n    blockers: /* @__PURE__ */ new Map()\n  };\n  let pendingAction = \"POP\" /* Pop */;\n  let pendingPopstateNavigationDfd = null;\n  let pendingPreventScrollReset = false;\n  let pendingNavigationController;\n  let pendingViewTransitionEnabled = false;\n  let appliedViewTransitions = /* @__PURE__ */ new Map();\n  let removePageHideEventListener = null;\n  let isUninterruptedRevalidation = false;\n  let isRevalidationRequired = false;\n  let cancelledFetcherLoads = /* @__PURE__ */ new Set();\n  let fetchControllers = /* @__PURE__ */ new Map();\n  let incrementingLoadId = 0;\n  let pendingNavigationLoadId = -1;\n  let fetchReloadIds = /* @__PURE__ */ new Map();\n  let fetchRedirectIds = /* @__PURE__ */ new Set();\n  let fetchLoadMatches = /* @__PURE__ */ new Map();\n  let activeFetchers = /* @__PURE__ */ new Map();\n  let fetchersQueuedForDeletion = /* @__PURE__ */ new Set();\n  let blockerFunctions = /* @__PURE__ */ new Map();\n  let unblockBlockerHistoryUpdate = void 0;\n  let pendingRevalidationDfd = null;\n  function initialize() {\n    unlistenHistory = init.history.listen(\n      ({ action: historyAction, location, delta }) => {\n        if (unblockBlockerHistoryUpdate) {\n          unblockBlockerHistoryUpdate();\n          unblockBlockerHistoryUpdate = void 0;\n          return;\n        }\n        warning(\n          blockerFunctions.size === 0 || delta != null,\n          \"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.\"\n        );\n        let blockerKey = shouldBlockNavigation({\n          currentLocation: state.location,\n          nextLocation: location,\n          historyAction\n        });\n        if (blockerKey && delta != null) {\n          let nextHistoryUpdatePromise = new Promise((resolve) => {\n            unblockBlockerHistoryUpdate = resolve;\n          });\n          init.history.go(delta * -1);\n          updateBlocker(blockerKey, {\n            state: \"blocked\",\n            location,\n            proceed() {\n              updateBlocker(blockerKey, {\n                state: \"proceeding\",\n                proceed: void 0,\n                reset: void 0,\n                location\n              });\n              nextHistoryUpdatePromise.then(() => init.history.go(delta));\n            },\n            reset() {\n              let blockers = new Map(state.blockers);\n              blockers.set(blockerKey, IDLE_BLOCKER);\n              updateState({ blockers });\n            }\n          });\n          pendingPopstateNavigationDfd?.resolve();\n          pendingPopstateNavigationDfd = null;\n          return;\n        }\n        return startNavigation(historyAction, location);\n      }\n    );\n    if (isBrowser3) {\n      restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n      let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n      routerWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n      removePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n    }\n    if (!state.initialized) {\n      startNavigation(\"POP\" /* Pop */, state.location, {\n        initialHydration: true\n      });\n    }\n    return router;\n  }\n  function dispose() {\n    if (unlistenHistory) {\n      unlistenHistory();\n    }\n    if (removePageHideEventListener) {\n      removePageHideEventListener();\n    }\n    subscribers.clear();\n    pendingNavigationController && pendingNavigationController.abort();\n    state.fetchers.forEach((_, key) => deleteFetcher(state.fetchers, key));\n    state.blockers.forEach((_, key) => deleteBlocker(key));\n  }\n  function subscribe(fn) {\n    subscribers.add(fn);\n    if (bufferedInitialStateUpdate) {\n      let { newErrors } = bufferedInitialStateUpdate;\n      bufferedInitialStateUpdate = null;\n      fn(state, {\n        deletedFetchers: [],\n        newErrors,\n        viewTransitionOpts: void 0,\n        flushSync: false\n      });\n    }\n    return () => subscribers.delete(fn);\n  }\n  function updateState(newState, opts = {}) {\n    if (newState.matches) {\n      newState.matches = newState.matches.map((m) => {\n        let route = manifest[m.route.id];\n        let matchRoute = m.route;\n        if (matchRoute.element !== route.element || matchRoute.errorElement !== route.errorElement || matchRoute.hydrateFallbackElement !== route.hydrateFallbackElement) {\n          return {\n            ...m,\n            route\n          };\n        }\n        return m;\n      });\n    }\n    state = {\n      ...state,\n      ...newState\n    };\n    let unmountedFetchers = [];\n    let mountedFetchers = [];\n    state.fetchers.forEach((fetcher, key) => {\n      if (fetcher.state === \"idle\") {\n        if (fetchersQueuedForDeletion.has(key)) {\n          unmountedFetchers.push(key);\n        } else {\n          mountedFetchers.push(key);\n        }\n      }\n    });\n    fetchersQueuedForDeletion.forEach((key) => {\n      if (!state.fetchers.has(key) && !fetchControllers.has(key)) {\n        unmountedFetchers.push(key);\n      }\n    });\n    if (subscribers.size === 0) {\n      bufferedInitialStateUpdate = { newErrors: newState.errors ?? null };\n    }\n    [...subscribers].forEach(\n      (subscriber) => subscriber(state, {\n        deletedFetchers: unmountedFetchers,\n        newErrors: newState.errors ?? null,\n        viewTransitionOpts: opts.viewTransitionOpts,\n        flushSync: opts.flushSync === true\n      })\n    );\n    unmountedFetchers.forEach((key) => deleteFetcher(state.fetchers, key));\n    mountedFetchers.forEach((key) => state.fetchers.delete(key));\n  }\n  function completeNavigation(location, newState, { flushSync } = {}) {\n    let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && location.state?._isRedirect !== true;\n    let actionData;\n    if (newState.actionData) {\n      if (Object.keys(newState.actionData).length > 0) {\n        actionData = newState.actionData;\n      } else {\n        actionData = null;\n      }\n    } else if (isActionReload) {\n      actionData = state.actionData;\n    } else {\n      actionData = null;\n    }\n    let loaderData = newState.loaderData ? mergeLoaderData(\n      state.loaderData,\n      newState.loaderData,\n      newState.matches || [],\n      newState.errors\n    ) : state.loaderData;\n    let blockers = state.blockers;\n    if (blockers.size > 0) {\n      blockers = new Map(blockers);\n      blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n    }\n    let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);\n    let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;\n    dataRoutes.commitHmrRoutes();\n    if (isUninterruptedRevalidation) {\n    } else if (pendingAction === \"POP\" /* Pop */) {\n    } else if (pendingAction === \"PUSH\" /* Push */) {\n      init.history.push(location, location.state);\n    } else if (pendingAction === \"REPLACE\" /* Replace */) {\n      init.history.replace(location, location.state);\n    }\n    let viewTransitionOpts;\n    if (pendingAction === \"POP\" /* Pop */ && !isUninterruptedRevalidation && location !== state.location) {\n      let priorPaths = appliedViewTransitions.get(state.location.pathname);\n      if (priorPaths && priorPaths.has(location.pathname)) {\n        viewTransitionOpts = {\n          currentLocation: state.location,\n          nextLocation: location\n        };\n      } else if (appliedViewTransitions.has(location.pathname)) {\n        viewTransitionOpts = {\n          currentLocation: location,\n          nextLocation: state.location\n        };\n      }\n    } else if (pendingViewTransitionEnabled) {\n      let toPaths = appliedViewTransitions.get(state.location.pathname);\n      if (toPaths) {\n        toPaths.add(location.pathname);\n      } else {\n        toPaths = /* @__PURE__ */ new Set([location.pathname]);\n        appliedViewTransitions.set(state.location.pathname, toPaths);\n      }\n      viewTransitionOpts = {\n        currentLocation: state.location,\n        nextLocation: location\n      };\n    }\n    updateState(\n      {\n        ...newState,\n        // matches, errors, fetchers go through as-is\n        actionData,\n        loaderData,\n        historyAction: pendingAction,\n        location,\n        initialized: true,\n        renderFallback: false,\n        navigation: IDLE_NAVIGATION,\n        revalidation: \"idle\",\n        restoreScrollPosition,\n        preventScrollReset,\n        blockers\n      },\n      {\n        viewTransitionOpts,\n        flushSync: flushSync === true\n      }\n    );\n    pendingAction = \"POP\" /* Pop */;\n    pendingPreventScrollReset = false;\n    pendingViewTransitionEnabled = false;\n    isUninterruptedRevalidation = false;\n    isRevalidationRequired = false;\n    pendingPopstateNavigationDfd?.resolve();\n    pendingPopstateNavigationDfd = null;\n    pendingRevalidationDfd?.resolve();\n    pendingRevalidationDfd = null;\n  }\n  async function navigate(to, opts) {\n    pendingPopstateNavigationDfd?.resolve();\n    pendingPopstateNavigationDfd = null;\n    if (typeof to === \"number\") {\n      if (!pendingPopstateNavigationDfd) {\n        pendingPopstateNavigationDfd = createDeferred();\n      }\n      let promise = pendingPopstateNavigationDfd.promise;\n      init.history.go(to);\n      return promise;\n    }\n    let normalizedPath = normalizeTo(\n      state.location,\n      state.matches,\n      basename,\n      to,\n      opts?.fromRouteId,\n      opts?.relative\n    );\n    let { path, submission, error } = normalizeNavigateOptions(\n      false,\n      normalizedPath,\n      opts\n    );\n    let maskPath;\n    if (opts?.mask) {\n      let partialPath = typeof opts.mask === \"string\" ? parsePath(opts.mask) : {\n        ...state.location.mask,\n        ...opts.mask\n      };\n      maskPath = {\n        pathname: partialPath.pathname ?? \"\",\n        search: partialPath.search ?? \"\",\n        hash: partialPath.hash ?? \"\"\n      };\n      if (PROTOCOL_RELATIVE_URL_REGEX.test(maskPath.pathname)) {\n        throw new Error(\"External navigation is not allowed\");\n      } else if (maskPath.pathname.startsWith(\"\\\\\")) {\n        maskPath.pathname = maskPath.pathname.replace(/^\\\\+/, \"/\");\n      }\n      validateNavigationTarget(\n        typeof opts.mask === \"string\" ? opts.mask : createPath(opts.mask),\n        createPath(maskPath),\n        init.history.createURL(\"/\"),\n        \"reject\"\n      );\n    }\n    let currentLocation = state.location;\n    let nextLocation = createLocation(\n      currentLocation,\n      path,\n      opts && opts.state,\n      void 0,\n      maskPath\n    );\n    nextLocation = {\n      ...nextLocation,\n      ...init.history.encodeLocation(nextLocation)\n    };\n    validateNavigationTarget(\n      to == null ? init.history.createHref(state.location) : typeof to === \"string\" ? to : createPath(to),\n      init.history.createHref(nextLocation.mask || nextLocation),\n      init.history.createURL(\"/\"),\n      \"reject\"\n    );\n    let userReplace = opts && opts.replace != null ? opts.replace : void 0;\n    let historyAction = \"PUSH\" /* Push */;\n    if (userReplace === true) {\n      historyAction = \"REPLACE\" /* Replace */;\n    } else if (userReplace === false) {\n    } else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n      historyAction = \"REPLACE\" /* Replace */;\n    }\n    let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : void 0;\n    let flushSync = (opts && opts.flushSync) === true;\n    let blockerKey = shouldBlockNavigation({\n      currentLocation,\n      nextLocation,\n      historyAction\n    });\n    if (blockerKey) {\n      updateBlocker(blockerKey, {\n        state: \"blocked\",\n        location: nextLocation,\n        proceed() {\n          updateBlocker(blockerKey, {\n            state: \"proceeding\",\n            proceed: void 0,\n            reset: void 0,\n            location: nextLocation\n          });\n          navigate(to, opts);\n        },\n        reset() {\n          let blockers = new Map(state.blockers);\n          blockers.set(blockerKey, IDLE_BLOCKER);\n          updateState({ blockers });\n        }\n      });\n      return;\n    }\n    await startNavigation(historyAction, nextLocation, {\n      submission,\n      // Send through the formData serialization error if we have one so we can\n      // render at the right error boundary after we match routes\n      pendingError: error,\n      preventScrollReset,\n      replace: opts && opts.replace,\n      enableViewTransition: opts && opts.viewTransition,\n      flushSync,\n      callSiteDefaultShouldRevalidate: opts && opts.defaultShouldRevalidate\n    });\n  }\n  function revalidate() {\n    if (!pendingRevalidationDfd) {\n      pendingRevalidationDfd = createDeferred();\n    }\n    interruptActiveLoads();\n    updateState({ revalidation: \"loading\" });\n    let promise = pendingRevalidationDfd.promise;\n    if (state.navigation.state === \"submitting\") {\n      return promise;\n    }\n    if (state.navigation.state === \"idle\") {\n      startNavigation(state.historyAction, state.location, {\n        startUninterruptedRevalidation: true\n      });\n      return promise;\n    }\n    startNavigation(\n      pendingAction || state.historyAction,\n      state.navigation.location,\n      {\n        overrideNavigation: state.navigation,\n        // Proxy through any rending view transition\n        enableViewTransition: pendingViewTransitionEnabled === true\n      }\n    );\n    return promise;\n  }\n  async function startNavigation(historyAction, location, opts) {\n    pendingNavigationController && pendingNavigationController.abort();\n    pendingNavigationController = null;\n    pendingAction = historyAction;\n    isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n    saveScrollPosition(state.location, state.matches);\n    pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n    pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n    let routesToUse = dataRoutes.activeRoutes;\n    let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (\n      // `matchRoutes()` has already been called if we're in here via `router.initialize()`\n      state.matches\n    ) : matchRoutesImpl(\n      routesToUse,\n      location,\n      basename,\n      false,\n      dataRoutes.branches\n    );\n    let flushSync = (opts && opts.flushSync) === true;\n    if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n      completeNavigation(location, { matches }, { flushSync });\n      return;\n    }\n    let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    if (!matches) {\n      let { error, notFoundMatches, route } = handleNavigational404(\n        location.pathname\n      );\n      completeNavigation(\n        location,\n        {\n          matches: notFoundMatches,\n          loaderData: {},\n          errors: {\n            [route.id]: error\n          }\n        },\n        { flushSync }\n      );\n      return;\n    }\n    let loadingNavigation = opts && opts.overrideNavigation ? {\n      ...opts.overrideNavigation,\n      matches,\n      historyAction\n    } : void 0;\n    pendingNavigationController = new AbortController();\n    let request = createClientSideRequest(\n      init.history,\n      location,\n      pendingNavigationController.signal,\n      opts && opts.submission\n    );\n    let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n    let pendingActionResult;\n    if (opts && opts.pendingError) {\n      pendingActionResult = [\n        findNearestBoundary(matches).route.id,\n        { type: \"error\" /* error */, error: opts.pendingError }\n      ];\n    } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n      let actionResult = await handleAction(\n        request,\n        location,\n        opts.submission,\n        matches,\n        historyAction,\n        scopedContext,\n        fogOfWar.active,\n        opts && opts.initialHydration === true,\n        { replace: opts.replace, flushSync }\n      );\n      if (actionResult.shortCircuited) {\n        return;\n      }\n      if (actionResult.pendingActionResult) {\n        let [routeId, result] = actionResult.pendingActionResult;\n        if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n          pendingNavigationController = null;\n          completeNavigation(location, {\n            matches: actionResult.matches,\n            loaderData: {},\n            errors: {\n              [routeId]: result.error\n            }\n          });\n          return;\n        }\n      }\n      matches = actionResult.matches || matches;\n      pendingActionResult = actionResult.pendingActionResult;\n      loadingNavigation = getLoadingNavigation(\n        location,\n        matches,\n        historyAction,\n        opts.submission\n      );\n      flushSync = false;\n      fogOfWar.active = false;\n      request = createClientSideRequest(\n        init.history,\n        request.url,\n        request.signal\n      );\n    }\n    let {\n      shortCircuited,\n      matches: updatedMatches,\n      loaderData,\n      errors,\n      workingFetchers\n    } = await handleLoaders(\n      request,\n      location,\n      matches,\n      historyAction,\n      scopedContext,\n      fogOfWar.active,\n      loadingNavigation,\n      opts && opts.submission,\n      opts && opts.fetcherSubmission,\n      opts && opts.replace,\n      opts && opts.initialHydration === true,\n      flushSync,\n      pendingActionResult,\n      opts && opts.callSiteDefaultShouldRevalidate\n    );\n    if (shortCircuited) {\n      return;\n    }\n    pendingNavigationController = null;\n    completeNavigation(location, {\n      matches: updatedMatches || matches,\n      ...getActionDataForCommit(pendingActionResult),\n      loaderData,\n      errors,\n      ...workingFetchers ? { fetchers: workingFetchers } : {}\n    });\n  }\n  async function handleAction(request, location, submission, matches, historyAction, scopedContext, isFogOfWar, initialHydration, opts = {}) {\n    interruptActiveLoads();\n    let navigation = getSubmittingNavigation(\n      location,\n      matches,\n      historyAction,\n      submission\n    );\n    updateState({ navigation }, { flushSync: opts.flushSync === true });\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(\n        matches,\n        location.pathname,\n        request.signal\n      );\n      if (discoverResult.type === \"aborted\") {\n        return { shortCircuited: true };\n      } else if (discoverResult.type === \"error\") {\n        if (discoverResult.partialMatches.length === 0) {\n          let { matches: matches2, route } = getShortCircuitMatches(\n            dataRoutes.activeRoutes\n          );\n          return {\n            matches: matches2,\n            pendingActionResult: [\n              route.id,\n              {\n                type: \"error\" /* error */,\n                error: discoverResult.error\n              }\n            ]\n          };\n        }\n        let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n        return {\n          matches: discoverResult.partialMatches,\n          pendingActionResult: [\n            boundaryId,\n            {\n              type: \"error\" /* error */,\n              error: discoverResult.error\n            }\n          ]\n        };\n      } else if (!discoverResult.matches) {\n        let { notFoundMatches, error, route } = handleNavigational404(\n          location.pathname\n        );\n        return {\n          matches: notFoundMatches,\n          pendingActionResult: [\n            route.id,\n            {\n              type: \"error\" /* error */,\n              error\n            }\n          ]\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    let result;\n    let actionMatch = getTargetMatch(matches, location);\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      result = {\n        type: \"error\" /* error */,\n        error: getInternalRouterError(405, {\n          method: request.method,\n          pathname: location.pathname,\n          routeId: actionMatch.route.id\n        })\n      };\n    } else {\n      let dsMatches = getTargetedDataStrategyMatches(\n        mapRouteProperties2,\n        manifest,\n        request,\n        location,\n        matches,\n        actionMatch,\n        initialHydration ? [] : hydrationRouteProperties2,\n        scopedContext\n      );\n      let results = await callDataStrategy(\n        request,\n        location,\n        dsMatches,\n        scopedContext,\n        null\n      );\n      result = results[actionMatch.route.id];\n      if (!result) {\n        for (let match of matches) {\n          if (results[match.route.id]) {\n            result = results[match.route.id];\n            break;\n          }\n        }\n      }\n      if (request.signal.aborted) {\n        return { shortCircuited: true };\n      }\n    }\n    if (isRedirectResult(result)) {\n      let replace2;\n      if (opts && opts.replace != null) {\n        replace2 = opts.replace;\n      } else {\n        let location2 = normalizeRedirectLocation(\n          result.response.headers.get(\"Location\"),\n          new URL(request.url),\n          basename,\n          init.history\n        );\n        replace2 = location2 === state.location.pathname + state.location.search;\n      }\n      await startRedirectNavigation(request, result, true, {\n        submission,\n        replace: replace2\n      });\n      return { shortCircuited: true };\n    }\n    if (isErrorResult(result)) {\n      let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n      if ((opts && opts.replace) !== true) {\n        pendingAction = \"PUSH\" /* Push */;\n      }\n      return {\n        matches,\n        pendingActionResult: [\n          boundaryMatch.route.id,\n          result,\n          actionMatch.route.id\n        ]\n      };\n    }\n    return {\n      matches,\n      pendingActionResult: [actionMatch.route.id, result]\n    };\n  }\n  async function handleLoaders(request, location, matches, historyAction, scopedContext, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace2, initialHydration, flushSync, pendingActionResult, callSiteDefaultShouldRevalidate) {\n    let loadingNavigation = overrideNavigation || getLoadingNavigation(location, matches, historyAction, submission);\n    let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n    let shouldUpdateNavigationState = !isUninterruptedRevalidation && !initialHydration;\n    if (isFogOfWar) {\n      if (shouldUpdateNavigationState) {\n        let actionData = getUpdatedActionData(pendingActionResult);\n        updateState(\n          {\n            navigation: loadingNavigation,\n            ...actionData !== void 0 ? { actionData } : {}\n          },\n          {\n            flushSync\n          }\n        );\n      }\n      let discoverResult = await discoverRoutes(\n        matches,\n        location.pathname,\n        request.signal\n      );\n      if (discoverResult.type === \"aborted\") {\n        return { shortCircuited: true };\n      } else if (discoverResult.type === \"error\") {\n        if (discoverResult.partialMatches.length === 0) {\n          let { matches: matches2, route } = getShortCircuitMatches(\n            dataRoutes.activeRoutes\n          );\n          return {\n            matches: matches2,\n            loaderData: {},\n            errors: {\n              [route.id]: discoverResult.error\n            }\n          };\n        }\n        let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n        return {\n          matches: discoverResult.partialMatches,\n          loaderData: {},\n          errors: {\n            [boundaryId]: discoverResult.error\n          }\n        };\n      } else if (!discoverResult.matches) {\n        let { error, notFoundMatches, route } = handleNavigational404(\n          location.pathname\n        );\n        return {\n          matches: notFoundMatches,\n          loaderData: {},\n          errors: {\n            [route.id]: error\n          }\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    let routesToUse = dataRoutes.activeRoutes;\n    let { dsMatches, revalidatingFetchers } = getMatchesToLoad(\n      request,\n      scopedContext,\n      mapRouteProperties2,\n      manifest,\n      init.history,\n      state,\n      matches,\n      activeSubmission,\n      location,\n      initialHydration ? [] : hydrationRouteProperties2,\n      initialHydration === true,\n      isRevalidationRequired,\n      cancelledFetcherLoads,\n      fetchersQueuedForDeletion,\n      fetchLoadMatches,\n      fetchRedirectIds,\n      routesToUse,\n      basename,\n      init.patchRoutesOnNavigation != null,\n      dataRoutes.branches,\n      pendingActionResult,\n      callSiteDefaultShouldRevalidate\n    );\n    pendingNavigationLoadId = ++incrementingLoadId;\n    if (!init.dataStrategy && !dsMatches.some((m) => m.shouldLoad) && !dsMatches.some(\n      (m) => m.route.middleware && m.route.middleware.length > 0\n    ) && revalidatingFetchers.length === 0) {\n      let workingFetchers2 = new Map(state.fetchers);\n      let didUpdateFetcherRedirects2 = markFetchRedirectsDone(workingFetchers2);\n      completeNavigation(\n        location,\n        {\n          matches,\n          loaderData: {},\n          // Commit pending error if we're short circuiting\n          errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? { [pendingActionResult[0]]: pendingActionResult[1].error } : null,\n          ...getActionDataForCommit(pendingActionResult),\n          ...didUpdateFetcherRedirects2 ? { fetchers: workingFetchers2 } : {}\n        },\n        { flushSync }\n      );\n      return { shortCircuited: true };\n    }\n    if (shouldUpdateNavigationState) {\n      let updates = {};\n      if (!isFogOfWar) {\n        updates.navigation = loadingNavigation;\n        let actionData = getUpdatedActionData(pendingActionResult);\n        if (actionData !== void 0) {\n          updates.actionData = actionData;\n        }\n      }\n      if (revalidatingFetchers.length > 0) {\n        updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n      }\n      updateState(updates, { flushSync });\n    }\n    revalidatingFetchers.forEach((rf) => {\n      abortFetcher(rf.key);\n      if (rf.controller) {\n        fetchControllers.set(rf.key, rf.controller);\n      }\n    });\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key));\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.addEventListener(\n        \"abort\",\n        abortPendingFetchRevalidations\n      );\n    }\n    let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(\n      dsMatches,\n      revalidatingFetchers,\n      request,\n      location,\n      scopedContext\n    );\n    if (request.signal.aborted) {\n      return { shortCircuited: true };\n    }\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.removeEventListener(\n        \"abort\",\n        abortPendingFetchRevalidations\n      );\n    }\n    revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));\n    let redirect2 = findRedirect(loaderResults);\n    if (redirect2) {\n      await startRedirectNavigation(request, redirect2.result, true, {\n        replace: replace2\n      });\n      return { shortCircuited: true };\n    }\n    redirect2 = findRedirect(fetcherResults);\n    if (redirect2) {\n      fetchRedirectIds.add(redirect2.key);\n      await startRedirectNavigation(request, redirect2.result, true, {\n        replace: replace2\n      });\n      return { shortCircuited: true };\n    }\n    let workingFetchers = new Map(state.fetchers);\n    let { loaderData, errors } = processLoaderData(\n      state,\n      matches,\n      loaderResults,\n      pendingActionResult,\n      revalidatingFetchers,\n      fetcherResults,\n      workingFetchers\n    );\n    if (initialHydration && state.errors) {\n      errors = { ...state.errors, ...errors };\n    }\n    let didUpdateFetcherRedirects = markFetchRedirectsDone(workingFetchers);\n    let didAbortFetchLoads = abortStaleFetchLoads(\n      pendingNavigationLoadId,\n      workingFetchers\n    );\n    let shouldUpdateFetchers = didUpdateFetcherRedirects || didAbortFetchLoads || revalidatingFetchers.length > 0;\n    return {\n      matches,\n      loaderData,\n      errors,\n      ...shouldUpdateFetchers ? { workingFetchers } : {}\n    };\n  }\n  function getUpdatedActionData(pendingActionResult) {\n    if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n      return {\n        [pendingActionResult[0]]: pendingActionResult[1].data\n      };\n    } else if (state.actionData) {\n      if (Object.keys(state.actionData).length === 0) {\n        return null;\n      } else {\n        return state.actionData;\n      }\n    }\n  }\n  function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n    let workingFetchers = new Map(state.fetchers);\n    revalidatingFetchers.forEach((rf) => {\n      let fetcher = workingFetchers.get(rf.key);\n      let revalidatingFetcher = getLoadingFetcher(\n        void 0,\n        fetcher ? fetcher.data : void 0\n      );\n      workingFetchers.set(rf.key, revalidatingFetcher);\n    });\n    return workingFetchers;\n  }\n  async function fetch2(key, routeId, href, opts) {\n    abortFetcher(key);\n    let flushSync = (opts && opts.flushSync) === true;\n    let routesToUse = dataRoutes.activeRoutes;\n    let normalizedPath = normalizeTo(\n      state.location,\n      state.matches,\n      basename,\n      href,\n      routeId,\n      opts?.relative\n    );\n    let matches = matchRoutesImpl(\n      routesToUse,\n      normalizedPath,\n      basename,\n      false,\n      dataRoutes.branches\n    );\n    let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    if (!matches) {\n      setFetcherError(\n        key,\n        routeId,\n        getInternalRouterError(404, { pathname: normalizedPath }),\n        { flushSync }\n      );\n      return;\n    }\n    let { path, submission, error } = normalizeNavigateOptions(\n      true,\n      normalizedPath,\n      opts\n    );\n    if (error) {\n      setFetcherError(key, routeId, error, { flushSync });\n      return;\n    }\n    let scopedContext = init.getContext ? await init.getContext() : new RouterContextProvider();\n    let preventScrollReset = (opts && opts.preventScrollReset) === true;\n    if (submission && isMutationMethod(submission.formMethod)) {\n      await handleFetcherAction(\n        key,\n        routeId,\n        path,\n        matches,\n        scopedContext,\n        fogOfWar.active,\n        flushSync,\n        preventScrollReset,\n        submission,\n        opts && opts.defaultShouldRevalidate\n      );\n      return;\n    }\n    fetchLoadMatches.set(key, { routeId, path });\n    await handleFetcherLoader(\n      key,\n      routeId,\n      path,\n      matches,\n      scopedContext,\n      fogOfWar.active,\n      flushSync,\n      preventScrollReset,\n      submission\n    );\n  }\n  async function handleFetcherAction(key, routeId, path, requestMatches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission, callSiteDefaultShouldRevalidate) {\n    interruptActiveLoads();\n    fetchLoadMatches.delete(key);\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n      flushSync\n    });\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(\n      init.history,\n      path,\n      abortController.signal,\n      submission\n    );\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(\n        requestMatches,\n        new URL(fetchRequest.url).pathname,\n        fetchRequest.signal,\n        key\n      );\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        setFetcherError(key, routeId, discoverResult.error, { flushSync });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(\n          key,\n          routeId,\n          getInternalRouterError(404, { pathname: path }),\n          { flushSync }\n        );\n        return;\n      } else {\n        requestMatches = discoverResult.matches;\n      }\n    }\n    let match = getTargetMatch(requestMatches, path);\n    if (!match.route.action && !match.route.lazy) {\n      let error = getInternalRouterError(405, {\n        method: submission.formMethod,\n        pathname: path,\n        routeId\n      });\n      setFetcherError(key, routeId, error, { flushSync });\n      return;\n    }\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let fetchMatches = getTargetedDataStrategyMatches(\n      mapRouteProperties2,\n      manifest,\n      fetchRequest,\n      path,\n      requestMatches,\n      match,\n      hydrationRouteProperties2,\n      scopedContext\n    );\n    let actionResults = await callDataStrategy(\n      fetchRequest,\n      path,\n      fetchMatches,\n      scopedContext,\n      key\n    );\n    let actionResult = actionResults[match.route.id];\n    if (!actionResult) {\n      for (let match2 of fetchMatches) {\n        if (actionResults[match2.route.id]) {\n          actionResult = actionResults[match2.route.id];\n          break;\n        }\n      }\n    }\n    if (fetchRequest.signal.aborted) {\n      if (fetchControllers.get(key) === abortController) {\n        fetchControllers.delete(key);\n      }\n      return;\n    }\n    if (fetchersQueuedForDeletion.has(key)) {\n      if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n        updateFetcherState(key, getDoneFetcher(void 0));\n        return;\n      }\n    } else {\n      if (isRedirectResult(actionResult)) {\n        fetchControllers.delete(key);\n        if (pendingNavigationLoadId > originatingLoadId) {\n          updateFetcherState(key, getDoneFetcher(void 0));\n          return;\n        } else {\n          fetchRedirectIds.add(key);\n          updateFetcherState(key, getLoadingFetcher(submission));\n          return startRedirectNavigation(fetchRequest, actionResult, false, {\n            fetcherSubmission: submission,\n            preventScrollReset\n          });\n        }\n      }\n      if (isErrorResult(actionResult)) {\n        setFetcherError(key, routeId, actionResult.error);\n        return;\n      }\n    }\n    let nextLocation = state.navigation.location || state.location;\n    let revalidationRequest = createClientSideRequest(\n      init.history,\n      nextLocation,\n      abortController.signal\n    );\n    let routesToUse = dataRoutes.activeRoutes;\n    let matches = state.navigation.state !== \"idle\" ? matchRoutesImpl(\n      routesToUse,\n      state.navigation.location,\n      basename,\n      false,\n      dataRoutes.branches\n    ) : state.matches;\n    invariant(matches, \"Didn't find any matches after fetcher action\");\n    let loadId = ++incrementingLoadId;\n    fetchReloadIds.set(key, loadId);\n    let { dsMatches, revalidatingFetchers } = getMatchesToLoad(\n      revalidationRequest,\n      scopedContext,\n      mapRouteProperties2,\n      manifest,\n      init.history,\n      state,\n      matches,\n      submission,\n      nextLocation,\n      hydrationRouteProperties2,\n      false,\n      isRevalidationRequired,\n      cancelledFetcherLoads,\n      fetchersQueuedForDeletion,\n      fetchLoadMatches,\n      fetchRedirectIds,\n      routesToUse,\n      basename,\n      init.patchRoutesOnNavigation != null,\n      dataRoutes.branches,\n      [match.route.id, actionResult],\n      callSiteDefaultShouldRevalidate\n    );\n    let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n    let workingFetchers = new Map(state.fetchers);\n    workingFetchers.set(key, loadFetcher);\n    revalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => {\n      let staleKey = rf.key;\n      let existingFetcher2 = workingFetchers.get(staleKey);\n      let revalidatingFetcher = getLoadingFetcher(\n        void 0,\n        existingFetcher2 ? existingFetcher2.data : void 0\n      );\n      workingFetchers.set(staleKey, revalidatingFetcher);\n      abortFetcher(staleKey);\n      if (rf.controller) {\n        fetchControllers.set(staleKey, rf.controller);\n      }\n    });\n    updateState({ fetchers: workingFetchers });\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));\n    abortController.signal.addEventListener(\n      \"abort\",\n      abortPendingFetchRevalidations\n    );\n    let { loaderResults, fetcherResults } = await callLoadersAndMaybeResolveData(\n      dsMatches,\n      revalidatingFetchers,\n      revalidationRequest,\n      nextLocation,\n      scopedContext\n    );\n    if (abortController.signal.aborted) {\n      return;\n    }\n    abortController.signal.removeEventListener(\n      \"abort\",\n      abortPendingFetchRevalidations\n    );\n    fetchReloadIds.delete(key);\n    fetchControllers.delete(key);\n    revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));\n    let fetcherIsMounted = state.fetchers.has(key);\n    let getRedirectStateWithDoneFetcher = (s) => {\n      if (!fetcherIsMounted) return s;\n      let workingFetchers2 = new Map(s.fetchers);\n      workingFetchers2.set(key, getDoneFetcher(actionResult.data));\n      return { ...s, fetchers: workingFetchers2 };\n    };\n    let redirect2 = findRedirect(loaderResults);\n    if (redirect2) {\n      state = getRedirectStateWithDoneFetcher(state);\n      return startRedirectNavigation(\n        revalidationRequest,\n        redirect2.result,\n        false,\n        { preventScrollReset }\n      );\n    }\n    redirect2 = findRedirect(fetcherResults);\n    if (redirect2) {\n      fetchRedirectIds.add(redirect2.key);\n      state = getRedirectStateWithDoneFetcher(state);\n      return startRedirectNavigation(\n        revalidationRequest,\n        redirect2.result,\n        false,\n        { preventScrollReset }\n      );\n    }\n    let finalFetchers = new Map(state.fetchers);\n    if (fetcherIsMounted) {\n      finalFetchers.set(key, getDoneFetcher(actionResult.data));\n    }\n    let { loaderData, errors } = processLoaderData(\n      state,\n      matches,\n      loaderResults,\n      void 0,\n      revalidatingFetchers,\n      fetcherResults,\n      finalFetchers\n    );\n    abortStaleFetchLoads(loadId, finalFetchers);\n    if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n      invariant(pendingAction, \"Expected pending action\");\n      pendingNavigationController && pendingNavigationController.abort();\n      completeNavigation(state.navigation.location, {\n        matches,\n        loaderData,\n        errors,\n        fetchers: finalFetchers\n      });\n    } else {\n      updateState({\n        errors,\n        loaderData: mergeLoaderData(\n          state.loaderData,\n          loaderData,\n          matches,\n          errors\n        ),\n        fetchers: finalFetchers\n      });\n      isRevalidationRequired = false;\n    }\n  }\n  async function handleFetcherLoader(key, routeId, path, matches, scopedContext, isFogOfWar, flushSync, preventScrollReset, submission) {\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(\n      key,\n      getLoadingFetcher(\n        submission,\n        existingFetcher ? existingFetcher.data : void 0\n      ),\n      { flushSync }\n    );\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(\n      init.history,\n      path,\n      abortController.signal\n    );\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(\n        matches,\n        new URL(fetchRequest.url).pathname,\n        fetchRequest.signal,\n        key\n      );\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        setFetcherError(key, routeId, discoverResult.error, { flushSync });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(\n          key,\n          routeId,\n          getInternalRouterError(404, { pathname: path }),\n          { flushSync }\n        );\n        return;\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    let match = getTargetMatch(matches, path);\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let dsMatches = getTargetedDataStrategyMatches(\n      mapRouteProperties2,\n      manifest,\n      fetchRequest,\n      path,\n      matches,\n      match,\n      hydrationRouteProperties2,\n      scopedContext\n    );\n    let results = await callDataStrategy(\n      fetchRequest,\n      path,\n      dsMatches,\n      scopedContext,\n      key\n    );\n    let result = results[match.route.id];\n    if (!result) {\n      for (let match2 of matches) {\n        if (results[match2.route.id]) {\n          result = results[match2.route.id];\n          break;\n        }\n      }\n    }\n    if (fetchControllers.get(key) === abortController) {\n      fetchControllers.delete(key);\n    }\n    if (fetchRequest.signal.aborted) {\n      return;\n    }\n    if (fetchersQueuedForDeletion.has(key)) {\n      updateFetcherState(key, getDoneFetcher(void 0));\n      return;\n    }\n    if (isRedirectResult(result)) {\n      if (pendingNavigationLoadId > originatingLoadId) {\n        updateFetcherState(key, getDoneFetcher(void 0));\n        return;\n      } else {\n        fetchRedirectIds.add(key);\n        await startRedirectNavigation(fetchRequest, result, false, {\n          preventScrollReset\n        });\n        return;\n      }\n    }\n    if (isErrorResult(result)) {\n      setFetcherError(key, routeId, result.error);\n      return;\n    }\n    updateFetcherState(key, getDoneFetcher(result.data));\n  }\n  async function startRedirectNavigation(request, redirect2, isNavigation, {\n    submission,\n    fetcherSubmission,\n    preventScrollReset,\n    replace: replace2\n  } = {}) {\n    if (!isNavigation) {\n      pendingPopstateNavigationDfd?.resolve();\n      pendingPopstateNavigationDfd = null;\n    }\n    if (redirect2.response.headers.has(\"X-Remix-Revalidate\")) {\n      isRevalidationRequired = true;\n    }\n    let location = redirect2.response.headers.get(\"Location\");\n    invariant(location, \"Expected a Location header on the redirect Response\");\n    let originalLocation = location;\n    let currentUrl = new URL(request.url);\n    location = normalizeRedirectLocation(\n      location,\n      currentUrl,\n      basename,\n      init.history\n    );\n    validateNavigationTarget(\n      originalLocation,\n      location,\n      currentUrl,\n      \"allow-explicit\"\n    );\n    let redirectLocation = createLocation(state.location, location, {\n      _isRedirect: true\n    });\n    if (isBrowser3) {\n      let isDocumentReload = false;\n      if (redirect2.response.headers.has(\"X-Remix-Reload-Document\")) {\n        isDocumentReload = true;\n      } else if (isAbsoluteUrl(location)) {\n        const url = createBrowserURLImpl(routerWindow, location, true);\n        isDocumentReload = // Hard reload if it's an absolute URL to a new origin\n        url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename\n        stripBasename(url.pathname, basename) == null;\n      }\n      if (isDocumentReload) {\n        if (replace2) {\n          routerWindow.location.replace(location);\n        } else {\n          routerWindow.location.assign(location);\n        }\n        return;\n      }\n    }\n    pendingNavigationController = null;\n    let redirectNavigationType = replace2 === true || redirect2.response.headers.has(\"X-Remix-Replace\") ? \"REPLACE\" /* Replace */ : \"PUSH\" /* Push */;\n    let { formMethod, formAction, formEncType } = state.navigation;\n    if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n      submission = getSubmissionFromNavigation(state.navigation);\n    }\n    let activeSubmission = submission || fetcherSubmission;\n    if (redirectPreserveMethodStatusCodes.has(redirect2.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n      await startNavigation(redirectNavigationType, redirectLocation, {\n        submission: {\n          ...activeSubmission,\n          formAction: location\n        },\n        // Preserve these flags across redirects\n        preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n        enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n      });\n    } else {\n      let overrideNavigation = getLoadingNavigation(\n        redirectLocation,\n        [],\n        redirectNavigationType,\n        submission\n      );\n      await startNavigation(redirectNavigationType, redirectLocation, {\n        overrideNavigation,\n        // Send fetcher submissions through for shouldRevalidate\n        fetcherSubmission,\n        // Preserve these flags across redirects\n        preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n        enableViewTransition: isNavigation ? pendingViewTransitionEnabled : void 0\n      });\n    }\n  }\n  async function callDataStrategy(request, path, matches, scopedContext, fetcherKey) {\n    let results;\n    let dataResults = {};\n    try {\n      results = await callDataStrategyImpl(\n        dataStrategyImpl,\n        request,\n        path,\n        matches,\n        fetcherKey,\n        scopedContext,\n        false\n      );\n    } catch (e) {\n      matches.filter((m) => m.shouldLoad).forEach((m) => {\n        dataResults[m.route.id] = {\n          type: \"error\" /* error */,\n          error: e\n        };\n      });\n      return dataResults;\n    }\n    if (request.signal.aborted) {\n      return dataResults;\n    }\n    if (!isMutationMethod(request.method)) {\n      for (let match of matches) {\n        if (results[match.route.id]?.type === \"error\" /* error */) {\n          break;\n        }\n        if (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) {\n          results[match.route.id] = {\n            type: \"error\" /* error */,\n            result: new Error(\n              `No result returned from dataStrategy for route ${match.route.id}`\n            )\n          };\n        }\n      }\n    }\n    for (let [routeId, result] of Object.entries(results)) {\n      if (isRedirectDataStrategyResult(result)) {\n        let response = result.result;\n        dataResults[routeId] = {\n          type: \"redirect\" /* redirect */,\n          response: normalizeRelativeRoutingRedirectResponse(\n            response,\n            request,\n            routeId,\n            matches,\n            basename\n          )\n        };\n      } else {\n        dataResults[routeId] = await convertDataStrategyResultToDataResult(result);\n      }\n    }\n    return dataResults;\n  }\n  async function callLoadersAndMaybeResolveData(matches, fetchersToLoad, request, location, scopedContext) {\n    let loaderResultsPromise = callDataStrategy(\n      request,\n      location,\n      matches,\n      scopedContext,\n      null\n    );\n    let fetcherResultsPromise = Promise.all(\n      fetchersToLoad.map(async (f) => {\n        if (f.matches && f.match && f.request && f.controller) {\n          let results = await callDataStrategy(\n            f.request,\n            f.path,\n            f.matches,\n            scopedContext,\n            f.key\n          );\n          let result = results[f.match.route.id];\n          return { [f.key]: result };\n        } else {\n          return Promise.resolve({\n            [f.key]: {\n              type: \"error\" /* error */,\n              error: getInternalRouterError(404, {\n                pathname: f.path\n              })\n            }\n          });\n        }\n      })\n    );\n    let loaderResults = await loaderResultsPromise;\n    let fetcherResults = (await fetcherResultsPromise).reduce(\n      (acc, r) => Object.assign(acc, r),\n      {}\n    );\n    return {\n      loaderResults,\n      fetcherResults\n    };\n  }\n  function interruptActiveLoads() {\n    isRevalidationRequired = true;\n    fetchLoadMatches.forEach((_, key) => {\n      if (fetchControllers.has(key)) {\n        cancelledFetcherLoads.add(key);\n      }\n      abortFetcher(key);\n    });\n  }\n  function updateFetcherState(key, fetcher, opts = {}) {\n    let workingFetchers = new Map(state.fetchers);\n    workingFetchers.set(key, fetcher);\n    updateState(\n      { fetchers: workingFetchers },\n      { flushSync: (opts && opts.flushSync) === true }\n    );\n  }\n  function setFetcherError(key, routeId, error, opts = {}) {\n    let boundaryMatch = findNearestBoundary(state.matches, routeId);\n    let workingFetchers = new Map(state.fetchers);\n    deleteFetcher(workingFetchers, key);\n    updateState(\n      {\n        errors: {\n          [boundaryMatch.route.id]: error\n        },\n        fetchers: workingFetchers\n      },\n      { flushSync: (opts && opts.flushSync) === true }\n    );\n  }\n  function getFetcher(key) {\n    activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n    if (fetchersQueuedForDeletion.has(key)) {\n      fetchersQueuedForDeletion.delete(key);\n    }\n    return state.fetchers.get(key) || IDLE_FETCHER;\n  }\n  function resetFetcher(key, opts) {\n    abortFetcher(key, opts?.reason);\n    updateFetcherState(key, getDoneFetcher(null));\n  }\n  function deleteFetcher(fetchers, key) {\n    let fetcher = state.fetchers.get(key);\n    if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n      abortFetcher(key);\n    }\n    fetchLoadMatches.delete(key);\n    fetchReloadIds.delete(key);\n    fetchRedirectIds.delete(key);\n    fetchersQueuedForDeletion.delete(key);\n    cancelledFetcherLoads.delete(key);\n    fetchers.delete(key);\n  }\n  function queueFetcherForDeletion(key) {\n    let count = (activeFetchers.get(key) || 0) - 1;\n    if (count <= 0) {\n      activeFetchers.delete(key);\n      fetchersQueuedForDeletion.add(key);\n    } else {\n      activeFetchers.set(key, count);\n    }\n    updateState({ fetchers: new Map(state.fetchers) });\n  }\n  function abortFetcher(key, reason) {\n    let controller = fetchControllers.get(key);\n    if (controller) {\n      controller.abort(reason);\n      fetchControllers.delete(key);\n    }\n  }\n  function markFetchersDone(keys, fetchers) {\n    for (let key of keys) {\n      let fetcher = fetchers.get(key);\n      invariant(fetcher, `Expected fetcher: ${key}`);\n      let doneFetcher = getDoneFetcher(fetcher.data);\n      fetchers.set(key, doneFetcher);\n    }\n  }\n  function markFetchRedirectsDone(fetchers) {\n    let doneKeys = [];\n    let didUpdateFetchers = false;\n    for (let key of fetchRedirectIds) {\n      let fetcher = fetchers.get(key);\n      invariant(fetcher, `Expected fetcher: ${key}`);\n      if (fetcher.state === \"loading\") {\n        fetchRedirectIds.delete(key);\n        doneKeys.push(key);\n        didUpdateFetchers = true;\n      }\n    }\n    markFetchersDone(doneKeys, fetchers);\n    return didUpdateFetchers;\n  }\n  function abortStaleFetchLoads(landedId, fetchers) {\n    let yeetedKeys = [];\n    for (let [key, id] of fetchReloadIds) {\n      if (id < landedId) {\n        let fetcher = fetchers.get(key);\n        invariant(fetcher, `Expected fetcher: ${key}`);\n        if (fetcher.state === \"loading\") {\n          abortFetcher(key);\n          fetchReloadIds.delete(key);\n          yeetedKeys.push(key);\n        }\n      }\n    }\n    markFetchersDone(yeetedKeys, fetchers);\n    return yeetedKeys.length > 0;\n  }\n  function getBlocker(key, fn) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    if (blockerFunctions.get(key) !== fn) {\n      blockerFunctions.set(key, fn);\n    }\n    return blocker;\n  }\n  function deleteBlocker(key) {\n    state.blockers.delete(key);\n    blockerFunctions.delete(key);\n  }\n  function updateBlocker(key, newBlocker) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    invariant(\n      blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\",\n      `Invalid blocker state transition: ${blocker.state} -> ${newBlocker.state}`\n    );\n    let blockers = new Map(state.blockers);\n    blockers.set(key, newBlocker);\n    updateState({ blockers });\n  }\n  function shouldBlockNavigation({\n    currentLocation,\n    nextLocation,\n    historyAction\n  }) {\n    if (blockerFunctions.size === 0) {\n      return;\n    }\n    if (blockerFunctions.size > 1) {\n      warning(false, \"A router only supports one blocker at a time\");\n    }\n    let entries = Array.from(blockerFunctions.entries());\n    let [blockerKey, blockerFunction] = entries[entries.length - 1];\n    let blocker = state.blockers.get(blockerKey);\n    if (blocker && blocker.state === \"proceeding\") {\n      return;\n    }\n    if (blockerFunction({ currentLocation, nextLocation, historyAction })) {\n      return blockerKey;\n    }\n  }\n  function handleNavigational404(pathname) {\n    let error = getInternalRouterError(404, { pathname });\n    let routesToUse = dataRoutes.activeRoutes;\n    let { matches, route } = getShortCircuitMatches(routesToUse);\n    return { notFoundMatches: matches, route, error };\n  }\n  function enableScrollRestoration(positions, getPosition, getKey) {\n    savedScrollPositions2 = positions;\n    getScrollPosition = getPosition;\n    getScrollRestorationKey2 = getKey || null;\n    if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n      initialScrollRestored = true;\n      let y = getSavedScrollPosition(state.location, state.matches);\n      if (y != null) {\n        updateState({ restoreScrollPosition: y });\n      }\n    }\n    return () => {\n      savedScrollPositions2 = null;\n      getScrollPosition = null;\n      getScrollRestorationKey2 = null;\n    };\n  }\n  function getScrollKey(location, matches) {\n    if (getScrollRestorationKey2) {\n      let key = getScrollRestorationKey2(\n        location,\n        matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))\n      );\n      return key || location.key;\n    }\n    return location.key;\n  }\n  function saveScrollPosition(location, matches) {\n    if (savedScrollPositions2 && getScrollPosition) {\n      let key = getScrollKey(location, matches);\n      savedScrollPositions2[key] = getScrollPosition();\n    }\n  }\n  function getSavedScrollPosition(location, matches) {\n    if (savedScrollPositions2) {\n      let key = getScrollKey(location, matches);\n      let y = savedScrollPositions2[key];\n      if (typeof y === \"number\") {\n        return y;\n      }\n    }\n    return null;\n  }\n  function checkFogOfWar(matches, routesToUse, pathname) {\n    if (init.patchRoutesOnNavigation) {\n      let activeBranches = dataRoutes.branches;\n      if (!matches) {\n        let fogMatches = matchRoutesImpl(\n          routesToUse,\n          pathname,\n          basename,\n          true,\n          activeBranches\n        );\n        return { active: true, matches: fogMatches || [] };\n      } else {\n        if (Object.keys(matches[0].params).length > 0) {\n          let partialMatches = matchRoutesImpl(\n            routesToUse,\n            pathname,\n            basename,\n            true,\n            activeBranches\n          );\n          return { active: true, matches: partialMatches };\n        }\n      }\n    }\n    return { active: false, matches: null };\n  }\n  async function discoverRoutes(matches, pathname, signal, fetcherKey) {\n    if (!init.patchRoutesOnNavigation) {\n      return { type: \"success\", matches };\n    }\n    let partialMatches = matches;\n    while (true) {\n      let localManifest = manifest;\n      try {\n        await init.patchRoutesOnNavigation({\n          signal,\n          path: pathname,\n          matches: partialMatches,\n          fetcherKey,\n          patch: (routeId, children) => {\n            if (signal.aborted) return;\n            patchRoutesImpl(\n              routeId,\n              children,\n              dataRoutes,\n              localManifest,\n              mapRouteProperties2,\n              false\n            );\n          }\n        });\n      } catch (e) {\n        return { type: \"error\", error: e, partialMatches };\n      }\n      if (signal.aborted) {\n        return { type: \"aborted\" };\n      }\n      let activeBranches = dataRoutes.branches;\n      let newMatches = matchRoutesImpl(\n        dataRoutes.activeRoutes,\n        pathname,\n        basename,\n        false,\n        activeBranches\n      );\n      let newPartialMatches = null;\n      if (newMatches) {\n        if (Object.keys(newMatches[0].params).length === 0) {\n          return { type: \"success\", matches: newMatches };\n        } else {\n          newPartialMatches = matchRoutesImpl(\n            dataRoutes.activeRoutes,\n            pathname,\n            basename,\n            true,\n            activeBranches\n          );\n          let matchedDeeper = newPartialMatches && partialMatches.length < newPartialMatches.length && compareMatches(\n            partialMatches,\n            newPartialMatches.slice(0, partialMatches.length)\n          );\n          if (!matchedDeeper) {\n            return { type: \"success\", matches: newMatches };\n          }\n        }\n      }\n      if (!newPartialMatches) {\n        newPartialMatches = matchRoutesImpl(\n          dataRoutes.activeRoutes,\n          pathname,\n          basename,\n          true,\n          activeBranches\n        );\n      }\n      if (!newPartialMatches || compareMatches(partialMatches, newPartialMatches)) {\n        return { type: \"success\", matches: null };\n      }\n      partialMatches = newPartialMatches;\n    }\n  }\n  function compareMatches(a, b) {\n    return a.length === b.length && a.every((m, i) => m.route.id === b[i].route.id);\n  }\n  function _internalSetRoutes(newRoutes) {\n    manifest = {};\n    dataRoutes.setHmrRoutes(\n      convertRoutesToDataRoutes(\n        newRoutes,\n        mapRouteProperties2,\n        void 0,\n        manifest\n      )\n    );\n  }\n  function patchRoutes(routeId, children, unstable_allowElementMutations = false) {\n    patchRoutesImpl(\n      routeId,\n      children,\n      dataRoutes,\n      manifest,\n      mapRouteProperties2,\n      unstable_allowElementMutations\n    );\n    if (!dataRoutes.hasHMRRoutes) {\n      updateState({});\n    }\n  }\n  router = {\n    get basename() {\n      return basename;\n    },\n    get future() {\n      return future;\n    },\n    get state() {\n      return state;\n    },\n    get routes() {\n      return dataRoutes.stableRoutes;\n    },\n    get branches() {\n      return dataRoutes.branches;\n    },\n    get manifest() {\n      return manifest;\n    },\n    get window() {\n      return routerWindow;\n    },\n    initialize,\n    subscribe,\n    enableScrollRestoration,\n    navigate,\n    fetch: fetch2,\n    revalidate,\n    // Passthrough to history-aware createHref used by useHref so we get proper\n    // hash-aware URLs in DOM paths\n    createHref: (to) => init.history.createHref(to),\n    createURL: (to) => init.history.createURL(to),\n    encodeLocation: (to) => init.history.encodeLocation(to),\n    getFetcher,\n    resetFetcher,\n    deleteFetcher: queueFetcherForDeletion,\n    dispose,\n    getBlocker,\n    deleteBlocker,\n    patchRoutes,\n    _internalFetchControllers: fetchControllers,\n    // TODO: Remove setRoutes, it's temporary to avoid dealing with\n    // updating the tree while validating the update algorithm.\n    _internalSetRoutes,\n    _internalSetStateDoNotUseOrYouWillBreakYourApp(newState) {\n      updateState(newState);\n    }\n  };\n  if (init.instrumentations) {\n    router = instrumentClientSideRouter(\n      router,\n      init.instrumentations.map((i) => i.router).filter(Boolean)\n    );\n  }\n  return router;\n}\nfunction createStaticHandler(routes, opts) {\n  invariant(\n    routes.length > 0,\n    \"You must provide a non-empty routes array to createStaticHandler\"\n  );\n  let manifest = {};\n  let basename = (opts ? opts.basename : null) || \"/\";\n  let _mapRouteProperties = opts?.mapRouteProperties || defaultMapRouteProperties;\n  let mapRouteProperties2 = _mapRouteProperties;\n  let future = {\n    ...opts?.future\n  };\n  if (opts?.instrumentations) {\n    let instrumentations = opts.instrumentations;\n    mapRouteProperties2 = (route) => {\n      return {\n        ..._mapRouteProperties(route),\n        ...getRouteInstrumentationUpdates(\n          instrumentations.map((i) => i.route).filter(Boolean),\n          route\n        )\n      };\n    };\n  }\n  let dataRoutes = convertRoutesToDataRoutes(\n    routes,\n    mapRouteProperties2,\n    void 0,\n    manifest\n  );\n  let routeBranches = flattenAndRankRoutes(dataRoutes);\n  let matchCost = routeBranches.reduce(\n    (total, branch) => total + branch.routesMeta.length,\n    0\n  );\n  async function query(request, {\n    requestContext,\n    filterMatchesToLoad,\n    skipLoaderErrorBubbling,\n    skipRevalidation,\n    dataStrategy,\n    generateMiddlewareResponse,\n    normalizePath\n  } = {}) {\n    let normalizePathImpl = normalizePath || defaultNormalizePath;\n    let method = request.method;\n    let location = createLocation(\n      \"\",\n      normalizePathImpl(request),\n      null,\n      \"default\"\n    );\n    let matches = matchRoutesImpl(\n      dataRoutes,\n      location,\n      basename,\n      false,\n      routeBranches\n    );\n    requestContext = requestContext != null ? requestContext : new RouterContextProvider();\n    if (!isValidMethod(method) && method !== \"HEAD\") {\n      let error = getInternalRouterError(405, { method });\n      let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);\n      let staticContext = {\n        basename,\n        location,\n        matches: methodNotAllowedMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {}\n      };\n      return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n    } else if (!matches) {\n      let error = getInternalRouterError(404, { pathname: location.pathname });\n      let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes);\n      let staticContext = {\n        basename,\n        location,\n        matches: notFoundMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {}\n      };\n      return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;\n    }\n    if (generateMiddlewareResponse) {\n      invariant(\n        requestContext instanceof RouterContextProvider,\n        \"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`\"\n      );\n      try {\n        await loadLazyMiddlewareForMatches(\n          matches,\n          manifest,\n          mapRouteProperties2\n        );\n        let renderedStaticContext;\n        let response = await runServerMiddlewarePipeline(\n          {\n            request,\n            url: createDataFunctionUrl(request, location),\n            pattern: getRoutePattern(matches),\n            matches,\n            params: matches[0].params,\n            // If we're calling middleware then it must be enabled so we can cast\n            // this to the proper type knowing it's not an `AppLoadContext`\n            context: requestContext\n          },\n          async () => {\n            let res = await generateMiddlewareResponse(\n              async (revalidationRequest, opts2 = {}) => {\n                let result2 = await queryImpl(\n                  revalidationRequest,\n                  location,\n                  matches,\n                  requestContext,\n                  dataStrategy || null,\n                  skipLoaderErrorBubbling === true,\n                  null,\n                  \"filterMatchesToLoad\" in opts2 ? opts2.filterMatchesToLoad ?? null : filterMatchesToLoad ?? null,\n                  skipRevalidation === true\n                );\n                if (isResponse(result2)) {\n                  return result2;\n                }\n                renderedStaticContext = { location, basename, ...result2 };\n                return renderedStaticContext;\n              }\n            );\n            return res;\n          },\n          async (error, routeId) => {\n            if (isRedirectResponse(error)) {\n              return error;\n            }\n            if (isResponse(error)) {\n              try {\n                error = new ErrorResponseImpl(\n                  error.status,\n                  error.statusText,\n                  await parseResponseBody(error)\n                );\n              } catch (e) {\n                error = e;\n              }\n            }\n            if (isDataWithResponseInit(error)) {\n              error = dataWithResponseInitToErrorResponse(error);\n            }\n            if (renderedStaticContext) {\n              if (routeId in renderedStaticContext.loaderData) {\n                renderedStaticContext.loaderData[routeId] = void 0;\n              }\n              let staticContext = getStaticContextFromError(\n                dataRoutes,\n                renderedStaticContext,\n                error,\n                skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, routeId).route.id\n              );\n              return generateMiddlewareResponse(\n                () => Promise.resolve(staticContext)\n              );\n            } else {\n              let boundaryRouteId = skipLoaderErrorBubbling ? routeId : findNearestBoundary(\n                matches,\n                matches.find(\n                  (m) => m.route.id === routeId || m.route.loader\n                )?.route.id || routeId\n              ).route.id;\n              let staticContext = {\n                matches,\n                location,\n                basename,\n                loaderData: {},\n                actionData: null,\n                errors: {\n                  [boundaryRouteId]: error\n                },\n                statusCode: isRouteErrorResponse(error) ? error.status : 500,\n                actionHeaders: {},\n                loaderHeaders: {}\n              };\n              return generateMiddlewareResponse(\n                () => Promise.resolve(staticContext)\n              );\n            }\n          }\n        );\n        invariant(isResponse(response), \"Expected a response in query()\");\n        return response;\n      } catch (e) {\n        if (isResponse(e)) {\n          return e;\n        }\n        throw e;\n      }\n    }\n    let result = await queryImpl(\n      request,\n      location,\n      matches,\n      requestContext,\n      dataStrategy || null,\n      skipLoaderErrorBubbling === true,\n      null,\n      filterMatchesToLoad || null,\n      skipRevalidation === true\n    );\n    if (isResponse(result)) {\n      return result;\n    }\n    return { location, basename, ...result };\n  }\n  async function queryRoute(request, {\n    routeId,\n    requestContext,\n    dataStrategy,\n    generateMiddlewareResponse,\n    normalizePath\n  } = {}) {\n    let normalizePathImpl = normalizePath || defaultNormalizePath;\n    let method = request.method;\n    let location = createLocation(\n      \"\",\n      normalizePathImpl(request),\n      null,\n      \"default\"\n    );\n    let matches = matchRoutesImpl(\n      dataRoutes,\n      location,\n      basename,\n      false,\n      routeBranches\n    );\n    requestContext = requestContext != null ? requestContext : new RouterContextProvider();\n    if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n      throw getInternalRouterError(405, { method });\n    } else if (!matches) {\n      throw getInternalRouterError(404, { pathname: location.pathname });\n    }\n    let match = routeId ? matches.find((m) => m.route.id === routeId) : getTargetMatch(matches, location);\n    if (routeId && !match) {\n      throw getInternalRouterError(403, {\n        pathname: location.pathname,\n        routeId\n      });\n    } else if (!match) {\n      throw getInternalRouterError(404, { pathname: location.pathname });\n    }\n    if (generateMiddlewareResponse) {\n      invariant(\n        requestContext instanceof RouterContextProvider,\n        \"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`\"\n      );\n      await loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2);\n      let response = await runServerMiddlewarePipeline(\n        {\n          request,\n          url: createDataFunctionUrl(request, location),\n          pattern: getRoutePattern(matches),\n          matches,\n          params: matches[0].params,\n          // If we're calling middleware then it must be enabled so we can cast\n          // this to the proper type knowing it's not an `AppLoadContext`\n          context: requestContext\n        },\n        async () => {\n          let res = await generateMiddlewareResponse(\n            async (innerRequest) => {\n              let result2 = await queryImpl(\n                innerRequest,\n                location,\n                matches,\n                requestContext,\n                dataStrategy || null,\n                false,\n                match,\n                null,\n                false\n              );\n              let processed = handleQueryResult(result2);\n              return isResponse(processed) ? processed : typeof processed === \"string\" ? new Response(processed) : Response.json(processed);\n            }\n          );\n          return res;\n        },\n        (error) => {\n          if (isDataWithResponseInit(error)) {\n            return Promise.resolve(dataWithResponseInitToResponse(error));\n          }\n          if (isResponse(error)) {\n            return Promise.resolve(error);\n          }\n          throw error;\n        }\n      );\n      return response;\n    }\n    let result = await queryImpl(\n      request,\n      location,\n      matches,\n      requestContext,\n      dataStrategy || null,\n      false,\n      match,\n      null,\n      false\n    );\n    return handleQueryResult(result);\n    function handleQueryResult(result2) {\n      if (isResponse(result2)) {\n        return result2;\n      }\n      let error = result2.errors ? Object.values(result2.errors)[0] : void 0;\n      if (error !== void 0) {\n        throw error;\n      }\n      if (result2.actionData) {\n        return Object.values(result2.actionData)[0];\n      }\n      if (result2.loaderData) {\n        return Object.values(result2.loaderData)[0];\n      }\n      return void 0;\n    }\n  }\n  async function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {\n    invariant(\n      request.signal,\n      \"query()/queryRoute() requests must contain an AbortController signal\"\n    );\n    try {\n      if (isMutationMethod(request.method)) {\n        let result2 = await submit(\n          request,\n          location,\n          matches,\n          routeMatch || getTargetMatch(matches, location),\n          requestContext,\n          dataStrategy,\n          skipLoaderErrorBubbling,\n          routeMatch != null,\n          filterMatchesToLoad,\n          skipRevalidation\n        );\n        return result2;\n      }\n      let result = await loadRouteData(\n        request,\n        location,\n        matches,\n        requestContext,\n        dataStrategy,\n        skipLoaderErrorBubbling,\n        routeMatch,\n        filterMatchesToLoad\n      );\n      return isResponse(result) ? result : {\n        ...result,\n        actionData: null,\n        actionHeaders: {}\n      };\n    } catch (e) {\n      if (isDataStrategyResult(e) && isResponse(e.result)) {\n        if (e.type === \"error\" /* error */) {\n          throw e.result;\n        }\n        return e.result;\n      }\n      if (isRedirectResponse(e)) {\n        return e;\n      }\n      throw e;\n    }\n  }\n  async function submit(request, location, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) {\n    let result;\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      let error = getInternalRouterError(405, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: actionMatch.route.id\n      });\n      if (isRouteRequest) {\n        throw error;\n      }\n      result = {\n        type: \"error\" /* error */,\n        error\n      };\n    } else {\n      let dsMatches = getTargetedDataStrategyMatches(\n        mapRouteProperties2,\n        manifest,\n        request,\n        location,\n        matches,\n        actionMatch,\n        [],\n        requestContext\n      );\n      let results = await callDataStrategy(\n        request,\n        location,\n        dsMatches,\n        isRouteRequest,\n        requestContext,\n        dataStrategy\n      );\n      result = results[actionMatch.route.id];\n      if (request.signal.aborted) {\n        throwStaticHandlerAbortedError(request, isRouteRequest);\n      }\n    }\n    if (isRedirectResult(result)) {\n      throw new Response(null, {\n        status: result.response.status,\n        headers: {\n          Location: result.response.headers.get(\"Location\")\n        }\n      });\n    }\n    if (isRouteRequest) {\n      if (isErrorResult(result)) {\n        throw result.error;\n      }\n      return {\n        matches: [actionMatch],\n        loaderData: {},\n        actionData: { [actionMatch.route.id]: result.data },\n        errors: null,\n        // Note: statusCode + headers are unused here since queryRoute will\n        // return the raw Response or value\n        statusCode: 200,\n        loaderHeaders: {},\n        actionHeaders: {}\n      };\n    }\n    if (skipRevalidation) {\n      if (isErrorResult(result)) {\n        let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n        return {\n          statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n          actionData: null,\n          actionHeaders: {\n            ...result.headers ? { [actionMatch.route.id]: result.headers } : {}\n          },\n          matches,\n          loaderData: {},\n          errors: {\n            [boundaryMatch.route.id]: result.error\n          },\n          loaderHeaders: {}\n        };\n      } else {\n        return {\n          actionData: {\n            [actionMatch.route.id]: result.data\n          },\n          actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {},\n          matches,\n          loaderData: {},\n          errors: null,\n          statusCode: result.statusCode || 200,\n          loaderHeaders: {}\n        };\n      }\n    }\n    let loaderRequest = new Request(request.url, {\n      headers: request.headers,\n      redirect: request.redirect,\n      signal: request.signal\n    });\n    if (isErrorResult(result)) {\n      let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n      let handlerContext2 = await loadRouteData(\n        loaderRequest,\n        location,\n        matches,\n        requestContext,\n        dataStrategy,\n        skipLoaderErrorBubbling,\n        null,\n        filterMatchesToLoad,\n        [boundaryMatch.route.id, result]\n      );\n      return {\n        ...handlerContext2,\n        statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n        actionData: null,\n        actionHeaders: {\n          ...result.headers ? { [actionMatch.route.id]: result.headers } : {}\n        }\n      };\n    }\n    let handlerContext = await loadRouteData(\n      loaderRequest,\n      location,\n      matches,\n      requestContext,\n      dataStrategy,\n      skipLoaderErrorBubbling,\n      null,\n      filterMatchesToLoad\n    );\n    return {\n      ...handlerContext,\n      actionData: {\n        [actionMatch.route.id]: result.data\n      },\n      // action status codes take precedence over loader status codes\n      ...result.statusCode ? { statusCode: result.statusCode } : {},\n      actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}\n    };\n  }\n  async function loadRouteData(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {\n    let isRouteRequest = routeMatch != null;\n    if (isRouteRequest && !routeMatch?.route.loader && !routeMatch?.route.lazy) {\n      throw getInternalRouterError(400, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: routeMatch?.route.id\n      });\n    }\n    let dsMatches;\n    if (routeMatch) {\n      dsMatches = getTargetedDataStrategyMatches(\n        mapRouteProperties2,\n        manifest,\n        request,\n        location,\n        matches,\n        routeMatch,\n        [],\n        requestContext\n      );\n    } else {\n      let maxIdx = pendingActionResult && isErrorResult(pendingActionResult[1]) ? (\n        // Up to but not including the boundary\n        matches.findIndex((m) => m.route.id === pendingActionResult[0]) - 1\n      ) : void 0;\n      let pattern = getRoutePattern(matches);\n      dsMatches = matches.map((match, index) => {\n        if (maxIdx != null && index > maxIdx) {\n          return getDataStrategyMatch(\n            mapRouteProperties2,\n            manifest,\n            request,\n            location,\n            pattern,\n            match,\n            [],\n            requestContext,\n            false\n          );\n        }\n        return getDataStrategyMatch(\n          mapRouteProperties2,\n          manifest,\n          request,\n          location,\n          pattern,\n          match,\n          [],\n          requestContext,\n          (match.route.loader || match.route.lazy) != null && (!filterMatchesToLoad || filterMatchesToLoad(match))\n        );\n      });\n    }\n    if (!dataStrategy && !dsMatches.some((m) => m.shouldLoad)) {\n      return {\n        matches,\n        loaderData: {},\n        errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n          [pendingActionResult[0]]: pendingActionResult[1].error\n        } : null,\n        statusCode: 200,\n        loaderHeaders: {}\n      };\n    }\n    let results = await callDataStrategy(\n      request,\n      location,\n      dsMatches,\n      isRouteRequest,\n      requestContext,\n      dataStrategy\n    );\n    if (request.signal.aborted) {\n      throwStaticHandlerAbortedError(request, isRouteRequest);\n    }\n    let handlerContext = processRouteLoaderData(\n      matches,\n      results,\n      pendingActionResult,\n      true,\n      skipLoaderErrorBubbling\n    );\n    return {\n      ...handlerContext,\n      matches\n    };\n  }\n  async function callDataStrategy(request, location, matches, isRouteRequest, requestContext, dataStrategy) {\n    let results = await callDataStrategyImpl(\n      dataStrategy || defaultDataStrategy,\n      request,\n      location,\n      matches,\n      null,\n      requestContext,\n      true\n    );\n    let dataResults = {};\n    await Promise.all(\n      matches.map(async (match) => {\n        if (!(match.route.id in results)) {\n          return;\n        }\n        let result = results[match.route.id];\n        if (isRedirectDataStrategyResult(result)) {\n          let response = result.result;\n          throw normalizeRelativeRoutingRedirectResponse(\n            response,\n            request,\n            match.route.id,\n            matches,\n            basename\n          );\n        }\n        if (isRouteRequest) {\n          if (isResponse(result.result)) {\n            throw result;\n          } else if (isDataWithResponseInit(result.result)) {\n            throw dataWithResponseInitToResponse(result.result);\n          }\n        }\n        dataResults[match.route.id] = await convertDataStrategyResultToDataResult(result);\n      })\n    );\n    return dataResults;\n  }\n  return {\n    dataRoutes,\n    _matchCost: matchCost,\n    _internalRouteBranches: routeBranches,\n    query,\n    queryRoute\n  };\n}\nfunction getStaticContextFromError(routes, handlerContext, error, boundaryId) {\n  let errorBoundaryId = boundaryId || handlerContext._deepestRenderedBoundaryId || routes[0].id;\n  return {\n    ...handlerContext,\n    statusCode: isRouteErrorResponse(error) ? error.status : 500,\n    errors: {\n      [errorBoundaryId]: error\n    }\n  };\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest) {\n  if (request.signal.reason !== void 0) {\n    throw request.signal.reason;\n  }\n  let method = isRouteRequest ? \"queryRoute\" : \"query\";\n  throw new Error(\n    `${method}() call aborted without an \\`AbortSignal.reason\\`: ${request.method} ${request.url}`\n  );\n}\nfunction isSubmissionNavigation(opts) {\n  return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== void 0);\n}\nfunction defaultNormalizePath(request) {\n  let url = new URL(request.url);\n  return {\n    pathname: url.pathname,\n    search: url.search,\n    hash: url.hash\n  };\n}\nfunction normalizeTo(location, matches, basename, to, fromRouteId, relative) {\n  let contextualMatches;\n  let activeRouteMatch;\n  if (fromRouteId) {\n    contextualMatches = [];\n    for (let match of matches) {\n      contextualMatches.push(match);\n      if (match.route.id === fromRouteId) {\n        activeRouteMatch = match;\n        break;\n      }\n    }\n  } else {\n    contextualMatches = matches;\n    activeRouteMatch = matches[matches.length - 1];\n  }\n  let path = resolveTo(\n    to ? to : \".\",\n    getResolveToMatches(contextualMatches),\n    stripBasename(location.pathname, basename) || location.pathname,\n    relative === \"path\"\n  );\n  if (to == null) {\n    path.search = location.search;\n    path.hash = location.hash;\n  }\n  if ((to == null || to === \"\" || to === \".\") && activeRouteMatch) {\n    let nakedIndex = hasNakedIndexQuery(path.search);\n    if (activeRouteMatch.route.index && !nakedIndex) {\n      path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n    } else if (!activeRouteMatch.route.index && nakedIndex) {\n      let params = new URLSearchParams(path.search);\n      let indexValues = params.getAll(\"index\");\n      params.delete(\"index\");\n      indexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n      let qs = params.toString();\n      path.search = qs ? `?${qs}` : \"\";\n    }\n  }\n  if (basename !== \"/\") {\n    path.pathname = prependBasename({ basename, pathname: path.pathname });\n  }\n  return createPath(path);\n}\nfunction normalizeNavigateOptions(isFetcher, path, opts) {\n  if (!opts || !isSubmissionNavigation(opts)) {\n    return { path };\n  }\n  if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n    return {\n      path,\n      error: getInternalRouterError(405, { method: opts.formMethod })\n    };\n  }\n  let getInvalidBodyError = () => ({\n    path,\n    error: getInternalRouterError(400, { type: \"invalid-body\" })\n  });\n  let rawFormMethod = opts.formMethod || \"get\";\n  let formMethod = rawFormMethod.toUpperCase();\n  let formAction = stripHashFromPath(path);\n  if (opts.body !== void 0) {\n    if (opts.formEncType === \"text/plain\") {\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? (\n        // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n        Array.from(opts.body.entries()).reduce(\n          (acc, [name, value]) => `${acc}${name}=${value}\n`,\n          \"\"\n        )\n      ) : String(opts.body);\n      return {\n        path,\n        submission: {\n          formMethod,\n          formAction,\n          formEncType: opts.formEncType,\n          formData: void 0,\n          json: void 0,\n          text\n        }\n      };\n    } else if (opts.formEncType === \"application/json\") {\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      try {\n        let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n        return {\n          path,\n          submission: {\n            formMethod,\n            formAction,\n            formEncType: opts.formEncType,\n            formData: void 0,\n            json,\n            text: void 0\n          }\n        };\n      } catch (e) {\n        return getInvalidBodyError();\n      }\n    }\n  }\n  invariant(\n    typeof FormData === \"function\",\n    \"FormData is not available in this environment\"\n  );\n  let searchParams;\n  let formData;\n  if (opts.formData) {\n    searchParams = convertFormDataToSearchParams(opts.formData);\n    formData = opts.formData;\n  } else if (opts.body instanceof FormData) {\n    searchParams = convertFormDataToSearchParams(opts.body);\n    formData = opts.body;\n  } else if (opts.body instanceof URLSearchParams) {\n    searchParams = opts.body;\n    formData = convertSearchParamsToFormData(searchParams);\n  } else if (opts.body == null) {\n    searchParams = new URLSearchParams();\n    formData = new FormData();\n  } else {\n    try {\n      searchParams = new URLSearchParams(opts.body);\n      formData = convertSearchParamsToFormData(searchParams);\n    } catch (e) {\n      return getInvalidBodyError();\n    }\n  }\n  let submission = {\n    formMethod,\n    formAction,\n    formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n    formData,\n    json: void 0,\n    text: void 0\n  };\n  if (isMutationMethod(submission.formMethod)) {\n    return { path, submission };\n  }\n  let parsedPath = parsePath(path);\n  if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n    searchParams.append(\"index\", \"\");\n  }\n  parsedPath.search = `?${searchParams}`;\n  return { path: createPath(parsedPath), submission };\n}\nfunction getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, branches, pendingActionResult, callSiteDefaultShouldRevalidate) {\n  let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;\n  let currentUrl = history.createURL(state.location);\n  let nextUrl = history.createURL(location);\n  let maxIdx;\n  if (initialHydration && state.errors) {\n    let boundaryId = Object.keys(state.errors)[0];\n    maxIdx = matches.findIndex((m) => m.route.id === boundaryId);\n  } else if (pendingActionResult && isErrorResult(pendingActionResult[1])) {\n    let boundaryId = pendingActionResult[0];\n    maxIdx = matches.findIndex((m) => m.route.id === boundaryId) - 1;\n  }\n  let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : void 0;\n  let shouldSkipRevalidation = actionStatus && actionStatus >= 400;\n  let baseShouldRevalidateArgs = {\n    currentUrl,\n    currentParams: state.matches[0]?.params || {},\n    nextUrl,\n    nextParams: matches[0].params,\n    ...submission,\n    actionResult,\n    actionStatus\n  };\n  let pattern = getRoutePattern(matches);\n  let dsMatches = matches.map((match, index) => {\n    let { route } = match;\n    let forceShouldLoad = null;\n    if (maxIdx != null && index > maxIdx) {\n      forceShouldLoad = false;\n    } else if (route.lazy) {\n      forceShouldLoad = true;\n    } else if (!routeHasLoaderOrMiddleware(route)) {\n      forceShouldLoad = false;\n    } else if (initialHydration) {\n      let { shouldLoad: shouldLoad2 } = getRouteHydrationStatus(\n        route,\n        state.loaderData,\n        state.errors\n      );\n      forceShouldLoad = shouldLoad2;\n    } else if (isNewLoader(state.loaderData, state.matches[index], match)) {\n      forceShouldLoad = true;\n    }\n    if (forceShouldLoad !== null) {\n      return getDataStrategyMatch(\n        mapRouteProperties2,\n        manifest,\n        request,\n        location,\n        pattern,\n        match,\n        lazyRoutePropertiesToSkip,\n        scopedContext,\n        forceShouldLoad\n      );\n    }\n    let defaultShouldRevalidate = false;\n    if (typeof callSiteDefaultShouldRevalidate === \"boolean\") {\n      defaultShouldRevalidate = callSiteDefaultShouldRevalidate;\n    } else if (shouldSkipRevalidation) {\n      defaultShouldRevalidate = false;\n    } else if (isRevalidationRequired) {\n      defaultShouldRevalidate = true;\n    } else if (currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search) {\n      defaultShouldRevalidate = true;\n    } else if (currentUrl.search !== nextUrl.search) {\n      defaultShouldRevalidate = true;\n    } else if (isNewRouteInstance(state.matches[index], match)) {\n      defaultShouldRevalidate = true;\n    }\n    let shouldRevalidateArgs = {\n      ...baseShouldRevalidateArgs,\n      defaultShouldRevalidate\n    };\n    let shouldLoad = shouldRevalidateLoader(match, shouldRevalidateArgs);\n    return getDataStrategyMatch(\n      mapRouteProperties2,\n      manifest,\n      request,\n      location,\n      pattern,\n      match,\n      lazyRoutePropertiesToSkip,\n      scopedContext,\n      shouldLoad,\n      shouldRevalidateArgs,\n      callSiteDefaultShouldRevalidate\n    );\n  });\n  let revalidatingFetchers = [];\n  fetchLoadMatches.forEach((f, key) => {\n    if (initialHydration || !matches.some((m) => m.route.id === f.routeId) || fetchersQueuedForDeletion.has(key)) {\n      return;\n    }\n    let fetcher = state.fetchers.get(key);\n    let isMidInitialLoad = fetcher && fetcher.state !== \"idle\" && fetcher.data === void 0;\n    let fetcherMatches = matchRoutesImpl(\n      routesToUse,\n      f.path,\n      basename ?? \"/\",\n      false,\n      branches\n    );\n    if (!fetcherMatches) {\n      if (hasPatchRoutesOnNavigation && isMidInitialLoad) {\n        return;\n      }\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: null,\n        match: null,\n        request: null,\n        controller: null\n      });\n      return;\n    }\n    if (fetchRedirectIds.has(key)) {\n      return;\n    }\n    let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n    let fetchController = new AbortController();\n    let fetchRequest = createClientSideRequest(\n      history,\n      f.path,\n      fetchController.signal\n    );\n    let fetcherDsMatches = null;\n    if (cancelledFetcherLoads.has(key)) {\n      cancelledFetcherLoads.delete(key);\n      fetcherDsMatches = getTargetedDataStrategyMatches(\n        mapRouteProperties2,\n        manifest,\n        fetchRequest,\n        f.path,\n        fetcherMatches,\n        fetcherMatch,\n        lazyRoutePropertiesToSkip,\n        scopedContext\n      );\n    } else if (isMidInitialLoad) {\n      if (isRevalidationRequired) {\n        fetcherDsMatches = getTargetedDataStrategyMatches(\n          mapRouteProperties2,\n          manifest,\n          fetchRequest,\n          f.path,\n          fetcherMatches,\n          fetcherMatch,\n          lazyRoutePropertiesToSkip,\n          scopedContext\n        );\n      }\n    } else {\n      let defaultShouldRevalidate;\n      if (typeof callSiteDefaultShouldRevalidate === \"boolean\") {\n        defaultShouldRevalidate = callSiteDefaultShouldRevalidate;\n      } else if (shouldSkipRevalidation) {\n        defaultShouldRevalidate = false;\n      } else {\n        defaultShouldRevalidate = isRevalidationRequired;\n      }\n      let shouldRevalidateArgs = {\n        ...baseShouldRevalidateArgs,\n        defaultShouldRevalidate\n      };\n      if (shouldRevalidateLoader(fetcherMatch, shouldRevalidateArgs)) {\n        fetcherDsMatches = getTargetedDataStrategyMatches(\n          mapRouteProperties2,\n          manifest,\n          fetchRequest,\n          f.path,\n          fetcherMatches,\n          fetcherMatch,\n          lazyRoutePropertiesToSkip,\n          scopedContext,\n          shouldRevalidateArgs\n        );\n      }\n    }\n    if (fetcherDsMatches) {\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: fetcherDsMatches,\n        match: fetcherMatch,\n        request: fetchRequest,\n        controller: fetchController\n      });\n    }\n  });\n  return { dsMatches, revalidatingFetchers };\n}\nfunction routeHasLoaderOrMiddleware(route) {\n  return route.loader != null || route.middleware != null && route.middleware.length > 0;\n}\nfunction getRouteHydrationStatus(route, loaderData, errors) {\n  if (route.lazy) {\n    return { shouldLoad: true, renderFallback: true };\n  }\n  if (!routeHasLoaderOrMiddleware(route)) {\n    return { shouldLoad: false, renderFallback: false };\n  }\n  let hasData = loaderData != null && route.id in loaderData;\n  let hasError = errors != null && errors[route.id] !== void 0;\n  if (!hasData && hasError) {\n    return { shouldLoad: false, renderFallback: false };\n  }\n  if (typeof route.loader === \"function\" && route.loader.hydrate === true) {\n    return { shouldLoad: true, renderFallback: !hasData };\n  }\n  let shouldLoad = !hasData && !hasError;\n  return { shouldLoad, renderFallback: shouldLoad };\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n  let isNew = (\n    // [a] -> [a, b]\n    !currentMatch || // [a, b] -> [a, c]\n    match.route.id !== currentMatch.route.id\n  );\n  let isMissingData = !currentLoaderData.hasOwnProperty(match.route.id);\n  return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n  let currentPath = currentMatch.route.path;\n  return (\n    // param change for this match, /users/123 -> /users/456\n    currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path\n    // e.g. /files/images/avatar.jpg -> files/finances.xls\n    currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n  );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n  if (loaderMatch.route.shouldRevalidate) {\n    let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n    if (typeof routeChoice === \"boolean\") {\n      return routeChoice;\n    }\n  }\n  return arg.defaultShouldRevalidate;\n}\nfunction patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProperties2, allowElementMutations) {\n  let childrenToPatch;\n  if (routeId) {\n    let route = manifest[routeId];\n    invariant(\n      route,\n      `No route found to patch children into: routeId = ${routeId}`\n    );\n    if (!route.children) {\n      route.children = [];\n    }\n    childrenToPatch = route.children;\n  } else {\n    childrenToPatch = dataRoutes.activeRoutes;\n  }\n  let uniqueChildren = [];\n  let existingChildren = [];\n  children.forEach((newRoute) => {\n    let existingRoute = childrenToPatch.find(\n      (existingRoute2) => isSameRoute(newRoute, existingRoute2)\n    );\n    if (existingRoute) {\n      existingChildren.push({ existingRoute, newRoute });\n    } else {\n      uniqueChildren.push(newRoute);\n    }\n  });\n  if (uniqueChildren.length > 0) {\n    let newRoutes = convertRoutesToDataRoutes(\n      uniqueChildren,\n      mapRouteProperties2,\n      [routeId || \"_\", \"patch\", String(childrenToPatch?.length || \"0\")],\n      manifest\n    );\n    childrenToPatch.push(...newRoutes);\n  }\n  if (allowElementMutations && existingChildren.length > 0) {\n    for (let i = 0; i < existingChildren.length; i++) {\n      let { existingRoute, newRoute } = existingChildren[i];\n      let existingRouteTyped = existingRoute;\n      let [newRouteTyped] = convertRoutesToDataRoutes(\n        [newRoute],\n        mapRouteProperties2,\n        [],\n        // Doesn't matter for mutated routes since they already have an id\n        {},\n        // Don't touch the manifest here since we're updating in place\n        true\n      );\n      Object.assign(existingRouteTyped, {\n        element: newRouteTyped.element ? newRouteTyped.element : existingRouteTyped.element,\n        errorElement: newRouteTyped.errorElement ? newRouteTyped.errorElement : existingRouteTyped.errorElement,\n        hydrateFallbackElement: newRouteTyped.hydrateFallbackElement ? newRouteTyped.hydrateFallbackElement : existingRouteTyped.hydrateFallbackElement\n      });\n    }\n  }\n  if (!dataRoutes.hasHMRRoutes) {\n    dataRoutes.setRoutes([...dataRoutes.activeRoutes]);\n  }\n}\nfunction isSameRoute(newRoute, existingRoute) {\n  if (\"id\" in newRoute && \"id\" in existingRoute && newRoute.id === existingRoute.id) {\n    return true;\n  }\n  if (!(newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive)) {\n    return false;\n  }\n  if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {\n    return true;\n  }\n  return newRoute.children?.every(\n    (aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))\n  ) ?? false;\n}\nvar lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();\nvar loadLazyRouteProperty = ({\n  key,\n  route,\n  manifest,\n  mapRouteProperties: mapRouteProperties2\n}) => {\n  let routeToUpdate = manifest[route.id];\n  invariant(routeToUpdate, \"No route found in manifest\");\n  if (!routeToUpdate.lazy || typeof routeToUpdate.lazy !== \"object\") {\n    return;\n  }\n  let lazyFn = routeToUpdate.lazy[key];\n  if (!lazyFn) {\n    return;\n  }\n  let cache = lazyRoutePropertyCache.get(routeToUpdate);\n  if (!cache) {\n    cache = {};\n    lazyRoutePropertyCache.set(routeToUpdate, cache);\n  }\n  let cachedPromise = cache[key];\n  if (cachedPromise) {\n    return cachedPromise;\n  }\n  let propertyPromise = (async () => {\n    let isUnsupported = isUnsupportedLazyRouteObjectKey(key);\n    let staticRouteValue = routeToUpdate[key];\n    let isStaticallyDefined = staticRouteValue !== void 0 && key !== \"hasErrorBoundary\";\n    if (isUnsupported) {\n      warning(\n        !isUnsupported,\n        \"Route property \" + key + \" is not a supported lazy route property. This property will be ignored.\"\n      );\n      cache[key] = Promise.resolve();\n    } else if (isStaticallyDefined) {\n      warning(\n        false,\n        `Route \"${routeToUpdate.id}\" has a static property \"${key}\" defined. The lazy property will be ignored.`\n      );\n    } else {\n      let value = await lazyFn();\n      if (value != null) {\n        Object.assign(routeToUpdate, { [key]: value });\n        Object.assign(routeToUpdate, mapRouteProperties2(routeToUpdate));\n      }\n    }\n    if (typeof routeToUpdate.lazy === \"object\") {\n      routeToUpdate.lazy[key] = void 0;\n      if (Object.values(routeToUpdate.lazy).every((value) => value === void 0)) {\n        routeToUpdate.lazy = void 0;\n      }\n    }\n  })();\n  cache[key] = propertyPromise;\n  return propertyPromise;\n};\nvar lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();\nfunction loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRoutePropertiesToSkip) {\n  let routeToUpdate = manifest[route.id];\n  invariant(routeToUpdate, \"No route found in manifest\");\n  if (!route.lazy) {\n    return {\n      lazyRoutePromise: void 0,\n      lazyHandlerPromise: void 0\n    };\n  }\n  if (typeof route.lazy === \"function\") {\n    let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);\n    if (cachedPromise) {\n      return {\n        lazyRoutePromise: cachedPromise,\n        lazyHandlerPromise: cachedPromise\n      };\n    }\n    let lazyRoutePromise2 = (async () => {\n      invariant(\n        typeof route.lazy === \"function\",\n        \"No lazy route function found\"\n      );\n      let lazyRoute = await route.lazy();\n      let routeUpdates = {};\n      for (let lazyRouteProperty in lazyRoute) {\n        let lazyValue = lazyRoute[lazyRouteProperty];\n        if (lazyValue === void 0) {\n          continue;\n        }\n        let isUnsupported = isUnsupportedLazyRouteFunctionKey(lazyRouteProperty);\n        let staticRouteValue = routeToUpdate[lazyRouteProperty];\n        let isStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based\n        // on the route updates\n        lazyRouteProperty !== \"hasErrorBoundary\";\n        if (isUnsupported) {\n          warning(\n            !isUnsupported,\n            \"Route property \" + lazyRouteProperty + \" is not a supported property to be returned from a lazy route function. This property will be ignored.\"\n          );\n        } else if (isStaticallyDefined) {\n          warning(\n            !isStaticallyDefined,\n            `Route \"${routeToUpdate.id}\" has a static property \"${lazyRouteProperty}\" defined but its lazy function is also returning a value for this property. The lazy route property \"${lazyRouteProperty}\" will be ignored.`\n          );\n        } else {\n          routeUpdates[lazyRouteProperty] = lazyValue;\n        }\n      }\n      Object.assign(routeToUpdate, routeUpdates);\n      Object.assign(routeToUpdate, {\n        // To keep things framework agnostic, we use the provided `mapRouteProperties`\n        // function to set the framework-aware properties (`element`/`hasErrorBoundary`)\n        // since the logic will differ between frameworks.\n        ...mapRouteProperties2(routeToUpdate),\n        lazy: void 0\n      });\n    })();\n    lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise2);\n    lazyRoutePromise2.catch(() => {\n    });\n    return {\n      lazyRoutePromise: lazyRoutePromise2,\n      lazyHandlerPromise: lazyRoutePromise2\n    };\n  }\n  let lazyKeys = Object.keys(route.lazy);\n  let lazyPropertyPromises = [];\n  let lazyHandlerPromise = void 0;\n  for (let key of lazyKeys) {\n    if (lazyRoutePropertiesToSkip && lazyRoutePropertiesToSkip.includes(key)) {\n      continue;\n    }\n    let promise = loadLazyRouteProperty({\n      key,\n      route,\n      manifest,\n      mapRouteProperties: mapRouteProperties2\n    });\n    if (promise) {\n      lazyPropertyPromises.push(promise);\n      if (key === type) {\n        lazyHandlerPromise = promise;\n      }\n    }\n  }\n  let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {\n  }) : void 0;\n  lazyRoutePromise?.catch(() => {\n  });\n  lazyHandlerPromise?.catch(() => {\n  });\n  return {\n    lazyRoutePromise,\n    lazyHandlerPromise\n  };\n}\nfunction isNonNullable(value) {\n  return value !== void 0;\n}\nfunction loadLazyMiddlewareForMatches(matches, manifest, mapRouteProperties2) {\n  let promises = matches.map(({ route }) => {\n    if (typeof route.lazy !== \"object\" || !route.lazy.middleware) {\n      return void 0;\n    }\n    return loadLazyRouteProperty({\n      key: \"middleware\",\n      route,\n      manifest,\n      mapRouteProperties: mapRouteProperties2\n    });\n  }).filter(isNonNullable);\n  return promises.length > 0 ? Promise.all(promises) : void 0;\n}\nasync function defaultDataStrategy(args) {\n  let matchesToLoad = args.matches.filter((m) => m.shouldLoad);\n  let keyedResults = {};\n  let results = await Promise.all(matchesToLoad.map((m) => m.resolve()));\n  results.forEach((result, i) => {\n    keyedResults[matchesToLoad[i].route.id] = result;\n  });\n  return keyedResults;\n}\nasync function defaultDataStrategyWithMiddleware(args) {\n  if (!args.matches.some((m) => m.route.middleware)) {\n    return defaultDataStrategy(args);\n  }\n  return runClientMiddlewarePipeline(args, () => defaultDataStrategy(args));\n}\nfunction runServerMiddlewarePipeline(args, handler, errorHandler) {\n  return runMiddlewarePipeline(\n    args,\n    handler,\n    processResult,\n    isResponse,\n    errorHandler\n  );\n  function processResult(result) {\n    return isDataWithResponseInit(result) ? dataWithResponseInitToResponse(result) : result;\n  }\n}\nfunction runClientMiddlewarePipeline(args, handler) {\n  return runMiddlewarePipeline(\n    args,\n    handler,\n    (r) => {\n      if (isRedirectResponse(r)) {\n        throw r;\n      }\n      return r;\n    },\n    isDataStrategyResults,\n    errorHandler\n  );\n  function errorHandler(error, routeId, nextResult) {\n    if (nextResult) {\n      return Promise.resolve(\n        Object.assign(nextResult.value, {\n          [routeId]: { type: \"error\", result: error }\n        })\n      );\n    } else {\n      let { matches } = args;\n      let maxBoundaryIdx = Math.min(\n        // Throwing route\n        Math.max(\n          matches.findIndex((m) => m.route.id === routeId),\n          0\n        ),\n        // or the shallowest route that needs to load data\n        Math.max(\n          matches.findIndex((m) => m.shouldCallHandler()),\n          0\n        )\n      );\n      let boundaryRouteId = findNearestBoundary(\n        matches,\n        matches[maxBoundaryIdx].route.id\n      ).route.id;\n      return Promise.resolve({\n        [boundaryRouteId]: { type: \"error\", result: error }\n      });\n    }\n  }\n}\nasync function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {\n  let { matches, ...dataFnArgs } = args;\n  let tuples = matches.flatMap(\n    (m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []\n  );\n  let result = await callRouteMiddleware(\n    dataFnArgs,\n    tuples,\n    handler,\n    processResult,\n    isResult,\n    errorHandler\n  );\n  return result;\n}\nasync function callRouteMiddleware(args, middlewares, handler, processResult, isResult, errorHandler, idx = 0) {\n  let { request } = args;\n  if (request.signal.aborted) {\n    throw request.signal.reason ?? new Error(`Request aborted: ${request.method} ${request.url}`);\n  }\n  let tuple = middlewares[idx];\n  if (!tuple) {\n    let result = await handler();\n    return result;\n  }\n  let [routeId, middleware] = tuple;\n  let nextResult;\n  let next = async () => {\n    if (nextResult) {\n      throw new Error(\"You may only call `next()` once per middleware\");\n    }\n    try {\n      let result = await callRouteMiddleware(\n        args,\n        middlewares,\n        handler,\n        processResult,\n        isResult,\n        errorHandler,\n        idx + 1\n      );\n      nextResult = { value: result };\n      return nextResult.value;\n    } catch (error) {\n      nextResult = { value: await errorHandler(error, routeId, nextResult) };\n      return nextResult.value;\n    }\n  };\n  try {\n    let value = await middleware(args, next);\n    let result = value != null ? processResult(value) : void 0;\n    if (isResult(result)) {\n      return result;\n    } else if (nextResult) {\n      return result ?? nextResult.value;\n    } else {\n      nextResult = { value: await next() };\n      return nextResult.value;\n    }\n  } catch (error) {\n    let response = await errorHandler(error, routeId, nextResult);\n    return response;\n  }\n}\nfunction getDataStrategyMatchLazyPromises(mapRouteProperties2, manifest, request, match, lazyRoutePropertiesToSkip) {\n  let lazyMiddlewarePromise = loadLazyRouteProperty({\n    key: \"middleware\",\n    route: match.route,\n    manifest,\n    mapRouteProperties: mapRouteProperties2\n  });\n  let lazyRoutePromises = loadLazyRoute(\n    match.route,\n    isMutationMethod(request.method) ? \"action\" : \"loader\",\n    manifest,\n    mapRouteProperties2,\n    lazyRoutePropertiesToSkip\n  );\n  return {\n    middleware: lazyMiddlewarePromise,\n    route: lazyRoutePromises.lazyRoutePromise,\n    handler: lazyRoutePromises.lazyHandlerPromise\n  };\n}\nfunction getDataStrategyMatch(mapRouteProperties2, manifest, request, path, pattern, match, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null, callSiteDefaultShouldRevalidate) {\n  let isUsingNewApi = false;\n  let _lazyPromises = getDataStrategyMatchLazyPromises(\n    mapRouteProperties2,\n    manifest,\n    request,\n    match,\n    lazyRoutePropertiesToSkip\n  );\n  return {\n    ...match,\n    _lazyPromises,\n    shouldLoad,\n    shouldRevalidateArgs,\n    shouldCallHandler(defaultShouldRevalidate) {\n      isUsingNewApi = true;\n      if (!shouldRevalidateArgs) {\n        return shouldLoad;\n      }\n      if (typeof callSiteDefaultShouldRevalidate === \"boolean\") {\n        return shouldRevalidateLoader(match, {\n          ...shouldRevalidateArgs,\n          defaultShouldRevalidate: callSiteDefaultShouldRevalidate\n        });\n      }\n      if (typeof defaultShouldRevalidate === \"boolean\") {\n        return shouldRevalidateLoader(match, {\n          ...shouldRevalidateArgs,\n          defaultShouldRevalidate\n        });\n      }\n      return shouldRevalidateLoader(match, shouldRevalidateArgs);\n    },\n    resolve(handlerOverride) {\n      let { lazy, loader, middleware } = match.route;\n      let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request.method) && (lazy || loader);\n      let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy;\n      if (callHandler && (isMutationMethod(request.method) || !isMiddlewareOnlyRoute)) {\n        return callLoaderOrAction({\n          request,\n          path,\n          pattern,\n          match,\n          lazyHandlerPromise: _lazyPromises?.handler,\n          lazyRoutePromise: _lazyPromises?.route,\n          handlerOverride,\n          scopedContext\n        });\n      }\n      return Promise.resolve({ type: \"data\" /* data */, result: void 0 });\n    }\n  };\n}\nfunction getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request, path, matches, targetMatch, lazyRoutePropertiesToSkip, scopedContext, shouldRevalidateArgs = null) {\n  return matches.map((match) => {\n    if (match.route.id !== targetMatch.route.id) {\n      return {\n        ...match,\n        shouldLoad: false,\n        shouldRevalidateArgs,\n        shouldCallHandler: () => false,\n        _lazyPromises: getDataStrategyMatchLazyPromises(\n          mapRouteProperties2,\n          manifest,\n          request,\n          match,\n          lazyRoutePropertiesToSkip\n        ),\n        resolve: () => Promise.resolve({ type: \"data\", result: void 0 })\n      };\n    }\n    return getDataStrategyMatch(\n      mapRouteProperties2,\n      manifest,\n      request,\n      path,\n      getRoutePattern(matches),\n      match,\n      lazyRoutePropertiesToSkip,\n      scopedContext,\n      true,\n      shouldRevalidateArgs\n    );\n  });\n}\nasync function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {\n  if (matches.some((m) => m._lazyPromises?.middleware)) {\n    await Promise.all(matches.map((m) => m._lazyPromises?.middleware));\n  }\n  let dataStrategyArgs = {\n    request,\n    url: createDataFunctionUrl(request, path),\n    pattern: getRoutePattern(matches),\n    params: matches[0].params,\n    context: scopedContext,\n    matches\n  };\n  let runClientMiddleware = isStaticHandler ? () => {\n    throw new Error(\n      \"You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`\"\n    );\n  } : (cb) => {\n    let typedDataStrategyArgs = dataStrategyArgs;\n    return runClientMiddlewarePipeline(typedDataStrategyArgs, () => {\n      return cb({\n        ...typedDataStrategyArgs,\n        fetcherKey,\n        runClientMiddleware: () => {\n          throw new Error(\n            \"Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler\"\n          );\n        }\n      });\n    });\n  };\n  let results = await dataStrategyImpl({\n    ...dataStrategyArgs,\n    fetcherKey,\n    runClientMiddleware\n  });\n  try {\n    await Promise.all(\n      matches.flatMap((m) => [\n        m._lazyPromises?.handler,\n        m._lazyPromises?.route\n      ])\n    );\n  } catch (e) {\n  }\n  return results;\n}\nasync function callLoaderOrAction({\n  request,\n  path,\n  pattern,\n  match,\n  lazyHandlerPromise,\n  lazyRoutePromise,\n  handlerOverride,\n  scopedContext\n}) {\n  let result;\n  let onReject;\n  let isAction = isMutationMethod(request.method);\n  let type = isAction ? \"action\" : \"loader\";\n  let runHandler = (handler) => {\n    let reject;\n    let abortPromise = new Promise((_, r) => reject = r);\n    onReject = () => reject();\n    request.signal.addEventListener(\"abort\", onReject);\n    let actualHandler = (ctx) => {\n      if (typeof handler !== \"function\") {\n        return Promise.reject(\n          new Error(\n            `You cannot call the handler for a route which defines a boolean \"${type}\" [routeId: ${match.route.id}]`\n          )\n        );\n      }\n      return handler(\n        {\n          request,\n          url: createDataFunctionUrl(request, path),\n          pattern,\n          params: match.params,\n          context: scopedContext\n        },\n        ...ctx !== void 0 ? [ctx] : []\n      );\n    };\n    let handlerPromise = (async () => {\n      try {\n        let val = await (handlerOverride ? handlerOverride((ctx) => actualHandler(ctx)) : actualHandler());\n        return { type: \"data\", result: val };\n      } catch (e) {\n        return { type: \"error\", result: e };\n      }\n    })();\n    return Promise.race([handlerPromise, abortPromise]);\n  };\n  try {\n    let handler = isAction ? match.route.action : match.route.loader;\n    if (lazyHandlerPromise || lazyRoutePromise) {\n      if (handler) {\n        let handlerError;\n        let [value] = await Promise.all([\n          // If the handler throws, don't let it immediately bubble out,\n          // since we need to let the lazy() execution finish so we know if this\n          // route has a boundary that can handle the error\n          runHandler(handler).catch((e) => {\n            handlerError = e;\n          }),\n          // Ensure all lazy route promises are resolved before continuing\n          lazyHandlerPromise,\n          lazyRoutePromise\n        ]);\n        if (handlerError !== void 0) {\n          throw handlerError;\n        }\n        result = value;\n      } else {\n        await lazyHandlerPromise;\n        let handler2 = isAction ? match.route.action : match.route.loader;\n        if (handler2) {\n          [result] = await Promise.all([runHandler(handler2), lazyRoutePromise]);\n        } else if (type === \"action\") {\n          let url = new URL(request.url);\n          let pathname = url.pathname + url.search;\n          throw getInternalRouterError(405, {\n            method: request.method,\n            pathname,\n            routeId: match.route.id\n          });\n        } else {\n          return { type: \"data\" /* data */, result: void 0 };\n        }\n      }\n    } else if (!handler) {\n      let url = new URL(request.url);\n      let pathname = url.pathname + url.search;\n      throw getInternalRouterError(404, {\n        pathname\n      });\n    } else {\n      result = await runHandler(handler);\n    }\n  } catch (e) {\n    return { type: \"error\" /* error */, result: e };\n  } finally {\n    if (onReject) {\n      request.signal.removeEventListener(\"abort\", onReject);\n    }\n  }\n  return result;\n}\nasync function parseResponseBody(response) {\n  let contentType = response.headers.get(\"Content-Type\");\n  if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n    return response.body == null ? null : response.json();\n  }\n  return response.text();\n}\nasync function convertDataStrategyResultToDataResult(dataStrategyResult) {\n  let { result, type } = dataStrategyResult;\n  if (isResponse(result)) {\n    let data2;\n    try {\n      data2 = await parseResponseBody(result);\n    } catch (e) {\n      return { type: \"error\" /* error */, error: e };\n    }\n    if (type === \"error\" /* error */) {\n      return {\n        type: \"error\" /* error */,\n        error: new ErrorResponseImpl(result.status, result.statusText, data2),\n        statusCode: result.status,\n        headers: result.headers\n      };\n    }\n    return {\n      type: \"data\" /* data */,\n      data: data2,\n      statusCode: result.status,\n      headers: result.headers\n    };\n  }\n  if (type === \"error\" /* error */) {\n    if (isDataWithResponseInit(result)) {\n      if (result.data instanceof Error) {\n        return {\n          type: \"error\" /* error */,\n          error: result.data,\n          statusCode: result.init?.status,\n          headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n        };\n      }\n      return {\n        type: \"error\" /* error */,\n        error: dataWithResponseInitToErrorResponse(result),\n        statusCode: isRouteErrorResponse(result) ? result.status : void 0,\n        headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n      };\n    }\n    return {\n      type: \"error\" /* error */,\n      error: result,\n      statusCode: isRouteErrorResponse(result) ? result.status : void 0\n    };\n  }\n  if (isDataWithResponseInit(result)) {\n    return {\n      type: \"data\" /* data */,\n      data: result.data,\n      statusCode: result.init?.status,\n      headers: result.init?.headers ? new Headers(result.init.headers) : void 0\n    };\n  }\n  return { type: \"data\" /* data */, data: result };\n}\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename) {\n  let location = response.headers.get(\"Location\");\n  invariant(\n    location,\n    \"Redirects returned/thrown from loaders/actions must have a Location header\"\n  );\n  if (!isAbsoluteUrl(location)) {\n    let trimmedMatches = matches.slice(\n      0,\n      matches.findIndex((m) => m.route.id === routeId) + 1\n    );\n    location = normalizeTo(\n      new URL(request.url),\n      trimmedMatches,\n      basename,\n      location\n    );\n    response.headers.set(\"Location\", location);\n  }\n  return response;\n}\nvar invalidProtocols = [\n  \"about:\",\n  \"blob:\",\n  \"chrome:\",\n  \"chrome-untrusted:\",\n  \"content:\",\n  \"data:\",\n  \"devtools:\",\n  \"file:\",\n  \"filesystem:\",\n  // eslint-disable-next-line no-script-url\n  \"javascript:\"\n];\nfunction hasInvalidProtocol(location) {\n  try {\n    return invalidProtocols.includes(new URL(location).protocol);\n  } catch {\n    return false;\n  }\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename, historyInstance) {\n  if (isAbsoluteUrl(location)) {\n    let normalizedLocation = location;\n    let url = PROTOCOL_RELATIVE_URL_REGEX.test(normalizedLocation) ? new URL(\n      normalizeProtocolRelativeUrl(normalizedLocation, currentUrl.protocol)\n    ) : new URL(normalizedLocation);\n    if (hasInvalidProtocol(url.toString())) {\n      throw new Error(\"Invalid redirect location\");\n    }\n    let isSameBasename = stripBasename(url.pathname, basename) != null;\n    if (url.origin === currentUrl.origin && isSameBasename) {\n      return removeDoubleSlashes(url.pathname) + url.search + url.hash;\n    }\n  }\n  try {\n    let url = historyInstance.createURL(location);\n    if (hasInvalidProtocol(url.toString())) {\n      throw new Error(\"Invalid redirect location\");\n    }\n  } catch (e) {\n  }\n  return location;\n}\nfunction createClientSideRequest(history, location, signal, submission) {\n  let url = history.createURL(stripHashFromPath(location)).toString();\n  let init = { signal };\n  if (submission && isMutationMethod(submission.formMethod)) {\n    let { formMethod, formEncType } = submission;\n    init.method = formMethod.toUpperCase();\n    if (formEncType === \"application/json\") {\n      init.headers = new Headers({ \"Content-Type\": formEncType });\n      init.body = JSON.stringify(submission.json);\n    } else if (formEncType === \"text/plain\") {\n      init.body = submission.text;\n    } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n      init.body = convertFormDataToSearchParams(submission.formData);\n    } else {\n      init.body = submission.formData;\n    }\n  }\n  return new Request(url, init);\n}\nfunction createDataFunctionUrl(request, path) {\n  let url = new URL(request.url);\n  let parsed = typeof path === \"string\" ? parsePath(path) : path;\n  url.pathname = parsed.pathname || \"/\";\n  if (parsed.search) {\n    let searchParams = new URLSearchParams(parsed.search);\n    let indexValues = searchParams.getAll(\"index\");\n    searchParams.delete(\"index\");\n    for (let value of indexValues.filter(Boolean)) {\n      searchParams.append(\"index\", value);\n    }\n    url.search = searchParams.size ? `?${searchParams.toString()}` : \"\";\n  } else {\n    url.search = \"\";\n  }\n  url.hash = parsed.hash || \"\";\n  return url;\n}\nfunction convertFormDataToSearchParams(formData) {\n  let searchParams = new URLSearchParams();\n  for (let [key, value] of formData.entries()) {\n    searchParams.append(key, typeof value === \"string\" ? value : value.name);\n  }\n  return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n  let formData = new FormData();\n  for (let [key, value] of searchParams.entries()) {\n    formData.append(key, value);\n  }\n  return formData;\n}\nfunction processRouteLoaderData(matches, results, pendingActionResult, isStaticHandler = false, skipLoaderErrorBubbling = false) {\n  let loaderData = {};\n  let errors = null;\n  let statusCode;\n  let foundError = false;\n  let loaderHeaders = {};\n  let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : void 0;\n  matches.forEach((match) => {\n    if (!(match.route.id in results)) {\n      return;\n    }\n    let id = match.route.id;\n    let result = results[id];\n    invariant(\n      !isRedirectResult(result),\n      \"Cannot handle redirect results in processLoaderData\"\n    );\n    if (isErrorResult(result)) {\n      let error = result.error;\n      if (pendingError !== void 0) {\n        error = pendingError;\n        pendingError = void 0;\n      }\n      errors = errors || {};\n      if (skipLoaderErrorBubbling) {\n        errors[id] = error;\n      } else {\n        let boundaryMatch = findNearestBoundary(matches, id);\n        if (errors[boundaryMatch.route.id] == null) {\n          errors[boundaryMatch.route.id] = error;\n        }\n      }\n      if (!isStaticHandler) {\n        loaderData[id] = ResetLoaderDataSymbol;\n      }\n      if (!foundError) {\n        foundError = true;\n        statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n      }\n      if (result.headers) {\n        loaderHeaders[id] = result.headers;\n      }\n    } else {\n      loaderData[id] = result.data;\n      if (result.statusCode && result.statusCode !== 200 && !foundError) {\n        statusCode = result.statusCode;\n      }\n      if (result.headers) {\n        loaderHeaders[id] = result.headers;\n      }\n    }\n  });\n  if (pendingError !== void 0 && pendingActionResult) {\n    errors = { [pendingActionResult[0]]: pendingError };\n    if (pendingActionResult[2]) {\n      loaderData[pendingActionResult[2]] = void 0;\n    }\n  }\n  return {\n    loaderData,\n    errors,\n    statusCode: statusCode || 200,\n    loaderHeaders\n  };\n}\nfunction processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults, workingFetchers) {\n  let { loaderData, errors } = processRouteLoaderData(\n    matches,\n    results,\n    pendingActionResult\n  );\n  revalidatingFetchers.filter((f) => !f.matches || f.matches.some((m) => m.shouldLoad)).forEach((rf) => {\n    let { key, match, controller } = rf;\n    if (controller && controller.signal.aborted) {\n      return;\n    }\n    let result = fetcherResults[key];\n    invariant(result, \"Did not find corresponding fetcher result\");\n    if (isErrorResult(result)) {\n      let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);\n      if (!(errors && errors[boundaryMatch.route.id])) {\n        errors = {\n          ...errors,\n          [boundaryMatch.route.id]: result.error\n        };\n      }\n      workingFetchers.delete(key);\n    } else if (isRedirectResult(result)) {\n      invariant(false, \"Unhandled fetcher revalidation redirect\");\n    } else {\n      let doneFetcher = getDoneFetcher(result.data);\n      workingFetchers.set(key, doneFetcher);\n    }\n  });\n  return { loaderData, errors };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n  let mergedLoaderData = Object.entries(newLoaderData).filter(([, v]) => v !== ResetLoaderDataSymbol).reduce((merged, [k, v]) => {\n    merged[k] = v;\n    return merged;\n  }, {});\n  for (let match of matches) {\n    let id = match.route.id;\n    if (!newLoaderData.hasOwnProperty(id) && loaderData.hasOwnProperty(id) && match.route.loader) {\n      mergedLoaderData[id] = loaderData[id];\n    }\n    if (errors && errors.hasOwnProperty(id)) {\n      break;\n    }\n  }\n  return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n  if (!pendingActionResult) {\n    return {};\n  }\n  return isErrorResult(pendingActionResult[1]) ? {\n    // Clear out prior actionData on errors\n    actionData: {}\n  } : {\n    actionData: {\n      [pendingActionResult[0]]: pendingActionResult[1].data\n    }\n  };\n}\nfunction findNearestBoundary(matches, routeId) {\n  let eligibleMatches = routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches];\n  return eligibleMatches.reverse().find((m) => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n  let route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === \"/\") || {\n    id: `__shim-error-route__`\n  };\n  return {\n    matches: [\n      {\n        params: {},\n        pathname: \"\",\n        pathnameBase: \"\",\n        route\n      }\n    ],\n    route\n  };\n}\nfunction getInternalRouterError(status, {\n  pathname,\n  routeId,\n  method,\n  type,\n  message\n} = {}) {\n  let statusText = \"Unknown Server Error\";\n  let errorMessage = \"Unknown @remix-run/router error\";\n  if (status === 400) {\n    statusText = \"Bad Request\";\n    if (method && pathname && routeId) {\n      errorMessage = `You made a ${method} request to \"${pathname}\" but did not provide a \\`loader\\` for route \"${routeId}\", so there is no way to handle the request.`;\n    } else if (type === \"invalid-body\") {\n      errorMessage = \"Unable to encode submission body\";\n    }\n  } else if (status === 403) {\n    statusText = \"Forbidden\";\n    errorMessage = `Route \"${routeId}\" does not match URL \"${pathname}\"`;\n  } else if (status === 404) {\n    statusText = \"Not Found\";\n    errorMessage = `No route matches URL \"${pathname}\"`;\n  } else if (status === 405) {\n    statusText = \"Method Not Allowed\";\n    if (method && pathname && routeId) {\n      errorMessage = `You made a ${method.toUpperCase()} request to \"${pathname}\" but did not provide an \\`action\\` for route \"${routeId}\", so there is no way to handle the request.`;\n    } else if (method) {\n      errorMessage = `Invalid request method \"${method.toUpperCase()}\"`;\n    }\n  }\n  return new ErrorResponseImpl(\n    status || 500,\n    statusText,\n    new Error(errorMessage),\n    true\n  );\n}\nfunction findRedirect(results) {\n  let entries = Object.entries(results);\n  for (let i = entries.length - 1; i >= 0; i--) {\n    let [key, result] = entries[i];\n    if (isRedirectResult(result)) {\n      return { key, result };\n    }\n  }\n}\nfunction stripHashFromPath(path) {\n  let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n  return createPath({ ...parsedPath, hash: \"\" });\n}\nfunction isHashChangeOnly(a, b) {\n  if (a.pathname !== b.pathname || a.search !== b.search) {\n    return false;\n  }\n  if (a.hash === \"\") {\n    return b.hash !== \"\";\n  } else if (a.hash === b.hash) {\n    return true;\n  } else if (b.hash !== \"\") {\n    return true;\n  }\n  return false;\n}\nfunction dataWithResponseInitToResponse(data2) {\n  return Response.json(data2.data, data2.init ?? void 0);\n}\nfunction dataWithResponseInitToErrorResponse(data2) {\n  return new ErrorResponseImpl(\n    data2.init?.status ?? 500,\n    data2.init?.statusText ?? \"Internal Server Error\",\n    data2.data\n  );\n}\nfunction isDataStrategyResults(result) {\n  return result != null && typeof result === \"object\" && Object.entries(result).every(\n    ([key, value]) => typeof key === \"string\" && isDataStrategyResult(value)\n  );\n}\nfunction isDataStrategyResult(result) {\n  return result != null && typeof result === \"object\" && \"type\" in result && \"result\" in result && (result.type === \"data\" /* data */ || result.type === \"error\" /* error */);\n}\nfunction isRedirectDataStrategyResult(result) {\n  return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isErrorResult(result) {\n  return result.type === \"error\" /* error */;\n}\nfunction isRedirectResult(result) {\n  return (result && result.type) === \"redirect\" /* redirect */;\n}\nfunction isDataWithResponseInit(value) {\n  return typeof value === \"object\" && value != null && \"type\" in value && \"data\" in value && \"init\" in value && value.type === \"DataWithResponseInit\";\n}\nfunction isResponse(value) {\n  return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectStatusCode(statusCode) {\n  return redirectStatusCodes.has(statusCode);\n}\nfunction isRedirectResponse(result) {\n  return isResponse(result) && isRedirectStatusCode(result.status) && result.headers.has(\"Location\");\n}\nfunction isValidMethod(method) {\n  return validRequestMethods.has(method.toUpperCase());\n}\nfunction isMutationMethod(method) {\n  return validMutationMethods.has(method.toUpperCase());\n}\nfunction hasNakedIndexQuery(search) {\n  return new URLSearchParams(search).getAll(\"index\").some((v) => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n  let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n  if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n    return matches[matches.length - 1];\n  }\n  let pathMatches = getPathContributingMatches(matches);\n  return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n  let { formMethod, formAction, formEncType, text, formData, json } = navigation;\n  if (!formMethod || !formAction || !formEncType) {\n    return;\n  }\n  if (text != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: void 0,\n      json: void 0,\n      text\n    };\n  } else if (formData != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData,\n      json: void 0,\n      text: void 0\n    };\n  } else if (json !== void 0) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: void 0,\n      json,\n      text: void 0\n    };\n  }\n}\nfunction getLoadingNavigation(location, matches, historyAction, submission) {\n  if (submission) {\n    let navigation = {\n      state: \"loading\",\n      location,\n      matches,\n      historyAction,\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text\n    };\n    return navigation;\n  } else {\n    let navigation = {\n      state: \"loading\",\n      location,\n      matches,\n      historyAction,\n      formMethod: void 0,\n      formAction: void 0,\n      formEncType: void 0,\n      formData: void 0,\n      json: void 0,\n      text: void 0\n    };\n    return navigation;\n  }\n}\nfunction getSubmittingNavigation(location, matches, historyAction, submission) {\n  let navigation = {\n    state: \"submitting\",\n    location,\n    matches,\n    historyAction,\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text\n  };\n  return navigation;\n}\nfunction getLoadingFetcher(submission, data2) {\n  if (submission) {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text,\n      data: data2\n    };\n    return fetcher;\n  } else {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: void 0,\n      formAction: void 0,\n      formEncType: void 0,\n      formData: void 0,\n      json: void 0,\n      text: void 0,\n      data: data2\n    };\n    return fetcher;\n  }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n  let fetcher = {\n    state: \"submitting\",\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text,\n    data: existingFetcher ? existingFetcher.data : void 0\n  };\n  return fetcher;\n}\nfunction getDoneFetcher(data2) {\n  let fetcher = {\n    state: \"idle\",\n    formMethod: void 0,\n    formAction: void 0,\n    formEncType: void 0,\n    formData: void 0,\n    json: void 0,\n    text: void 0,\n    data: data2\n  };\n  return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n  try {\n    let sessionPositions = _window.sessionStorage.getItem(\n      TRANSITIONS_STORAGE_KEY\n    );\n    if (sessionPositions) {\n      let json = JSON.parse(sessionPositions);\n      for (let [k, v] of Object.entries(json || {})) {\n        if (v && Array.isArray(v)) {\n          transitions.set(k, new Set(v || []));\n        }\n      }\n    }\n  } catch (e) {\n  }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n  if (transitions.size > 0) {\n    let json = {};\n    for (let [k, v] of transitions) {\n      json[k] = [...v];\n    }\n    try {\n      _window.sessionStorage.setItem(\n        TRANSITIONS_STORAGE_KEY,\n        JSON.stringify(json)\n      );\n    } catch (error) {\n      warning(\n        false,\n        `Failed to save applied view transitions in sessionStorage (${error}).`\n      );\n    }\n  }\n}\nfunction createDeferred() {\n  let resolve;\n  let reject;\n  let promise = new Promise((res, rej) => {\n    resolve = async (val) => {\n      res(val);\n      try {\n        await promise;\n      } catch (e) {\n      }\n    };\n    reject = async (error) => {\n      rej(error);\n      try {\n        await promise;\n      } catch (e) {\n      }\n    };\n  });\n  return {\n    promise,\n    //@ts-ignore\n    resolve,\n    //@ts-ignore\n    reject\n  };\n}\n\n// lib/context.ts\nimport * as React from \"react\";\nvar DataRouterContext = React.createContext(null);\nDataRouterContext.displayName = \"DataRouter\";\nvar DataRouterStateContext = React.createContext(null);\nDataRouterStateContext.displayName = \"DataRouterState\";\nvar RSCRouterContext = React.createContext(false);\nfunction useIsRSCRouterContext() {\n  return React.useContext(RSCRouterContext);\n}\nvar ViewTransitionContext = React.createContext({\n  isTransitioning: false\n});\nViewTransitionContext.displayName = \"ViewTransition\";\nvar FetchersContext = React.createContext(\n  /* @__PURE__ */ new Map()\n);\nFetchersContext.displayName = \"Fetchers\";\nvar AwaitContext = React.createContext(null);\nAwaitContext.displayName = \"Await\";\nvar AwaitContextProvider = (props) => React.createElement(AwaitContext.Provider, props);\nvar NavigationContext = React.createContext(\n  null\n);\nNavigationContext.displayName = \"Navigation\";\nvar LocationContext = React.createContext(\n  null\n);\nLocationContext.displayName = \"Location\";\nvar RouteContext = React.createContext({\n  outlet: null,\n  matches: [],\n  isDataRoute: false\n});\nRouteContext.displayName = \"Route\";\nvar RouteErrorContext = React.createContext(null);\nRouteErrorContext.displayName = \"RouteError\";\nvar ENABLE_DEV_WARNINGS = true;\n\n// lib/hooks.tsx\nimport * as React2 from \"react\";\n\n// lib/errors.ts\nvar ERROR_DIGEST_BASE = \"REACT_ROUTER_ERROR\";\nvar ERROR_DIGEST_REDIRECT = \"REDIRECT\";\nvar ERROR_DIGEST_ROUTE_ERROR_RESPONSE = \"ROUTE_ERROR_RESPONSE\";\nfunction decodeRedirectErrorDigest(digest) {\n  if (digest.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`)) {\n    try {\n      let parsed = JSON.parse(digest.slice(28));\n      if (typeof parsed === \"object\" && parsed && typeof parsed.status === \"number\" && typeof parsed.statusText === \"string\" && typeof parsed.location === \"string\" && typeof parsed.reloadDocument === \"boolean\" && typeof parsed.replace === \"boolean\") {\n        return parsed;\n      }\n    } catch {\n    }\n  }\n}\nfunction decodeRouteErrorResponseDigest(digest) {\n  if (digest.startsWith(\n    `${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`\n  )) {\n    try {\n      let parsed = JSON.parse(digest.slice(40));\n      if (typeof parsed === \"object\" && parsed && typeof parsed.status === \"number\" && typeof parsed.statusText === \"string\") {\n        return new ErrorResponseImpl(\n          parsed.status,\n          parsed.statusText,\n          parsed.data\n        );\n      }\n    } catch {\n    }\n  }\n}\n\n// lib/hooks.tsx\nfunction useHref(to, { relative } = {}) {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of the\n    // router loaded. We can help them understand how to avoid that.\n    `useHref() may be used only in the context of a <Router> component.`\n  );\n  let { basename, navigator } = React2.useContext(NavigationContext);\n  let { hash, pathname, search } = useResolvedPath(to, { relative });\n  let joinedPathname = pathname;\n  if (basename !== \"/\") {\n    joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n  }\n  return navigator.createHref({ pathname: joinedPathname, search, hash });\n}\nfunction useInRouterContext() {\n  return React2.useContext(LocationContext) != null;\n}\nfunction useLocation() {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of the\n    // router loaded. We can help them understand how to avoid that.\n    `useLocation() may be used only in the context of a <Router> component.`\n  );\n  return React2.useContext(LocationContext).location;\n}\nfunction useNavigationType() {\n  return React2.useContext(LocationContext).navigationType;\n}\nfunction useMatch(pattern) {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of the\n    // router loaded. We can help them understand how to avoid that.\n    `useMatch() may be used only in the context of a <Router> component.`\n  );\n  let { pathname } = useLocation();\n  return React2.useMemo(\n    () => matchPath(pattern, decodePath(pathname)),\n    [pathname, pattern]\n  );\n}\nvar navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;\nfunction useIsomorphicLayoutEffect(cb) {\n  let isStatic = React2.useContext(NavigationContext).static;\n  if (!isStatic) {\n    React2.useLayoutEffect(cb);\n  }\n}\nfunction useNavigate() {\n  let { isDataRoute } = React2.useContext(RouteContext);\n  return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of the\n    // router loaded. We can help them understand how to avoid that.\n    `useNavigate() may be used only in the context of a <Router> component.`\n  );\n  let dataRouterContext = React2.useContext(DataRouterContext);\n  let { basename, navigator } = React2.useContext(NavigationContext);\n  let { matches } = React2.useContext(RouteContext);\n  let { pathname: locationPathname } = useLocation();\n  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n  let activeRef = React2.useRef(false);\n  useIsomorphicLayoutEffect(() => {\n    activeRef.current = true;\n  });\n  let navigate = React2.useCallback(\n    (to, options = {}) => {\n      warning(activeRef.current, navigateEffectWarning);\n      if (!activeRef.current) return;\n      if (typeof to === \"number\") {\n        navigator.go(to);\n        return;\n      }\n      let path = resolveTo(\n        to,\n        JSON.parse(routePathnamesJson),\n        locationPathname,\n        options.relative === \"path\"\n      );\n      if (dataRouterContext == null && basename !== \"/\") {\n        path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n      }\n      validateNavigationTarget(\n        typeof to === \"string\" ? to : createPath(to),\n        navigator.createHref(path),\n        getNavigatorCurrentUrl(navigator),\n        \"reject\"\n      );\n      (!!options.replace ? navigator.replace : navigator.push)(\n        path,\n        options.state,\n        options\n      );\n    },\n    [\n      basename,\n      navigator,\n      routePathnamesJson,\n      locationPathname,\n      dataRouterContext\n    ]\n  );\n  return navigate;\n}\nvar OutletContext = React2.createContext(null);\nfunction useOutletContext() {\n  return React2.useContext(OutletContext);\n}\nfunction useOutlet(context) {\n  let outlet = React2.useContext(RouteContext).outlet;\n  return React2.useMemo(\n    () => outlet && /* @__PURE__ */ React2.createElement(OutletContext.Provider, { value: context }, outlet),\n    [outlet, context]\n  );\n}\nfunction useParams() {\n  let { matches } = React2.useContext(RouteContext);\n  let routeMatch = matches[matches.length - 1];\n  return routeMatch?.params ?? {};\n}\nfunction useResolvedPath(to, { relative } = {}) {\n  let { matches } = React2.useContext(RouteContext);\n  let { pathname: locationPathname } = useLocation();\n  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));\n  return React2.useMemo(\n    () => resolveTo(\n      to,\n      JSON.parse(routePathnamesJson),\n      locationPathname,\n      relative === \"path\"\n    ),\n    [to, routePathnamesJson, locationPathname, relative]\n  );\n}\nfunction useRoutes(routes, locationArg) {\n  return useRoutesImpl(routes, locationArg);\n}\nfunction useRoutesImpl(routes, locationArg, dataRouterOpts) {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of the\n    // router loaded. We can help them understand how to avoid that.\n    `useRoutes() may be used only in the context of a <Router> component.`\n  );\n  let { navigator } = React2.useContext(NavigationContext);\n  let { matches: parentMatches } = React2.useContext(RouteContext);\n  let routeMatch = parentMatches[parentMatches.length - 1];\n  let parentParams = routeMatch ? routeMatch.params : {};\n  let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n  let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n  let parentRoute = routeMatch && routeMatch.route;\n  if (ENABLE_DEV_WARNINGS) {\n    let parentPath = parentRoute && parentRoute.path || \"\";\n    warningOnce(\n      parentPathname,\n      !parentRoute || parentPath.endsWith(\"*\") || parentPath.endsWith(\"*?\"),\n      `You rendered descendant <Routes> (or called \\`useRoutes()\\`) at \"${parentPathname}\" (under <Route path=\"${parentPath}\">) but the parent route path has no trailing \"*\". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path=\"${parentPath}\"> to <Route path=\"${parentPath === \"/\" ? \"*\" : `${parentPath}/*`}\">.`\n    );\n  }\n  let locationFromContext = useLocation();\n  let location;\n  if (locationArg) {\n    let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n    invariant(\n      parentPathnameBase === \"/\" || parsedLocationArg.pathname?.startsWith(parentPathnameBase),\n      `When overriding the location using \\`<Routes location>\\` or \\`useRoutes(routes, location)\\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is \"${parentPathnameBase}\" but pathname \"${parsedLocationArg.pathname}\" was given in the \\`location\\` prop.`\n    );\n    location = parsedLocationArg;\n  } else {\n    location = locationFromContext;\n  }\n  let pathname = location.pathname || \"/\";\n  let remainingPathname = pathname;\n  if (parentPathnameBase !== \"/\") {\n    let parentSegments = parentPathnameBase.replace(/^\\//, \"\").split(\"/\");\n    let segments = pathname.replace(/^\\//, \"\").split(\"/\");\n    remainingPathname = \"/\" + segments.slice(parentSegments.length).join(\"/\");\n  }\n  let matches = dataRouterOpts && dataRouterOpts.state.matches.length ? (\n    // If we're in a data router, use the matches we've already identified but ensure\n    // we have the latest route instances from the manifest in case elements have changed\n    dataRouterOpts.state.matches.map(\n      (m) => Object.assign(m, {\n        route: dataRouterOpts.manifest[m.route.id] || m.route\n      })\n    )\n  ) : matchRoutes(routes, { pathname: remainingPathname });\n  if (ENABLE_DEV_WARNINGS) {\n    warning(\n      parentRoute || matches != null,\n      `No routes matched location \"${location.pathname}${location.search}${location.hash}\" `\n    );\n    warning(\n      matches == null || matches[matches.length - 1].route.element !== void 0 || matches[matches.length - 1].route.Component !== void 0 || matches[matches.length - 1].route.lazy !== void 0,\n      `Matched leaf route at location \"${location.pathname}${location.search}${location.hash}\" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an \"empty\" page.`\n    );\n  }\n  let renderedMatches = _renderMatches(\n    matches && matches.map(\n      (match) => Object.assign({}, match, {\n        params: Object.assign({}, parentParams, match.params),\n        pathname: joinPaths([\n          parentPathnameBase,\n          // Re-encode pathnames that were decoded inside matchRoutes.\n          // Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses\n          // `new URL()` internally and we need to prevent it from treating\n          // them as separators\n          navigator.encodeLocation ? navigator.encodeLocation(\n            match.pathname.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")\n          ).pathname : match.pathname\n        ]),\n        pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([\n          parentPathnameBase,\n          // Re-encode pathnames that were decoded inside matchRoutes\n          // Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses\n          // `new URL()` internally and we need to prevent it from treating\n          // them as separators\n          navigator.encodeLocation ? navigator.encodeLocation(\n            match.pathnameBase.replace(/%/g, \"%25\").replace(/\\?/g, \"%3F\").replace(/#/g, \"%23\")\n          ).pathname : match.pathnameBase\n        ])\n      })\n    ),\n    parentMatches,\n    dataRouterOpts\n  );\n  if (locationArg && renderedMatches) {\n    return /* @__PURE__ */ React2.createElement(\n      LocationContext.Provider,\n      {\n        value: {\n          location: {\n            pathname: \"/\",\n            search: \"\",\n            hash: \"\",\n            state: null,\n            key: \"default\",\n            mask: void 0,\n            ...location\n          },\n          navigationType: \"POP\" /* Pop */\n        }\n      },\n      renderedMatches\n    );\n  }\n  return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n  let error = useRouteError();\n  let message = isRouteErrorResponse(error) ? `${error.status} ${error.statusText}` : error instanceof Error ? error.message : JSON.stringify(error);\n  let stack = error instanceof Error ? error.stack : null;\n  let lightgrey = \"rgba(200,200,200, 0.5)\";\n  let preStyles = { padding: \"0.5rem\", backgroundColor: lightgrey };\n  let codeStyles = { padding: \"2px 4px\", backgroundColor: lightgrey };\n  let devInfo = null;\n  if (ENABLE_DEV_WARNINGS) {\n    console.error(\n      \"Error handled by React Router default ErrorBoundary:\",\n      error\n    );\n    devInfo = /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\"p\", null, \"\\u{1F4BF} Hey developer \\u{1F44B}\"), /* @__PURE__ */ React2.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own \", /* @__PURE__ */ React2.createElement(\"code\", { style: codeStyles }, \"ErrorBoundary\"), \" or\", \" \", /* @__PURE__ */ React2.createElement(\"code\", { style: codeStyles }, \"errorElement\"), \" prop on your route.\"));\n  }\n  return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\"h2\", null, \"Unexpected Application Error!\"), /* @__PURE__ */ React2.createElement(\"h3\", { style: { fontStyle: \"italic\" } }, message), stack ? /* @__PURE__ */ React2.createElement(\"pre\", { style: preStyles }, stack) : null, devInfo);\n}\nvar defaultErrorElement = /* @__PURE__ */ React2.createElement(DefaultErrorComponent, null);\nvar RenderErrorBoundary = class extends React2.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      location: props.location,\n      revalidation: props.revalidation,\n      error: props.error\n    };\n  }\n  static getDerivedStateFromError(error) {\n    return { error };\n  }\n  static getDerivedStateFromProps(props, state) {\n    if (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") {\n      return {\n        error: props.error,\n        location: props.location,\n        revalidation: props.revalidation\n      };\n    }\n    return {\n      error: props.error !== void 0 ? props.error : state.error,\n      location: state.location,\n      revalidation: props.revalidation || state.revalidation\n    };\n  }\n  componentDidCatch(error, errorInfo) {\n    if (this.props.onError) {\n      this.props.onError(error, errorInfo);\n    } else {\n      console.error(\n        \"React Router caught the following error during render\",\n        error\n      );\n    }\n  }\n  render() {\n    let error = this.state.error;\n    if (this.context && typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n      const decoded = decodeRouteErrorResponseDigest(error.digest);\n      if (decoded) error = decoded;\n    }\n    let result = error !== void 0 ? /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React2.createElement(\n      RouteErrorContext.Provider,\n      {\n        value: error,\n        children: this.props.component\n      }\n    )) : this.props.children;\n    if (this.context) {\n      return /* @__PURE__ */ React2.createElement(RSCErrorHandler, { error }, result);\n    }\n    return result;\n  }\n};\nRenderErrorBoundary.contextType = RSCRouterContext;\nvar errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();\nfunction RSCErrorHandler({\n  children,\n  error\n}) {\n  let { basename, navigator } = React2.useContext(NavigationContext);\n  if (typeof error === \"object\" && error && \"digest\" in error && typeof error.digest === \"string\") {\n    let redirect2 = decodeRedirectErrorDigest(error.digest);\n    if (redirect2) {\n      let existingRedirect = errorRedirectHandledMap.get(error);\n      if (existingRedirect) throw existingRedirect;\n      let parsed = parseToInfo(redirect2.location, basename);\n      let target = parsed.absoluteURL || parsed.to;\n      validateNavigationTarget(\n        redirect2.location,\n        target,\n        getNavigatorCurrentUrl(navigator),\n        \"allow-explicit\"\n      );\n      if (hasInvalidProtocol(target)) {\n        throw new Error(\"Invalid redirect location\");\n      }\n      if (isBrowser && !errorRedirectHandledMap.get(error)) {\n        if (parsed.isExternal || redirect2.reloadDocument) {\n          window.location.href = target;\n        } else {\n          const redirectPromise = Promise.resolve().then(\n            () => window.__reactRouterDataRouter.navigate(parsed.to, {\n              replace: redirect2.replace\n            })\n          );\n          errorRedirectHandledMap.set(error, redirectPromise);\n          throw redirectPromise;\n        }\n      }\n      return /* @__PURE__ */ React2.createElement(\"meta\", { httpEquiv: \"refresh\", content: `0;url=${target}` });\n    }\n  }\n  return children;\n}\nfunction RenderedRoute({ routeContext, match, children }) {\n  let dataRouterContext = React2.useContext(DataRouterContext);\n  if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n    dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n  }\n  return /* @__PURE__ */ React2.createElement(RouteContext.Provider, { value: routeContext }, children);\n}\nfunction _renderMatches(matches, parentMatches = [], dataRouterOpts) {\n  let dataRouterState = dataRouterOpts?.state;\n  if (matches == null) {\n    if (!dataRouterState) {\n      return null;\n    }\n    if (dataRouterState.errors) {\n      matches = dataRouterState.matches;\n    } else if (parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {\n      matches = dataRouterState.matches;\n    } else {\n      return null;\n    }\n  }\n  let renderedMatches = matches;\n  let errors = dataRouterState?.errors;\n  if (errors != null) {\n    let errorIndex = renderedMatches.findIndex(\n      (m) => m.route.id && errors?.[m.route.id] !== void 0\n    );\n    invariant(\n      errorIndex >= 0,\n      `Could not find a matching route for errors on route IDs: ${Object.keys(\n        errors\n      ).join(\",\")}`\n    );\n    renderedMatches = renderedMatches.slice(\n      0,\n      Math.min(renderedMatches.length, errorIndex + 1)\n    );\n  }\n  let renderFallback = false;\n  let fallbackIndex = -1;\n  if (dataRouterOpts && dataRouterState) {\n    renderFallback = dataRouterState.renderFallback;\n    for (let i = 0; i < renderedMatches.length; i++) {\n      let match = renderedMatches[i];\n      if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n        fallbackIndex = i;\n      }\n      if (match.route.id) {\n        let { loaderData, errors: errors2 } = dataRouterState;\n        let needsToRunLoader = match.route.loader && !loaderData.hasOwnProperty(match.route.id) && (!errors2 || errors2[match.route.id] === void 0);\n        if (match.route.lazy || needsToRunLoader) {\n          if (dataRouterOpts.isStatic) {\n            renderFallback = true;\n          }\n          if (fallbackIndex >= 0) {\n            renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n          } else {\n            renderedMatches = [renderedMatches[0]];\n          }\n          break;\n        }\n      }\n    }\n  }\n  let onErrorHandler = dataRouterOpts?.onError;\n  let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {\n    onErrorHandler(error, {\n      location: dataRouterState.location,\n      params: dataRouterState.matches?.[0]?.params ?? {},\n      pattern: getRoutePattern(dataRouterState.matches),\n      errorInfo\n    });\n  } : void 0;\n  return renderedMatches.reduceRight(\n    (outlet, match, index) => {\n      let error;\n      let shouldRenderHydrateFallback = false;\n      let errorElement = null;\n      let hydrateFallbackElement = null;\n      if (dataRouterState) {\n        error = errors && match.route.id ? errors[match.route.id] : void 0;\n        errorElement = match.route.errorElement || defaultErrorElement;\n        if (renderFallback) {\n          if (fallbackIndex < 0 && index === 0) {\n            warningOnce(\n              \"route-fallback\",\n              false,\n              \"No `HydrateFallback` element provided to render during initial hydration\"\n            );\n            shouldRenderHydrateFallback = true;\n            hydrateFallbackElement = null;\n          } else if (fallbackIndex === index) {\n            shouldRenderHydrateFallback = true;\n            hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n          }\n        }\n      }\n      let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));\n      let getChildren = () => {\n        let children;\n        if (error) {\n          children = errorElement;\n        } else if (shouldRenderHydrateFallback) {\n          children = hydrateFallbackElement;\n        } else if (match.route.Component) {\n          children = /* @__PURE__ */ React2.createElement(match.route.Component, null);\n        } else if (match.route.element) {\n          children = match.route.element;\n        } else {\n          children = outlet;\n        }\n        return /* @__PURE__ */ React2.createElement(\n          RenderedRoute,\n          {\n            match,\n            routeContext: {\n              outlet,\n              matches: matches2,\n              isDataRoute: dataRouterState != null\n            },\n            children\n          }\n        );\n      };\n      return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2.createElement(\n        RenderErrorBoundary,\n        {\n          location: dataRouterState.location,\n          revalidation: dataRouterState.revalidation,\n          component: errorElement,\n          error,\n          children: getChildren(),\n          routeContext: { outlet: null, matches: matches2, isDataRoute: true },\n          onError\n        }\n      ) : getChildren();\n    },\n    null\n  );\n}\nfunction getDataRouterConsoleError(hookName) {\n  return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext(hookName) {\n  let ctx = React2.useContext(DataRouterContext);\n  invariant(ctx, getDataRouterConsoleError(hookName));\n  return ctx;\n}\nfunction useDataRouterState(hookName) {\n  let state = React2.useContext(DataRouterStateContext);\n  invariant(state, getDataRouterConsoleError(hookName));\n  return state;\n}\nfunction useRouteContext(hookName) {\n  let route = React2.useContext(RouteContext);\n  invariant(route, getDataRouterConsoleError(hookName));\n  return route;\n}\nfunction useCurrentRouteId(hookName) {\n  let route = useRouteContext(hookName);\n  let thisRoute = route.matches[route.matches.length - 1];\n  invariant(\n    thisRoute.route.id,\n    `${hookName} can only be used on routes that contain a unique \"id\"`\n  );\n  return thisRoute.route.id;\n}\nfunction useRouteId() {\n  return useCurrentRouteId(\"useRouteId\" /* UseRouteId */);\n}\nfunction useNavigation() {\n  let state = useDataRouterState(\"useNavigation\" /* UseNavigation */);\n  return React2.useMemo(() => {\n    let { matches, historyAction, ...rest } = state.navigation;\n    return rest;\n  }, [state.navigation]);\n}\nfunction useRevalidator() {\n  let dataRouterContext = useDataRouterContext(\"useRevalidator\" /* UseRevalidator */);\n  let state = useDataRouterState(\"useRevalidator\" /* UseRevalidator */);\n  let revalidate = React2.useCallback(async () => {\n    await dataRouterContext.router.revalidate();\n  }, [dataRouterContext.router]);\n  return React2.useMemo(\n    () => ({ revalidate, state: state.revalidation }),\n    [revalidate, state.revalidation]\n  );\n}\nfunction useMatches() {\n  let { matches, loaderData } = useDataRouterState(\n    \"useMatches\" /* UseMatches */\n  );\n  return React2.useMemo(\n    () => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)),\n    [matches, loaderData]\n  );\n}\nfunction useLoaderData() {\n  let state = useDataRouterState(\"useLoaderData\" /* UseLoaderData */);\n  let routeId = useCurrentRouteId(\"useLoaderData\" /* UseLoaderData */);\n  return state.loaderData[routeId];\n}\nfunction useRouteLoaderData(routeId) {\n  let state = useDataRouterState(\"useRouteLoaderData\" /* UseRouteLoaderData */);\n  return state.loaderData[routeId];\n}\nfunction useActionData() {\n  let state = useDataRouterState(\"useActionData\" /* UseActionData */);\n  let routeId = useCurrentRouteId(\"useLoaderData\" /* UseLoaderData */);\n  return state.actionData ? state.actionData[routeId] : void 0;\n}\nfunction useRouteError() {\n  let error = React2.useContext(RouteErrorContext);\n  let state = useDataRouterState(\"useRouteError\" /* UseRouteError */);\n  let routeId = useCurrentRouteId(\"useRouteError\" /* UseRouteError */);\n  if (error !== void 0) {\n    return error;\n  }\n  return state.errors?.[routeId];\n}\nfunction useAsyncValue() {\n  let value = React2.useContext(AwaitContext);\n  return value?._data;\n}\nfunction useAsyncError() {\n  let value = React2.useContext(AwaitContext);\n  return value?._error;\n}\nvar blockerId = 0;\nfunction useBlocker(shouldBlock) {\n  let { router, basename } = useDataRouterContext(\"useBlocker\" /* UseBlocker */);\n  let state = useDataRouterState(\"useBlocker\" /* UseBlocker */);\n  let [blockerKey, setBlockerKey] = React2.useState(\"\");\n  let blockerFunction = React2.useCallback(\n    (arg) => {\n      if (typeof shouldBlock !== \"function\") {\n        return !!shouldBlock;\n      }\n      if (basename === \"/\") {\n        return shouldBlock(arg);\n      }\n      let { currentLocation, nextLocation, historyAction } = arg;\n      return shouldBlock({\n        currentLocation: {\n          ...currentLocation,\n          pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n        },\n        nextLocation: {\n          ...nextLocation,\n          pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n        },\n        historyAction\n      });\n    },\n    [basename, shouldBlock]\n  );\n  React2.useEffect(() => {\n    let key = String(++blockerId);\n    setBlockerKey(key);\n    return () => router.deleteBlocker(key);\n  }, [router]);\n  React2.useEffect(() => {\n    if (blockerKey !== \"\") {\n      router.getBlocker(blockerKey, blockerFunction);\n    }\n  }, [router, blockerKey, blockerFunction]);\n  return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\nfunction useNavigateStable() {\n  let { router } = useDataRouterContext(\"useNavigate\" /* UseNavigateStable */);\n  let id = useCurrentRouteId(\"useNavigate\" /* UseNavigateStable */);\n  let activeRef = React2.useRef(false);\n  useIsomorphicLayoutEffect(() => {\n    activeRef.current = true;\n  });\n  let navigate = React2.useCallback(\n    async (to, options = {}) => {\n      warning(activeRef.current, navigateEffectWarning);\n      if (!activeRef.current) return;\n      if (typeof to === \"number\") {\n        await router.navigate(to);\n      } else {\n        await router.navigate(to, { fromRouteId: id, ...options });\n      }\n    },\n    [router, id]\n  );\n  return navigate;\n}\nvar alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n  if (!cond && !alreadyWarned[key]) {\n    alreadyWarned[key] = true;\n    warning(false, message);\n  }\n}\nfunction useRoute(...args) {\n  const currentRouteId = useCurrentRouteId(\n    \"useRoute\" /* UseRoute */\n  );\n  const id = args[0] ?? currentRouteId;\n  const state = useDataRouterState(\"useRoute\" /* UseRoute */);\n  const route = state.matches.find(({ route: route2 }) => route2.id === id);\n  if (route === void 0) return void 0;\n  return {\n    handle: route.route.handle,\n    loaderData: state.loaderData[id],\n    actionData: state.actionData?.[id]\n  };\n}\nfunction toRouterStateMatch(match) {\n  return {\n    id: match.route.id,\n    pathname: match.pathname,\n    params: match.params,\n    handle: match.route.handle\n  };\n}\nfunction useRouterState() {\n  let {\n    location,\n    historyAction: type,\n    matches,\n    navigation\n  } = useDataRouterState(\"unstable_useRouterState\" /* UseRouterState */);\n  let active = React2.useMemo(\n    () => ({\n      type,\n      location,\n      searchParams: new URLSearchParams(location.search),\n      params: matches[matches.length - 1]?.params ?? {},\n      matches: matches.map((m) => toRouterStateMatch(m))\n    }),\n    [location, matches, type]\n  );\n  let pending = React2.useMemo(() => {\n    if (navigation.state === \"idle\") return null;\n    let shared = {\n      type: navigation.historyAction,\n      location: navigation.location,\n      searchParams: new URLSearchParams(navigation.location.search),\n      params: navigation.matches[navigation.matches.length - 1]?.params ?? {},\n      matches: navigation.matches.map((m) => toRouterStateMatch(m))\n    };\n    return navigation.state === \"loading\" ? {\n      ...shared,\n      state: \"loading\",\n      formMethod: navigation.formMethod,\n      formAction: navigation.formAction,\n      formEncType: navigation.formEncType,\n      formData: navigation.formData,\n      json: navigation.json,\n      text: navigation.text\n    } : {\n      ...shared,\n      state: \"submitting\",\n      formMethod: navigation.formMethod,\n      formAction: navigation.formAction,\n      formEncType: navigation.formEncType,\n      formData: navigation.formData,\n      json: navigation.json,\n      text: navigation.text\n    };\n  }, [navigation]);\n  return React2.useMemo(\n    () => ({ active, pending }),\n    [active, pending]\n  );\n}\n\n// lib/components.tsx\nimport * as React3 from \"react\";\n\n// lib/server-runtime/warnings.ts\nvar alreadyWarned2 = {};\nfunction warnOnce(condition, message) {\n  if (!condition && !alreadyWarned2[message]) {\n    alreadyWarned2[message] = true;\n    console.warn(message);\n  }\n}\n\n// lib/components.tsx\nvar USE_OPTIMISTIC = \"useOptimistic\";\nvar useOptimisticImpl = React3[USE_OPTIMISTIC];\nvar stableUseOptimisticSetter = () => void 0;\nfunction useOptimisticSafe(val) {\n  if (useOptimisticImpl) {\n    return useOptimisticImpl(val);\n  } else {\n    return [val, stableUseOptimisticSetter];\n  }\n}\nfunction mapRouteProperties(route) {\n  let updates = {\n    // Note: this check also occurs in createRoutesFromChildren so update\n    // there if you change this -- please and thank you!\n    hasErrorBoundary: route.hasErrorBoundary || route.ErrorBoundary != null || route.errorElement != null\n  };\n  if (route.Component) {\n    if (ENABLE_DEV_WARNINGS) {\n      if (route.element) {\n        warning(\n          false,\n          \"You should not include both `Component` and `element` on your route - `Component` will be used.\"\n        );\n      }\n    }\n    Object.assign(updates, {\n      element: React3.createElement(route.Component),\n      Component: void 0\n    });\n  }\n  if (route.HydrateFallback) {\n    if (ENABLE_DEV_WARNINGS) {\n      if (route.hydrateFallbackElement) {\n        warning(\n          false,\n          \"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used.\"\n        );\n      }\n    }\n    Object.assign(updates, {\n      hydrateFallbackElement: React3.createElement(route.HydrateFallback),\n      HydrateFallback: void 0\n    });\n  }\n  if (route.ErrorBoundary) {\n    if (ENABLE_DEV_WARNINGS) {\n      if (route.errorElement) {\n        warning(\n          false,\n          \"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used.\"\n        );\n      }\n    }\n    Object.assign(updates, {\n      errorElement: React3.createElement(route.ErrorBoundary),\n      ErrorBoundary: void 0\n    });\n  }\n  return updates;\n}\nvar hydrationRouteProperties = [\n  \"HydrateFallback\",\n  \"hydrateFallbackElement\"\n];\nfunction createMemoryRouter(routes, opts) {\n  return createRouter({\n    basename: opts?.basename,\n    getContext: opts?.getContext,\n    future: opts?.future,\n    history: createMemoryHistory({\n      initialEntries: opts?.initialEntries,\n      initialIndex: opts?.initialIndex\n    }),\n    hydrationData: opts?.hydrationData,\n    routes,\n    hydrationRouteProperties,\n    mapRouteProperties,\n    dataStrategy: opts?.dataStrategy,\n    patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n    instrumentations: opts?.instrumentations\n  }).initialize();\n}\nvar Deferred = class {\n  constructor() {\n    this.status = \"pending\";\n    this.promise = new Promise((resolve, reject) => {\n      this.resolve = (value) => {\n        if (this.status === \"pending\") {\n          this.status = \"resolved\";\n          resolve(value);\n        }\n      };\n      this.reject = (reason) => {\n        if (this.status === \"pending\") {\n          this.status = \"rejected\";\n          reject(reason);\n        }\n      };\n    });\n  }\n};\nfunction RouterProvider({\n  router,\n  flushSync: reactDomFlushSyncImpl,\n  onError,\n  useTransitions\n}) {\n  let unstable_rsc = useIsRSCRouterContext();\n  useTransitions = unstable_rsc || useTransitions;\n  let [_state, setStateImpl] = React3.useState(router.state);\n  let [state, setOptimisticState] = useOptimisticSafe(_state);\n  let [pendingState, setPendingState] = React3.useState();\n  let [vtContext, setVtContext] = React3.useState({\n    isTransitioning: false\n  });\n  let [renderDfd, setRenderDfd] = React3.useState();\n  let [transition, setTransition] = React3.useState();\n  let [interruption, setInterruption] = React3.useState();\n  let fetcherData = React3.useRef(/* @__PURE__ */ new Map());\n  let setState = React3.useCallback(\n    (newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {\n      if (newErrors && onError) {\n        Object.values(newErrors).forEach(\n          (error) => onError(error, {\n            location: newState.location,\n            params: newState.matches[0]?.params ?? {},\n            pattern: getRoutePattern(newState.matches)\n          })\n        );\n      }\n      newState.fetchers.forEach((fetcher, key) => {\n        if (fetcher.data !== void 0) {\n          fetcherData.current.set(key, fetcher.data);\n        }\n      });\n      deletedFetchers.forEach((key) => fetcherData.current.delete(key));\n      warnOnce(\n        flushSync === false || reactDomFlushSyncImpl != null,\n        'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from \"react-router/dom\"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'\n      );\n      let isViewTransitionAvailable = router.window != null && router.window.document != null && typeof router.window.document.startViewTransition === \"function\";\n      warnOnce(\n        viewTransitionOpts == null || isViewTransitionAvailable,\n        \"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available.\"\n      );\n      if (!viewTransitionOpts || !isViewTransitionAvailable) {\n        if (reactDomFlushSyncImpl && flushSync) {\n          reactDomFlushSyncImpl(() => setStateImpl(newState));\n        } else if (useTransitions === false) {\n          setStateImpl(newState);\n        } else {\n          React3.startTransition(() => {\n            if (useTransitions === true) {\n              setOptimisticState((s) => getOptimisticRouterState(s, newState));\n            }\n            setStateImpl(newState);\n          });\n        }\n        return;\n      }\n      if (reactDomFlushSyncImpl && flushSync) {\n        reactDomFlushSyncImpl(() => {\n          if (transition) {\n            renderDfd?.resolve();\n            transition.skipTransition();\n          }\n          setVtContext({\n            isTransitioning: true,\n            flushSync: true,\n            currentLocation: viewTransitionOpts.currentLocation,\n            nextLocation: viewTransitionOpts.nextLocation\n          });\n        });\n        let t = router.window.document.startViewTransition(() => {\n          reactDomFlushSyncImpl(() => setStateImpl(newState));\n        });\n        t.finished.finally(() => {\n          reactDomFlushSyncImpl(() => {\n            setRenderDfd(void 0);\n            setTransition(void 0);\n            setPendingState(void 0);\n            setVtContext({ isTransitioning: false });\n          });\n        });\n        reactDomFlushSyncImpl(() => setTransition(t));\n        return;\n      }\n      if (transition) {\n        renderDfd?.resolve();\n        transition.skipTransition();\n        setInterruption({\n          state: newState,\n          currentLocation: viewTransitionOpts.currentLocation,\n          nextLocation: viewTransitionOpts.nextLocation\n        });\n      } else {\n        setPendingState(newState);\n        setVtContext({\n          isTransitioning: true,\n          flushSync: false,\n          currentLocation: viewTransitionOpts.currentLocation,\n          nextLocation: viewTransitionOpts.nextLocation\n        });\n      }\n    },\n    [\n      router.window,\n      reactDomFlushSyncImpl,\n      transition,\n      renderDfd,\n      useTransitions,\n      setOptimisticState,\n      onError\n    ]\n  );\n  React3.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n  React3.useEffect(() => {\n    if (vtContext.isTransitioning && !vtContext.flushSync) {\n      setRenderDfd(new Deferred());\n    }\n  }, [vtContext]);\n  React3.useEffect(() => {\n    if (renderDfd && pendingState && router.window) {\n      let newState = pendingState;\n      let renderPromise = renderDfd.promise;\n      let transition2 = router.window.document.startViewTransition(async () => {\n        if (useTransitions === false) {\n          setStateImpl(newState);\n        } else {\n          React3.startTransition(() => {\n            if (useTransitions === true) {\n              setOptimisticState((s) => getOptimisticRouterState(s, newState));\n            }\n            setStateImpl(newState);\n          });\n        }\n        await renderPromise;\n      });\n      transition2.finished.finally(() => {\n        setRenderDfd(void 0);\n        setTransition(void 0);\n        setPendingState(void 0);\n        setVtContext({ isTransitioning: false });\n      });\n      setTransition(transition2);\n    }\n  }, [\n    pendingState,\n    renderDfd,\n    router.window,\n    useTransitions,\n    setOptimisticState\n  ]);\n  React3.useEffect(() => {\n    if (renderDfd && pendingState && state.location.key === pendingState.location.key) {\n      renderDfd.resolve();\n    }\n  }, [renderDfd, transition, state.location, pendingState]);\n  React3.useEffect(() => {\n    if (!vtContext.isTransitioning && interruption) {\n      setPendingState(interruption.state);\n      setVtContext({\n        isTransitioning: true,\n        flushSync: false,\n        currentLocation: interruption.currentLocation,\n        nextLocation: interruption.nextLocation\n      });\n      setInterruption(void 0);\n    }\n  }, [vtContext.isTransitioning, interruption]);\n  let navigator = React3.useMemo(() => {\n    return {\n      createHref: router.createHref,\n      createURL: router.createURL,\n      encodeLocation: router.encodeLocation,\n      go: (n) => router.navigate(n),\n      push: (to, state2, opts) => router.navigate(to, {\n        state: state2,\n        preventScrollReset: opts?.preventScrollReset\n      }),\n      replace: (to, state2, opts) => router.navigate(to, {\n        replace: true,\n        state: state2,\n        preventScrollReset: opts?.preventScrollReset\n      })\n    };\n  }, [router]);\n  let basename = router.basename || \"/\";\n  let dataRouterContext = React3.useMemo(\n    () => ({\n      router,\n      navigator,\n      static: false,\n      basename,\n      onError\n    }),\n    [router, navigator, basename, onError]\n  );\n  return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React3.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React3.createElement(FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React3.createElement(ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React3.createElement(\n    Router,\n    {\n      basename,\n      location: state.location,\n      navigationType: state.historyAction,\n      navigator,\n      useTransitions\n    },\n    /* @__PURE__ */ React3.createElement(\n      MemoizedDataRoutes,\n      {\n        routes: router.routes,\n        manifest: router.manifest,\n        future: router.future,\n        state,\n        isStatic: false,\n        onError\n      }\n    )\n  ))))), null);\n}\nfunction getOptimisticRouterState(currentState, newState) {\n  return {\n    // Don't surface \"current location specific\" stuff mid-navigation\n    // (historyAction, location, matches, loaderData, errors, initialized,\n    // restoreScroll, preventScrollReset, blockers, etc.)\n    ...currentState,\n    // Only surface \"pending/in-flight stuff\"\n    // (navigation, revalidation, actionData, fetchers, )\n    navigation: newState.navigation.state !== \"idle\" ? newState.navigation : currentState.navigation,\n    revalidation: newState.revalidation !== \"idle\" ? newState.revalidation : currentState.revalidation,\n    actionData: newState.navigation.state !== \"submitting\" ? newState.actionData : currentState.actionData,\n    fetchers: newState.fetchers\n  };\n}\nvar MemoizedDataRoutes = React3.memo(DataRoutes2);\nfunction DataRoutes2({\n  routes,\n  manifest,\n  future,\n  state,\n  isStatic,\n  onError\n}) {\n  return useRoutesImpl(routes, void 0, {\n    manifest,\n    state,\n    isStatic,\n    onError,\n    future\n  });\n}\nfunction MemoryRouter({\n  basename,\n  children,\n  initialEntries,\n  initialIndex,\n  useTransitions\n}) {\n  let historyRef = React3.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createMemoryHistory({\n      initialEntries,\n      initialIndex,\n      v5Compat: true\n    });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React3.useState({\n    action: history.action,\n    location: history.location\n  });\n  let setState = React3.useCallback(\n    (newState) => {\n      if (useTransitions === false) {\n        setStateImpl(newState);\n      } else {\n        React3.startTransition(() => setStateImpl(newState));\n      }\n    },\n    [useTransitions]\n  );\n  React3.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  return /* @__PURE__ */ React3.createElement(\n    Router,\n    {\n      basename,\n      children,\n      location: state.location,\n      navigationType: state.action,\n      navigator: history,\n      useTransitions\n    }\n  );\n}\nfunction Navigate({\n  to,\n  replace: replace2,\n  state,\n  relative\n}) {\n  invariant(\n    useInRouterContext(),\n    // TODO: This error is probably because they somehow have 2 versions of\n    // the router loaded. We can help them understand how to avoid that.\n    `<Navigate> may be used only in the context of a <Router> component.`\n  );\n  let { static: isStatic, navigator } = React3.useContext(NavigationContext);\n  warning(\n    !isStatic,\n    `<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`\n  );\n  let { matches } = React3.useContext(RouteContext);\n  let { pathname: locationPathname } = useLocation();\n  let navigate = useNavigate();\n  let path = resolveTo(\n    to,\n    getResolveToMatches(matches),\n    locationPathname,\n    relative === \"path\"\n  );\n  validateNavigationTarget(\n    typeof to === \"string\" ? to : createPath(to),\n    navigator.createHref(path),\n    getNavigatorCurrentUrl(navigator),\n    \"reject\"\n  );\n  let jsonPath = JSON.stringify(path);\n  React3.useEffect(() => {\n    navigate(JSON.parse(jsonPath), { replace: replace2, state, relative });\n  }, [navigate, jsonPath, relative, replace2, state]);\n  return null;\n}\nfunction Outlet(props) {\n  return useOutlet(props.context);\n}\nfunction Route(props) {\n  invariant(\n    false,\n    `A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`\n  );\n}\nfunction Router({\n  basename: basenameProp = \"/\",\n  children = null,\n  location: locationProp,\n  navigationType = \"POP\" /* Pop */,\n  navigator,\n  static: staticProp = false,\n  useTransitions\n}) {\n  invariant(\n    !useInRouterContext(),\n    `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`\n  );\n  let basename = basenameProp.replace(/^\\/*/, \"/\");\n  let navigationContext = React3.useMemo(\n    () => ({\n      basename,\n      navigator,\n      static: staticProp,\n      useTransitions,\n      future: {}\n    }),\n    [basename, navigator, staticProp, useTransitions]\n  );\n  if (typeof locationProp === \"string\") {\n    locationProp = parsePath(locationProp);\n  }\n  let {\n    pathname = \"/\",\n    search = \"\",\n    hash = \"\",\n    state = null,\n    key = \"default\",\n    mask\n  } = locationProp;\n  let locationContext = React3.useMemo(() => {\n    let trailingPathname = stripBasename(pathname, basename);\n    if (trailingPathname == null) {\n      return null;\n    }\n    return {\n      location: {\n        pathname: trailingPathname,\n        search,\n        hash,\n        state,\n        key,\n        mask\n      },\n      navigationType\n    };\n  }, [basename, pathname, search, hash, state, key, navigationType, mask]);\n  warning(\n    locationContext != null,\n    `<Router basename=\"${basename}\"> is not able to match the URL \"${pathname}${search}${hash}\" because it does not start with the basename, so the <Router> won't render anything.`\n  );\n  if (locationContext == null) {\n    return null;\n  }\n  return /* @__PURE__ */ React3.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3.createElement(LocationContext.Provider, { children, value: locationContext }));\n}\nfunction Routes({\n  children,\n  location\n}) {\n  return useRoutes(createRoutesFromChildren(children), location);\n}\nfunction Await({\n  children,\n  errorElement,\n  resolve\n}) {\n  let dataRouterContext = React3.useContext(DataRouterContext);\n  let dataRouterStateContext = React3.useContext(DataRouterStateContext);\n  let onError = React3.useCallback(\n    (error, errorInfo) => {\n      if (dataRouterContext && dataRouterContext.onError && dataRouterStateContext) {\n        dataRouterContext.onError(error, {\n          location: dataRouterStateContext.location,\n          params: dataRouterStateContext.matches[0]?.params || {},\n          pattern: getRoutePattern(dataRouterStateContext.matches),\n          errorInfo\n        });\n      }\n    },\n    [dataRouterContext, dataRouterStateContext]\n  );\n  return /* @__PURE__ */ React3.createElement(\n    AwaitErrorBoundary,\n    {\n      resolve,\n      errorElement,\n      onError\n    },\n    /* @__PURE__ */ React3.createElement(ResolveAwait, null, children)\n  );\n}\nvar AwaitErrorBoundary = class extends React3.Component {\n  constructor(props) {\n    super(props);\n    this.state = { error: null };\n  }\n  static getDerivedStateFromError(error) {\n    return { error };\n  }\n  componentDidCatch(error, errorInfo) {\n    if (this.props.onError) {\n      this.props.onError(error, errorInfo);\n    } else {\n      console.error(\n        \"<Await> caught the following error during render\",\n        error,\n        errorInfo\n      );\n    }\n  }\n  render() {\n    let { children, errorElement, resolve } = this.props;\n    let promise = null;\n    let status = 0 /* pending */;\n    if (!(resolve instanceof Promise)) {\n      status = 1 /* success */;\n      promise = Promise.resolve();\n      Object.defineProperty(promise, \"_tracked\", { get: () => true });\n      Object.defineProperty(promise, \"_data\", { get: () => resolve });\n    } else if (this.state.error) {\n      status = 2 /* error */;\n      let renderError = this.state.error;\n      promise = Promise.reject().catch(() => {\n      });\n      Object.defineProperty(promise, \"_tracked\", { get: () => true });\n      Object.defineProperty(promise, \"_error\", { get: () => renderError });\n    } else if (resolve._tracked) {\n      promise = resolve;\n      status = \"_error\" in promise ? 2 /* error */ : \"_data\" in promise ? 1 /* success */ : 0 /* pending */;\n    } else {\n      status = 0 /* pending */;\n      Object.defineProperty(resolve, \"_tracked\", { get: () => true });\n      promise = resolve.then(\n        (data2) => Object.defineProperty(resolve, \"_data\", { get: () => data2 }),\n        (error) => {\n          this.props.onError?.(error);\n          Object.defineProperty(resolve, \"_error\", { get: () => error });\n        }\n      );\n    }\n    if (status === 2 /* error */ && !errorElement) {\n      throw promise._error;\n    }\n    if (status === 2 /* error */) {\n      return /* @__PURE__ */ React3.createElement(AwaitContext.Provider, { value: promise, children: errorElement });\n    }\n    if (status === 1 /* success */) {\n      return /* @__PURE__ */ React3.createElement(AwaitContext.Provider, { value: promise, children });\n    }\n    throw promise;\n  }\n};\nfunction ResolveAwait({\n  children\n}) {\n  let data2 = useAsyncValue();\n  let toRender = typeof children === \"function\" ? children(data2) : children;\n  return /* @__PURE__ */ React3.createElement(React3.Fragment, null, toRender);\n}\nfunction createRoutesFromChildren(children, parentPath = []) {\n  let routes = [];\n  React3.Children.forEach(children, (element, index) => {\n    if (!React3.isValidElement(element)) {\n      return;\n    }\n    let treePath = [...parentPath, index];\n    if (element.type === React3.Fragment) {\n      routes.push.apply(\n        routes,\n        createRoutesFromChildren(element.props.children, treePath)\n      );\n      return;\n    }\n    invariant(\n      element.type === Route,\n      `[${typeof element.type === \"string\" ? element.type : element.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`\n    );\n    invariant(\n      !element.props.index || !element.props.children,\n      \"An index route cannot have child routes.\"\n    );\n    let route = {\n      id: element.props.id || treePath.join(\"-\"),\n      caseSensitive: element.props.caseSensitive,\n      element: element.props.element,\n      Component: element.props.Component,\n      index: element.props.index,\n      path: element.props.path,\n      middleware: element.props.middleware,\n      loader: element.props.loader,\n      action: element.props.action,\n      hydrateFallbackElement: element.props.hydrateFallbackElement,\n      HydrateFallback: element.props.HydrateFallback,\n      errorElement: element.props.errorElement,\n      ErrorBoundary: element.props.ErrorBoundary,\n      hasErrorBoundary: element.props.hasErrorBoundary === true || element.props.ErrorBoundary != null || element.props.errorElement != null,\n      shouldRevalidate: element.props.shouldRevalidate,\n      handle: element.props.handle,\n      lazy: element.props.lazy\n    };\n    if (element.props.children) {\n      route.children = createRoutesFromChildren(\n        element.props.children,\n        treePath\n      );\n    }\n    routes.push(route);\n  });\n  return routes;\n}\nvar createRoutesFromElements = createRoutesFromChildren;\nfunction renderMatches(matches) {\n  return _renderMatches(matches);\n}\nfunction useRouteComponentProps() {\n  return {\n    params: useParams(),\n    loaderData: useLoaderData(),\n    actionData: useActionData(),\n    matches: useMatches()\n  };\n}\nfunction WithComponentProps({\n  children\n}) {\n  const props = useRouteComponentProps();\n  return React3.cloneElement(children, props);\n}\nfunction withComponentProps(Component4) {\n  return function WithComponentProps2() {\n    const props = useRouteComponentProps();\n    return React3.createElement(Component4, props);\n  };\n}\nfunction useHydrateFallbackProps() {\n  return {\n    params: useParams(),\n    loaderData: useLoaderData(),\n    actionData: useActionData()\n  };\n}\nfunction WithHydrateFallbackProps({\n  children\n}) {\n  const props = useHydrateFallbackProps();\n  return React3.cloneElement(children, props);\n}\nfunction withHydrateFallbackProps(HydrateFallback) {\n  return function WithHydrateFallbackProps2() {\n    const props = useHydrateFallbackProps();\n    return React3.createElement(HydrateFallback, props);\n  };\n}\nfunction useErrorBoundaryProps() {\n  return {\n    params: useParams(),\n    loaderData: useLoaderData(),\n    actionData: useActionData(),\n    error: useRouteError()\n  };\n}\nfunction WithErrorBoundaryProps({\n  children\n}) {\n  const props = useErrorBoundaryProps();\n  return React3.cloneElement(children, props);\n}\nfunction withErrorBoundaryProps(ErrorBoundary) {\n  return function WithErrorBoundaryProps2() {\n    const props = useErrorBoundaryProps();\n    return React3.createElement(ErrorBoundary, props);\n  };\n}\n\n// lib/dom/dom.ts\nvar defaultMethod = \"get\";\nvar defaultEncType = \"application/x-www-form-urlencoded\";\nfunction isHtmlElement(object) {\n  return typeof HTMLElement !== \"undefined\" && object instanceof HTMLElement;\n}\nfunction isButtonElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\nfunction isFormElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\nfunction isInputElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\nfunction isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n  return event.button === 0 && // Ignore everything but left clicks\n  (!target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n  !isModifiedEvent(event);\n}\nfunction createSearchParams(init = \"\") {\n  return new URLSearchParams(\n    typeof init === \"string\" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo2, key) => {\n      let value = init[key];\n      return memo2.concat(\n        Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n      );\n    }, [])\n  );\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n  let searchParams = createSearchParams(locationSearch);\n  if (defaultSearchParams) {\n    defaultSearchParams.forEach((_, key) => {\n      if (!searchParams.has(key)) {\n        defaultSearchParams.getAll(key).forEach((value) => {\n          searchParams.append(key, value);\n        });\n      }\n    });\n  }\n  return searchParams;\n}\nvar _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n  if (_formDataSupportsSubmitter === null) {\n    try {\n      new FormData(\n        document.createElement(\"form\"),\n        // @ts-expect-error if FormData supports the submitter parameter, this will throw\n        0\n      );\n      _formDataSupportsSubmitter = false;\n    } catch (e) {\n      _formDataSupportsSubmitter = true;\n    }\n  }\n  return _formDataSupportsSubmitter;\n}\nvar supportedFormEncTypes = /* @__PURE__ */ new Set([\n  \"application/x-www-form-urlencoded\",\n  \"multipart/form-data\",\n  \"text/plain\"\n]);\nfunction getFormEncType(encType) {\n  if (encType != null && !supportedFormEncTypes.has(encType)) {\n    warning(\n      false,\n      `\"${encType}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` and will default to \"${defaultEncType}\"`\n    );\n    return null;\n  }\n  return encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n  let method;\n  let action;\n  let encType;\n  let formData;\n  let body;\n  if (isFormElement(target)) {\n    let attr = target.getAttribute(\"action\");\n    action = attr ? stripBasename(attr, basename) : null;\n    method = target.getAttribute(\"method\") || defaultMethod;\n    encType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n    formData = new FormData(target);\n  } else if (isButtonElement(target) || isInputElement(target) && (target.type === \"submit\" || target.type === \"image\")) {\n    let form = target.form;\n    if (form == null) {\n      throw new Error(\n        `Cannot submit a <button> or <input type=\"submit\"> without a <form>`\n      );\n    }\n    let attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n    action = attr ? stripBasename(attr, basename) : null;\n    method = target.getAttribute(\"formmethod\") || form.getAttribute(\"method\") || defaultMethod;\n    encType = getFormEncType(target.getAttribute(\"formenctype\")) || getFormEncType(form.getAttribute(\"enctype\")) || defaultEncType;\n    formData = new FormData(form, target);\n    if (!isFormDataSubmitterSupported()) {\n      let { name, type, value } = target;\n      if (type === \"image\") {\n        let prefix = name ? `${name}.` : \"\";\n        formData.append(`${prefix}x`, \"0\");\n        formData.append(`${prefix}y`, \"0\");\n      } else if (name) {\n        formData.append(name, value);\n      }\n    }\n  } else if (isHtmlElement(target)) {\n    throw new Error(\n      `Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">`\n    );\n  } else {\n    method = defaultMethod;\n    action = null;\n    encType = defaultEncType;\n    body = target;\n  }\n  if (formData && encType === \"text/plain\") {\n    body = formData;\n    formData = void 0;\n  }\n  return { action, method: method.toLowerCase(), encType, formData, body };\n}\n\n// lib/dom/ssr/single-fetch.tsx\nimport * as React4 from \"react\";\n\n// vendor/turbo-stream-v2/utils.ts\nvar HOLE = -1;\nvar NAN = -2;\nvar NEGATIVE_INFINITY = -3;\nvar NEGATIVE_ZERO = -4;\nvar NULL = -5;\nvar POSITIVE_INFINITY = -6;\nvar UNDEFINED = -7;\nvar TYPE_BIGINT = \"B\";\nvar TYPE_DATE = \"D\";\nvar TYPE_ERROR = \"E\";\nvar TYPE_MAP = \"M\";\nvar TYPE_NULL_OBJECT = \"N\";\nvar TYPE_PROMISE = \"P\";\nvar TYPE_REGEXP = \"R\";\nvar TYPE_SET = \"S\";\nvar TYPE_SYMBOL = \"Y\";\nvar TYPE_URL = \"U\";\nvar TYPE_PREVIOUS_RESOLVED = \"Z\";\nvar Deferred2 = class {\n  constructor() {\n    this.promise = new Promise((resolve, reject) => {\n      this.resolve = resolve;\n      this.reject = reject;\n    });\n  }\n};\nfunction createLineSplittingTransform() {\n  const decoder = new TextDecoder();\n  let leftover = \"\";\n  return new TransformStream({\n    transform(chunk, controller) {\n      const str = decoder.decode(chunk, { stream: true });\n      const parts = (leftover + str).split(\"\\n\");\n      leftover = parts.pop() || \"\";\n      for (const part of parts) {\n        controller.enqueue(part);\n      }\n    },\n    flush(controller) {\n      if (leftover) {\n        controller.enqueue(leftover);\n      }\n    }\n  });\n}\n\n// vendor/turbo-stream-v2/flatten.ts\nvar TIME_LIMIT_MS = 1;\nvar getNow = () => Date.now();\nvar yieldToMain = () => new Promise((resolve) => setTimeout(resolve, 0));\nasync function flatten(input) {\n  const { indices } = this;\n  const existing = indices.get(input);\n  if (existing) return [existing];\n  if (input === void 0) return UNDEFINED;\n  if (input === null) return NULL;\n  if (Number.isNaN(input)) return NAN;\n  if (input === Number.POSITIVE_INFINITY) return POSITIVE_INFINITY;\n  if (input === Number.NEGATIVE_INFINITY) return NEGATIVE_INFINITY;\n  if (input === 0 && 1 / input < 0) return NEGATIVE_ZERO;\n  const index = this.index++;\n  indices.set(input, index);\n  const stack = [[input, index]];\n  await stringify.call(this, stack);\n  return index;\n}\nasync function stringify(stack) {\n  const { deferred, indices, plugins, postPlugins } = this;\n  const str = this.stringified;\n  let lastYieldTime = getNow();\n  const flattenValue = (value) => {\n    const existing = indices.get(value);\n    if (existing) return [existing];\n    if (value === void 0) return UNDEFINED;\n    if (value === null) return NULL;\n    if (Number.isNaN(value)) return NAN;\n    if (value === Number.POSITIVE_INFINITY) return POSITIVE_INFINITY;\n    if (value === Number.NEGATIVE_INFINITY) return NEGATIVE_INFINITY;\n    if (value === 0 && 1 / value < 0) return NEGATIVE_ZERO;\n    const index = this.index++;\n    indices.set(value, index);\n    stack.push([value, index]);\n    return index;\n  };\n  let i = 0;\n  while (stack.length > 0) {\n    const now = getNow();\n    if (++i % 6e3 === 0 && now - lastYieldTime >= TIME_LIMIT_MS) {\n      await yieldToMain();\n      lastYieldTime = getNow();\n    }\n    const [input, index] = stack.pop();\n    const partsForObj = (obj) => Object.keys(obj).map((k) => `\"_${flattenValue(k)}\":${flattenValue(obj[k])}`).join(\",\");\n    let error = null;\n    switch (typeof input) {\n      case \"boolean\":\n      case \"number\":\n      case \"string\":\n        str[index] = JSON.stringify(input);\n        break;\n      case \"bigint\":\n        str[index] = `[\"${TYPE_BIGINT}\",\"${input}\"]`;\n        break;\n      case \"symbol\": {\n        const keyFor = Symbol.keyFor(input);\n        if (!keyFor) {\n          error = new Error(\n            \"Cannot encode symbol unless created with Symbol.for()\"\n          );\n        } else {\n          str[index] = `[\"${TYPE_SYMBOL}\",${JSON.stringify(keyFor)}]`;\n        }\n        break;\n      }\n      case \"object\": {\n        if (!input) {\n          str[index] = `${NULL}`;\n          break;\n        }\n        const isArray = Array.isArray(input);\n        let pluginHandled = false;\n        if (!isArray && plugins) {\n          for (const plugin of plugins) {\n            const pluginResult = plugin(input);\n            if (Array.isArray(pluginResult)) {\n              pluginHandled = true;\n              const [pluginIdentifier, ...rest] = pluginResult;\n              str[index] = `[${JSON.stringify(pluginIdentifier)}`;\n              if (rest.length > 0) {\n                str[index] += `,${rest.map((v) => flattenValue(v)).join(\",\")}`;\n              }\n              str[index] += \"]\";\n              break;\n            }\n          }\n        }\n        if (!pluginHandled) {\n          let result = isArray ? \"[\" : \"{\";\n          if (isArray) {\n            for (let i2 = 0; i2 < input.length; i2++)\n              result += (i2 ? \",\" : \"\") + (i2 in input ? flattenValue(input[i2]) : HOLE);\n            str[index] = `${result}]`;\n          } else if (input instanceof Date) {\n            const dateTime = input.getTime();\n            str[index] = `[\"${TYPE_DATE}\",${Number.isNaN(dateTime) ? JSON.stringify(\"invalid\") : dateTime}]`;\n          } else if (input instanceof URL) {\n            str[index] = `[\"${TYPE_URL}\",${JSON.stringify(input.href)}]`;\n          } else if (input instanceof RegExp) {\n            str[index] = `[\"${TYPE_REGEXP}\",${JSON.stringify(\n              input.source\n            )},${JSON.stringify(input.flags)}]`;\n          } else if (input instanceof Set) {\n            if (input.size > 0) {\n              str[index] = `[\"${TYPE_SET}\",${[...input].map((val) => flattenValue(val)).join(\",\")}]`;\n            } else {\n              str[index] = `[\"${TYPE_SET}\"]`;\n            }\n          } else if (input instanceof Map) {\n            if (input.size > 0) {\n              str[index] = `[\"${TYPE_MAP}\",${[...input].flatMap(([k, v]) => [flattenValue(k), flattenValue(v)]).join(\",\")}]`;\n            } else {\n              str[index] = `[\"${TYPE_MAP}\"]`;\n            }\n          } else if (input instanceof Promise) {\n            str[index] = `[\"${TYPE_PROMISE}\",${index}]`;\n            deferred[index] = input;\n          } else if (input instanceof Error) {\n            str[index] = `[\"${TYPE_ERROR}\",${JSON.stringify(input.message)}`;\n            if (input.name !== \"Error\") {\n              str[index] += `,${JSON.stringify(input.name)}`;\n            }\n            str[index] += \"]\";\n          } else if (Object.getPrototypeOf(input) === null) {\n            str[index] = `[\"${TYPE_NULL_OBJECT}\",{${partsForObj(input)}}]`;\n          } else if (isPlainObject2(input)) {\n            str[index] = `{${partsForObj(input)}}`;\n          } else {\n            error = new Error(\"Cannot encode object with prototype\");\n          }\n        }\n        break;\n      }\n      default: {\n        const isArray = Array.isArray(input);\n        let pluginHandled = false;\n        if (!isArray && plugins) {\n          for (const plugin of plugins) {\n            const pluginResult = plugin(input);\n            if (Array.isArray(pluginResult)) {\n              pluginHandled = true;\n              const [pluginIdentifier, ...rest] = pluginResult;\n              str[index] = `[${JSON.stringify(pluginIdentifier)}`;\n              if (rest.length > 0) {\n                str[index] += `,${rest.map((v) => flattenValue(v)).join(\",\")}`;\n              }\n              str[index] += \"]\";\n              break;\n            }\n          }\n        }\n        if (!pluginHandled) {\n          error = new Error(\"Cannot encode function or unexpected type\");\n        }\n      }\n    }\n    if (error) {\n      let pluginHandled = false;\n      if (postPlugins) {\n        for (const plugin of postPlugins) {\n          const pluginResult = plugin(input);\n          if (Array.isArray(pluginResult)) {\n            pluginHandled = true;\n            const [pluginIdentifier, ...rest] = pluginResult;\n            str[index] = `[${JSON.stringify(pluginIdentifier)}`;\n            if (rest.length > 0) {\n              str[index] += `,${rest.map((v) => flattenValue(v)).join(\",\")}`;\n            }\n            str[index] += \"]\";\n            break;\n          }\n        }\n      }\n      if (!pluginHandled) {\n        throw error;\n      }\n    }\n  }\n}\nvar objectProtoNames2 = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction isPlainObject2(thing) {\n  const proto = Object.getPrototypeOf(thing);\n  return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === objectProtoNames2;\n}\n\n// vendor/turbo-stream-v2/unflatten.ts\nvar globalObj = typeof window !== \"undefined\" ? window : typeof globalThis !== \"undefined\" ? globalThis : void 0;\nfunction unflatten(parsed) {\n  const { hydrated, values } = this;\n  if (typeof parsed === \"number\") return hydrate.call(this, parsed);\n  if (!Array.isArray(parsed) || !parsed.length) throw new SyntaxError();\n  const startIndex = values.length;\n  for (const value of parsed) {\n    values.push(value);\n  }\n  hydrated.length = values.length;\n  return hydrate.call(this, startIndex);\n}\nfunction hydrate(index) {\n  const { hydrated, values, deferred, plugins } = this;\n  let result;\n  const stack = [\n    [\n      index,\n      (v) => {\n        result = v;\n      }\n    ]\n  ];\n  let postRun = [];\n  while (stack.length > 0) {\n    const [index2, set] = stack.pop();\n    switch (index2) {\n      case UNDEFINED:\n        set(void 0);\n        continue;\n      case NULL:\n        set(null);\n        continue;\n      case NAN:\n        set(NaN);\n        continue;\n      case POSITIVE_INFINITY:\n        set(Infinity);\n        continue;\n      case NEGATIVE_INFINITY:\n        set(-Infinity);\n        continue;\n      case NEGATIVE_ZERO:\n        set(-0);\n        continue;\n    }\n    validateIndex(index2, values.length);\n    if (hydrated[index2]) {\n      set(hydrated[index2]);\n      continue;\n    }\n    const value = values[index2];\n    if (!value || typeof value !== \"object\") {\n      hydrated[index2] = value;\n      set(value);\n      continue;\n    }\n    if (Array.isArray(value)) {\n      if (typeof value[0] === \"string\") {\n        const [type, b, c] = value;\n        switch (type) {\n          case TYPE_DATE:\n            set(hydrated[index2] = new Date(b));\n            continue;\n          case TYPE_URL:\n            set(hydrated[index2] = new URL(b));\n            continue;\n          case TYPE_BIGINT:\n            set(hydrated[index2] = BigInt(b));\n            continue;\n          case TYPE_REGEXP:\n            set(hydrated[index2] = new RegExp(b, c));\n            continue;\n          case TYPE_SYMBOL:\n            set(hydrated[index2] = Symbol.for(b));\n            continue;\n          case TYPE_SET:\n            const newSet = /* @__PURE__ */ new Set();\n            hydrated[index2] = newSet;\n            for (let i = value.length - 1; i > 0; i--)\n              stack.push([\n                value[i],\n                (v) => {\n                  newSet.add(v);\n                }\n              ]);\n            set(newSet);\n            continue;\n          case TYPE_MAP:\n            const map = /* @__PURE__ */ new Map();\n            hydrated[index2] = map;\n            for (let i = value.length - 2; i > 0; i -= 2) {\n              const r = [];\n              stack.push([\n                value[i + 1],\n                (v) => {\n                  r[1] = v;\n                }\n              ]);\n              stack.push([\n                value[i],\n                (k) => {\n                  r[0] = k;\n                }\n              ]);\n              postRun.push(() => {\n                map.set(r[0], r[1]);\n              });\n            }\n            set(map);\n            continue;\n          case TYPE_NULL_OBJECT:\n            const obj = /* @__PURE__ */ Object.create(null);\n            hydrated[index2] = obj;\n            for (const key of Object.keys(b).reverse()) {\n              const r = [];\n              stack.push([\n                b[key],\n                (v) => {\n                  r[1] = v;\n                }\n              ]);\n              stack.push([\n                Number(key.slice(1)),\n                (k) => {\n                  r[0] = k;\n                }\n              ]);\n              postRun.push(() => {\n                obj[r[0]] = r[1];\n              });\n            }\n            set(obj);\n            continue;\n          case TYPE_PROMISE:\n            validateIndex(b, values.length);\n            if (hydrated[b]) {\n              set(hydrated[index2] = hydrated[b]);\n            } else {\n              const d = new Deferred2();\n              deferred[b] = d;\n              set(hydrated[index2] = d.promise);\n            }\n            continue;\n          case TYPE_ERROR:\n            const [, message, errorType] = value;\n            let error = errorType && globalObj && SUPPORTED_ERROR_TYPES.includes(errorType) && errorType in globalObj && typeof globalObj[errorType] === \"function\" ? new globalObj[errorType](message) : new Error(message);\n            hydrated[index2] = error;\n            set(error);\n            continue;\n          case TYPE_PREVIOUS_RESOLVED:\n            validateIndex(b, values.length);\n            set(hydrated[index2] = hydrated[b]);\n            continue;\n          default:\n            if (Array.isArray(plugins)) {\n              const r = [];\n              const vals = value.slice(1);\n              for (let i = 0; i < vals.length; i++) {\n                const v = vals[i];\n                stack.push([\n                  v,\n                  (v2) => {\n                    r[i] = v2;\n                  }\n                ]);\n              }\n              postRun.push(() => {\n                for (const plugin of plugins) {\n                  const result2 = plugin(value[0], ...r);\n                  if (result2) {\n                    set(hydrated[index2] = result2.value);\n                    return;\n                  }\n                }\n                throw new SyntaxError();\n              });\n              continue;\n            }\n            throw new SyntaxError();\n        }\n      } else {\n        const array = [];\n        hydrated[index2] = array;\n        for (let i = 0; i < value.length; i++) {\n          const n = value[i];\n          if (n !== HOLE) {\n            stack.push([\n              n,\n              (v) => {\n                array[i] = v;\n              }\n            ]);\n          }\n        }\n        set(array);\n        continue;\n      }\n    } else {\n      const object = {};\n      hydrated[index2] = object;\n      for (const key of Object.keys(value).reverse()) {\n        const r = [];\n        stack.push([\n          value[key],\n          (v) => {\n            r[1] = v;\n          }\n        ]);\n        stack.push([\n          Number(key.slice(1)),\n          (k) => {\n            r[0] = k;\n          }\n        ]);\n        postRun.push(() => {\n          Object.defineProperty(object, r[0], {\n            value: r[1],\n            enumerable: true,\n            configurable: true,\n            writable: true\n          });\n        });\n      }\n      set(object);\n      continue;\n    }\n  }\n  while (postRun.length > 0) {\n    postRun.pop()();\n  }\n  return result;\n}\nfunction validateIndex(index, length) {\n  if (!Number.isSafeInteger(index) || index < 0 || index >= length) {\n    throw new SyntaxError();\n  }\n}\n\n// vendor/turbo-stream-v2/turbo-stream.ts\nasync function decode(readable, options) {\n  const { plugins } = options ?? {};\n  const done = new Deferred2();\n  const reader = readable.pipeThrough(createLineSplittingTransform()).getReader();\n  const decoder = {\n    values: [],\n    hydrated: [],\n    deferred: {},\n    plugins\n  };\n  const decoded = await decodeInitial.call(decoder, reader);\n  let donePromise = done.promise;\n  if (decoded.done) {\n    done.resolve();\n  } else {\n    donePromise = decodeDeferred.call(decoder, reader).then(done.resolve).catch((reason) => {\n      for (const deferred of Object.values(decoder.deferred)) {\n        deferred.reject(reason);\n      }\n      done.reject(reason);\n    });\n  }\n  return {\n    done: donePromise.then(() => reader.closed),\n    value: decoded.value\n  };\n}\nasync function decodeInitial(reader) {\n  const read = await reader.read();\n  if (!read.value) {\n    throw new SyntaxError();\n  }\n  let line;\n  try {\n    line = JSON.parse(read.value);\n  } catch (reason) {\n    throw new SyntaxError();\n  }\n  return {\n    done: read.done,\n    value: unflatten.call(this, line)\n  };\n}\nasync function decodeDeferred(reader) {\n  let read = await reader.read();\n  while (!read.done) {\n    if (!read.value) continue;\n    const line = read.value;\n    switch (line[0]) {\n      case TYPE_PROMISE: {\n        const colonIndex = line.indexOf(\":\");\n        const deferredId = Number(line.slice(1, colonIndex));\n        const deferred = this.deferred[deferredId];\n        if (!deferred) {\n          throw new Error(`Deferred ID ${deferredId} not found in stream`);\n        }\n        const lineData = line.slice(colonIndex + 1);\n        let jsonLine;\n        try {\n          jsonLine = JSON.parse(lineData);\n        } catch (reason) {\n          throw new SyntaxError();\n        }\n        const value = unflatten.call(this, jsonLine);\n        deferred.resolve(value);\n        break;\n      }\n      case TYPE_ERROR: {\n        const colonIndex = line.indexOf(\":\");\n        const deferredId = Number(line.slice(1, colonIndex));\n        const deferred = this.deferred[deferredId];\n        if (!deferred) {\n          throw new Error(`Deferred ID ${deferredId} not found in stream`);\n        }\n        const lineData = line.slice(colonIndex + 1);\n        let jsonLine;\n        try {\n          jsonLine = JSON.parse(lineData);\n        } catch (reason) {\n          throw new SyntaxError();\n        }\n        const value = unflatten.call(this, jsonLine);\n        deferred.reject(value);\n        break;\n      }\n      default:\n        throw new SyntaxError();\n    }\n    read = await reader.read();\n  }\n}\nfunction encode(input, options) {\n  const { onComplete, plugins, postPlugins, signal } = options ?? {};\n  const encoder = {\n    deferred: {},\n    index: 0,\n    indices: /* @__PURE__ */ new Map(),\n    stringified: [],\n    plugins,\n    postPlugins,\n    signal\n  };\n  const textEncoder = new TextEncoder();\n  let lastSentIndex = 0;\n  const readable = new ReadableStream({\n    async start(controller) {\n      const id = await flatten.call(encoder, input);\n      if (Array.isArray(id)) {\n        throw new Error(\"This should never happen\");\n      }\n      if (id < 0) {\n        controller.enqueue(textEncoder.encode(`${id}\n`));\n      } else {\n        controller.enqueue(\n          textEncoder.encode(`[${encoder.stringified.join(\",\")}]\n`)\n        );\n        lastSentIndex = encoder.stringified.length - 1;\n      }\n      const seenPromises = /* @__PURE__ */ new WeakSet();\n      let processingChain = Promise.resolve();\n      if (Object.keys(encoder.deferred).length) {\n        let raceDone;\n        const racePromise = new Promise((resolve, reject) => {\n          raceDone = resolve;\n          if (signal) {\n            const rejectPromise = () => reject(signal.reason || new Error(\"Signal was aborted.\"));\n            if (signal.aborted) {\n              rejectPromise();\n            } else {\n              signal.addEventListener(\"abort\", (event) => {\n                rejectPromise();\n              });\n            }\n          }\n        });\n        while (Object.keys(encoder.deferred).length > 0) {\n          for (const [deferredId, deferred] of Object.entries(\n            encoder.deferred\n          )) {\n            if (seenPromises.has(deferred)) continue;\n            seenPromises.add(\n              // biome-ignore lint/suspicious/noAssignInExpressions: <explanation>\n              encoder.deferred[Number(deferredId)] = Promise.race([\n                racePromise,\n                deferred\n              ]).then(\n                (resolved) => {\n                  processingChain = processingChain.then(async () => {\n                    const id2 = await flatten.call(encoder, resolved);\n                    if (Array.isArray(id2)) {\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_PROMISE}${deferredId}:[[\"${TYPE_PREVIOUS_RESOLVED}\",${id2[0]}]]\n`\n                        )\n                      );\n                      encoder.index++;\n                      lastSentIndex++;\n                    } else if (id2 < 0) {\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_PROMISE}${deferredId}:${id2}\n`\n                        )\n                      );\n                    } else {\n                      const values = encoder.stringified.slice(lastSentIndex + 1).join(\",\");\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_PROMISE}${deferredId}:[${values}]\n`\n                        )\n                      );\n                      lastSentIndex = encoder.stringified.length - 1;\n                    }\n                  });\n                  return processingChain;\n                },\n                (reason) => {\n                  processingChain = processingChain.then(async () => {\n                    if (!reason || typeof reason !== \"object\" || !(reason instanceof Error)) {\n                      reason = new Error(\"An unknown error occurred\");\n                    }\n                    const id2 = await flatten.call(encoder, reason);\n                    if (Array.isArray(id2)) {\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_ERROR}${deferredId}:[[\"${TYPE_PREVIOUS_RESOLVED}\",${id2[0]}]]\n`\n                        )\n                      );\n                      encoder.index++;\n                      lastSentIndex++;\n                    } else if (id2 < 0) {\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_ERROR}${deferredId}:${id2}\n`\n                        )\n                      );\n                    } else {\n                      const values = encoder.stringified.slice(lastSentIndex + 1).join(\",\");\n                      controller.enqueue(\n                        textEncoder.encode(\n                          `${TYPE_ERROR}${deferredId}:[${values}]\n`\n                        )\n                      );\n                      lastSentIndex = encoder.stringified.length - 1;\n                    }\n                  });\n                  return processingChain;\n                }\n              ).finally(() => {\n                delete encoder.deferred[Number(deferredId)];\n              })\n            );\n          }\n          await Promise.race(Object.values(encoder.deferred));\n        }\n        raceDone();\n      }\n      await Promise.all(Object.values(encoder.deferred));\n      await processingChain;\n      controller.close();\n      onComplete?.();\n    }\n  });\n  return readable;\n}\n\n// lib/dom/ssr/data.ts\nasync function createRequestInit(request) {\n  let init = { signal: request.signal };\n  if (request.method !== \"GET\") {\n    init.method = request.method;\n    let contentType = request.headers.get(\"Content-Type\");\n    if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n      init.headers = { \"Content-Type\": contentType };\n      init.body = JSON.stringify(await request.json());\n    } else if (contentType && /\\btext\\/plain\\b/.test(contentType)) {\n      init.headers = { \"Content-Type\": contentType };\n      init.body = await request.text();\n    } else if (contentType && /\\bapplication\\/x-www-form-urlencoded\\b/.test(contentType)) {\n      init.body = new URLSearchParams(await request.text());\n    } else {\n      init.body = await request.formData();\n    }\n  }\n  return init;\n}\n\n// lib/dom/ssr/markup.ts\nvar ESCAPE_LOOKUP = {\n  \"&\": \"\\\\u0026\",\n  \">\": \"\\\\u003e\",\n  \"<\": \"\\\\u003c\",\n  \"\\u2028\": \"\\\\u2028\",\n  \"\\u2029\": \"\\\\u2029\"\n};\nvar ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction escapeHtml(html) {\n  return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]);\n}\nfunction escapeAttribute(value) {\n  return value.replace(/&/g, \"&amp;\").replace(/\"/g, \"&quot;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\");\n}\n\n// lib/dom/ssr/invariant.ts\nfunction invariant2(value, message) {\n  if (value === false || value === null || typeof value === \"undefined\") {\n    throw new Error(message);\n  }\n}\n\n// lib/dom/ssr/single-fetch.tsx\nvar SingleFetchRedirectSymbol = Symbol(\"SingleFetchRedirect\");\nvar SingleFetchNoResultError = class extends Error {\n};\nvar SINGLE_FETCH_REDIRECT_STATUS = 202;\nvar NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([100, 101, 204, 205]);\nfunction StreamTransfer({\n  context,\n  identifier,\n  reader,\n  textDecoder,\n  nonce\n}) {\n  if (!context.renderMeta || !context.renderMeta.didRenderScripts) {\n    return null;\n  }\n  if (!context.renderMeta.streamCache) {\n    context.renderMeta.streamCache = {};\n  }\n  let { streamCache } = context.renderMeta;\n  let promise = streamCache[identifier];\n  if (!promise) {\n    promise = streamCache[identifier] = reader.read().then((result) => {\n      streamCache[identifier].result = {\n        done: result.done,\n        value: textDecoder.decode(result.value, { stream: true })\n      };\n    }).catch((e) => {\n      streamCache[identifier].error = e;\n    });\n  }\n  if (promise.error) {\n    throw promise.error;\n  }\n  if (promise.result === void 0) {\n    throw promise;\n  }\n  let { done, value } = promise.result;\n  let scriptTag = value ? /* @__PURE__ */ React4.createElement(\n    \"script\",\n    {\n      nonce,\n      dangerouslySetInnerHTML: {\n        __html: `window.__reactRouterContext.streamController.enqueue(${escapeHtml(\n          JSON.stringify(value)\n        )});`\n      }\n    }\n  ) : null;\n  if (done) {\n    return /* @__PURE__ */ React4.createElement(React4.Fragment, null, scriptTag, /* @__PURE__ */ React4.createElement(\n      \"script\",\n      {\n        nonce,\n        dangerouslySetInnerHTML: {\n          __html: `window.__reactRouterContext.streamController.close();`\n        }\n      }\n    ));\n  } else {\n    return /* @__PURE__ */ React4.createElement(React4.Fragment, null, scriptTag, /* @__PURE__ */ React4.createElement(React4.Suspense, null, /* @__PURE__ */ React4.createElement(\n      StreamTransfer,\n      {\n        context,\n        identifier: identifier + 1,\n        reader,\n        textDecoder,\n        nonce\n      }\n    )));\n  }\n}\nfunction getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules, ssr, basename, trailingSlashAware) {\n  let dataStrategy = getSingleFetchDataStrategyImpl(\n    getRouter,\n    (match) => {\n      let manifestRoute = manifest.routes[match.route.id];\n      invariant2(manifestRoute, \"Route not found in manifest\");\n      return {\n        hasLoader: manifestRoute.hasLoader,\n        hasClientLoader: manifestRoute.hasClientLoader\n      };\n    },\n    fetchAndDecodeViaTurboStream,\n    ssr,\n    basename,\n    trailingSlashAware\n  );\n  return async (args) => args.runClientMiddleware(dataStrategy);\n}\nfunction getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename, trailingSlashAware, shouldAllowOptOut = () => true) {\n  return async (args) => {\n    let { request, matches, fetcherKey } = args;\n    let router = getRouter();\n    if (request.method !== \"GET\") {\n      return singleFetchActionStrategy(\n        args,\n        fetchAndDecode,\n        basename,\n        trailingSlashAware\n      );\n    }\n    let foundRevalidatingServerLoader = matches.some((m) => {\n      let { hasLoader, hasClientLoader } = getRouteInfo(m);\n      return m.shouldCallHandler() && hasLoader && !hasClientLoader;\n    });\n    if (!ssr && !foundRevalidatingServerLoader) {\n      return nonSsrStrategy(\n        args,\n        getRouteInfo,\n        fetchAndDecode,\n        basename,\n        trailingSlashAware\n      );\n    }\n    if (fetcherKey) {\n      return singleFetchLoaderFetcherStrategy(\n        args,\n        fetchAndDecode,\n        basename,\n        trailingSlashAware\n      );\n    }\n    return singleFetchLoaderNavigationStrategy(\n      args,\n      router,\n      getRouteInfo,\n      fetchAndDecode,\n      ssr,\n      basename,\n      trailingSlashAware,\n      shouldAllowOptOut\n    );\n  };\n}\nasync function singleFetchActionStrategy(args, fetchAndDecode, basename, trailingSlashAware) {\n  let actionMatch = args.matches.find((m) => m.shouldCallHandler());\n  invariant2(actionMatch, \"No action match found\");\n  let actionStatus = void 0;\n  let result = await actionMatch.resolve(async (handler) => {\n    let result2 = await handler(async () => {\n      let { data: data2, status } = await fetchAndDecode(\n        args,\n        basename,\n        trailingSlashAware,\n        [actionMatch.route.id]\n      );\n      actionStatus = status;\n      return unwrapSingleFetchResult(data2, actionMatch.route.id);\n    });\n    return result2;\n  });\n  if (isResponse(result.result) || isRouteErrorResponse(result.result) || isDataWithResponseInit(result.result)) {\n    return { [actionMatch.route.id]: result };\n  }\n  return {\n    [actionMatch.route.id]: {\n      type: result.type,\n      result: data(result.result, actionStatus)\n    }\n  };\n}\nasync function nonSsrStrategy(args, getRouteInfo, fetchAndDecode, basename, trailingSlashAware) {\n  let matchesToLoad = args.matches.filter((m) => m.shouldCallHandler());\n  let results = {};\n  await Promise.all(\n    matchesToLoad.map(\n      (m) => m.resolve(async (handler) => {\n        try {\n          let { hasClientLoader } = getRouteInfo(m);\n          let routeId = m.route.id;\n          let result = hasClientLoader ? await handler(async () => {\n            let { data: data2 } = await fetchAndDecode(\n              args,\n              basename,\n              trailingSlashAware,\n              [routeId]\n            );\n            return unwrapSingleFetchResult(data2, routeId);\n          }) : await handler();\n          results[m.route.id] = { type: \"data\", result };\n        } catch (e) {\n          results[m.route.id] = { type: \"error\", result: e };\n        }\n      })\n    )\n  );\n  return results;\n}\nasync function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, basename, trailingSlashAware, shouldAllowOptOut = () => true) {\n  let routesParams = /* @__PURE__ */ new Set();\n  let foundOptOutRoute = false;\n  let routeDfds = args.matches.map(() => createDeferred2());\n  let singleFetchDfd = createDeferred2();\n  let results = {};\n  let resolvePromise = Promise.all(\n    args.matches.map(\n      async (m, i) => m.resolve(async (handler) => {\n        routeDfds[i].resolve();\n        let routeId = m.route.id;\n        let { hasLoader, hasClientLoader } = getRouteInfo(m);\n        let defaultShouldRevalidate = !m.shouldRevalidateArgs || m.shouldRevalidateArgs.actionStatus == null || m.shouldRevalidateArgs.actionStatus < 400;\n        let shouldCall = m.shouldCallHandler(defaultShouldRevalidate);\n        if (!shouldCall) {\n          foundOptOutRoute || (foundOptOutRoute = m.shouldRevalidateArgs != null && // This is a revalidation,\n          hasLoader);\n          return;\n        }\n        if (shouldAllowOptOut(m) && hasClientLoader) {\n          if (hasLoader) {\n            foundOptOutRoute = true;\n          }\n          try {\n            let result = await handler(async () => {\n              let { data: data2 } = await fetchAndDecode(\n                args,\n                basename,\n                trailingSlashAware,\n                [routeId]\n              );\n              return unwrapSingleFetchResult(data2, routeId);\n            });\n            results[routeId] = { type: \"data\", result };\n          } catch (e) {\n            results[routeId] = { type: \"error\", result: e };\n          }\n          return;\n        }\n        if (hasLoader) {\n          routesParams.add(routeId);\n        }\n        try {\n          let result = await handler(async () => {\n            let data2 = await singleFetchDfd.promise;\n            return unwrapSingleFetchResult(data2, routeId);\n          });\n          results[routeId] = { type: \"data\", result };\n        } catch (e) {\n          results[routeId] = { type: \"error\", result: e };\n        }\n      })\n    )\n  );\n  await Promise.all(routeDfds.map((d) => d.promise));\n  let isInitialLoad = !router.state.initialized && router.state.navigation.state === \"idle\";\n  if ((isInitialLoad || routesParams.size === 0) && !window.__reactRouterHdrActive) {\n    singleFetchDfd.resolve({ routes: {} });\n  } else {\n    let targetRoutes = ssr && foundOptOutRoute && routesParams.size > 0 ? [...routesParams.keys()] : void 0;\n    try {\n      let data2 = await fetchAndDecode(\n        args,\n        basename,\n        trailingSlashAware,\n        targetRoutes\n      );\n      singleFetchDfd.resolve(data2.data);\n    } catch (e) {\n      singleFetchDfd.reject(e);\n    }\n  }\n  await resolvePromise;\n  await bubbleMiddlewareErrors(\n    singleFetchDfd.promise,\n    args.matches,\n    routesParams,\n    results\n  );\n  return results;\n}\nasync function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {\n  try {\n    let middlewareError;\n    let fetchedData = await singleFetchPromise;\n    if (\"routes\" in fetchedData) {\n      for (let match of matches) {\n        if (match.route.id in fetchedData.routes) {\n          let routeResult = fetchedData.routes[match.route.id];\n          if (\"error\" in routeResult) {\n            middlewareError = routeResult.error;\n            if (results[match.route.id]?.result == null) {\n              results[match.route.id] = {\n                type: \"error\",\n                result: middlewareError\n              };\n            }\n            break;\n          }\n        }\n      }\n    }\n    if (middlewareError !== void 0) {\n      Array.from(routesParams.values()).forEach((routeId) => {\n        if (results[routeId].result instanceof SingleFetchNoResultError) {\n          results[routeId].result = middlewareError;\n        }\n      });\n    }\n  } catch (e) {\n  }\n}\nasync function singleFetchLoaderFetcherStrategy(args, fetchAndDecode, basename, trailingSlashAware) {\n  let fetcherMatch = args.matches.find((m) => m.shouldCallHandler());\n  invariant2(fetcherMatch, \"No fetcher match found\");\n  let routeId = fetcherMatch.route.id;\n  let result = await fetcherMatch.resolve(\n    async (handler) => handler(async () => {\n      let { data: data2 } = await fetchAndDecode(args, basename, trailingSlashAware, [\n        routeId\n      ]);\n      return unwrapSingleFetchResult(data2, routeId);\n    })\n  );\n  return { [fetcherMatch.route.id]: result };\n}\nfunction stripIndexParam(url) {\n  let indexValues = url.searchParams.getAll(\"index\");\n  url.searchParams.delete(\"index\");\n  let indexValuesToKeep = [];\n  for (let indexValue of indexValues) {\n    if (indexValue) {\n      indexValuesToKeep.push(indexValue);\n    }\n  }\n  for (let toKeep of indexValuesToKeep) {\n    url.searchParams.append(\"index\", toKeep);\n  }\n  return url;\n}\nfunction singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {\n  let url = typeof reqUrl === \"string\" ? new URL(\n    reqUrl,\n    // This can be called during the SSR flow via PrefetchPageLinksImpl so\n    // don't assume window is available\n    typeof window === \"undefined\" ? \"server://singlefetch/\" : window.location.origin\n  ) : reqUrl;\n  if (trailingSlashAware) {\n    if (url.pathname.endsWith(\"/\")) {\n      url.pathname = `${url.pathname}_.${extension}`;\n    } else {\n      url.pathname = `${url.pathname}.${extension}`;\n    }\n  } else {\n    if (url.pathname === \"/\") {\n      url.pathname = `_root.${extension}`;\n    } else if (basename && stripBasename(url.pathname, basename) === \"/\") {\n      url.pathname = `${removeTrailingSlash(basename)}/_root.${extension}`;\n    } else {\n      url.pathname = `${removeTrailingSlash(url.pathname)}.${extension}`;\n    }\n  }\n  return url;\n}\nasync function fetchAndDecodeViaTurboStream(args, basename, trailingSlashAware, targetRoutes) {\n  let { request } = args;\n  let url = singleFetchUrl(request.url, basename, trailingSlashAware, \"data\");\n  if (request.method === \"GET\") {\n    url = stripIndexParam(url);\n    if (targetRoutes) {\n      url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n    }\n  }\n  let res = await fetch(url, await createRequestInit(request));\n  if (res.status >= 400 && !res.headers.has(\"X-Remix-Response\")) {\n    throw new ErrorResponseImpl(res.status, res.statusText, await res.text());\n  }\n  if (res.status === 204 && res.headers.has(\"X-Remix-Redirect\")) {\n    return {\n      status: SINGLE_FETCH_REDIRECT_STATUS,\n      data: {\n        redirect: {\n          redirect: res.headers.get(\"X-Remix-Redirect\"),\n          status: Number(res.headers.get(\"X-Remix-Status\") || \"302\"),\n          revalidate: res.headers.get(\"X-Remix-Revalidate\") === \"true\",\n          reload: res.headers.get(\"X-Remix-Reload-Document\") === \"true\",\n          replace: res.headers.get(\"X-Remix-Replace\") === \"true\"\n        }\n      }\n    };\n  }\n  if (NO_BODY_STATUS_CODES.has(res.status)) {\n    let routes = {};\n    if (targetRoutes && request.method !== \"GET\") {\n      routes[targetRoutes[0]] = { data: void 0 };\n    }\n    return {\n      status: res.status,\n      data: { routes }\n    };\n  }\n  invariant2(res.body, \"No response body to decode\");\n  try {\n    let decoded = await decodeViaTurboStream(res.body, window);\n    let data2;\n    if (request.method === \"GET\") {\n      let typed = decoded.value;\n      if (SingleFetchRedirectSymbol in typed) {\n        data2 = { redirect: typed[SingleFetchRedirectSymbol] };\n      } else {\n        data2 = { routes: typed };\n      }\n    } else {\n      let typed = decoded.value;\n      let routeId = targetRoutes?.[0];\n      invariant2(routeId, \"No routeId found for single fetch call decoding\");\n      if (\"redirect\" in typed) {\n        data2 = { redirect: typed };\n      } else {\n        data2 = { routes: { [routeId]: typed } };\n      }\n    }\n    return { status: res.status, data: data2 };\n  } catch (e) {\n    throw new Error(\"Unable to decode turbo-stream response\");\n  }\n}\nfunction decodeViaTurboStream(body, global) {\n  return decode(body, {\n    plugins: [\n      (type, ...rest) => {\n        if (type === \"SanitizedError\") {\n          let [name, message, stack] = rest;\n          let Constructor = Error;\n          if (name && SUPPORTED_ERROR_TYPES.includes(name) && name in global && // @ts-expect-error\n          typeof global[name] === \"function\") {\n            Constructor = global[name];\n          }\n          let error = new Constructor(message);\n          error.stack = stack;\n          return { value: error };\n        }\n        if (type === \"ErrorResponse\") {\n          let [data2, status, statusText] = rest;\n          return {\n            value: new ErrorResponseImpl(status, statusText, data2)\n          };\n        }\n        if (type === \"SingleFetchRedirect\") {\n          return { value: { [SingleFetchRedirectSymbol]: rest[0] } };\n        }\n        if (type === \"SingleFetchClassInstance\") {\n          return { value: rest[0] };\n        }\n        if (type === \"SingleFetchFallback\") {\n          return { value: void 0 };\n        }\n      }\n    ]\n  });\n}\nfunction unwrapSingleFetchResult(result, routeId) {\n  if (\"redirect\" in result) {\n    let {\n      redirect: location,\n      revalidate,\n      reload,\n      replace: replace2,\n      status\n    } = result.redirect;\n    throw redirect(location, {\n      status,\n      headers: {\n        // Three R's of redirecting (lol Veep)\n        ...revalidate ? { \"X-Remix-Revalidate\": \"yes\" } : null,\n        ...reload ? { \"X-Remix-Reload-Document\": \"yes\" } : null,\n        ...replace2 ? { \"X-Remix-Replace\": \"yes\" } : null\n      }\n    });\n  }\n  let routeResult = result.routes[routeId];\n  if (routeResult == null) {\n    throw new SingleFetchNoResultError(\n      `No result found for routeId \"${routeId}\"`\n    );\n  } else if (\"error\" in routeResult) {\n    throw routeResult.error;\n  } else if (\"data\" in routeResult) {\n    return routeResult.data;\n  } else {\n    throw new Error(`Invalid response found for routeId \"${routeId}\"`);\n  }\n}\nfunction createDeferred2() {\n  let resolve;\n  let reject;\n  let promise = new Promise((res, rej) => {\n    resolve = async (val) => {\n      res(val);\n      try {\n        await promise;\n      } catch (e) {\n      }\n    };\n    reject = async (error) => {\n      rej(error);\n      try {\n        await promise;\n      } catch (e) {\n      }\n    };\n  });\n  return {\n    promise,\n    //@ts-ignore\n    resolve,\n    //@ts-ignore\n    reject\n  };\n}\n\n// lib/dom/ssr/errorBoundaries.tsx\nimport * as React9 from \"react\";\n\n// lib/dom/ssr/components.tsx\nimport * as React8 from \"react\";\n\n// lib/dom/ssr/routeModules.ts\nasync function loadRouteModule(route, routeModulesCache) {\n  if (route.id in routeModulesCache) {\n    return routeModulesCache[route.id];\n  }\n  try {\n    let routeModule = await import(\n      /* @vite-ignore */\n      /* webpackIgnore: true */\n      route.module\n    );\n    routeModulesCache[route.id] = routeModule;\n    return routeModule;\n  } catch (error) {\n    console.error(\n      `Error loading route module \\`${route.module}\\`, reloading page...`\n    );\n    console.error(error);\n    if (window.__reactRouterContext && window.__reactRouterContext.isSpaMode && // @ts-expect-error\n    import.meta.hot) {\n      throw error;\n    }\n    window.location.reload();\n    return new Promise(() => {\n    });\n  }\n}\n\n// lib/dom/ssr/links.ts\nfunction getKeyedLinksForMatches(matches, routeModules, manifest) {\n  let descriptors = matches.map((match) => {\n    let module = routeModules[match.route.id];\n    let route = manifest.routes[match.route.id];\n    return [\n      route && route.css ? route.css.map((href) => ({ rel: \"stylesheet\", href })) : [],\n      module?.links?.() || []\n    ];\n  }).flat(2);\n  let preloads = getModuleLinkHrefs(matches, manifest);\n  return dedupeLinkDescriptors(descriptors, preloads);\n}\nfunction getRouteCssDescriptors(route) {\n  if (!route.css) return [];\n  return route.css.map((href) => ({ rel: \"stylesheet\", href }));\n}\nasync function prefetchRouteCss(route) {\n  if (!route.css) return;\n  let descriptors = getRouteCssDescriptors(route);\n  await Promise.all(descriptors.map(prefetchStyleLink));\n}\nasync function prefetchStyleLinks(route, routeModule) {\n  if (!route.css && !routeModule.links || !isPreloadSupported()) return;\n  let descriptors = [];\n  if (route.css) {\n    descriptors.push(...getRouteCssDescriptors(route));\n  }\n  if (routeModule.links) {\n    descriptors.push(...routeModule.links());\n  }\n  if (descriptors.length === 0) return;\n  let styleLinks = [];\n  for (let descriptor of descriptors) {\n    if (!isPageLinkDescriptor(descriptor) && descriptor.rel === \"stylesheet\") {\n      styleLinks.push({\n        ...descriptor,\n        rel: \"preload\",\n        as: \"style\"\n      });\n    }\n  }\n  await Promise.all(styleLinks.map(prefetchStyleLink));\n}\nasync function prefetchStyleLink(descriptor) {\n  return new Promise((resolve) => {\n    if (descriptor.media && !window.matchMedia(descriptor.media).matches || document.querySelector(\n      `link[rel=\"stylesheet\"][href=\"${descriptor.href}\"]`\n    )) {\n      return resolve();\n    }\n    let link = document.createElement(\"link\");\n    Object.assign(link, descriptor);\n    function removeLink() {\n      if (document.head.contains(link)) {\n        document.head.removeChild(link);\n      }\n    }\n    link.onload = () => {\n      removeLink();\n      resolve();\n    };\n    link.onerror = () => {\n      removeLink();\n      resolve();\n    };\n    document.head.appendChild(link);\n  });\n}\nfunction isPageLinkDescriptor(object) {\n  return object != null && typeof object.page === \"string\";\n}\nfunction isHtmlLinkDescriptor(object) {\n  if (object == null) {\n    return false;\n  }\n  if (object.href == null) {\n    return object.rel === \"preload\" && typeof object.imageSrcSet === \"string\" && typeof object.imageSizes === \"string\";\n  }\n  return typeof object.rel === \"string\" && typeof object.href === \"string\";\n}\nasync function getKeyedPrefetchLinks(matches, manifest, routeModules) {\n  let links = await Promise.all(\n    matches.map(async (match) => {\n      let route = manifest.routes[match.route.id];\n      if (route) {\n        let mod = await loadRouteModule(route, routeModules);\n        return mod.links ? mod.links() : [];\n      }\n      return [];\n    })\n  );\n  return dedupeLinkDescriptors(\n    links.flat(1).filter(isHtmlLinkDescriptor).filter((link) => link.rel === \"stylesheet\" || link.rel === \"preload\").map(\n      (link) => link.rel === \"stylesheet\" ? { ...link, rel: \"prefetch\", as: \"style\" } : { ...link, rel: \"prefetch\" }\n    )\n  );\n}\nfunction getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {\n  let isNew = (match, index) => {\n    if (!currentMatches[index]) return true;\n    return match.route.id !== currentMatches[index].route.id;\n  };\n  let matchPathChanged = (match, index) => {\n    return (\n      // param change, /users/123 -> /users/456\n      currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path\n      // e.g. /files/images/avatar.jpg -> files/finances.xls\n      currentMatches[index].route.path?.endsWith(\"*\") && currentMatches[index].params[\"*\"] !== match.params[\"*\"]\n    );\n  };\n  if (mode === \"assets\") {\n    return nextMatches.filter(\n      (match, index) => isNew(match, index) || matchPathChanged(match, index)\n    );\n  }\n  if (mode === \"data\") {\n    return nextMatches.filter((match, index) => {\n      let manifestRoute = manifest.routes[match.route.id];\n      if (!manifestRoute || !manifestRoute.hasLoader) {\n        return false;\n      }\n      if (isNew(match, index) || matchPathChanged(match, index)) {\n        return true;\n      }\n      if (match.route.shouldRevalidate) {\n        let routeChoice = match.route.shouldRevalidate({\n          currentUrl: new URL(\n            location.pathname + location.search + location.hash,\n            window.origin\n          ),\n          currentParams: currentMatches[0]?.params || {},\n          nextUrl: new URL(page, window.origin),\n          nextParams: match.params,\n          defaultShouldRevalidate: true\n        });\n        if (typeof routeChoice === \"boolean\") {\n          return routeChoice;\n        }\n      }\n      return true;\n    });\n  }\n  return [];\n}\nfunction getModuleLinkHrefs(matches, manifest, { includeHydrateFallback } = {}) {\n  return dedupeHrefs(\n    matches.map((match) => {\n      let route = manifest.routes[match.route.id];\n      if (!route) return [];\n      let hrefs = [route.module];\n      if (route.clientActionModule) {\n        hrefs = hrefs.concat(route.clientActionModule);\n      }\n      if (route.clientLoaderModule) {\n        hrefs = hrefs.concat(route.clientLoaderModule);\n      }\n      if (includeHydrateFallback && route.hydrateFallbackModule) {\n        hrefs = hrefs.concat(route.hydrateFallbackModule);\n      }\n      if (route.imports) {\n        hrefs = hrefs.concat(route.imports);\n      }\n      return hrefs;\n    }).flat(1)\n  );\n}\nfunction dedupeHrefs(hrefs) {\n  return [...new Set(hrefs)];\n}\nfunction sortKeys(obj) {\n  let sorted = {};\n  let keys = Object.keys(obj).sort();\n  for (let key of keys) {\n    sorted[key] = obj[key];\n  }\n  return sorted;\n}\nfunction dedupeLinkDescriptors(descriptors, preloads) {\n  let set = /* @__PURE__ */ new Set();\n  let preloadsSet = new Set(preloads);\n  return descriptors.reduce((deduped, descriptor) => {\n    let alreadyModulePreload = preloads && !isPageLinkDescriptor(descriptor) && descriptor.as === \"script\" && descriptor.href && preloadsSet.has(descriptor.href);\n    if (alreadyModulePreload) {\n      return deduped;\n    }\n    let key = JSON.stringify(sortKeys(descriptor));\n    if (!set.has(key)) {\n      set.add(key);\n      deduped.push({ key, link: descriptor });\n    }\n    return deduped;\n  }, []);\n}\nvar _isPreloadSupported;\nfunction isPreloadSupported() {\n  if (_isPreloadSupported !== void 0) {\n    return _isPreloadSupported;\n  }\n  let el = document.createElement(\"link\");\n  _isPreloadSupported = el.relList.supports(\"preload\");\n  el = null;\n  return _isPreloadSupported;\n}\n\n// lib/dom/ssr/fog-of-war.ts\nimport * as React7 from \"react\";\n\n// lib/dom/ssr/routes.tsx\nimport * as React6 from \"react\";\n\n// lib/dom/ssr/fallback.tsx\nimport * as React5 from \"react\";\nfunction RemixRootDefaultHydrateFallback() {\n  let { nonce } = useFrameworkContext();\n  return /* @__PURE__ */ React5.createElement(BoundaryShell, { title: \"Loading...\", renderScripts: true }, ENABLE_DEV_WARNINGS ? /* @__PURE__ */ React5.createElement(\n    \"script\",\n    {\n      nonce,\n      dangerouslySetInnerHTML: {\n        __html: `\n              console.log(\n                \"\\u{1F4BF} Hey developer \\u{1F44B}. You can provide a way better UX than this \" +\n                \"when your app is loading JS modules and/or running \\`clientLoader\\` \" +\n                \"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback \" +\n                \"for more information.\"\n              );\n            `\n      }\n    }\n  ) : null);\n}\n\n// lib/dom/ssr/routes.tsx\nfunction groupRoutesByParentId(manifest) {\n  let routes = {};\n  Object.values(manifest).forEach((route) => {\n    if (route) {\n      let parentId = route.parentId || \"\";\n      if (!routes[parentId]) {\n        routes[parentId] = [];\n      }\n      routes[parentId].push(route);\n    }\n  });\n  return routes;\n}\nfunction getRouteComponents(route, routeModule, isSpaMode) {\n  let Component4 = getRouteModuleComponent(routeModule);\n  let HydrateFallback = routeModule.HydrateFallback && (!isSpaMode || route.id === \"root\") ? routeModule.HydrateFallback : route.id === \"root\" ? RemixRootDefaultHydrateFallback : void 0;\n  let ErrorBoundary = routeModule.ErrorBoundary ? routeModule.ErrorBoundary : route.id === \"root\" ? () => /* @__PURE__ */ React6.createElement(RemixRootDefaultErrorBoundary, { error: useRouteError() }) : void 0;\n  if (route.id === \"root\" && routeModule.Layout) {\n    return {\n      ...Component4 ? {\n        element: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(Component4, null))\n      } : { Component: Component4 },\n      ...ErrorBoundary ? {\n        errorElement: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(ErrorBoundary, null))\n      } : { ErrorBoundary },\n      ...HydrateFallback ? {\n        hydrateFallbackElement: /* @__PURE__ */ React6.createElement(routeModule.Layout, null, /* @__PURE__ */ React6.createElement(HydrateFallback, null))\n      } : { HydrateFallback }\n    };\n  }\n  return { Component: Component4, ErrorBoundary, HydrateFallback };\n}\nfunction createServerRoutes(manifest, routeModules, future, isSpaMode, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest), spaModeLazyPromise = Promise.resolve({ Component: () => null })) {\n  return (routesByParentId[parentId] || []).map((route) => {\n    let routeModule = routeModules[route.id];\n    invariant2(\n      routeModule,\n      \"No `routeModule` available to create server routes\"\n    );\n    let dataRoute = {\n      ...getRouteComponents(route, routeModule, isSpaMode),\n      caseSensitive: route.caseSensitive,\n      id: route.id,\n      index: route.index,\n      path: route.path,\n      handle: routeModule.handle,\n      // For SPA Mode, all routes are lazy except root.  However we tell the\n      // router root is also lazy here too since we don't need a full\n      // implementation - we just need a `lazy` prop to tell the RR rendering\n      // where to stop which is always at the root route in SPA mode\n      lazy: isSpaMode ? () => spaModeLazyPromise : void 0,\n      // For partial hydration rendering, we need to indicate when the route\n      // has a loader/clientLoader, but it won't ever be called during the static\n      // render, so just give it a no-op function so we can render down to the\n      // proper fallback\n      loader: route.hasLoader || route.hasClientLoader ? () => null : void 0\n      // We don't need middleware/action/shouldRevalidate on these routes since\n      // they're for a static render\n    };\n    let children = createServerRoutes(\n      manifest,\n      routeModules,\n      future,\n      isSpaMode,\n      route.id,\n      routesByParentId,\n      spaModeLazyPromise\n    );\n    if (children.length > 0) dataRoute.children = children;\n    return dataRoute;\n  });\n}\nfunction createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, ssr, isSpaMode) {\n  return createClientRoutes(\n    manifest,\n    routeModulesCache,\n    initialState,\n    ssr,\n    isSpaMode,\n    \"\",\n    groupRoutesByParentId(manifest),\n    needsRevalidation\n  );\n}\nfunction preventInvalidServerHandlerCall(type, route) {\n  if (type === \"loader\" && !route.hasLoader || type === \"action\" && !route.hasAction) {\n    let fn = type === \"action\" ? \"serverAction()\" : \"serverLoader()\";\n    let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: \"${route.id}\")`;\n    console.error(msg);\n    throw new ErrorResponseImpl(400, \"Bad Request\", new Error(msg), true);\n  }\n}\nfunction noActionDefinedError(type, routeId) {\n  let article = type === \"clientAction\" ? \"a\" : \"an\";\n  let msg = `Route \"${routeId}\" does not have ${article} ${type}, but you are trying to submit to it. To fix this, please add ${article} \\`${type}\\` function to the route`;\n  console.error(msg);\n  throw new ErrorResponseImpl(405, \"Method Not Allowed\", new Error(msg), true);\n}\nfunction createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {\n  return (routesByParentId[parentId] || []).map((route) => {\n    let routeModule = routeModulesCache[route.id];\n    function fetchServerHandler(singleFetch) {\n      invariant2(\n        typeof singleFetch === \"function\",\n        \"No single fetch function available for route handler\"\n      );\n      return singleFetch();\n    }\n    function fetchServerLoader(singleFetch) {\n      if (!route.hasLoader) return Promise.resolve(null);\n      return fetchServerHandler(singleFetch);\n    }\n    function fetchServerAction(singleFetch) {\n      if (!route.hasAction) {\n        throw noActionDefinedError(\"action\", route.id);\n      }\n      return fetchServerHandler(singleFetch);\n    }\n    function prefetchModule(modulePath) {\n      import(\n        /* @vite-ignore */\n        /* webpackIgnore: true */\n        modulePath\n      );\n    }\n    function prefetchRouteModuleChunks(route2) {\n      if (route2.clientActionModule) {\n        prefetchModule(route2.clientActionModule);\n      }\n      if (route2.clientLoaderModule) {\n        prefetchModule(route2.clientLoaderModule);\n      }\n    }\n    async function prefetchStylesAndCallHandler(handler) {\n      let cachedModule = routeModulesCache[route.id];\n      let linkPrefetchPromise = cachedModule ? prefetchStyleLinks(route, cachedModule) : Promise.resolve();\n      try {\n        return handler();\n      } finally {\n        await linkPrefetchPromise;\n      }\n    }\n    let dataRoute = {\n      id: route.id,\n      index: route.index,\n      path: route.path\n    };\n    if (routeModule) {\n      Object.assign(dataRoute, {\n        ...dataRoute,\n        ...getRouteComponents(route, routeModule, isSpaMode),\n        middleware: routeModule.clientMiddleware,\n        handle: routeModule.handle,\n        shouldRevalidate: getShouldRevalidateFunction(\n          dataRoute.path,\n          routeModule,\n          route,\n          ssr,\n          needsRevalidation\n        )\n      });\n      let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;\n      let initialData = hasInitialData ? initialState?.loaderData?.[route.id] : void 0;\n      let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;\n      let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;\n      let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);\n      dataRoute.loader = async ({ request, params, context, pattern, url }, singleFetch) => {\n        let _isHydrationRequest = isHydrationRequest;\n        isHydrationRequest = false;\n        let result = await prefetchStylesAndCallHandler(async () => {\n          invariant2(\n            routeModule,\n            \"No `routeModule` available for critical-route loader\"\n          );\n          if (!routeModule.clientLoader) {\n            return fetchServerLoader(singleFetch);\n          }\n          return routeModule.clientLoader({\n            request,\n            params,\n            context,\n            pattern,\n            url,\n            async serverLoader() {\n              preventInvalidServerHandlerCall(\"loader\", route);\n              if (_isHydrationRequest) {\n                if (hasInitialData) {\n                  return initialData;\n                }\n                if (hasInitialError) {\n                  throw initialError;\n                }\n              }\n              return fetchServerLoader(singleFetch);\n            }\n          });\n        });\n        return result;\n      };\n      dataRoute.loader.hydrate = shouldHydrateRouteLoader(\n        route.id,\n        routeModule.clientLoader,\n        route.hasLoader,\n        isSpaMode\n      );\n      dataRoute.action = ({ request, params, context, pattern, url }, singleFetch) => {\n        return prefetchStylesAndCallHandler(async () => {\n          invariant2(\n            routeModule,\n            \"No `routeModule` available for critical-route action\"\n          );\n          if (!routeModule.clientAction) {\n            if (isSpaMode) {\n              throw noActionDefinedError(\"clientAction\", route.id);\n            }\n            return fetchServerAction(singleFetch);\n          }\n          return routeModule.clientAction({\n            request,\n            params,\n            context,\n            pattern,\n            url,\n            async serverAction() {\n              preventInvalidServerHandlerCall(\"action\", route);\n              return fetchServerAction(singleFetch);\n            }\n          });\n        });\n      };\n    } else {\n      if (!route.hasClientLoader) {\n        dataRoute.loader = (_, singleFetch) => prefetchStylesAndCallHandler(() => {\n          return fetchServerLoader(singleFetch);\n        });\n      }\n      if (!route.hasClientAction) {\n        dataRoute.action = (_, singleFetch) => prefetchStylesAndCallHandler(() => {\n          if (isSpaMode) {\n            throw noActionDefinedError(\"clientAction\", route.id);\n          }\n          return fetchServerAction(singleFetch);\n        });\n      }\n      let lazyRoutePromise;\n      async function getLazyRoute() {\n        if (lazyRoutePromise) {\n          return await lazyRoutePromise;\n        }\n        lazyRoutePromise = (async () => {\n          if (route.clientLoaderModule || route.clientActionModule) {\n            await new Promise((resolve) => setTimeout(resolve, 0));\n          }\n          let routeModulePromise = loadRouteModuleWithBlockingLinks(\n            route,\n            routeModulesCache\n          );\n          prefetchRouteModuleChunks(route);\n          return await routeModulePromise;\n        })();\n        return await lazyRoutePromise;\n      }\n      dataRoute.lazy = {\n        loader: route.hasClientLoader ? async () => {\n          let { clientLoader } = route.clientLoaderModule ? await import(\n            /* @vite-ignore */\n            /* webpackIgnore: true */\n            route.clientLoaderModule\n          ) : await getLazyRoute();\n          invariant2(clientLoader, \"No `clientLoader` export found\");\n          return (args, singleFetch) => clientLoader({\n            ...args,\n            async serverLoader() {\n              preventInvalidServerHandlerCall(\"loader\", route);\n              return fetchServerLoader(singleFetch);\n            }\n          });\n        } : void 0,\n        action: route.hasClientAction ? async () => {\n          let clientActionPromise = route.clientActionModule ? import(\n            /* @vite-ignore */\n            /* webpackIgnore: true */\n            route.clientActionModule\n          ) : getLazyRoute();\n          prefetchRouteModuleChunks(route);\n          let { clientAction } = await clientActionPromise;\n          invariant2(clientAction, \"No `clientAction` export found\");\n          return (args, singleFetch) => clientAction({\n            ...args,\n            async serverAction() {\n              preventInvalidServerHandlerCall(\"action\", route);\n              return fetchServerAction(singleFetch);\n            }\n          });\n        } : void 0,\n        middleware: route.hasClientMiddleware ? async () => {\n          let { clientMiddleware } = route.clientMiddlewareModule ? await import(\n            /* @vite-ignore */\n            /* webpackIgnore: true */\n            route.clientMiddlewareModule\n          ) : await getLazyRoute();\n          invariant2(clientMiddleware, \"No `clientMiddleware` export found\");\n          return clientMiddleware;\n        } : void 0,\n        shouldRevalidate: async () => {\n          let lazyRoute = await getLazyRoute();\n          return getShouldRevalidateFunction(\n            dataRoute.path,\n            lazyRoute,\n            route,\n            ssr,\n            needsRevalidation\n          );\n        },\n        handle: async () => (await getLazyRoute()).handle,\n        // No need to wrap these in layout since the root route is never\n        // loaded via route.lazy()\n        Component: async () => (await getLazyRoute()).Component,\n        ErrorBoundary: route.hasErrorBoundary ? async () => (await getLazyRoute()).ErrorBoundary : void 0\n      };\n    }\n    let children = createClientRoutes(\n      manifest,\n      routeModulesCache,\n      initialState,\n      ssr,\n      isSpaMode,\n      route.id,\n      routesByParentId,\n      needsRevalidation\n    );\n    if (children.length > 0) dataRoute.children = children;\n    return dataRoute;\n  });\n}\nfunction getShouldRevalidateFunction(path, route, manifestRoute, ssr, needsRevalidation) {\n  if (needsRevalidation) {\n    return wrapShouldRevalidateForHdr(\n      manifestRoute.id,\n      route.shouldRevalidate,\n      needsRevalidation\n    );\n  }\n  if (!ssr && manifestRoute.hasLoader && !manifestRoute.hasClientLoader) {\n    let myParams = path ? compilePath(path)[1].map((p) => p.paramName) : [];\n    const didParamsChange = (opts) => myParams.some((p) => opts.currentParams[p] !== opts.nextParams[p]);\n    if (route.shouldRevalidate) {\n      let fn = route.shouldRevalidate;\n      return (opts) => fn({\n        ...opts,\n        defaultShouldRevalidate: didParamsChange(opts)\n      });\n    } else {\n      return (opts) => didParamsChange(opts);\n    }\n  }\n  return route.shouldRevalidate;\n}\nfunction wrapShouldRevalidateForHdr(routeId, routeShouldRevalidate, needsRevalidation) {\n  let handledRevalidation = false;\n  return (arg) => {\n    if (!handledRevalidation) {\n      handledRevalidation = true;\n      return needsRevalidation.has(routeId);\n    }\n    return routeShouldRevalidate ? routeShouldRevalidate(arg) : arg.defaultShouldRevalidate;\n  };\n}\nasync function loadRouteModuleWithBlockingLinks(route, routeModules) {\n  let routeModulePromise = loadRouteModule(route, routeModules);\n  let prefetchRouteCssPromise = prefetchRouteCss(route);\n  let routeModule = await routeModulePromise;\n  await Promise.all([\n    prefetchRouteCssPromise,\n    prefetchStyleLinks(route, routeModule)\n  ]);\n  return {\n    Component: getRouteModuleComponent(routeModule),\n    ErrorBoundary: routeModule.ErrorBoundary,\n    clientMiddleware: routeModule.clientMiddleware,\n    clientAction: routeModule.clientAction,\n    clientLoader: routeModule.clientLoader,\n    handle: routeModule.handle,\n    links: routeModule.links,\n    meta: routeModule.meta,\n    shouldRevalidate: routeModule.shouldRevalidate\n  };\n}\nfunction getRouteModuleComponent(routeModule) {\n  if (routeModule.default == null) return void 0;\n  let isEmptyObject = typeof routeModule.default === \"object\" && Object.keys(routeModule.default).length === 0;\n  if (!isEmptyObject) {\n    return routeModule.default;\n  }\n}\nfunction shouldHydrateRouteLoader(routeId, clientLoader, hasLoader, isSpaMode) {\n  return isSpaMode && routeId !== \"root\" || clientLoader != null && (clientLoader.hydrate === true || hasLoader !== true);\n}\n\n// lib/dom/ssr/fog-of-war.ts\nvar nextPaths = /* @__PURE__ */ new Set();\nvar discoveredPathsMaxSize = 1e3;\nvar discoveredPaths = /* @__PURE__ */ new Set();\nvar URL_LIMIT = 7680;\nfunction getPathsWithAncestors(paths) {\n  let result = /* @__PURE__ */ new Set();\n  paths.forEach((path) => {\n    if (!path.startsWith(\"/\")) {\n      path = `/${path}`;\n    }\n    for (let i = 1; i < path.length; i++) {\n      if (path[i] === \"/\") {\n        result.add(path.slice(0, i));\n      }\n    }\n    result.add(path);\n  });\n  return Array.from(result);\n}\nfunction isFogOfWarEnabled(routeDiscovery, ssr) {\n  return routeDiscovery.mode === \"lazy\" && ssr === true;\n}\nvar MANIFEST_MATCH_COST_LIMIT = 5e4;\nvar MANIFEST_MATCH_COST_SEGMENT_THRESHOLD = 10;\nfunction shouldUseInitialRouteDiscovery(pathname, matchCost = 0) {\n  let segmentCount = pathname.split(\"/\").length - 1;\n  let ancestorCount = Math.max(segmentCount - 1, 0);\n  return ancestorCount * pathname.length + 1 > URL_LIMIT || segmentCount > MANIFEST_MATCH_COST_SEGMENT_THRESHOLD && segmentCount * matchCost > MANIFEST_MATCH_COST_LIMIT;\n}\nfunction getPartialManifest({ sri, ...manifest }, router) {\n  let routeIds = new Set(router.state.matches.map((m) => m.route.id));\n  let segments = router.state.location.pathname.split(\"/\").filter(Boolean);\n  let paths = [\"/\"];\n  segments.pop();\n  while (segments.length > 0) {\n    paths.push(`/${segments.join(\"/\")}`);\n    segments.pop();\n  }\n  paths.forEach((path) => {\n    let matches = matchRoutesImpl(\n      router.routes,\n      path,\n      router.basename || \"/\",\n      false,\n      router.branches\n    );\n    if (matches) {\n      matches.forEach((m) => routeIds.add(m.route.id));\n    }\n  });\n  let initialRoutes = [...routeIds].reduce(\n    (acc, id) => Object.assign(acc, { [id]: manifest.routes[id] }),\n    {}\n  );\n  return {\n    ...manifest,\n    routes: initialRoutes,\n    sri: sri ? true : void 0\n  };\n}\nfunction getPatchRoutesOnNavigationFunction(getRouter, manifest, routeModules, ssr, routeDiscovery, isSpaMode, basename) {\n  if (!isFogOfWarEnabled(routeDiscovery, ssr)) {\n    return void 0;\n  }\n  return async ({ path, patch, signal, fetcherKey }) => {\n    if (discoveredPaths.has(path)) {\n      return;\n    }\n    let { state } = getRouter();\n    await fetchAndApplyManifestPatches(\n      [path],\n      // If we're patching for a fetcher call, reload the current location\n      // Otherwise prefer any ongoing navigation location\n      fetcherKey ? window.location.href : createPath(state.navigation.location || state.location),\n      manifest,\n      routeModules,\n      ssr,\n      isSpaMode,\n      basename,\n      routeDiscovery.manifestPath,\n      patch,\n      signal\n    );\n  };\n}\nfunction useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {\n  React7.useEffect(() => {\n    if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet\n    window.navigator?.connection?.saveData === true) {\n      return;\n    }\n    function registerElement(el) {\n      let path = el.tagName === \"FORM\" ? el.getAttribute(\"action\") : el.getAttribute(\"href\");\n      if (!path) {\n        return;\n      }\n      let pathname = el.tagName === \"A\" ? el.pathname : new URL(path, window.location.origin).pathname;\n      if (!discoveredPaths.has(pathname)) {\n        nextPaths.add(pathname);\n      }\n    }\n    async function fetchPatches() {\n      document.querySelectorAll(\"a[data-discover], form[data-discover]\").forEach(registerElement);\n      let lazyPaths = Array.from(nextPaths.keys()).filter((path) => {\n        if (discoveredPaths.has(path)) {\n          nextPaths.delete(path);\n          return false;\n        }\n        return true;\n      });\n      if (lazyPaths.length === 0) {\n        return;\n      }\n      try {\n        await fetchAndApplyManifestPatches(\n          lazyPaths,\n          null,\n          manifest,\n          routeModules,\n          ssr,\n          isSpaMode,\n          router.basename,\n          routeDiscovery.manifestPath,\n          router.patchRoutes\n        );\n      } catch (e) {\n        console.error(\"Failed to fetch manifest patches\", e);\n      }\n    }\n    let debouncedFetchPatches = debounce(fetchPatches, 100);\n    fetchPatches();\n    let observer = new MutationObserver(() => debouncedFetchPatches());\n    observer.observe(document.documentElement, {\n      subtree: true,\n      childList: true,\n      attributes: true,\n      attributeFilter: [\"data-discover\", \"href\", \"action\"]\n    });\n    return () => observer.disconnect();\n  }, [ssr, isSpaMode, manifest, routeModules, router, routeDiscovery]);\n}\nfunction getManifestPath(_manifestPath, basename) {\n  let manifestPath = _manifestPath || \"/__manifest\";\n  return basename == null ? manifestPath : joinPaths([basename, manifestPath]);\n}\nvar MANIFEST_VERSION_STORAGE_KEY = \"react-router-manifest-version\";\nasync function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, routeModules, ssr, isSpaMode, basename, manifestPath, patchRoutes, signal) {\n  paths = getPathsWithAncestors(paths);\n  const searchParams = new URLSearchParams();\n  searchParams.set(\"paths\", paths.sort().join(\",\"));\n  searchParams.set(\"version\", manifest.version);\n  let url = new URL(\n    getManifestPath(manifestPath, basename),\n    window.location.origin\n  );\n  url.search = searchParams.toString();\n  if (url.toString().length > URL_LIMIT) {\n    nextPaths.clear();\n    return;\n  }\n  let serverPatches;\n  try {\n    let res = await fetch(url, { signal });\n    if (!res.ok) {\n      throw new Error(`${res.status} ${res.statusText}`);\n    } else if (res.status === 204 && res.headers.has(\"X-Remix-Reload-Document\")) {\n      if (!errorReloadPath) {\n        console.warn(\n          \"Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.\"\n        );\n        return;\n      }\n      try {\n        if (sessionStorage.getItem(MANIFEST_VERSION_STORAGE_KEY) === manifest.version) {\n          console.error(\n            \"Unable to discover routes due to manifest version mismatch.\"\n          );\n          return;\n        }\n        sessionStorage.setItem(MANIFEST_VERSION_STORAGE_KEY, manifest.version);\n      } catch {\n      }\n      window.location.href = errorReloadPath;\n      console.warn(\"Detected manifest version mismatch, reloading...\");\n      await new Promise(() => {\n      });\n    } else if (res.status >= 400) {\n      throw new Error(await res.text());\n    }\n    try {\n      sessionStorage.removeItem(MANIFEST_VERSION_STORAGE_KEY);\n    } catch {\n    }\n    serverPatches = await res.json();\n  } catch (e) {\n    if (signal?.aborted) return;\n    throw e;\n  }\n  let knownRoutes = new Set(Object.keys(manifest.routes));\n  let patches = Object.values(serverPatches).reduce((acc, route) => {\n    if (route && !knownRoutes.has(route.id)) {\n      acc[route.id] = route;\n    }\n    return acc;\n  }, {});\n  Object.assign(manifest.routes, patches);\n  paths.forEach((p) => addToFifoQueue(p, discoveredPaths));\n  let parentIds = /* @__PURE__ */ new Set();\n  Object.values(patches).forEach((patch) => {\n    if (patch && (!patch.parentId || !patches[patch.parentId])) {\n      parentIds.add(patch.parentId);\n    }\n  });\n  parentIds.forEach(\n    (parentId) => patchRoutes(\n      parentId || null,\n      createClientRoutes(patches, routeModules, null, ssr, isSpaMode, parentId)\n    )\n  );\n}\nfunction addToFifoQueue(path, queue) {\n  if (queue.size >= discoveredPathsMaxSize) {\n    let first = queue.values().next().value;\n    queue.delete(first);\n  }\n  queue.add(path);\n}\nfunction debounce(callback, wait) {\n  let timeoutId;\n  return (...args) => {\n    window.clearTimeout(timeoutId);\n    timeoutId = window.setTimeout(() => callback(...args), wait);\n  };\n}\n\n// lib/dom/ssr/components.tsx\nfunction useDataRouterContext2() {\n  let context = React8.useContext(DataRouterContext);\n  invariant2(\n    context,\n    \"You must render this element inside a <DataRouterContext.Provider> element\"\n  );\n  return context;\n}\nfunction useDataRouterStateContext() {\n  let context = React8.useContext(DataRouterStateContext);\n  invariant2(\n    context,\n    \"You must render this element inside a <DataRouterStateContext.Provider> element\"\n  );\n  return context;\n}\nvar FrameworkContext = React8.createContext(void 0);\nFrameworkContext.displayName = \"FrameworkContext\";\nfunction useFrameworkContext() {\n  let context = React8.useContext(FrameworkContext);\n  invariant2(\n    context,\n    \"You must render this element inside a <HydratedRouter> element\"\n  );\n  return context;\n}\nfunction usePrefetchBehavior(prefetch, theirElementProps) {\n  let frameworkContext = React8.useContext(FrameworkContext);\n  let [maybePrefetch, setMaybePrefetch] = React8.useState(false);\n  let [shouldPrefetch, setShouldPrefetch] = React8.useState(false);\n  let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;\n  let ref = React8.useRef(null);\n  React8.useEffect(() => {\n    if (prefetch === \"render\") {\n      setShouldPrefetch(true);\n    }\n    if (prefetch === \"viewport\") {\n      let callback = (entries) => {\n        entries.forEach((entry) => {\n          setShouldPrefetch(entry.isIntersecting);\n        });\n      };\n      let observer = new IntersectionObserver(callback, { threshold: 0.5 });\n      if (ref.current) observer.observe(ref.current);\n      return () => {\n        observer.disconnect();\n      };\n    }\n  }, [prefetch]);\n  React8.useEffect(() => {\n    if (maybePrefetch) {\n      let id = setTimeout(() => {\n        setShouldPrefetch(true);\n      }, 100);\n      return () => {\n        clearTimeout(id);\n      };\n    }\n  }, [maybePrefetch]);\n  let setIntent = () => {\n    setMaybePrefetch(true);\n  };\n  let cancelIntent = () => {\n    setMaybePrefetch(false);\n    setShouldPrefetch(false);\n  };\n  if (!frameworkContext) {\n    return [false, ref, {}];\n  }\n  if (prefetch !== \"intent\") {\n    return [shouldPrefetch, ref, {}];\n  }\n  return [\n    shouldPrefetch,\n    ref,\n    {\n      onFocus: composeEventHandlers(onFocus, setIntent),\n      onBlur: composeEventHandlers(onBlur, cancelIntent),\n      onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),\n      onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),\n      onTouchStart: composeEventHandlers(onTouchStart, setIntent)\n    }\n  ];\n}\nfunction composeEventHandlers(theirHandler, ourHandler) {\n  return (event) => {\n    theirHandler && theirHandler(event);\n    if (!event.defaultPrevented) {\n      ourHandler(event);\n    }\n  };\n}\nfunction getActiveMatches(matches, errors, isSpaMode) {\n  if (isSpaMode && !isHydrated) {\n    return [matches[0]];\n  }\n  if (errors) {\n    let errorIdx = matches.findIndex((m) => errors[m.route.id] !== void 0);\n    return matches.slice(0, errorIdx + 1);\n  }\n  return matches;\n}\nvar CRITICAL_CSS_DATA_ATTRIBUTE = \"data-react-router-critical-css\";\nfunction Links({ nonce, crossOrigin }) {\n  let {\n    isSpaMode,\n    manifest,\n    routeModules,\n    criticalCss,\n    nonce: contextNonce\n  } = useFrameworkContext();\n  let { errors, matches: routerMatches } = useDataRouterStateContext();\n  let matches = getActiveMatches(routerMatches, errors, isSpaMode);\n  let keyedLinks = React8.useMemo(\n    () => getKeyedLinksForMatches(matches, routeModules, manifest),\n    [matches, routeModules, manifest]\n  );\n  if (nonce == null && contextNonce) {\n    nonce = contextNonce;\n  }\n  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof criticalCss === \"string\" ? /* @__PURE__ */ React8.createElement(\n    \"style\",\n    {\n      ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: \"\" },\n      nonce,\n      dangerouslySetInnerHTML: { __html: criticalCss }\n    }\n  ) : null, typeof criticalCss === \"object\" ? /* @__PURE__ */ React8.createElement(\n    \"link\",\n    {\n      ...{ [CRITICAL_CSS_DATA_ATTRIBUTE]: \"\" },\n      rel: \"stylesheet\",\n      href: criticalCss.href,\n      nonce,\n      crossOrigin\n    }\n  ) : null, keyedLinks.map(\n    ({ key, link }) => isPageLinkDescriptor(link) ? /* @__PURE__ */ React8.createElement(\n      PrefetchPageLinks,\n      {\n        key,\n        nonce,\n        ...link,\n        crossOrigin: link.crossOrigin ?? crossOrigin\n      }\n    ) : /* @__PURE__ */ React8.createElement(\n      \"link\",\n      {\n        key,\n        nonce,\n        ...link,\n        crossOrigin: link.crossOrigin ?? crossOrigin\n      }\n    )\n  ));\n}\nfunction PrefetchPageLinks({ page, ...linkProps }) {\n  let rsc = useIsRSCRouterContext();\n  let { nonce: contextNonce } = useFrameworkContext();\n  let { router } = useDataRouterContext2();\n  let matches = React8.useMemo(\n    () => matchRoutes(router.routes, page, router.basename),\n    [router.routes, page, router.basename]\n  );\n  if (!matches) {\n    return null;\n  }\n  if (linkProps.nonce == null && contextNonce) {\n    linkProps = { ...linkProps, nonce: contextNonce };\n  }\n  if (rsc) {\n    return /* @__PURE__ */ React8.createElement(RSCPrefetchPageLinksImpl, { page, matches, ...linkProps });\n  }\n  return /* @__PURE__ */ React8.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps });\n}\nfunction useKeyedPrefetchLinks(matches) {\n  let { manifest, routeModules } = useFrameworkContext();\n  let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React8.useState([]);\n  React8.useEffect(() => {\n    let interrupted = false;\n    void getKeyedPrefetchLinks(matches, manifest, routeModules).then(\n      (links) => {\n        if (!interrupted) {\n          setKeyedPrefetchLinks(links);\n        }\n      }\n    );\n    return () => {\n      interrupted = true;\n    };\n  }, [matches, manifest, routeModules]);\n  return keyedPrefetchLinks;\n}\nfunction RSCPrefetchPageLinksImpl({\n  page,\n  matches: nextMatches,\n  ...linkProps\n}) {\n  let location = useLocation();\n  let { future } = useFrameworkContext();\n  let { basename } = useDataRouterContext2();\n  let dataHrefs = React8.useMemo(() => {\n    if (page === location.pathname + location.search + location.hash) {\n      return [];\n    }\n    let url = singleFetchUrl(\n      page,\n      basename,\n      future.v8_trailingSlashAwareDataRequests,\n      \"rsc\"\n    );\n    let hasSomeRoutesWithShouldRevalidate = false;\n    let targetRoutes = [];\n    for (let match of nextMatches) {\n      if (typeof match.route.shouldRevalidate === \"function\") {\n        hasSomeRoutesWithShouldRevalidate = true;\n      } else {\n        targetRoutes.push(match.route.id);\n      }\n    }\n    if (hasSomeRoutesWithShouldRevalidate && targetRoutes.length > 0) {\n      url.searchParams.set(\"_routes\", targetRoutes.join(\",\"));\n    }\n    return [url.pathname + url.search];\n  }, [\n    basename,\n    future.v8_trailingSlashAwareDataRequests,\n    page,\n    location,\n    nextMatches\n  ]);\n  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement(\"link\", { key: href, rel: \"prefetch\", as: \"fetch\", href, ...linkProps })));\n}\nfunction PrefetchPageLinksImpl({\n  page,\n  matches: nextMatches,\n  ...linkProps\n}) {\n  let location = useLocation();\n  let { future, manifest, routeModules } = useFrameworkContext();\n  let { basename } = useDataRouterContext2();\n  let { loaderData, matches } = useDataRouterStateContext();\n  let newMatchesForData = React8.useMemo(\n    () => getNewMatchesForLinks(\n      page,\n      nextMatches,\n      matches,\n      manifest,\n      location,\n      \"data\"\n    ),\n    [page, nextMatches, matches, manifest, location]\n  );\n  let newMatchesForAssets = React8.useMemo(\n    () => getNewMatchesForLinks(\n      page,\n      nextMatches,\n      matches,\n      manifest,\n      location,\n      \"assets\"\n    ),\n    [page, nextMatches, matches, manifest, location]\n  );\n  let dataHrefs = React8.useMemo(() => {\n    if (page === location.pathname + location.search + location.hash) {\n      return [];\n    }\n    let routesParams = /* @__PURE__ */ new Set();\n    let foundOptOutRoute = false;\n    nextMatches.forEach((m) => {\n      let manifestRoute = manifest.routes[m.route.id];\n      if (!manifestRoute || !manifestRoute.hasLoader) {\n        return;\n      }\n      if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {\n        foundOptOutRoute = true;\n      } else if (manifestRoute.hasClientLoader) {\n        foundOptOutRoute = true;\n      } else {\n        routesParams.add(m.route.id);\n      }\n    });\n    if (routesParams.size === 0) {\n      return [];\n    }\n    let url = singleFetchUrl(\n      page,\n      basename,\n      future.v8_trailingSlashAwareDataRequests,\n      \"data\"\n    );\n    if (foundOptOutRoute && routesParams.size > 0) {\n      url.searchParams.set(\n        \"_routes\",\n        nextMatches.filter((m) => routesParams.has(m.route.id)).map((m) => m.route.id).join(\",\")\n      );\n    }\n    return [url.pathname + url.search];\n  }, [\n    basename,\n    future.v8_trailingSlashAwareDataRequests,\n    loaderData,\n    location,\n    manifest,\n    newMatchesForData,\n    nextMatches,\n    page,\n    routeModules\n  ]);\n  let moduleHrefs = React8.useMemo(\n    () => getModuleLinkHrefs(newMatchesForAssets, manifest),\n    [newMatchesForAssets, manifest]\n  );\n  let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);\n  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React8.createElement(\"link\", { key: href, rel: \"prefetch\", as: \"fetch\", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React8.createElement(\"link\", { key: href, rel: \"modulepreload\", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (\n    // these don't spread `linkProps` because they are full link descriptors\n    // already with their own props\n    /* @__PURE__ */ React8.createElement(\n      \"link\",\n      {\n        key,\n        nonce: linkProps.nonce,\n        ...link,\n        crossOrigin: link.crossOrigin ?? linkProps.crossOrigin\n      }\n    )\n  )));\n}\nfunction Meta() {\n  let { isSpaMode, routeModules } = useFrameworkContext();\n  let {\n    errors,\n    matches: routerMatches,\n    loaderData\n  } = useDataRouterStateContext();\n  let location = useLocation();\n  let _matches = getActiveMatches(routerMatches, errors, isSpaMode);\n  let error = null;\n  if (errors) {\n    error = errors[_matches[_matches.length - 1].route.id];\n  }\n  let meta = [];\n  let leafMeta = null;\n  let matches = [];\n  for (let i = 0; i < _matches.length; i++) {\n    let _match = _matches[i];\n    let routeId = _match.route.id;\n    let data2 = loaderData[routeId];\n    let params = _match.params;\n    let routeModule = routeModules[routeId];\n    let routeMeta = [];\n    let match = {\n      id: routeId,\n      data: data2,\n      loaderData: data2,\n      meta: [],\n      params: _match.params,\n      pathname: _match.pathname,\n      handle: _match.route.handle,\n      error\n    };\n    matches[i] = match;\n    if (routeModule?.meta) {\n      routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n        data: data2,\n        loaderData: data2,\n        params,\n        location,\n        matches,\n        error\n      }) : Array.isArray(routeModule.meta) ? [...routeModule.meta] : routeModule.meta;\n    } else if (leafMeta) {\n      routeMeta = [...leafMeta];\n    }\n    routeMeta = routeMeta || [];\n    if (!Array.isArray(routeMeta)) {\n      throw new Error(\n        \"The route at \" + _match.route.path + \" returns an invalid value. All route meta functions must return an array of meta objects.\\n\\nTo reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta\"\n      );\n    }\n    match.meta = routeMeta;\n    matches[i] = match;\n    meta = [...routeMeta];\n    leafMeta = meta;\n  }\n  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, meta.flat().map((metaProps) => {\n    if (!metaProps) {\n      return null;\n    }\n    if (\"tagName\" in metaProps) {\n      let { tagName, ...rest } = metaProps;\n      if (!isValidMetaTag(tagName)) {\n        console.warn(\n          `A meta object uses an invalid tagName: ${tagName}. Expected either 'link' or 'meta'`\n        );\n        return null;\n      }\n      let Comp = tagName;\n      return /* @__PURE__ */ React8.createElement(Comp, { key: JSON.stringify(rest), ...rest });\n    }\n    if (\"title\" in metaProps) {\n      return /* @__PURE__ */ React8.createElement(\"title\", { key: \"title\" }, String(metaProps.title));\n    }\n    if (\"charset\" in metaProps) {\n      metaProps.charSet ?? (metaProps.charSet = metaProps.charset);\n      delete metaProps.charset;\n    }\n    if (\"charSet\" in metaProps && metaProps.charSet != null) {\n      return typeof metaProps.charSet === \"string\" ? /* @__PURE__ */ React8.createElement(\"meta\", { key: \"charSet\", charSet: metaProps.charSet }) : null;\n    }\n    if (\"script:ld+json\" in metaProps) {\n      try {\n        let json = JSON.stringify(metaProps[\"script:ld+json\"]);\n        return /* @__PURE__ */ React8.createElement(\n          \"script\",\n          {\n            key: `script:ld+json:${json}`,\n            type: \"application/ld+json\",\n            dangerouslySetInnerHTML: { __html: escapeHtml(json) }\n          }\n        );\n      } catch (e) {\n        return null;\n      }\n    }\n    return /* @__PURE__ */ React8.createElement(\"meta\", { key: JSON.stringify(metaProps), ...metaProps });\n  }));\n}\nfunction isValidMetaTag(tagName) {\n  return typeof tagName === \"string\" && /^(meta|link)$/.test(tagName);\n}\nvar isHydrated = false;\nfunction setIsHydrated() {\n  isHydrated = true;\n}\nfunction Scripts(scriptProps) {\n  let {\n    manifest,\n    serverHandoffString,\n    isSpaMode,\n    renderMeta,\n    routeDiscovery,\n    ssr,\n    nonce: contextNonce\n  } = useFrameworkContext();\n  let { router, static: isStatic, staticContext } = useDataRouterContext2();\n  let { matches: routerMatches } = useDataRouterStateContext();\n  let isRSCRouterContext = useIsRSCRouterContext();\n  let enableFogOfWar = isFogOfWarEnabled(routeDiscovery, ssr);\n  if (scriptProps.nonce == null && contextNonce) {\n    scriptProps = { ...scriptProps, nonce: contextNonce };\n  }\n  if (renderMeta) {\n    renderMeta.didRenderScripts = true;\n  }\n  let matches = getActiveMatches(routerMatches, null, isSpaMode);\n  React8.useEffect(() => {\n    setIsHydrated();\n  }, []);\n  let initialScripts = React8.useMemo(() => {\n    if (isRSCRouterContext) {\n      return null;\n    }\n    let streamScript = \"window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());\";\n    let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : \" \";\n    let routeModulesScript = !isStatic ? \" \" : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : \"\"}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : \"\"};\n${matches.map((match, routeIndex) => {\n      let routeVarName = `route${routeIndex}`;\n      let manifestEntry = manifest.routes[match.route.id];\n      invariant2(manifestEntry, `Route ${match.route.id} not found in manifest`);\n      let {\n        clientActionModule,\n        clientLoaderModule,\n        clientMiddlewareModule,\n        hydrateFallbackModule,\n        module\n      } = manifestEntry;\n      let chunks = [\n        ...clientActionModule ? [\n          {\n            module: clientActionModule,\n            varName: `${routeVarName}_clientAction`\n          }\n        ] : [],\n        ...clientLoaderModule ? [\n          {\n            module: clientLoaderModule,\n            varName: `${routeVarName}_clientLoader`\n          }\n        ] : [],\n        ...clientMiddlewareModule ? [\n          {\n            module: clientMiddlewareModule,\n            varName: `${routeVarName}_clientMiddleware`\n          }\n        ] : [],\n        ...hydrateFallbackModule ? [\n          {\n            module: hydrateFallbackModule,\n            varName: `${routeVarName}_HydrateFallback`\n          }\n        ] : [],\n        { module, varName: `${routeVarName}_main` }\n      ];\n      if (chunks.length === 1) {\n        return `import * as ${routeVarName} from ${JSON.stringify(module)};`;\n      }\n      let chunkImportsSnippet = chunks.map((chunk) => `import * as ${chunk.varName} from \"${chunk.module}\";`).join(\"\\n\");\n      let mergedChunksSnippet = `const ${routeVarName} = {${chunks.map((chunk) => `...${chunk.varName}`).join(\",\")}};`;\n      return [chunkImportsSnippet, mergedChunksSnippet].join(\"\\n\");\n    }).join(\"\\n\")}\n  ${enableFogOfWar ? (\n      // Inline a minimal manifest with the SSR matches\n      `window.__reactRouterManifest = ${JSON.stringify(\n        getPartialManifest(manifest, router),\n        null,\n        2\n      )};`\n    ) : \"\"}\n  window.__reactRouterRouteModules = {${matches.map((match, index) => `${JSON.stringify(match.route.id)}:route${index}`).join(\",\")}};\n\nimport(${JSON.stringify(manifest.entry.module)});`;\n    return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(\n      \"script\",\n      {\n        ...scriptProps,\n        suppressHydrationWarning: true,\n        dangerouslySetInnerHTML: { __html: contextScript },\n        type: void 0\n      }\n    ), /* @__PURE__ */ React8.createElement(\n      \"script\",\n      {\n        ...scriptProps,\n        suppressHydrationWarning: true,\n        dangerouslySetInnerHTML: { __html: routeModulesScript },\n        type: \"module\",\n        async: true\n      }\n    ));\n  }, []);\n  let preloads = isHydrated || isRSCRouterContext ? [] : [\n    // Dedupe through a Set\n    ...new Set(\n      manifest.entry.imports.concat(\n        getModuleLinkHrefs(matches, manifest, {\n          includeHydrateFallback: true\n        })\n      )\n    )\n  ];\n  let sri = typeof manifest.sri === \"object\" ? manifest.sri : {};\n  warnOnce(\n    !isRSCRouterContext,\n    \"The <Scripts /> element is a no-op when using RSC and can be safely removed.\"\n  );\n  return isHydrated || isRSCRouterContext ? null : /* @__PURE__ */ React8.createElement(React8.Fragment, null, typeof manifest.sri === \"object\" ? /* @__PURE__ */ React8.createElement(\n    \"script\",\n    {\n      ...scriptProps,\n      \"rr-importmap\": \"\",\n      type: \"importmap\",\n      suppressHydrationWarning: true,\n      dangerouslySetInnerHTML: {\n        __html: JSON.stringify({\n          integrity: sri\n        })\n      }\n    }\n  ) : null, !enableFogOfWar ? /* @__PURE__ */ React8.createElement(\n    \"link\",\n    {\n      rel: \"modulepreload\",\n      href: manifest.url,\n      crossOrigin: scriptProps.crossOrigin,\n      integrity: sri[manifest.url],\n      nonce: scriptProps.nonce,\n      suppressHydrationWarning: true\n    }\n  ) : null, /* @__PURE__ */ React8.createElement(\n    \"link\",\n    {\n      rel: \"modulepreload\",\n      href: manifest.entry.module,\n      crossOrigin: scriptProps.crossOrigin,\n      integrity: sri[manifest.entry.module],\n      nonce: scriptProps.nonce,\n      suppressHydrationWarning: true\n    }\n  ), preloads.map((path) => /* @__PURE__ */ React8.createElement(\n    \"link\",\n    {\n      key: path,\n      rel: \"modulepreload\",\n      href: path,\n      crossOrigin: scriptProps.crossOrigin,\n      integrity: sri[path],\n      nonce: scriptProps.nonce,\n      suppressHydrationWarning: true\n    }\n  )), initialScripts);\n}\nfunction mergeRefs(...refs) {\n  return (value) => {\n    refs.forEach((ref) => {\n      if (typeof ref === \"function\") {\n        ref(value);\n      } else if (ref != null) {\n        ref.current = value;\n      }\n    });\n  };\n}\n\n// lib/dom/ssr/errorBoundaries.tsx\nvar RemixErrorBoundary = class extends React9.Component {\n  constructor(props) {\n    super(props);\n    this.state = { error: props.error || null, location: props.location };\n  }\n  static getDerivedStateFromError(error) {\n    return { error };\n  }\n  static getDerivedStateFromProps(props, state) {\n    if (state.location !== props.location) {\n      return { error: props.error || null, location: props.location };\n    }\n    return { error: props.error || state.error, location: state.location };\n  }\n  render() {\n    if (this.state.error) {\n      return /* @__PURE__ */ React9.createElement(\n        RemixRootDefaultErrorBoundary,\n        {\n          error: this.state.error,\n          isOutsideRemixApp: true\n        }\n      );\n    } else {\n      return this.props.children;\n    }\n  }\n};\nfunction RemixRootDefaultErrorBoundary({\n  error,\n  isOutsideRemixApp\n}) {\n  let { nonce } = useFrameworkContext();\n  console.error(error);\n  let heyDeveloper = /* @__PURE__ */ React9.createElement(\n    \"script\",\n    {\n      nonce,\n      dangerouslySetInnerHTML: {\n        __html: `\n        console.log(\n          \"\\u{1F4BF} Hey developer \\u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information.\"\n        );\n      `\n      }\n    }\n  );\n  if (isRouteErrorResponse(error)) {\n    return /* @__PURE__ */ React9.createElement(BoundaryShell, { title: \"Unhandled Thrown Response!\" }, /* @__PURE__ */ React9.createElement(\"h1\", { style: { fontSize: \"24px\" } }, error.status, \" \", error.statusText), ENABLE_DEV_WARNINGS ? heyDeveloper : null);\n  }\n  let errorInstance;\n  if (error instanceof Error) {\n    errorInstance = error;\n  } else {\n    let errorString = error == null ? \"Unknown Error\" : typeof error === \"object\" && \"toString\" in error ? error.toString() : JSON.stringify(error);\n    errorInstance = new Error(errorString);\n  }\n  return /* @__PURE__ */ React9.createElement(\n    BoundaryShell,\n    {\n      title: \"Application Error!\",\n      isOutsideRemixApp\n    },\n    /* @__PURE__ */ React9.createElement(\"h1\", { style: { fontSize: \"24px\" } }, \"Application Error\"),\n    /* @__PURE__ */ React9.createElement(\n      \"pre\",\n      {\n        style: {\n          padding: \"2rem\",\n          background: \"hsla(10, 50%, 50%, 0.1)\",\n          color: \"red\",\n          overflow: \"auto\"\n        }\n      },\n      errorInstance.stack\n    ),\n    heyDeveloper\n  );\n}\nfunction BoundaryShell({\n  title,\n  renderScripts,\n  isOutsideRemixApp,\n  children\n}) {\n  let { routeModules } = useFrameworkContext();\n  if (routeModules.root?.Layout && !isOutsideRemixApp) {\n    return children;\n  }\n  return /* @__PURE__ */ React9.createElement(\"html\", { lang: \"en\" }, /* @__PURE__ */ React9.createElement(\"head\", null, /* @__PURE__ */ React9.createElement(\"meta\", { charSet: \"utf-8\" }), /* @__PURE__ */ React9.createElement(\n    \"meta\",\n    {\n      name: \"viewport\",\n      content: \"width=device-width,initial-scale=1,viewport-fit=cover\"\n    }\n  ), /* @__PURE__ */ React9.createElement(\"title\", null, title)), /* @__PURE__ */ React9.createElement(\"body\", null, /* @__PURE__ */ React9.createElement(\"main\", { style: { fontFamily: \"system-ui, sans-serif\", padding: \"2rem\" } }, children, renderScripts ? /* @__PURE__ */ React9.createElement(Scripts, null) : null)));\n}\n\n// lib/dom/lib.tsx\nimport * as React10 from \"react\";\nvar isBrowser2 = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\ntry {\n  if (isBrowser2) {\n    window.__reactRouterVersion = // @ts-expect-error\n    \"7.18.5\";\n  }\n} catch (e) {\n}\nfunction createBrowserRouter(routes, opts) {\n  return createRouter({\n    basename: opts?.basename,\n    getContext: opts?.getContext,\n    future: opts?.future,\n    history: createBrowserHistory({ window: opts?.window }),\n    hydrationData: opts?.hydrationData || parseHydrationData(),\n    routes,\n    mapRouteProperties,\n    hydrationRouteProperties,\n    dataStrategy: opts?.dataStrategy,\n    patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n    window: opts?.window,\n    instrumentations: opts?.instrumentations\n  }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n  return createRouter({\n    basename: opts?.basename,\n    getContext: opts?.getContext,\n    future: opts?.future,\n    history: createHashHistory({ window: opts?.window }),\n    hydrationData: opts?.hydrationData || parseHydrationData(),\n    routes,\n    mapRouteProperties,\n    hydrationRouteProperties,\n    dataStrategy: opts?.dataStrategy,\n    patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,\n    window: opts?.window,\n    instrumentations: opts?.instrumentations\n  }).initialize();\n}\nfunction parseHydrationData() {\n  let state = window?.__staticRouterHydrationData;\n  if (state && state.errors) {\n    state = {\n      ...state,\n      errors: deserializeErrors(state.errors)\n    };\n  }\n  return state;\n}\nfunction deserializeErrors(errors) {\n  if (!errors) return null;\n  let entries = Object.entries(errors);\n  let serialized = {};\n  for (let [key, val] of entries) {\n    if (val && val.__type === \"RouteErrorResponse\") {\n      serialized[key] = new ErrorResponseImpl(\n        val.status,\n        val.statusText,\n        val.data,\n        val.internal === true\n      );\n    } else if (val && val.__type === \"Error\") {\n      if (typeof val.__subType === \"string\" && SUPPORTED_ERROR_TYPES.includes(val.__subType)) {\n        let ErrorConstructor = window[val.__subType];\n        if (typeof ErrorConstructor === \"function\") {\n          try {\n            let error = new ErrorConstructor(val.message);\n            error.stack = \"\";\n            serialized[key] = error;\n          } catch (e) {\n          }\n        }\n      }\n      if (serialized[key] == null) {\n        let error = new Error(val.message);\n        error.stack = \"\";\n        serialized[key] = error;\n      }\n    } else {\n      serialized[key] = val;\n    }\n  }\n  return serialized;\n}\nfunction BrowserRouter({\n  basename,\n  children,\n  useTransitions,\n  window: window2\n}) {\n  let historyRef = React10.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createBrowserHistory({ window: window2, v5Compat: true });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React10.useState({\n    action: history.action,\n    location: history.location\n  });\n  let setState = React10.useCallback(\n    (newState) => {\n      if (useTransitions === false) {\n        setStateImpl(newState);\n      } else {\n        React10.startTransition(() => setStateImpl(newState));\n      }\n    },\n    [useTransitions]\n  );\n  React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  return /* @__PURE__ */ React10.createElement(\n    Router,\n    {\n      basename,\n      children,\n      location: state.location,\n      navigationType: state.action,\n      navigator: history,\n      useTransitions\n    }\n  );\n}\nfunction HashRouter({\n  basename,\n  children,\n  useTransitions,\n  window: window2\n}) {\n  let historyRef = React10.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createHashHistory({ window: window2, v5Compat: true });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React10.useState({\n    action: history.action,\n    location: history.location\n  });\n  let setState = React10.useCallback(\n    (newState) => {\n      if (useTransitions === false) {\n        setStateImpl(newState);\n      } else {\n        React10.startTransition(() => setStateImpl(newState));\n      }\n    },\n    [useTransitions]\n  );\n  React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  return /* @__PURE__ */ React10.createElement(\n    Router,\n    {\n      basename,\n      children,\n      location: state.location,\n      navigationType: state.action,\n      navigator: history,\n      useTransitions\n    }\n  );\n}\nfunction HistoryRouter({\n  basename,\n  children,\n  history,\n  useTransitions\n}) {\n  let [state, setStateImpl] = React10.useState({\n    action: history.action,\n    location: history.location\n  });\n  let setState = React10.useCallback(\n    (newState) => {\n      if (useTransitions === false) {\n        setStateImpl(newState);\n      } else {\n        React10.startTransition(() => setStateImpl(newState));\n      }\n    },\n    [useTransitions]\n  );\n  React10.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  return /* @__PURE__ */ React10.createElement(\n    Router,\n    {\n      basename,\n      children,\n      location: state.location,\n      navigationType: state.action,\n      navigator: history,\n      useTransitions\n    }\n  );\n}\nHistoryRouter.displayName = \"unstable_HistoryRouter\";\nvar Link = React10.forwardRef(\n  function LinkWithRef({\n    onClick,\n    discover = \"render\",\n    prefetch = \"none\",\n    relative,\n    reloadDocument,\n    replace: replace2,\n    mask,\n    state,\n    target,\n    to,\n    preventScrollReset,\n    viewTransition,\n    defaultShouldRevalidate,\n    ...rest\n  }, forwardedRef) {\n    let { basename, navigator, useTransitions } = React10.useContext(NavigationContext);\n    let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n    let parsed = parseToInfo(to, basename);\n    to = parsed.to;\n    let href = useHref(to, { relative });\n    let location = useLocation();\n    let maskedHref = null;\n    if (mask) {\n      let resolved = resolveTo(\n        mask,\n        [],\n        location.mask ? location.mask.pathname : \"/\",\n        true\n      );\n      if (basename !== \"/\") {\n        resolved.pathname = resolved.pathname === \"/\" ? basename : joinPaths([basename, resolved.pathname]);\n      }\n      maskedHref = navigator.createHref(resolved);\n    }\n    let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(\n      prefetch,\n      rest\n    );\n    let internalOnClick = useLinkClickHandler(to, {\n      replace: replace2,\n      mask,\n      state,\n      target,\n      preventScrollReset,\n      relative,\n      viewTransition,\n      defaultShouldRevalidate,\n      useTransitions\n    });\n    function handleClick(event) {\n      if (onClick) onClick(event);\n      if (!event.defaultPrevented) {\n        internalOnClick(event);\n      }\n    }\n    let isSpaLink = !(parsed.isExternal || reloadDocument);\n    let link = (\n      // eslint-disable-next-line jsx-a11y/anchor-has-content\n      /* @__PURE__ */ React10.createElement(\n        \"a\",\n        {\n          ...rest,\n          ...prefetchHandlers,\n          href: (isSpaLink ? maskedHref : void 0) || parsed.absoluteURL || href,\n          onClick: isSpaLink ? handleClick : onClick,\n          ref: mergeRefs(forwardedRef, prefetchRef),\n          target,\n          \"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n        }\n      )\n    );\n    return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, link, /* @__PURE__ */ React10.createElement(PrefetchPageLinks, { page: href })) : link;\n  }\n);\nLink.displayName = \"Link\";\nvar NavLink = React10.forwardRef(\n  function NavLinkWithRef({\n    \"aria-current\": ariaCurrentProp = \"page\",\n    caseSensitive = false,\n    className: classNameProp = \"\",\n    end = false,\n    style: styleProp,\n    to,\n    viewTransition,\n    children,\n    ...rest\n  }, ref) {\n    let path = useResolvedPath(to, { relative: rest.relative });\n    let location = useLocation();\n    let routerState = React10.useContext(DataRouterStateContext);\n    let { navigator, basename } = React10.useContext(NavigationContext);\n    let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useViewTransitionState(path) && viewTransition === true;\n    let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n    let locationPathname = location.pathname;\n    let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n    if (!caseSensitive) {\n      locationPathname = locationPathname.toLowerCase();\n      nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n      toPathname = toPathname.toLowerCase();\n    }\n    if (nextLocationPathname && basename) {\n      nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;\n    }\n    const endSlashPosition = toPathname !== \"/\" && toPathname.endsWith(\"/\") ? toPathname.length - 1 : toPathname.length;\n    let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === \"/\";\n    let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === \"/\");\n    let renderProps = {\n      isActive,\n      isPending,\n      isTransitioning\n    };\n    let ariaCurrent = isActive ? ariaCurrentProp : void 0;\n    let className;\n    if (typeof classNameProp === \"function\") {\n      className = classNameProp(renderProps);\n    } else {\n      className = [\n        classNameProp,\n        isActive ? \"active\" : null,\n        isPending ? \"pending\" : null,\n        isTransitioning ? \"transitioning\" : null\n      ].filter(Boolean).join(\" \");\n    }\n    let style = typeof styleProp === \"function\" ? styleProp(renderProps) : styleProp;\n    return /* @__PURE__ */ React10.createElement(\n      Link,\n      {\n        ...rest,\n        \"aria-current\": ariaCurrent,\n        className,\n        ref,\n        style,\n        to,\n        viewTransition\n      },\n      typeof children === \"function\" ? children(renderProps) : children\n    );\n  }\n);\nNavLink.displayName = \"NavLink\";\nvar Form = React10.forwardRef(\n  ({\n    discover = \"render\",\n    fetcherKey,\n    navigate,\n    reloadDocument,\n    replace: replace2,\n    state,\n    method = defaultMethod,\n    action,\n    onSubmit,\n    relative,\n    preventScrollReset,\n    viewTransition,\n    defaultShouldRevalidate,\n    ...props\n  }, forwardedRef) => {\n    let { useTransitions } = React10.useContext(NavigationContext);\n    let submit = useSubmit();\n    let formAction = useFormAction(action, { relative });\n    let formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n    let isAbsolute = typeof action === \"string\" && ABSOLUTE_URL_REGEX.test(action);\n    let submitHandler = (event) => {\n      onSubmit && onSubmit(event);\n      if (event.defaultPrevented) return;\n      event.preventDefault();\n      let submitter = event.nativeEvent.submitter;\n      let submitMethod = submitter?.getAttribute(\"formmethod\") || method;\n      let doSubmit = () => submit(submitter || event.currentTarget, {\n        fetcherKey,\n        method: submitMethod,\n        navigate,\n        replace: replace2,\n        state,\n        relative,\n        preventScrollReset,\n        viewTransition,\n        defaultShouldRevalidate\n      });\n      if (useTransitions && navigate !== false) {\n        React10.startTransition(() => doSubmit());\n      } else {\n        doSubmit();\n      }\n    };\n    return /* @__PURE__ */ React10.createElement(\n      \"form\",\n      {\n        ref: forwardedRef,\n        method: formMethod,\n        action: formAction,\n        onSubmit: reloadDocument ? onSubmit : submitHandler,\n        ...props,\n        \"data-discover\": !isAbsolute && discover === \"render\" ? \"true\" : void 0\n      }\n    );\n  }\n);\nForm.displayName = \"Form\";\nfunction ScrollRestoration({\n  getKey,\n  storageKey,\n  ...props\n}) {\n  let remixContext = React10.useContext(FrameworkContext);\n  let { basename } = React10.useContext(NavigationContext);\n  let location = useLocation();\n  let matches = useMatches();\n  useScrollRestoration({ getKey, storageKey });\n  let ssrKey = React10.useMemo(\n    () => {\n      if (!remixContext || !getKey) return null;\n      let userKey = getScrollRestorationKey(\n        location,\n        matches,\n        basename,\n        getKey\n      );\n      return userKey !== location.key ? userKey : null;\n    },\n    // Nah, we only need this the first time for the SSR render\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    []\n  );\n  if (!remixContext || remixContext.isSpaMode) {\n    return null;\n  }\n  let restoreScroll = ((storageKey2, restoreKey) => {\n    if (!window.history.state || !window.history.state.key) {\n      let key = Math.random().toString(32).slice(2);\n      window.history.replaceState({ key }, \"\");\n    }\n    try {\n      let positions = JSON.parse(sessionStorage.getItem(storageKey2) || \"{}\");\n      let storedY = positions[restoreKey || window.history.state.key];\n      if (typeof storedY === \"number\") {\n        window.scrollTo(0, storedY);\n      }\n    } catch (error) {\n      console.error(error);\n      sessionStorage.removeItem(storageKey2);\n    }\n  }).toString();\n  if (props.nonce == null && remixContext?.nonce) {\n    props.nonce = remixContext.nonce;\n  }\n  return /* @__PURE__ */ React10.createElement(\n    \"script\",\n    {\n      ...props,\n      suppressHydrationWarning: true,\n      dangerouslySetInnerHTML: {\n        __html: `(${restoreScroll})(${escapeHtml(\n          JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY)\n        )}, ${escapeHtml(JSON.stringify(ssrKey))})`\n      }\n    }\n  );\n}\nScrollRestoration.displayName = \"ScrollRestoration\";\nfunction getDataRouterConsoleError2(hookName) {\n  return `${hookName} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`;\n}\nfunction useDataRouterContext3(hookName) {\n  let ctx = React10.useContext(DataRouterContext);\n  invariant(ctx, getDataRouterConsoleError2(hookName));\n  return ctx;\n}\nfunction useDataRouterState2(hookName) {\n  let state = React10.useContext(DataRouterStateContext);\n  invariant(state, getDataRouterConsoleError2(hookName));\n  return state;\n}\nfunction useLinkClickHandler(to, {\n  target,\n  replace: replaceProp,\n  mask,\n  state,\n  preventScrollReset,\n  relative,\n  viewTransition,\n  defaultShouldRevalidate,\n  useTransitions\n} = {}) {\n  let navigate = useNavigate();\n  let location = useLocation();\n  let path = useResolvedPath(to, { relative });\n  return React10.useCallback(\n    (event) => {\n      if (shouldProcessLinkClick(event, target)) {\n        event.preventDefault();\n        let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);\n        let doNavigate = () => navigate(to, {\n          replace: replace2,\n          mask,\n          state,\n          preventScrollReset,\n          relative,\n          viewTransition,\n          defaultShouldRevalidate\n        });\n        if (useTransitions) {\n          React10.startTransition(() => doNavigate());\n        } else {\n          doNavigate();\n        }\n      }\n    },\n    [\n      location,\n      navigate,\n      path,\n      replaceProp,\n      mask,\n      state,\n      target,\n      to,\n      preventScrollReset,\n      relative,\n      viewTransition,\n      defaultShouldRevalidate,\n      useTransitions\n    ]\n  );\n}\nfunction useSearchParams(defaultInit) {\n  warning(\n    typeof URLSearchParams !== \"undefined\",\n    `You cannot use the \\`useSearchParams\\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`\n  );\n  let defaultSearchParamsRef = React10.useRef(createSearchParams(defaultInit));\n  let hasSetSearchParamsRef = React10.useRef(false);\n  let location = useLocation();\n  let searchParams = React10.useMemo(\n    () => (\n      // Only merge in the defaults if we haven't yet called setSearchParams.\n      // Once we call that we want those to take precedence, otherwise you can't\n      // remove a param with setSearchParams({}) if it has an initial value\n      getSearchParamsForLocation(\n        location.search,\n        hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current\n      )\n    ),\n    [location.search]\n  );\n  let navigate = useNavigate();\n  let setSearchParams = React10.useCallback(\n    (nextInit, navigateOptions) => {\n      const newSearchParams = createSearchParams(\n        typeof nextInit === \"function\" ? nextInit(new URLSearchParams(searchParams)) : nextInit\n      );\n      hasSetSearchParamsRef.current = true;\n      navigate(\"?\" + newSearchParams, navigateOptions);\n    },\n    [navigate, searchParams]\n  );\n  return [searchParams, setSearchParams];\n}\nvar fetcherId = 0;\nvar getUniqueFetcherId = () => `__${String(++fetcherId)}__`;\nfunction useSubmit() {\n  let { router } = useDataRouterContext3(\"useSubmit\" /* UseSubmit */);\n  let { basename } = React10.useContext(NavigationContext);\n  let currentRouteId = useRouteId();\n  let routerFetch = router.fetch;\n  let routerNavigate = router.navigate;\n  return React10.useCallback(\n    async (target, options = {}) => {\n      let { action, method, encType, formData, body } = getFormSubmissionInfo(\n        target,\n        basename\n      );\n      if (options.navigate === false) {\n        let key = options.fetcherKey || getUniqueFetcherId();\n        await routerFetch(key, currentRouteId, options.action || action, {\n          defaultShouldRevalidate: options.defaultShouldRevalidate,\n          preventScrollReset: options.preventScrollReset,\n          formData,\n          body,\n          formMethod: options.method || method,\n          formEncType: options.encType || encType,\n          flushSync: options.flushSync\n        });\n      } else {\n        await routerNavigate(options.action || action, {\n          defaultShouldRevalidate: options.defaultShouldRevalidate,\n          preventScrollReset: options.preventScrollReset,\n          formData,\n          body,\n          formMethod: options.method || method,\n          formEncType: options.encType || encType,\n          replace: options.replace,\n          state: options.state,\n          fromRouteId: currentRouteId,\n          flushSync: options.flushSync,\n          viewTransition: options.viewTransition\n        });\n      }\n    },\n    [routerFetch, routerNavigate, basename, currentRouteId]\n  );\n}\nfunction useFormAction(action, { relative } = {}) {\n  let { basename } = React10.useContext(NavigationContext);\n  let routeContext = React10.useContext(RouteContext);\n  invariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n  let [match] = routeContext.matches.slice(-1);\n  let path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n  let location = useLocation();\n  if (action == null) {\n    path.search = location.search;\n    let params = new URLSearchParams(path.search);\n    let indexValues = params.getAll(\"index\");\n    let hasNakedIndexParam = indexValues.some((v) => v === \"\");\n    if (hasNakedIndexParam) {\n      params.delete(\"index\");\n      indexValues.filter((v) => v).forEach((v) => params.append(\"index\", v));\n      let qs = params.toString();\n      path.search = qs ? `?${qs}` : \"\";\n    }\n  }\n  if ((!action || action === \".\") && match.route.index) {\n    path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n  }\n  if (basename !== \"/\") {\n    path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n  }\n  return createPath(path);\n}\nfunction useFetcher({\n  key\n} = {}) {\n  let { router } = useDataRouterContext3(\"useFetcher\" /* UseFetcher */);\n  let state = useDataRouterState2(\"useFetcher\" /* UseFetcher */);\n  let fetcherData = React10.useContext(FetchersContext);\n  let route = React10.useContext(RouteContext);\n  let routeId = route.matches[route.matches.length - 1]?.route.id;\n  invariant(fetcherData, `useFetcher must be used inside a FetchersContext`);\n  invariant(route, `useFetcher must be used inside a RouteContext`);\n  invariant(\n    routeId != null,\n    `useFetcher can only be used on routes that contain a unique \"id\"`\n  );\n  let defaultKey = React10.useId();\n  let [fetcherKey, setFetcherKey] = React10.useState(key || defaultKey);\n  if (key && key !== fetcherKey) {\n    setFetcherKey(key);\n  }\n  let { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;\n  React10.useEffect(() => {\n    getFetcher(fetcherKey);\n    return () => deleteFetcher(fetcherKey);\n  }, [deleteFetcher, getFetcher, fetcherKey]);\n  let load = React10.useCallback(\n    async (href, opts) => {\n      invariant(routeId, \"No routeId available for fetcher.load()\");\n      await routerFetch(fetcherKey, routeId, href, opts);\n    },\n    [fetcherKey, routeId, routerFetch]\n  );\n  let submitImpl = useSubmit();\n  let submit = React10.useCallback(\n    async (target, opts) => {\n      await submitImpl(target, {\n        ...opts,\n        navigate: false,\n        fetcherKey\n      });\n    },\n    [fetcherKey, submitImpl]\n  );\n  let reset = React10.useCallback(\n    (opts) => resetFetcher(fetcherKey, opts),\n    [resetFetcher, fetcherKey]\n  );\n  let FetcherForm = React10.useMemo(() => {\n    let FetcherForm2 = React10.forwardRef(\n      (props, ref) => {\n        return /* @__PURE__ */ React10.createElement(Form, { ...props, navigate: false, fetcherKey, ref });\n      }\n    );\n    FetcherForm2.displayName = \"fetcher.Form\";\n    return FetcherForm2;\n  }, [fetcherKey]);\n  let fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;\n  let data2 = fetcherData.get(fetcherKey);\n  let fetcherWithComponents = React10.useMemo(\n    () => ({\n      Form: FetcherForm,\n      submit,\n      load,\n      reset,\n      ...fetcher,\n      data: data2\n    }),\n    [FetcherForm, submit, load, reset, fetcher, data2]\n  );\n  return fetcherWithComponents;\n}\nfunction useFetchers() {\n  let state = useDataRouterState2(\"useFetchers\" /* UseFetchers */);\n  return React10.useMemo(\n    () => Array.from(state.fetchers.entries()).map(([key, fetcher]) => ({\n      ...fetcher,\n      key\n    })),\n    [state.fetchers]\n  );\n}\nvar SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nvar savedScrollPositions = {};\nfunction getScrollRestorationKey(location, matches, basename, getKey) {\n  let key = null;\n  if (getKey) {\n    if (basename !== \"/\") {\n      key = getKey(\n        {\n          ...location,\n          pathname: stripBasename(location.pathname, basename) || location.pathname\n        },\n        matches\n      );\n    } else {\n      key = getKey(location, matches);\n    }\n  }\n  if (key == null) {\n    key = location.key;\n  }\n  return key;\n}\nfunction useScrollRestoration({\n  getKey,\n  storageKey\n} = {}) {\n  let { router } = useDataRouterContext3(\"useScrollRestoration\" /* UseScrollRestoration */);\n  let { restoreScrollPosition, preventScrollReset } = useDataRouterState2(\n    \"useScrollRestoration\" /* UseScrollRestoration */\n  );\n  let { basename } = React10.useContext(NavigationContext);\n  let location = useLocation();\n  let matches = useMatches();\n  let navigation = useNavigation();\n  React10.useEffect(() => {\n    window.history.scrollRestoration = \"manual\";\n    return () => {\n      window.history.scrollRestoration = \"auto\";\n    };\n  }, []);\n  usePageHide(\n    React10.useCallback(() => {\n      if (navigation.state === \"idle\") {\n        let key = getScrollRestorationKey(location, matches, basename, getKey);\n        savedScrollPositions[key] = window.scrollY;\n      }\n      try {\n        sessionStorage.setItem(\n          storageKey || SCROLL_RESTORATION_STORAGE_KEY,\n          JSON.stringify(savedScrollPositions)\n        );\n      } catch (error) {\n        warning(\n          false,\n          `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`\n        );\n      }\n      window.history.scrollRestoration = \"auto\";\n    }, [navigation.state, getKey, basename, location, matches, storageKey])\n  );\n  if (typeof document !== \"undefined\") {\n    React10.useLayoutEffect(() => {\n      try {\n        let sessionPositions = sessionStorage.getItem(\n          storageKey || SCROLL_RESTORATION_STORAGE_KEY\n        );\n        if (sessionPositions) {\n          savedScrollPositions = JSON.parse(sessionPositions);\n        }\n      } catch (e) {\n      }\n    }, [storageKey]);\n    React10.useLayoutEffect(() => {\n      let disableScrollRestoration = router?.enableScrollRestoration(\n        savedScrollPositions,\n        () => window.scrollY,\n        getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0\n      );\n      return () => disableScrollRestoration && disableScrollRestoration();\n    }, [router, basename, getKey]);\n    React10.useLayoutEffect(() => {\n      if (restoreScrollPosition === false) {\n        return;\n      }\n      if (typeof restoreScrollPosition === \"number\") {\n        window.scrollTo(0, restoreScrollPosition);\n        return;\n      }\n      try {\n        if (location.hash) {\n          let el = document.getElementById(\n            decodeURIComponent(location.hash.slice(1))\n          );\n          if (el) {\n            el.scrollIntoView();\n            return;\n          }\n        }\n      } catch {\n        warning(\n          false,\n          `\"${location.hash.slice(\n            1\n          )}\" is not a decodable element ID. The view will not scroll to it.`\n        );\n      }\n      if (preventScrollReset === true) {\n        return;\n      }\n      window.scrollTo(0, 0);\n    }, [location, restoreScrollPosition, preventScrollReset]);\n  }\n}\nfunction useBeforeUnload(callback, options) {\n  let { capture } = options || {};\n  React10.useEffect(() => {\n    let opts = capture != null ? { capture } : void 0;\n    window.addEventListener(\"beforeunload\", callback, opts);\n    return () => {\n      window.removeEventListener(\"beforeunload\", callback, opts);\n    };\n  }, [callback, capture]);\n}\nfunction usePageHide(callback, options) {\n  let { capture } = options || {};\n  React10.useEffect(() => {\n    let opts = capture != null ? { capture } : void 0;\n    window.addEventListener(\"pagehide\", callback, opts);\n    return () => {\n      window.removeEventListener(\"pagehide\", callback, opts);\n    };\n  }, [callback, capture]);\n}\nfunction usePrompt({\n  when,\n  message\n}) {\n  let blocker = useBlocker(when);\n  React10.useEffect(() => {\n    if (blocker.state === \"blocked\") {\n      let proceed = window.confirm(message);\n      if (proceed) {\n        setTimeout(blocker.proceed, 0);\n      } else {\n        blocker.reset();\n      }\n    }\n  }, [blocker, message]);\n  React10.useEffect(() => {\n    if (blocker.state === \"blocked\" && !when) {\n      blocker.reset();\n    }\n  }, [blocker, when]);\n}\nfunction useViewTransitionState(to, { relative } = {}) {\n  let vtContext = React10.useContext(ViewTransitionContext);\n  invariant(\n    vtContext != null,\n    \"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?\"\n  );\n  let { basename } = useDataRouterContext3(\n    \"useViewTransitionState\" /* useViewTransitionState */\n  );\n  let path = useResolvedPath(to, { relative });\n  if (!vtContext.isTransitioning) {\n    return false;\n  }\n  let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n  let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n  return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;\n}\n\n// lib/dom/server.tsx\nimport * as React11 from \"react\";\nfunction StaticRouter({\n  basename,\n  children,\n  location: locationProp = \"/\"\n}) {\n  if (typeof locationProp === \"string\") {\n    locationProp = parsePath(locationProp);\n  }\n  let action = \"POP\" /* Pop */;\n  let location = {\n    pathname: locationProp.pathname || \"/\",\n    search: locationProp.search || \"\",\n    hash: locationProp.hash || \"\",\n    state: locationProp.state != null ? locationProp.state : null,\n    key: locationProp.key || \"default\",\n    mask: void 0\n  };\n  let staticNavigator = getStatelessNavigator();\n  return /* @__PURE__ */ React11.createElement(\n    Router,\n    {\n      basename,\n      children,\n      location,\n      navigationType: action,\n      navigator: staticNavigator,\n      static: true,\n      useTransitions: false\n    }\n  );\n}\nfunction StaticRouterProvider({\n  context,\n  router,\n  hydrate: hydrate2 = true,\n  nonce\n}) {\n  invariant(\n    router && context,\n    \"You must provide `router` and `context` to <StaticRouterProvider>\"\n  );\n  let dataRouterContext = {\n    router,\n    navigator: getStatelessNavigator(),\n    static: true,\n    staticContext: context,\n    basename: context.basename || \"/\"\n  };\n  let fetchersContext = /* @__PURE__ */ new Map();\n  let hydrateScript = \"\";\n  if (hydrate2 !== false) {\n    let data2 = {\n      loaderData: context.loaderData,\n      actionData: context.actionData,\n      errors: serializeErrors(context.errors)\n    };\n    let json = escapeHtml(JSON.stringify(JSON.stringify(data2)));\n    hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;\n  }\n  let { state } = dataRouterContext.router;\n  return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React11.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React11.createElement(FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React11.createElement(ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React11.createElement(\n    Router,\n    {\n      basename: dataRouterContext.basename,\n      location: state.location,\n      navigationType: state.historyAction,\n      navigator: dataRouterContext.navigator,\n      static: dataRouterContext.static,\n      useTransitions: false\n    },\n    /* @__PURE__ */ React11.createElement(\n      DataRoutes2,\n      {\n        manifest: router.manifest,\n        routes: router.routes,\n        future: router.future,\n        state,\n        isStatic: true\n      }\n    )\n  ))))), hydrateScript ? /* @__PURE__ */ React11.createElement(\n    \"script\",\n    {\n      suppressHydrationWarning: true,\n      nonce,\n      dangerouslySetInnerHTML: { __html: hydrateScript }\n    }\n  ) : null);\n}\nfunction serializeErrors(errors) {\n  if (!errors) return null;\n  let entries = Object.entries(errors);\n  let serialized = {};\n  for (let [key, val] of entries) {\n    if (isRouteErrorResponse(val)) {\n      serialized[key] = { ...val, __type: \"RouteErrorResponse\" };\n    } else if (val instanceof Error) {\n      serialized[key] = {\n        message: val.message,\n        __type: \"Error\",\n        // If this is a subclass (i.e., ReferenceError), send up the type so we\n        // can re-create the same type during hydration.\n        ...val.name !== \"Error\" ? {\n          __subType: val.name\n        } : {}\n      };\n    } else {\n      serialized[key] = val;\n    }\n  }\n  return serialized;\n}\nfunction getStatelessNavigator() {\n  return {\n    createHref,\n    encodeLocation,\n    push(to) {\n      throw new Error(\n        `You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${JSON.stringify(to)})\\` somewhere in your app.`\n      );\n    },\n    replace(to) {\n      throw new Error(\n        `You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${JSON.stringify(to)}, { replace: true })\\` somewhere in your app.`\n      );\n    },\n    go(delta) {\n      throw new Error(\n        `You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \\`navigate(${delta})\\` somewhere in your app.`\n      );\n    },\n    back() {\n      throw new Error(\n        `You cannot use navigator.back() on the server because it is a stateless environment.`\n      );\n    },\n    forward() {\n      throw new Error(\n        `You cannot use navigator.forward() on the server because it is a stateless environment.`\n      );\n    }\n  };\n}\nfunction createStaticHandler2(routes, opts) {\n  return createStaticHandler(routes, {\n    ...opts,\n    mapRouteProperties\n  });\n}\nfunction createStaticRouter(routes, context, opts = {}) {\n  let manifest = {};\n  let dataRoutes = convertRoutesToDataRoutes(\n    routes,\n    mapRouteProperties,\n    void 0,\n    manifest\n  );\n  let matches = context.matches.map((match) => {\n    let route = manifest[match.route.id] || match.route;\n    return {\n      ...match,\n      route\n    };\n  });\n  let msg = (method) => `You cannot use router.${method}() on the server because it is a stateless environment`;\n  return {\n    get basename() {\n      return context.basename;\n    },\n    get future() {\n      return {\n        v8_middleware: false,\n        v8_passThroughRequests: false,\n        v8_trailingSlashAwareDataRequests: false,\n        ...opts?.future\n      };\n    },\n    get state() {\n      return {\n        historyAction: \"POP\" /* Pop */,\n        location: context.location,\n        matches,\n        loaderData: context.loaderData,\n        actionData: context.actionData,\n        errors: context.errors,\n        initialized: true,\n        renderFallback: false,\n        navigation: IDLE_NAVIGATION,\n        restoreScrollPosition: null,\n        preventScrollReset: false,\n        revalidation: \"idle\",\n        fetchers: /* @__PURE__ */ new Map(),\n        blockers: /* @__PURE__ */ new Map()\n      };\n    },\n    get routes() {\n      return dataRoutes;\n    },\n    get branches() {\n      return opts.branches;\n    },\n    get manifest() {\n      return manifest;\n    },\n    get window() {\n      return void 0;\n    },\n    initialize() {\n      throw msg(\"initialize\");\n    },\n    subscribe() {\n      throw msg(\"subscribe\");\n    },\n    enableScrollRestoration() {\n      throw msg(\"enableScrollRestoration\");\n    },\n    navigate() {\n      throw msg(\"navigate\");\n    },\n    fetch() {\n      throw msg(\"fetch\");\n    },\n    revalidate() {\n      throw msg(\"revalidate\");\n    },\n    createHref,\n    encodeLocation,\n    getFetcher() {\n      return IDLE_FETCHER;\n    },\n    deleteFetcher() {\n      throw msg(\"deleteFetcher\");\n    },\n    resetFetcher() {\n      throw msg(\"resetFetcher\");\n    },\n    dispose() {\n      throw msg(\"dispose\");\n    },\n    getBlocker() {\n      return IDLE_BLOCKER;\n    },\n    deleteBlocker() {\n      throw msg(\"deleteBlocker\");\n    },\n    patchRoutes() {\n      throw msg(\"patchRoutes\");\n    },\n    _internalFetchControllers: /* @__PURE__ */ new Map(),\n    _internalSetRoutes() {\n      throw msg(\"_internalSetRoutes\");\n    },\n    _internalSetStateDoNotUseOrYouWillBreakYourApp() {\n      throw msg(\"_internalSetStateDoNotUseOrYouWillBreakYourApp\");\n    }\n  };\n}\nfunction createHref(to) {\n  return typeof to === \"string\" ? to : createPath(to);\n}\nfunction encodeLocation(to) {\n  let href = typeof to === \"string\" ? to : createPath(to);\n  href = href.replace(/ $/, \"%20\");\n  let encoded = ABSOLUTE_URL_REGEX.test(href) ? new URL(href) : new URL(href, \"http://localhost\");\n  return {\n    pathname: encoded.pathname,\n    search: encoded.search,\n    hash: encoded.hash\n  };\n}\n\nexport {\n  PROTOCOL_RELATIVE_URL_REGEX,\n  Action,\n  createMemoryHistory,\n  createBrowserHistory,\n  createHashHistory,\n  invariant,\n  createPath,\n  parsePath,\n  createContext,\n  RouterContextProvider,\n  convertRoutesToDataRoutes,\n  matchRoutes,\n  matchRoutesImpl,\n  generatePath,\n  matchPath,\n  stripBasename,\n  resolvePath,\n  data,\n  redirect,\n  redirectDocument,\n  replace,\n  ErrorResponseImpl,\n  isRouteErrorResponse,\n  instrumentHandler,\n  validateNavigationTarget,\n  IDLE_NAVIGATION,\n  IDLE_FETCHER,\n  IDLE_BLOCKER,\n  createRouter,\n  createStaticHandler,\n  getStaticContextFromError,\n  hasInvalidProtocol,\n  isDataWithResponseInit,\n  isResponse,\n  isRedirectStatusCode,\n  isRedirectResponse,\n  isMutationMethod,\n  DataRouterContext,\n  DataRouterStateContext,\n  RSCRouterContext,\n  ViewTransitionContext,\n  FetchersContext,\n  AwaitContextProvider,\n  NavigationContext,\n  LocationContext,\n  RouteContext,\n  ENABLE_DEV_WARNINGS,\n  decodeRedirectErrorDigest,\n  decodeRouteErrorResponseDigest,\n  useHref,\n  useInRouterContext,\n  useLocation,\n  useNavigationType,\n  useMatch,\n  useNavigate,\n  useOutletContext,\n  useOutlet,\n  useParams,\n  useResolvedPath,\n  useRoutes,\n  useNavigation,\n  useRevalidator,\n  useMatches,\n  useLoaderData,\n  useRouteLoaderData,\n  useActionData,\n  useRouteError,\n  useAsyncValue,\n  useAsyncError,\n  useBlocker,\n  useRoute,\n  useRouterState,\n  warnOnce,\n  mapRouteProperties,\n  hydrationRouteProperties,\n  createMemoryRouter,\n  RouterProvider,\n  MemoryRouter,\n  Navigate,\n  Outlet,\n  Route,\n  Router,\n  Routes,\n  Await,\n  createRoutesFromChildren,\n  createRoutesFromElements,\n  renderMatches,\n  WithComponentProps,\n  withComponentProps,\n  WithHydrateFallbackProps,\n  withHydrateFallbackProps,\n  WithErrorBoundaryProps,\n  withErrorBoundaryProps,\n  createSearchParams,\n  escapeHtml,\n  escapeAttribute,\n  encode,\n  createRequestInit,\n  SingleFetchRedirectSymbol,\n  SINGLE_FETCH_REDIRECT_STATUS,\n  NO_BODY_STATUS_CODES,\n  StreamTransfer,\n  getTurboStreamSingleFetchDataStrategy,\n  getSingleFetchDataStrategyImpl,\n  stripIndexParam,\n  singleFetchUrl,\n  decodeViaTurboStream,\n  RemixErrorBoundary,\n  createServerRoutes,\n  createClientRoutesWithHMRRevalidationOptOut,\n  noActionDefinedError,\n  createClientRoutes,\n  shouldHydrateRouteLoader,\n  URL_LIMIT,\n  getPathsWithAncestors,\n  isFogOfWarEnabled,\n  shouldUseInitialRouteDiscovery,\n  getPatchRoutesOnNavigationFunction,\n  useFogOFWarDiscovery,\n  getManifestPath,\n  FrameworkContext,\n  CRITICAL_CSS_DATA_ATTRIBUTE,\n  Links,\n  PrefetchPageLinks,\n  Meta,\n  setIsHydrated,\n  Scripts,\n  createBrowserRouter,\n  createHashRouter,\n  BrowserRouter,\n  HashRouter,\n  HistoryRouter,\n  Link,\n  NavLink,\n  Form,\n  ScrollRestoration,\n  useLinkClickHandler,\n  useSearchParams,\n  useSubmit,\n  useFormAction,\n  useFetcher,\n  useFetchers,\n  useScrollRestoration,\n  useBeforeUnload,\n  usePrompt,\n  useViewTransitionState,\n  StaticRouter,\n  StaticRouterProvider,\n  createStaticHandler2,\n  createStaticRouter\n};\n", "/**\n * react-router v7.18.5\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\"use client\";\nimport {\n  RSCDefaultRootErrorBoundary,\n  RSCStaticRouter,\n  ServerMode,\n  ServerRouter,\n  createCookie,\n  createCookieSessionStorage,\n  createMemorySessionStorage,\n  createRequestHandler,\n  createRoutesStub,\n  createSession,\n  createSessionStorage,\n  getHydrationData,\n  href,\n  isCookie,\n  isSession,\n  routeRSCServerRequest,\n  setDevServerHooks\n} from \"./chunk-JAHXRPFV.mjs\";\nimport {\n  Action,\n  Await,\n  AwaitContextProvider,\n  BrowserRouter,\n  DataRouterContext,\n  DataRouterStateContext,\n  ErrorResponseImpl,\n  FetchersContext,\n  Form,\n  FrameworkContext,\n  HashRouter,\n  HistoryRouter,\n  IDLE_BLOCKER,\n  IDLE_FETCHER,\n  IDLE_NAVIGATION,\n  Link,\n  Links,\n  LocationContext,\n  MemoryRouter,\n  Meta,\n  NavLink,\n  Navigate,\n  NavigationContext,\n  Outlet,\n  PrefetchPageLinks,\n  RemixErrorBoundary,\n  Route,\n  RouteContext,\n  Router,\n  RouterContextProvider,\n  RouterProvider,\n  Routes,\n  Scripts,\n  ScrollRestoration,\n  SingleFetchRedirectSymbol,\n  StaticRouter,\n  StaticRouterProvider,\n  ViewTransitionContext,\n  WithComponentProps,\n  WithErrorBoundaryProps,\n  WithHydrateFallbackProps,\n  createBrowserHistory,\n  createBrowserRouter,\n  createClientRoutes,\n  createClientRoutesWithHMRRevalidationOptOut,\n  createContext,\n  createHashHistory,\n  createHashRouter,\n  createMemoryHistory,\n  createMemoryRouter,\n  createPath,\n  createRouter,\n  createRoutesFromChildren,\n  createRoutesFromElements,\n  createSearchParams,\n  createStaticHandler2 as createStaticHandler,\n  createStaticRouter,\n  data,\n  decodeViaTurboStream,\n  generatePath,\n  getPatchRoutesOnNavigationFunction,\n  getTurboStreamSingleFetchDataStrategy,\n  hydrationRouteProperties,\n  invariant,\n  isRouteErrorResponse,\n  mapRouteProperties,\n  matchPath,\n  matchRoutes,\n  parsePath,\n  redirect,\n  redirectDocument,\n  renderMatches,\n  replace,\n  resolvePath,\n  shouldHydrateRouteLoader,\n  useActionData,\n  useAsyncError,\n  useAsyncValue,\n  useBeforeUnload,\n  useBlocker,\n  useFetcher,\n  useFetchers,\n  useFogOFWarDiscovery,\n  useFormAction,\n  useHref,\n  useInRouterContext,\n  useLinkClickHandler,\n  useLoaderData,\n  useLocation,\n  useMatch,\n  useMatches,\n  useNavigate,\n  useNavigation,\n  useNavigationType,\n  useOutlet,\n  useOutletContext,\n  useParams,\n  usePrompt,\n  useResolvedPath,\n  useRevalidator,\n  useRoute,\n  useRouteError,\n  useRouteLoaderData,\n  useRouterState,\n  useRoutes,\n  useScrollRestoration,\n  useSearchParams,\n  useSubmit,\n  useViewTransitionState,\n  withComponentProps,\n  withErrorBoundaryProps,\n  withHydrateFallbackProps\n} from \"./chunk-6KYCQHYJ.mjs\";\nexport {\n  Await,\n  BrowserRouter,\n  Form,\n  HashRouter,\n  IDLE_BLOCKER,\n  IDLE_FETCHER,\n  IDLE_NAVIGATION,\n  Link,\n  Links,\n  MemoryRouter,\n  Meta,\n  NavLink,\n  Navigate,\n  Action as NavigationType,\n  Outlet,\n  PrefetchPageLinks,\n  Route,\n  Router,\n  RouterContextProvider,\n  RouterProvider,\n  Routes,\n  Scripts,\n  ScrollRestoration,\n  ServerRouter,\n  StaticRouter,\n  StaticRouterProvider,\n  AwaitContextProvider as UNSAFE_AwaitContextProvider,\n  DataRouterContext as UNSAFE_DataRouterContext,\n  DataRouterStateContext as UNSAFE_DataRouterStateContext,\n  ErrorResponseImpl as UNSAFE_ErrorResponseImpl,\n  FetchersContext as UNSAFE_FetchersContext,\n  FrameworkContext as UNSAFE_FrameworkContext,\n  LocationContext as UNSAFE_LocationContext,\n  NavigationContext as UNSAFE_NavigationContext,\n  RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,\n  RemixErrorBoundary as UNSAFE_RemixErrorBoundary,\n  RouteContext as UNSAFE_RouteContext,\n  ServerMode as UNSAFE_ServerMode,\n  SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,\n  ViewTransitionContext as UNSAFE_ViewTransitionContext,\n  WithComponentProps as UNSAFE_WithComponentProps,\n  WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,\n  WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,\n  createBrowserHistory as UNSAFE_createBrowserHistory,\n  createClientRoutes as UNSAFE_createClientRoutes,\n  createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,\n  createHashHistory as UNSAFE_createHashHistory,\n  createMemoryHistory as UNSAFE_createMemoryHistory,\n  createRouter as UNSAFE_createRouter,\n  decodeViaTurboStream as UNSAFE_decodeViaTurboStream,\n  getHydrationData as UNSAFE_getHydrationData,\n  getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,\n  getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,\n  hydrationRouteProperties as UNSAFE_hydrationRouteProperties,\n  invariant as UNSAFE_invariant,\n  mapRouteProperties as UNSAFE_mapRouteProperties,\n  shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,\n  useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,\n  useScrollRestoration as UNSAFE_useScrollRestoration,\n  withComponentProps as UNSAFE_withComponentProps,\n  withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,\n  withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,\n  createBrowserRouter,\n  createContext,\n  createCookie,\n  createCookieSessionStorage,\n  createHashRouter,\n  createMemoryRouter,\n  createMemorySessionStorage,\n  createPath,\n  createRequestHandler,\n  createRoutesFromChildren,\n  createRoutesFromElements,\n  createRoutesStub,\n  createSearchParams,\n  createSession,\n  createSessionStorage,\n  createStaticHandler,\n  createStaticRouter,\n  data,\n  generatePath,\n  href,\n  isCookie,\n  isRouteErrorResponse,\n  isSession,\n  matchPath,\n  matchRoutes,\n  parsePath,\n  redirect,\n  redirectDocument,\n  renderMatches,\n  replace,\n  resolvePath,\n  HistoryRouter as unstable_HistoryRouter,\n  RSCStaticRouter as unstable_RSCStaticRouter,\n  routeRSCServerRequest as unstable_routeRSCServerRequest,\n  setDevServerHooks as unstable_setDevServerHooks,\n  usePrompt as unstable_usePrompt,\n  useRoute as unstable_useRoute,\n  useRouterState as unstable_useRouterState,\n  useActionData,\n  useAsyncError,\n  useAsyncValue,\n  useBeforeUnload,\n  useBlocker,\n  useFetcher,\n  useFetchers,\n  useFormAction,\n  useHref,\n  useInRouterContext,\n  useLinkClickHandler,\n  useLoaderData,\n  useLocation,\n  useMatch,\n  useMatches,\n  useNavigate,\n  useNavigation,\n  useNavigationType,\n  useOutlet,\n  useOutletContext,\n  useParams,\n  useResolvedPath,\n  useRevalidator,\n  useRouteError,\n  useRouteLoaderData,\n  useRoutes,\n  useSearchParams,\n  useSubmit,\n  useViewTransitionState\n};\n", "import type { ElementType, MemoExoticComponent, ReactElement } from 'react'\nimport { React } from './react'\n\n// Directly ported from:\n// https://unpkg.com/browse/react-is@19.0.0/cjs/react-is.production.js\n// It's very possible this could change in the future, but given that\n// we only use these in `connect`, this is a low priority.\n\nexport const IS_REACT_19 = /* @__PURE__ */ React.version.startsWith('19')\n\nconst REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n  IS_REACT_19 ? 'react.transitional.element' : 'react.element',\n)\nconst REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for('react.portal')\nconst REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for('react.fragment')\nconst REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for('react.strict_mode')\nconst REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for('react.profiler')\nconst REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for('react.consumer')\nconst REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for('react.context')\nconst REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for('react.forward_ref')\nconst REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for('react.suspense')\nconst REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n  'react.suspense_list',\n)\nconst REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for('react.memo')\nconst REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for('react.lazy')\nconst REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for('react.offscreen')\nconst REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n  'react.client.reference',\n)\n\nexport const ForwardRef = REACT_FORWARD_REF_TYPE\nexport const Memo = REACT_MEMO_TYPE\n\nexport function isValidElementType(type: any): type is ElementType {\n  return typeof type === 'string' ||\n    typeof type === 'function' ||\n    type === REACT_FRAGMENT_TYPE ||\n    type === REACT_PROFILER_TYPE ||\n    type === REACT_STRICT_MODE_TYPE ||\n    type === REACT_SUSPENSE_TYPE ||\n    type === REACT_SUSPENSE_LIST_TYPE ||\n    type === REACT_OFFSCREEN_TYPE ||\n    (typeof type === 'object' &&\n      type !== null &&\n      (type.$$typeof === REACT_LAZY_TYPE ||\n        type.$$typeof === REACT_MEMO_TYPE ||\n        type.$$typeof === REACT_CONTEXT_TYPE ||\n        type.$$typeof === REACT_CONSUMER_TYPE ||\n        type.$$typeof === REACT_FORWARD_REF_TYPE ||\n        type.$$typeof === REACT_CLIENT_REFERENCE ||\n        type.getModuleId !== undefined))\n    ? !0\n    : !1\n}\n\nfunction typeOf(object: any): symbol | undefined {\n  if (typeof object === 'object' && object !== null) {\n    const { $$typeof } = object\n\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        switch (((object = object.type), object)) {\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n          case REACT_SUSPENSE_LIST_TYPE:\n            return object\n          default:\n            switch (((object = object && object.$$typeof), object)) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n                return object\n              case REACT_CONSUMER_TYPE:\n                return object\n              default:\n                return $$typeof\n            }\n        }\n      case REACT_PORTAL_TYPE:\n        return $$typeof\n    }\n  }\n\n  return undefined\n}\n\nexport function isContextConsumer(object: any): object is ReactElement {\n  return IS_REACT_19\n    ? typeOf(object) === REACT_CONSUMER_TYPE\n    : typeOf(object) === REACT_CONTEXT_TYPE\n}\n\nexport function isMemo(object: any): object is MemoExoticComponent<any> {\n  return typeOf(object) === REACT_MEMO_TYPE\n}\n", "/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message: string) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message)\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message)\n    /* eslint-disable no-empty */\n  } catch (e) {}\n  /* eslint-enable no-empty */\n}\n", "import warning from '../utils/warning'\n\nfunction verify(selector: unknown, methodName: string): void {\n  if (!selector) {\n    throw new Error(`Unexpected value for ${methodName} in connect.`)\n  } else if (\n    methodName === 'mapStateToProps' ||\n    methodName === 'mapDispatchToProps'\n  ) {\n    if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) {\n      warning(\n        `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`,\n      )\n    }\n  }\n}\n\nexport default function verifySubselectors(\n  mapStateToProps: unknown,\n  mapDispatchToProps: unknown,\n  mergeProps: unknown,\n): void {\n  verify(mapStateToProps, 'mapStateToProps')\n  verify(mapDispatchToProps, 'mapDispatchToProps')\n  verify(mergeProps, 'mergeProps')\n}\n", "import type { Dispatch, Action } from 'redux'\nimport type { ComponentType } from 'react'\nimport verifySubselectors from './verifySubselectors'\nimport type { EqualityFn, ExtendedEqualityFn } from '../types'\n\nexport type SelectorFactory<S, TProps, TOwnProps, TFactoryOptions> = (\n  dispatch: Dispatch<Action<string>>,\n  factoryOptions: TFactoryOptions,\n) => Selector<S, TProps, TOwnProps>\n\nexport type Selector<S, TProps, TOwnProps = null> = TOwnProps extends\n  | null\n  | undefined\n  ? (state: S) => TProps\n  : (state: S, ownProps: TOwnProps) => TProps\n\nexport type MapStateToProps<TStateProps, TOwnProps, State> = (\n  state: State,\n  ownProps: TOwnProps,\n) => TStateProps\n\nexport type MapStateToPropsFactory<TStateProps, TOwnProps, State> = (\n  initialState: State,\n  ownProps: TOwnProps,\n) => MapStateToProps<TStateProps, TOwnProps, State>\n\nexport type MapStateToPropsParam<TStateProps, TOwnProps, State> =\n  | MapStateToPropsFactory<TStateProps, TOwnProps, State>\n  | MapStateToProps<TStateProps, TOwnProps, State>\n  | null\n  | undefined\n\nexport type MapDispatchToPropsFunction<TDispatchProps, TOwnProps> = (\n  dispatch: Dispatch<Action<string>>,\n  ownProps: TOwnProps,\n) => TDispatchProps\n\nexport type MapDispatchToProps<TDispatchProps, TOwnProps> =\n  | MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\n  | TDispatchProps\n\nexport type MapDispatchToPropsFactory<TDispatchProps, TOwnProps> = (\n  dispatch: Dispatch<Action<string>>,\n  ownProps: TOwnProps,\n) => MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\n\nexport type MapDispatchToPropsParam<TDispatchProps, TOwnProps> =\n  | MapDispatchToPropsFactory<TDispatchProps, TOwnProps>\n  | MapDispatchToProps<TDispatchProps, TOwnProps>\n\nexport type MapDispatchToPropsNonObject<TDispatchProps, TOwnProps> =\n  | MapDispatchToPropsFactory<TDispatchProps, TOwnProps>\n  | MapDispatchToPropsFunction<TDispatchProps, TOwnProps>\n\nexport type MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps> = (\n  stateProps: TStateProps,\n  dispatchProps: TDispatchProps,\n  ownProps: TOwnProps,\n) => TMergedProps\n\ninterface PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State> {\n  readonly areStatesEqual: ExtendedEqualityFn<State, TOwnProps>\n  readonly areStatePropsEqual: EqualityFn<TStateProps>\n  readonly areOwnPropsEqual: EqualityFn<TOwnProps>\n}\n\nfunction pureFinalPropsSelectorFactory<\n  TStateProps,\n  TOwnProps,\n  TDispatchProps,\n  TMergedProps,\n  State,\n>(\n  mapStateToProps: WrappedMapStateToProps<TStateProps, TOwnProps, State>,\n  mapDispatchToProps: WrappedMapDispatchToProps<TDispatchProps, TOwnProps>,\n  mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\n  dispatch: Dispatch<Action<string>>,\n  {\n    areStatesEqual,\n    areOwnPropsEqual,\n    areStatePropsEqual,\n  }: PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State>,\n) {\n  let hasRunAtLeastOnce = false\n  let state: State\n  let ownProps: TOwnProps\n  let stateProps: TStateProps\n  let dispatchProps: TDispatchProps\n  let mergedProps: TMergedProps\n\n  function handleFirstCall(firstState: State, firstOwnProps: TOwnProps) {\n    state = firstState\n    ownProps = firstOwnProps\n    stateProps = mapStateToProps(state, ownProps)\n    dispatchProps = mapDispatchToProps(dispatch, ownProps)\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\n    hasRunAtLeastOnce = true\n    return mergedProps\n  }\n\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps)\n\n    if (mapDispatchToProps.dependsOnOwnProps)\n      dispatchProps = mapDispatchToProps(dispatch, ownProps)\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\n    return mergedProps\n  }\n\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps)\n      stateProps = mapStateToProps(state, ownProps)\n\n    if (mapDispatchToProps.dependsOnOwnProps)\n      dispatchProps = mapDispatchToProps(dispatch, ownProps)\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\n    return mergedProps\n  }\n\n  function handleNewState() {\n    const nextStateProps = mapStateToProps(state, ownProps)\n    const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps)\n    stateProps = nextStateProps\n\n    if (statePropsChanged)\n      mergedProps = mergeProps(stateProps, dispatchProps, ownProps)\n\n    return mergedProps\n  }\n\n  function handleSubsequentCalls(nextState: State, nextOwnProps: TOwnProps) {\n    const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps)\n    const stateChanged = !areStatesEqual(\n      nextState,\n      state,\n      nextOwnProps,\n      ownProps,\n    )\n    state = nextState\n    ownProps = nextOwnProps\n\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState()\n    if (propsChanged) return handleNewProps()\n    if (stateChanged) return handleNewState()\n    return mergedProps\n  }\n\n  return function pureFinalPropsSelector(\n    nextState: State,\n    nextOwnProps: TOwnProps,\n  ) {\n    return hasRunAtLeastOnce\n      ? handleSubsequentCalls(nextState, nextOwnProps)\n      : handleFirstCall(nextState, nextOwnProps)\n  }\n}\n\ninterface WrappedMapStateToProps<TStateProps, TOwnProps, State> {\n  (state: State, ownProps: TOwnProps): TStateProps\n  readonly dependsOnOwnProps: boolean\n}\n\ninterface WrappedMapDispatchToProps<TDispatchProps, TOwnProps> {\n  (dispatch: Dispatch<Action<string>>, ownProps: TOwnProps): TDispatchProps\n  readonly dependsOnOwnProps: boolean\n}\n\nexport interface InitOptions<\n  TStateProps,\n  TOwnProps,\n  TMergedProps,\n  State,\n> extends PureSelectorFactoryComparisonOptions<TStateProps, TOwnProps, State> {\n  readonly shouldHandleStateChanges: boolean\n  readonly displayName: string\n  readonly wrappedComponentName: string\n  readonly WrappedComponent: ComponentType<TOwnProps>\n  readonly areMergedPropsEqual: EqualityFn<TMergedProps>\n}\n\nexport interface SelectorFactoryOptions<\n  TStateProps,\n  TOwnProps,\n  TDispatchProps,\n  TMergedProps,\n  State,\n> extends InitOptions<TStateProps, TOwnProps, TMergedProps, State> {\n  readonly initMapStateToProps: (\n    dispatch: Dispatch<Action<string>>,\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>,\n  ) => WrappedMapStateToProps<TStateProps, TOwnProps, State>\n  readonly initMapDispatchToProps: (\n    dispatch: Dispatch<Action<string>>,\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>,\n  ) => WrappedMapDispatchToProps<TDispatchProps, TOwnProps>\n  readonly initMergeProps: (\n    dispatch: Dispatch<Action<string>>,\n    options: InitOptions<TStateProps, TOwnProps, TMergedProps, State>,\n  ) => MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>\n}\n\n// TODO: Add more comments\n\n// The selector returned by selectorFactory will memoize its results,\n// allowing connect's shouldComponentUpdate to return false if final\n// props have not changed.\n\nexport default function finalPropsSelectorFactory<\n  TStateProps,\n  TOwnProps,\n  TDispatchProps,\n  TMergedProps,\n  State,\n>(\n  dispatch: Dispatch<Action<string>>,\n  {\n    initMapStateToProps,\n    initMapDispatchToProps,\n    initMergeProps,\n    ...options\n  }: SelectorFactoryOptions<\n    TStateProps,\n    TOwnProps,\n    TDispatchProps,\n    TMergedProps,\n    State\n  >,\n) {\n  const mapStateToProps = initMapStateToProps(dispatch, options)\n  const mapDispatchToProps = initMapDispatchToProps(dispatch, options)\n  const mergeProps = initMergeProps(dispatch, options)\n\n  if (process.env.NODE_ENV !== 'production') {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps)\n  }\n\n  return pureFinalPropsSelectorFactory<\n    TStateProps,\n    TOwnProps,\n    TDispatchProps,\n    TMergedProps,\n    State\n  >(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options)\n}\n", "import type { ActionCreatorsMapObject, Dispatch } from 'redux'\n\nexport default function bindActionCreators(\n  actionCreators: ActionCreatorsMapObject,\n  dispatch: Dispatch,\n): ActionCreatorsMapObject {\n  const boundActionCreators: ActionCreatorsMapObject = {}\n\n  for (const key in actionCreators) {\n    const actionCreator = actionCreators[key]\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = (...args) => dispatch(actionCreator(...args))\n    }\n  }\n  return boundActionCreators\n}\n", "/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nexport default function isPlainObject(obj: unknown) {\n  if (typeof obj !== 'object' || obj === null) return false\n\n  const proto = Object.getPrototypeOf(obj)\n  if (proto === null) return true\n\n  let baseProto = proto\n  while (Object.getPrototypeOf(baseProto) !== null) {\n    baseProto = Object.getPrototypeOf(baseProto)\n  }\n\n  return proto === baseProto\n}\n", "import isPlainObject from './isPlainObject'\nimport warning from './warning'\n\nexport default function verifyPlainObject(\n  value: unknown,\n  displayName: string,\n  methodName: string,\n) {\n  if (!isPlainObject(value)) {\n    warning(\n      `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`,\n    )\n  }\n}\n", "import type { ActionCreatorsMapObject, Dispatch, ActionCreator } from 'redux'\n\nimport type { FixTypeLater } from '../types'\nimport verifyPlainObject from '../utils/verifyPlainObject'\n\ntype AnyState = { [key: string]: any }\ntype StateOrDispatch<S extends AnyState = AnyState> = S | Dispatch\n\ntype AnyProps = { [key: string]: any }\n\nexport type MapToProps<P extends AnyProps = AnyProps> = {\n  // eslint-disable-next-line no-unused-vars\n  (stateOrDispatch: StateOrDispatch, ownProps?: P): FixTypeLater\n  dependsOnOwnProps?: boolean\n}\n\nexport function wrapMapToPropsConstant(\n  // * Note:\n  //  It seems that the dispatch argument\n  //  could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing)\n  //  and a state object in some others (ex: whenMapStateToPropsIsMissing)\n  // eslint-disable-next-line no-unused-vars\n  getConstant: (dispatch: Dispatch) =>\n    | {\n        dispatch?: Dispatch\n        dependsOnOwnProps?: boolean\n      }\n    | ActionCreatorsMapObject\n    | ActionCreator<any>,\n) {\n  return function initConstantSelector(dispatch: Dispatch) {\n    const constant = getConstant(dispatch)\n\n    function constantSelector() {\n      return constant\n    }\n    constantSelector.dependsOnOwnProps = false\n    return constantSelector\n  }\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n//\n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\n// TODO Can this get pulled out so that we can subscribe directly to the store if we don't need ownProps?\nfunction getDependsOnOwnProps(mapToProps: MapToProps) {\n  return mapToProps.dependsOnOwnProps != null\n    ? Boolean(mapToProps.dependsOnOwnProps)\n    : mapToProps.length !== 1\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n//\n//  * Detects whether the mapToProps function being called depends on props, which\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\n//\n//  * On first call, handles mapToProps if returns another function, and treats that\n//    new function as the true mapToProps for subsequent calls.\n//\n//  * On first call, verifies the first result is a plain object, in order to warn\n//    the developer that their mapToProps function is not returning a valid result.\n//\nexport function wrapMapToPropsFunc<P extends AnyProps = AnyProps>(\n  mapToProps: MapToProps,\n  methodName: string,\n) {\n  return function initProxySelector(\n    dispatch: Dispatch,\n    { displayName }: { displayName: string },\n  ) {\n    const proxy = function mapToPropsProxy(\n      stateOrDispatch: StateOrDispatch,\n      ownProps?: P,\n    ): MapToProps {\n      return proxy.dependsOnOwnProps\n        ? proxy.mapToProps(stateOrDispatch, ownProps)\n        : proxy.mapToProps(stateOrDispatch, undefined)\n    }\n\n    // allow detectFactoryAndVerify to get ownProps\n    proxy.dependsOnOwnProps = true\n\n    proxy.mapToProps = function detectFactoryAndVerify(\n      stateOrDispatch: StateOrDispatch,\n      ownProps?: P,\n    ): MapToProps {\n      proxy.mapToProps = mapToProps\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps)\n      let props = proxy(stateOrDispatch, ownProps)\n\n      if (typeof props === 'function') {\n        proxy.mapToProps = props\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props)\n        props = proxy(stateOrDispatch, ownProps)\n      }\n\n      if (process.env.NODE_ENV !== 'production')\n        verifyPlainObject(props, displayName, methodName)\n\n      return props\n    }\n\n    return proxy\n  }\n}\n", "import type { Action, Dispatch } from 'redux'\n\nexport function createInvalidArgFactory(arg: unknown, name: string) {\n  return (\n    dispatch: Dispatch<Action<string>>,\n    options: { readonly wrappedComponentName: string },\n  ) => {\n    throw new Error(\n      `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${\n        options.wrappedComponentName\n      }.`,\n    )\n  }\n}\n", "import type { Action, Dispatch } from 'redux'\nimport bindActionCreators from '../utils/bindActionCreators'\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'\nimport { createInvalidArgFactory } from './invalidArgFactory'\nimport type { MapDispatchToPropsParam } from './selectorFactory'\n\nexport function mapDispatchToPropsFactory<TDispatchProps, TOwnProps>(\n  mapDispatchToProps:\n    | MapDispatchToPropsParam<TDispatchProps, TOwnProps>\n    | undefined,\n) {\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object'\n    ? wrapMapToPropsConstant((dispatch: Dispatch<Action<string>>) =>\n        // @ts-ignore\n        bindActionCreators(mapDispatchToProps, dispatch),\n      )\n    : !mapDispatchToProps\n      ? wrapMapToPropsConstant((dispatch: Dispatch<Action<string>>) => ({\n          dispatch,\n        }))\n      : typeof mapDispatchToProps === 'function'\n        ? // @ts-ignore\n          wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps')\n        : createInvalidArgFactory(mapDispatchToProps, 'mapDispatchToProps')\n}\n", "import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'\nimport { createInvalidArgFactory } from './invalidArgFactory'\nimport type { MapStateToPropsParam } from './selectorFactory'\n\nexport function mapStateToPropsFactory<TStateProps, TOwnProps, State>(\n  mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>,\n) {\n  return !mapStateToProps\n    ? wrapMapToPropsConstant(() => ({}))\n    : typeof mapStateToProps === 'function'\n      ? // @ts-ignore\n        wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps')\n      : createInvalidArgFactory(mapStateToProps, 'mapStateToProps')\n}\n", "import type { Action, Dispatch } from 'redux'\nimport verifyPlainObject from '../utils/verifyPlainObject'\nimport { createInvalidArgFactory } from './invalidArgFactory'\nimport type { MergeProps } from './selectorFactory'\nimport type { EqualityFn } from '../types'\n\nfunction defaultMergeProps<\n  TStateProps,\n  TDispatchProps,\n  TOwnProps,\n  TMergedProps,\n>(\n  stateProps: TStateProps,\n  dispatchProps: TDispatchProps,\n  ownProps: TOwnProps,\n): TMergedProps {\n  // @ts-ignore\n  return { ...ownProps, ...stateProps, ...dispatchProps }\n}\n\nfunction wrapMergePropsFunc<\n  TStateProps,\n  TDispatchProps,\n  TOwnProps,\n  TMergedProps,\n>(\n  mergeProps: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\n): (\n  dispatch: Dispatch<Action<string>>,\n  options: {\n    readonly displayName: string\n    readonly areMergedPropsEqual: EqualityFn<TMergedProps>\n  },\n) => MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps> {\n  return function initMergePropsProxy(\n    dispatch,\n    { displayName, areMergedPropsEqual },\n  ) {\n    let hasRunOnce = false\n    let mergedProps: TMergedProps\n\n    return function mergePropsProxy(\n      stateProps: TStateProps,\n      dispatchProps: TDispatchProps,\n      ownProps: TOwnProps,\n    ) {\n      const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps)\n\n      if (hasRunOnce) {\n        if (!areMergedPropsEqual(nextMergedProps, mergedProps))\n          mergedProps = nextMergedProps\n      } else {\n        hasRunOnce = true\n        mergedProps = nextMergedProps\n\n        if (process.env.NODE_ENV !== 'production')\n          verifyPlainObject(mergedProps, displayName, 'mergeProps')\n      }\n\n      return mergedProps\n    }\n  }\n}\n\nexport function mergePropsFactory<\n  TStateProps,\n  TDispatchProps,\n  TOwnProps,\n  TMergedProps,\n>(\n  mergeProps?: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\n) {\n  return !mergeProps\n    ? () => defaultMergeProps\n    : typeof mergeProps === 'function'\n      ? wrapMergePropsFunc(mergeProps)\n      : createInvalidArgFactory(mergeProps, 'mergeProps')\n}\n", "// Default to a dummy \"batch\" implementation that just runs the callback\nexport function defaultNoopBatch(callback: () => void) {\n  callback()\n}\n", "import { defaultNoopBatch as batch } from './batch'\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\ntype VoidFunc = () => void\n\ntype Listener = {\n  callback: VoidFunc\n  next: Listener | null\n  prev: Listener | null\n}\n\nfunction createListenerCollection() {\n  let first: Listener | null = null\n  let last: Listener | null = null\n\n  return {\n    clear() {\n      first = null\n      last = null\n    },\n\n    notify() {\n      batch(() => {\n        let listener = first\n        while (listener) {\n          listener.callback()\n          listener = listener.next\n        }\n      })\n    },\n\n    get() {\n      const listeners: Listener[] = []\n      let listener = first\n      while (listener) {\n        listeners.push(listener)\n        listener = listener.next\n      }\n      return listeners\n    },\n\n    subscribe(callback: () => void) {\n      let isSubscribed = true\n\n      const listener: Listener = (last = {\n        callback,\n        next: null,\n        prev: last,\n      })\n\n      if (listener.prev) {\n        listener.prev.next = listener\n      } else {\n        first = listener\n      }\n\n      return function unsubscribe() {\n        if (!isSubscribed || first === null) return\n        isSubscribed = false\n\n        if (listener.next) {\n          listener.next.prev = listener.prev\n        } else {\n          last = listener.prev\n        }\n        if (listener.prev) {\n          listener.prev.next = listener.next\n        } else {\n          first = listener.next\n        }\n      }\n    },\n  }\n}\n\ntype ListenerCollection = ReturnType<typeof createListenerCollection>\n\nexport interface Subscription {\n  addNestedSub: (listener: VoidFunc) => VoidFunc\n  notifyNestedSubs: VoidFunc\n  handleChangeWrapper: VoidFunc\n  isSubscribed: () => boolean\n  onStateChange?: VoidFunc | null\n  trySubscribe: VoidFunc\n  tryUnsubscribe: VoidFunc\n  getListeners: () => ListenerCollection\n}\n\nconst nullListeners = {\n  notify() {},\n  get: () => [],\n} as unknown as ListenerCollection\n\nexport function createSubscription(store: any, parentSub?: Subscription) {\n  let unsubscribe: VoidFunc | undefined\n  let listeners: ListenerCollection = nullListeners\n\n  // Reasons to keep the subscription active\n  let subscriptionsAmount = 0\n\n  // Is this specific subscription subscribed (or only nested ones?)\n  let selfSubscribed = false\n\n  function addNestedSub(listener: () => void) {\n    trySubscribe()\n\n    const cleanupListener = listeners.subscribe(listener)\n\n    // cleanup nested sub\n    let removed = false\n    return () => {\n      if (!removed) {\n        removed = true\n        cleanupListener()\n        tryUnsubscribe()\n      }\n    }\n  }\n\n  function notifyNestedSubs() {\n    listeners.notify()\n  }\n\n  function handleChangeWrapper() {\n    if (subscription.onStateChange) {\n      subscription.onStateChange()\n    }\n  }\n\n  function isSubscribed() {\n    return selfSubscribed\n  }\n\n  function trySubscribe() {\n    subscriptionsAmount++\n    if (!unsubscribe) {\n      unsubscribe = parentSub\n        ? parentSub.addNestedSub(handleChangeWrapper)\n        : store.subscribe(handleChangeWrapper)\n\n      listeners = createListenerCollection()\n    }\n  }\n\n  function tryUnsubscribe() {\n    subscriptionsAmount--\n    if (unsubscribe && subscriptionsAmount === 0) {\n      unsubscribe()\n      unsubscribe = undefined\n      listeners.clear()\n      listeners = nullListeners\n    }\n  }\n\n  function trySubscribeSelf() {\n    if (!selfSubscribed) {\n      selfSubscribed = true\n      trySubscribe()\n    }\n  }\n\n  function tryUnsubscribeSelf() {\n    if (selfSubscribed) {\n      selfSubscribed = false\n      tryUnsubscribe()\n    }\n  }\n\n  const subscription: Subscription = {\n    addNestedSub,\n    notifyNestedSubs,\n    handleChangeWrapper,\n    isSubscribed,\n    trySubscribe: trySubscribeSelf,\n    tryUnsubscribe: tryUnsubscribeSelf,\n    getListeners: () => listeners,\n  }\n\n  return subscription\n}\n", "import { React } from '../utils/react'\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store\n// subscription callback always has the selector from the latest render commit\n// available, otherwise a store update may happen between render and the effect,\n// which may cause missed updates; we also must ensure the store subscription\n// is created synchronously, otherwise a store update may occur before the\n// subscription is created and an inconsistent state may be observed\n\n// Matches logic in React's `shared/ExecutionEnvironment` file\nconst canUseDOM = () =>\n  !!(\n    typeof window !== 'undefined' &&\n    typeof window.document !== 'undefined' &&\n    typeof window.document.createElement !== 'undefined'\n  )\n\nconst isDOM = /* @__PURE__ */ canUseDOM()\n\n// Under React Native, we know that we always want to use useLayoutEffect\n\n/**\n * Checks if the code is running in a React Native environment.\n *\n * @returns Whether the code is running in a React Native environment.\n *\n * @see {@link https://github.com/facebook/react-native/issues/1331 Reference}\n */\nconst isRunningInReactNative = () =>\n  typeof navigator !== 'undefined' && navigator.product === 'ReactNative'\n\nconst isReactNative = /* @__PURE__ */ isRunningInReactNative()\n\nconst getUseIsomorphicLayoutEffect = () =>\n  isDOM || isReactNative ? React.useLayoutEffect : React.useEffect\n\nexport const useIsomorphicLayoutEffect =\n  /* @__PURE__ */ getUseIsomorphicLayoutEffect()\n", "function is(x: unknown, y: unknown) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y\n  } else {\n    return x !== x && y !== y\n  }\n}\n\nexport default function shallowEqual(objA: any, objB: any) {\n  if (is(objA, objB)) return true\n\n  if (\n    typeof objA !== 'object' ||\n    objA === null ||\n    typeof objB !== 'object' ||\n    objB === null\n  ) {\n    return false\n  }\n\n  const keysA = Object.keys(objA)\n  const keysB = Object.keys(objB)\n\n  if (keysA.length !== keysB.length) return false\n\n  for (let i = 0; i < keysA.length; i++) {\n    if (\n      !Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||\n      !is(objA[keysA[i]], objB[keysA[i]])\n    ) {\n      return false\n    }\n  }\n\n  return true\n}\n", "// Copied directly from:\n// https://github.com/mridgway/hoist-non-react-statics/blob/main/src/index.js\n// https://unpkg.com/browse/@types/hoist-non-react-statics@3.3.6/index.d.ts\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nimport type { ForwardRefExoticComponent, MemoExoticComponent } from 'react'\nimport { ForwardRef, Memo, isMemo } from '../utils/react-is'\n\nconst REACT_STATICS = {\n  childContextTypes: true,\n  contextType: true,\n  contextTypes: true,\n  defaultProps: true,\n  displayName: true,\n  getDefaultProps: true,\n  getDerivedStateFromError: true,\n  getDerivedStateFromProps: true,\n  mixins: true,\n  propTypes: true,\n  type: true,\n} as const\n\nconst KNOWN_STATICS = {\n  name: true,\n  length: true,\n  prototype: true,\n  caller: true,\n  callee: true,\n  arguments: true,\n  arity: true,\n} as const\n\nconst FORWARD_REF_STATICS = {\n  $$typeof: true,\n  render: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true,\n} as const\n\nconst MEMO_STATICS = {\n  $$typeof: true,\n  compare: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true,\n  type: true,\n} as const\n\nconst TYPE_STATICS = {\n  [ForwardRef]: FORWARD_REF_STATICS,\n  [Memo]: MEMO_STATICS,\n} as const\n\nfunction getStatics(component: any) {\n  // React v16.11 and below\n  if (isMemo(component)) {\n    return MEMO_STATICS\n  }\n\n  // React v16.12 and above\n  return TYPE_STATICS[component['$$typeof']] || REACT_STATICS\n}\n\nexport type NonReactStatics<\n  Source,\n  C extends {\n    [key: string]: true\n  } = {},\n> = {\n  [\n    key in Exclude<\n      keyof Source,\n      Source extends MemoExoticComponent<any>\n        ? keyof typeof MEMO_STATICS | keyof C\n        : Source extends ForwardRefExoticComponent<any>\n          ? keyof typeof FORWARD_REF_STATICS | keyof C\n          : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C\n    >\n  ]: Source[key]\n}\n\nconst defineProperty = Object.defineProperty\nconst getOwnPropertyNames = Object.getOwnPropertyNames\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\nconst getPrototypeOf = Object.getPrototypeOf\nconst objectPrototype = Object.prototype\n\nexport default function hoistNonReactStatics<\n  Target,\n  Source,\n  CustomStatic extends {\n    [key: string]: true\n  } = {},\n>(\n  targetComponent: Target,\n  sourceComponent: Source,\n): Target & NonReactStatics<Source, CustomStatic> {\n  if (typeof sourceComponent !== 'string') {\n    // don't hoist over string (html) components\n\n    if (objectPrototype) {\n      const inheritedComponent = getPrototypeOf(sourceComponent)\n      if (inheritedComponent && inheritedComponent !== objectPrototype) {\n        hoistNonReactStatics(targetComponent, inheritedComponent)\n      }\n    }\n\n    let keys: (string | symbol)[] = getOwnPropertyNames(sourceComponent)\n\n    if (getOwnPropertySymbols) {\n      keys = keys.concat(getOwnPropertySymbols(sourceComponent))\n    }\n\n    const targetStatics = getStatics(targetComponent)\n    const sourceStatics = getStatics(sourceComponent)\n\n    for (let i = 0; i < keys.length; ++i) {\n      const key = keys[i]\n      if (\n        !KNOWN_STATICS[key as keyof typeof KNOWN_STATICS] &&\n        !(sourceStatics && sourceStatics[key as keyof typeof sourceStatics]) &&\n        !(targetStatics && targetStatics[key as keyof typeof targetStatics])\n      ) {\n        const descriptor = getOwnPropertyDescriptor(sourceComponent, key)\n        try {\n          // Avoid failures from read-only properties\n          defineProperty(targetComponent, key, descriptor!)\n        } catch (e) {\n          // ignore\n        }\n      }\n    }\n  }\n\n  return targetComponent as any\n}\n", "import type { Context } from 'react'\nimport { React } from '../utils/react'\nimport type { Action, Store, UnknownAction } from 'redux'\nimport type { Subscription } from '../utils/Subscription'\nimport type { ProviderProps } from './Provider'\n\nexport interface ReactReduxContextValue<\n  SS = any,\n  A extends Action<string> = UnknownAction,\n> extends Pick<ProviderProps, 'stabilityCheck' | 'identityFunctionCheck'> {\n  store: Store<SS, A>\n  subscription: Subscription\n  getServerState?: () => SS\n}\n\nconst ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`)\nconst gT: {\n  [ContextKey]?: Map<\n    typeof React.createContext,\n    Context<ReactReduxContextValue | null>\n  >\n} = (\n  typeof globalThis !== 'undefined'\n    ? globalThis\n    : /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {}\n) as any\n\nfunction getContext(): Context<ReactReduxContextValue | null> {\n  if (!React.createContext) return {} as any\n\n  const contextMap = (gT[ContextKey] ??= new Map<\n    typeof React.createContext,\n    Context<ReactReduxContextValue | null>\n  >())\n  let realContext = contextMap.get(React.createContext)\n  if (!realContext) {\n    realContext = React.createContext<ReactReduxContextValue | null>(\n      null as any,\n    )\n    if (process.env.NODE_ENV !== 'production') {\n      realContext.displayName = 'ReactRedux'\n    }\n    contextMap.set(React.createContext, realContext)\n  }\n  return realContext\n}\n\nexport const ReactReduxContext = /*#__PURE__*/ getContext()\n\nexport type ReactReduxContextInstance = typeof ReactReduxContext\n", "/* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */\nimport type { ComponentType } from 'react'\nimport { React } from '../utils/react'\nimport { isValidElementType, isContextConsumer } from '../utils/react-is'\n\nimport type { Store } from 'redux'\n\nimport type {\n  ConnectedComponent,\n  InferableComponentEnhancer,\n  InferableComponentEnhancerWithProps,\n  ResolveThunks,\n  DispatchProp,\n  ConnectPropsMaybeWithoutContext,\n} from '../types'\n\nimport type {\n  MapStateToProps,\n  MapStateToPropsFactory,\n  MapStateToPropsParam,\n  MapDispatchToProps,\n  MapDispatchToPropsFactory,\n  MapDispatchToPropsFunction,\n  MapDispatchToPropsParam,\n  MergeProps,\n  SelectorFactoryOptions,\n} from '../connect/selectorFactory'\nimport defaultSelectorFactory from '../connect/selectorFactory'\nimport { mapDispatchToPropsFactory } from '../connect/mapDispatchToProps'\nimport { mapStateToPropsFactory } from '../connect/mapStateToProps'\nimport { mergePropsFactory } from '../connect/mergeProps'\n\nimport type { Subscription } from '../utils/Subscription'\nimport { createSubscription } from '../utils/Subscription'\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'\nimport shallowEqual from '../utils/shallowEqual'\nimport hoistStatics from '../utils/hoistStatics'\nimport warning from '../utils/warning'\n\nimport type {\n  ReactReduxContextValue,\n  ReactReduxContextInstance,\n} from './Context'\nimport { ReactReduxContext } from './Context'\n\n// Accepts the same values as `MapStateToPropsParam`, but as a single function\n// type whose return is `TStateProps | MapStateToProps<...>`. Inference prefers\n// the non-naked `MapStateToProps` member, so a factory infers `TStateProps` from\n// its inner function on every compiler, independent of union member order.\ntype MapStateToPropsParamForMergeProps<TStateProps, TOwnProps, State> =\n  | ((\n      state: State,\n      ownProps: TOwnProps,\n    ) => TStateProps | MapStateToProps<TStateProps, TOwnProps, State>)\n  | null\n  | undefined\n\n// Define some constant arrays just to avoid re-creating these\nconst EMPTY_ARRAY: [unknown, number] = [null, 0]\nconst NO_SUBSCRIPTION_ARRAY = [null, null]\n\n// Attempts to stringify whatever not-really-a-component value we were given\n// for logging in an error message\nconst stringifyComponent = (Comp: unknown) => {\n  try {\n    return JSON.stringify(Comp)\n  } catch (err) {\n    return String(Comp)\n  }\n}\n\ntype EffectFunc = (...args: any[]) => void | ReturnType<React.EffectCallback>\n\n// This is \"just\" a `useLayoutEffect`, but with two modifications:\n// - we need to fall back to `useEffect` in SSR to avoid annoying warnings\n// - we extract this to a separate function to avoid closing over values\n//   and causing memory leaks\nfunction useIsomorphicLayoutEffectWithArgs(\n  effectFunc: EffectFunc,\n  effectArgs: any[],\n  dependencies?: React.DependencyList,\n) {\n  useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies)\n}\n\n// Effect callback, extracted: assign the latest props values to refs for later usage\nfunction captureWrapperProps(\n  lastWrapperProps: React.MutableRefObject<unknown>,\n  lastChildProps: React.MutableRefObject<unknown>,\n  renderIsScheduled: React.MutableRefObject<boolean>,\n  wrapperProps: unknown,\n  // actualChildProps: unknown,\n  childPropsFromStoreUpdate: React.MutableRefObject<unknown>,\n  notifyNestedSubs: () => void,\n) {\n  // We want to capture the wrapper props and child props we used for later comparisons\n  lastWrapperProps.current = wrapperProps\n  renderIsScheduled.current = false\n\n  // If the render was from a store update, clear out that reference and cascade the subscriber update\n  if (childPropsFromStoreUpdate.current) {\n    childPropsFromStoreUpdate.current = null\n    notifyNestedSubs()\n  }\n}\n\n// Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor,\n// check for updates after dispatched actions, and trigger re-renders.\nfunction subscribeUpdates(\n  shouldHandleStateChanges: boolean,\n  store: Store,\n  subscription: Subscription,\n  childPropsSelector: (state: unknown, props: unknown) => unknown,\n  lastWrapperProps: React.MutableRefObject<unknown>,\n  lastChildProps: React.MutableRefObject<unknown>,\n  renderIsScheduled: React.MutableRefObject<boolean>,\n  isMounted: React.MutableRefObject<boolean>,\n  childPropsFromStoreUpdate: React.MutableRefObject<unknown>,\n  notifyNestedSubs: () => void,\n  // forceComponentUpdateDispatch: React.Dispatch<any>,\n  additionalSubscribeListener: () => void,\n  displayName: string,\n) {\n  // If we're not subscribed to the store, nothing to do here\n  if (!shouldHandleStateChanges) return () => {}\n\n  // Capture values for checking if and when this component unmounts\n  let didUnsubscribe = false\n  let lastThrownError: Error | null = null\n\n  // We'll run this callback every time a store subscription update propagates to this component\n  const checkForUpdates = () => {\n    if (didUnsubscribe || !isMounted.current) {\n      // Don't run stale listeners.\n      // Redux doesn't guarantee unsubscriptions happen until next dispatch.\n      return\n    }\n\n    // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it\n    const latestStoreState = store.getState()\n\n    let newChildProps, error\n    try {\n      // Actually run the selector with the most recent store state and wrapper props\n      // to determine what the child props should be\n      newChildProps = childPropsSelector(\n        latestStoreState,\n        lastWrapperProps.current,\n      )\n    } catch (e) {\n      error = e\n      lastThrownError = e as Error | null\n      if (process.env.NODE_ENV !== 'production') {\n        console.error(\n          `An error occurred in \\`mapStateToProps\\` (or a selector) of the \\`connect()\\`-ed component \"${displayName}\". ` +\n            'See https://github.com/reduxjs/react-redux/issues/1942 for details.',\n          e,\n        )\n      }\n    }\n\n    if (!error) {\n      lastThrownError = null\n    }\n\n    // If the child props haven't changed, nothing to do here - cascade the subscription update\n    if (newChildProps === lastChildProps.current) {\n      if (!renderIsScheduled.current) {\n        notifyNestedSubs()\n      }\n    } else {\n      // Save references to the new child props.  Note that we track the \"child props from store update\"\n      // as a ref instead of a useState/useReducer because we need a way to determine if that value has\n      // been processed.  If this went into useState/useReducer, we couldn't clear out the value without\n      // forcing another re-render, which we don't want.\n      lastChildProps.current = newChildProps\n      childPropsFromStoreUpdate.current = newChildProps\n      renderIsScheduled.current = true\n\n      // TODO This is hacky and not how `uSES` is meant to be used\n      // Trigger the React `useSyncExternalStore` subscriber\n      additionalSubscribeListener()\n    }\n  }\n\n  // Actually subscribe to the nearest connected ancestor (or store)\n  subscription.onStateChange = checkForUpdates\n  subscription.trySubscribe()\n\n  // Pull data from the store after first render in case the store has\n  // changed since we began.\n  checkForUpdates()\n\n  const unsubscribeWrapper = () => {\n    didUnsubscribe = true\n    subscription.tryUnsubscribe()\n    subscription.onStateChange = null\n\n    if (lastThrownError) {\n      // It's possible that we caught an error due to a bad mapState function, but the\n      // parent re-rendered without this component and we're about to unmount.\n      // This shouldn't happen as long as we do top-down subscriptions correctly, but\n      // if we ever do those wrong, this throw will surface the error in our tests.\n      // In that case, throw the error from here so it doesn't get lost.\n      throw lastThrownError\n    }\n  }\n\n  return unsubscribeWrapper\n}\n\n// Reducer initial state creation for our update reducer\nconst initStateUpdates = () => EMPTY_ARRAY\n\nexport interface ConnectProps {\n  /** A custom Context instance that the component can use to access the store from an alternate Provider using that same Context instance */\n  context?: ReactReduxContextInstance\n  /** A Redux store instance to be used for subscriptions instead of the store from a Provider */\n  store?: Store\n}\n\ninterface InternalConnectProps extends ConnectProps {\n  reactReduxForwardedRef?: React.ForwardedRef<unknown>\n}\n\nfunction strictEqual(a: unknown, b: unknown) {\n  return a === b\n}\n\n/**\n * Infers the type of props that a connector will inject into a component.\n */\nexport type ConnectedProps<TConnector> =\n  TConnector extends InferableComponentEnhancerWithProps<\n    infer TInjectedProps,\n    any\n  >\n    ? unknown extends TInjectedProps\n      ? TConnector extends InferableComponentEnhancer<infer TInjectedProps>\n        ? TInjectedProps\n        : never\n      : TInjectedProps\n    : never\n\nexport interface ConnectOptions<\n  State = unknown,\n  TStateProps = {},\n  TOwnProps = {},\n  TMergedProps = {},\n> {\n  forwardRef?: boolean\n  context?: typeof ReactReduxContext\n  areStatesEqual?: (\n    nextState: State,\n    prevState: State,\n    nextOwnProps: TOwnProps,\n    prevOwnProps: TOwnProps,\n  ) => boolean\n\n  areOwnPropsEqual?: (\n    nextOwnProps: TOwnProps,\n    prevOwnProps: TOwnProps,\n  ) => boolean\n\n  areStatePropsEqual?: (\n    nextStateProps: TStateProps,\n    prevStateProps: TStateProps,\n  ) => boolean\n  areMergedPropsEqual?: (\n    nextMergedProps: TMergedProps,\n    prevMergedProps: TMergedProps,\n  ) => boolean\n}\n\n/**\n\n *\n * Connects a React component to a Redux store.\n *\n * - Without arguments, just wraps the component, without changing the behavior / props\n *\n * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior\n * is to override ownProps (as stated in the docs), so what remains is everything that's\n * not a state or dispatch prop\n *\n * - When 3rd param is passed, we don't know if ownProps propagate and whether they\n * should be valid component props, because it depends on mergeProps implementation.\n * As such, it is the user's responsibility to extend ownProps interface from state or\n * dispatch props or both when applicable\n *\n * @param mapStateToProps\n * @param mapDispatchToProps\n * @param mergeProps\n * @param options\n */\nexport interface Connect<DefaultState = unknown> {\n  // tslint:disable:no-unnecessary-generics\n  //\n  // NOTE: the `mapStateToProps` and `mapDispatchToProps` parameters are\n  // intentionally split into separate \"factory\" and \"plain\" overloads instead of\n  // accepting the `MapStateToPropsParam` / `MapDispatchToProps{Param,NonObject}`\n  // unions directly. A factory (e.g. `() => (state) => props`) is structurally\n  // assignable to its plain counterpart, so when both forms live in a single\n  // union the compiler has to pick a \"first\" inference candidate - and the old\n  // and new (native, TS 7 / `tsgo`) compilers order union members differently,\n  // inferring `TStateProps` / `TDispatchProps` incorrectly on one of them.\n  // Listing the factory overload first makes the resolution order explicit and\n  // compiler-independent. The `mergeProps` overloads can't be split this way\n  // (see the note on those overloads below).\n  // See https://github.com/reduxjs/react-redux/issues/2244\n  (): InferableComponentEnhancer<DispatchProp>\n\n  /** mapState only (as a factory) */\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n  ): InferableComponentEnhancerWithProps<TStateProps & DispatchProp, TOwnProps>\n\n  /** mapState only */\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n  ): InferableComponentEnhancerWithProps<TStateProps & DispatchProp, TOwnProps>\n\n  /** mapDispatch only (as a factory) */\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\n\n  /** mapDispatch only (as a function) */\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\n\n  /** mapDispatch only (as an object) */\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  /** mapState (as a factory) and mapDispatch (as a factory) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState (as a factory) and mapDispatch (as a function) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState and mapDispatch (as a factory) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState and mapDispatch (as a function)*/\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState (as a factory) and mapDispatch (nullish) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: null | undefined,\n  ): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>\n\n  /** mapState and mapDispatch (nullish) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: null | undefined,\n  ): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>\n\n  /** mapState (as a factory) and mapDispatch (as an object) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  /** mapState and mapDispatch (as an object) */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  /** mergeProps only */\n  <no_state = {}, no_dispatch = {}, TOwnProps = {}, TMergedProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: null | undefined,\n    mergeProps: MergeProps<undefined, DispatchProp, TOwnProps, TMergedProps>,\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\n\n  // `mergeProps` overloads don't split off a factory overload (see the note on\n  // the final `mergeProps` overload below) - doing so would collapse the\n  // inferred props to `{}`.\n\n  /** mapState and mergeProps */\n  <\n    TStateProps = {},\n    no_dispatch = {},\n    TOwnProps = {},\n    TMergedProps = {},\n    State = DefaultState,\n  >(\n    mapStateToProps: MapStateToPropsParamForMergeProps<\n      TStateProps,\n      TOwnProps,\n      State\n    >,\n    mapDispatchToProps: null | undefined,\n    mergeProps: MergeProps<TStateProps, DispatchProp, TOwnProps, TMergedProps>,\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\n\n  /** mapDispatch (as a object) and mergeProps */\n  <no_state = {}, TDispatchProps = {}, TOwnProps = {}, TMergedProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\n    mergeProps: MergeProps<undefined, TDispatchProps, TOwnProps, TMergedProps>,\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\n\n  /** mapState (as a factory) and options */\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: null | undefined,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<DispatchProp & TStateProps, TOwnProps>\n\n  /** mapState and options */\n  <TStateProps = {}, no_dispatch = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: null | undefined,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<DispatchProp & TStateProps, TOwnProps>\n\n  /** mapDispatch (as a factory) and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<{}, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\n\n  /** mapDispatch (as a function) and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<{}, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<TDispatchProps, TOwnProps>\n\n  /** mapDispatch (as an object) and options*/\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}>(\n    mapStateToProps: null | undefined,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<{}, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  /** mapState (as a factory), mapDispatch (as a factory), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState (as a factory), mapDispatch (as a function), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState, mapDispatch (as a factory), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToPropsFactory<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState,  mapDispatch (as a function), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToPropsFunction<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & TDispatchProps,\n    TOwnProps\n  >\n\n  /** mapState (as a factory), mapDispatch (as an object), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps: MapStateToPropsFactory<TStateProps, TOwnProps, State>,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  /** mapState,  mapDispatch (as an object), and options */\n  <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(\n    mapStateToProps:\n      | MapStateToProps<TStateProps, TOwnProps, State>\n      | null\n      | undefined,\n    mapDispatchToProps: MapDispatchToProps<TDispatchProps, TOwnProps>,\n    mergeProps: null | undefined,\n    options: ConnectOptions<State, TStateProps, TOwnProps>,\n  ): InferableComponentEnhancerWithProps<\n    TStateProps & ResolveThunks<TDispatchProps>,\n    TOwnProps\n  >\n\n  // NOTE: the `mergeProps` overloads accept both map forms in one overload\n  // rather than the factory/plain split used above. `mergeProps` receives `stateProps` and\n  // `dispatchProps` as contextually-typed (non-inferring) parameters, so\n  // `TStateProps` / `TDispatchProps` can only be inferred from `mapStateToProps`\n  // / `mapDispatchToProps`. With a dedicated factory overload listed first a\n  // plain map function gets captured by it and the inferred props collapse to\n  // `{}`, because the contextually-typed `mergeProps` parameters keep the types\n  // from the failed overload attempt. `mapStateToProps` uses\n  // `MapStateToPropsParamForMergeProps` instead of the `MapStateToPropsParam`\n  // union so that a factory infers the same `TStateProps` on every compiler.\n\n  /** mapState, mapDispatch, mergeProps, and options */\n  <\n    TStateProps = {},\n    TDispatchProps = {},\n    TOwnProps = {},\n    TMergedProps = {},\n    State = DefaultState,\n  >(\n    mapStateToProps: MapStateToPropsParamForMergeProps<\n      TStateProps,\n      TOwnProps,\n      State\n    >,\n    mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\n    mergeProps: MergeProps<\n      TStateProps,\n      TDispatchProps,\n      TOwnProps,\n      TMergedProps\n    >,\n    options?: ConnectOptions<State, TStateProps, TOwnProps, TMergedProps>,\n  ): InferableComponentEnhancerWithProps<TMergedProps, TOwnProps>\n  // tslint:enable:no-unnecessary-generics\n}\n\nlet hasWarnedAboutDeprecatedPureOption = false\n\n/**\n * @deprecated\n *\n * **We recommend using the `useSelector` and `useDispatch` hooks instead.**\n * See https://react-redux.js.org/api/hooks\n *\n * If you need to use `connect` without this visual deprecation warning,\n * import `legacy_connect` instead:\n *\n * `import { legacy_connect as connect } from 'react-redux'`\n *\n * Connects a React component to a Redux store.\n *\n * - Without arguments, just wraps the component, without changing the behavior / props\n *\n * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior\n * is to override ownProps (as stated in the docs), so what remains is everything that's\n * not a state or dispatch prop\n *\n * - When 3rd param is passed, we don't know if ownProps propagate and whether they\n * should be valid component props, because it depends on mergeProps implementation.\n * As such, it is the user's responsibility to extend ownProps interface from state or\n * dispatch props or both when applicable\n *\n * @param mapStateToProps A function that extracts values from state\n * @param mapDispatchToProps Setup for dispatching actions\n * @param mergeProps Optional callback to merge state and dispatch props together\n * @param options Options for configuring the connection\n *\n */\nfunction _connect<\n  TStateProps = {},\n  TDispatchProps = {},\n  TOwnProps = {},\n  TMergedProps = {},\n  State = unknown,\n>(\n  mapStateToProps?: MapStateToPropsParam<TStateProps, TOwnProps, State>,\n  mapDispatchToProps?: MapDispatchToPropsParam<TDispatchProps, TOwnProps>,\n  mergeProps?: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>,\n  {\n    // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n    // @ts-ignore\n    pure,\n    areStatesEqual = strictEqual,\n    areOwnPropsEqual = shallowEqual,\n    areStatePropsEqual = shallowEqual,\n    areMergedPropsEqual = shallowEqual,\n\n    // use React's forwardRef to expose a ref of the wrapped component\n    forwardRef = false,\n\n    // the context consumer to use\n    context = ReactReduxContext,\n  }: ConnectOptions<unknown, unknown, unknown, unknown> = {},\n): unknown {\n  if (process.env.NODE_ENV !== 'production') {\n    if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) {\n      hasWarnedAboutDeprecatedPureOption = true\n      warning(\n        'The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component',\n      )\n    }\n  }\n\n  const Context = context\n\n  const initMapStateToProps = mapStateToPropsFactory(mapStateToProps)\n  const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps)\n  const initMergeProps = mergePropsFactory(mergeProps)\n\n  const shouldHandleStateChanges = Boolean(mapStateToProps)\n\n  const wrapWithConnect = <TProps,>(\n    WrappedComponent: ComponentType<TProps>,\n  ) => {\n    type WrappedComponentProps = TProps &\n      ConnectPropsMaybeWithoutContext<TProps>\n\n    if (process.env.NODE_ENV !== 'production') {\n      const isValid = /*#__PURE__*/ isValidElementType(WrappedComponent)\n      if (!isValid)\n        throw new Error(\n          `You must pass a component to the function returned by connect. Instead received ${stringifyComponent(\n            WrappedComponent,\n          )}`,\n        )\n    }\n\n    const wrappedComponentName =\n      WrappedComponent.displayName || WrappedComponent.name || 'Component'\n\n    const displayName = `Connect(${wrappedComponentName})`\n\n    const selectorFactoryOptions: SelectorFactoryOptions<\n      any,\n      any,\n      any,\n      any,\n      State\n    > = {\n      shouldHandleStateChanges,\n      displayName,\n      wrappedComponentName,\n      WrappedComponent,\n      // @ts-ignore\n      initMapStateToProps,\n      initMapDispatchToProps,\n      initMergeProps,\n      areStatesEqual,\n      areStatePropsEqual,\n      areOwnPropsEqual,\n      areMergedPropsEqual,\n    }\n\n    function ConnectFunction<TOwnProps>(\n      props: InternalConnectProps & TOwnProps,\n    ) {\n      const [propsContext, reactReduxForwardedRef, wrapperProps] =\n        React.useMemo(() => {\n          // Distinguish between actual \"data\" props that were passed to the wrapper component,\n          // and values needed to control behavior (forwarded refs, alternate context instances).\n          // To maintain the wrapperProps object reference, memoize this destructuring.\n          const { reactReduxForwardedRef, ...wrapperProps } = props\n          return [props.context, reactReduxForwardedRef, wrapperProps]\n        }, [props])\n\n      const ContextToUse: ReactReduxContextInstance = React.useMemo(() => {\n        // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.\n        // Memoize the check that determines which context instance we should use.\n        let ResultContext = Context\n        if (propsContext?.Consumer) {\n          if (process.env.NODE_ENV !== 'production') {\n            const isValid = /*#__PURE__*/ isContextConsumer(\n              // @ts-ignore\n              <propsContext.Consumer />,\n            )\n            if (!isValid) {\n              throw new Error(\n                'You must pass a valid React context consumer as `props.context`',\n              )\n            }\n          }\n          ResultContext = propsContext\n        }\n        return ResultContext\n      }, [propsContext, Context])\n\n      // Retrieve the store and ancestor subscription via context, if available\n      const contextValue = React.useContext(ContextToUse)\n\n      // The store _must_ exist as either a prop or in context.\n      // We'll check to see if it _looks_ like a Redux store first.\n      // This allows us to pass through a `store` prop that is just a plain value.\n      const didStoreComeFromProps =\n        Boolean(props.store) &&\n        Boolean(props.store!.getState) &&\n        Boolean(props.store!.dispatch)\n      const didStoreComeFromContext =\n        Boolean(contextValue) && Boolean(contextValue!.store)\n\n      if (\n        process.env.NODE_ENV !== 'production' &&\n        !didStoreComeFromProps &&\n        !didStoreComeFromContext\n      ) {\n        throw new Error(\n          `Could not find \"store\" in the context of ` +\n            `\"${displayName}\". Either wrap the root component in a <Provider>, ` +\n            `or pass a custom React context provider to <Provider> and the corresponding ` +\n            `React context consumer to ${displayName} in connect options.`,\n        )\n      }\n\n      // Based on the previous check, one of these must be true\n      const store: Store = didStoreComeFromProps\n        ? props.store!\n        : contextValue!.store\n\n      const getServerState = didStoreComeFromContext\n        ? contextValue!.getServerState\n        : store.getState\n\n      const childPropsSelector = React.useMemo(() => {\n        // The child props selector needs the store reference as an input.\n        // Re-create this selector whenever the store changes.\n        return defaultSelectorFactory(store.dispatch, selectorFactoryOptions)\n      }, [store])\n\n      const [subscription, notifyNestedSubs] = React.useMemo(() => {\n        if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY\n\n        // This Subscription's source should match where store came from: props vs. context. A component\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\n        const subscription = createSubscription(\n          store,\n          didStoreComeFromProps ? undefined : contextValue!.subscription,\n        )\n\n        // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in\n        // the middle of the notification loop, where `subscription` will then be null. This can\n        // probably be avoided if Subscription's listeners logic is changed to not call listeners\n        // that have been unsubscribed in the  middle of the notification loop.\n        const notifyNestedSubs =\n          subscription.notifyNestedSubs.bind(subscription)\n\n        return [subscription, notifyNestedSubs]\n      }, [store, didStoreComeFromProps, contextValue])\n\n      // Determine what {store, subscription} value should be put into nested context, if necessary,\n      // and memoize that value to avoid unnecessary context updates.\n      const overriddenContextValue = React.useMemo(() => {\n        if (didStoreComeFromProps) {\n          // This component is directly subscribed to a store from props.\n          // We don't want descendants reading from this store - pass down whatever\n          // the existing context value is from the nearest connected ancestor.\n          return contextValue!\n        }\n\n        // Otherwise, put this component's subscription instance into context, so that\n        // connected descendants won't update until after this component is done\n        return {\n          ...contextValue,\n          subscription,\n        } as ReactReduxContextValue\n      }, [didStoreComeFromProps, contextValue, subscription])\n\n      // Set up refs to coordinate values between the subscription effect and the render logic\n      const lastChildProps = React.useRef<unknown>(undefined)\n      const lastWrapperProps = React.useRef(wrapperProps)\n      const childPropsFromStoreUpdate = React.useRef<unknown>(undefined)\n      const renderIsScheduled = React.useRef(false)\n      const isMounted = React.useRef(false)\n\n      // TODO: Change this to `React.useRef<Error>(undefined)` after upgrading to React 19.\n      /**\n       * @todo Change this to `React.useRef<Error>(undefined)` after upgrading to React 19.\n       */\n      const latestSubscriptionCallbackError = React.useRef<Error | undefined>(\n        undefined,\n      )\n\n      useIsomorphicLayoutEffect(() => {\n        isMounted.current = true\n        return () => {\n          isMounted.current = false\n        }\n      }, [])\n\n      const actualChildPropsSelector = React.useMemo(() => {\n        const selector = () => {\n          // Tricky logic here:\n          // - This render may have been triggered by a Redux store update that produced new child props\n          // - However, we may have gotten new wrapper props after that\n          // If we have new child props, and the same wrapper props, we know we should use the new child props as-is.\n          // But, if we have new wrapper props, those might change the child props, so we have to recalculate things.\n          // So, we'll use the child props from store update only if the wrapper props are the same as last time.\n          if (\n            childPropsFromStoreUpdate.current &&\n            wrapperProps === lastWrapperProps.current\n          ) {\n            return childPropsFromStoreUpdate.current\n          }\n\n          // TODO We're reading the store directly in render() here. Bad idea?\n          // This will likely cause Bad Things (TM) to happen in Concurrent Mode.\n          // Note that we do this because on renders _not_ caused by store updates, we need the latest store state\n          // to determine what the child props should be.\n          return childPropsSelector(store.getState(), wrapperProps)\n        }\n        return selector\n      }, [store, wrapperProps])\n\n      // We need this to execute synchronously every time we re-render. However, React warns\n      // about useLayoutEffect in SSR, so we try to detect environment and fall back to\n      // just useEffect instead to avoid the warning, since neither will run anyway.\n\n      const subscribeForReact = React.useMemo(() => {\n        const subscribe = (reactListener: () => void) => {\n          if (!subscription) {\n            return () => {}\n          }\n\n          return subscribeUpdates(\n            shouldHandleStateChanges,\n            store,\n            subscription,\n            // @ts-ignore\n            childPropsSelector,\n            lastWrapperProps,\n            lastChildProps,\n            renderIsScheduled,\n            isMounted,\n            childPropsFromStoreUpdate,\n            notifyNestedSubs,\n            reactListener,\n            displayName,\n          )\n        }\n\n        return subscribe\n      }, [subscription])\n\n      useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [\n        lastWrapperProps,\n        lastChildProps,\n        renderIsScheduled,\n        wrapperProps,\n        childPropsFromStoreUpdate,\n        notifyNestedSubs,\n      ])\n\n      let actualChildProps: Record<string, unknown>\n\n      try {\n        actualChildProps = React.useSyncExternalStore(\n          // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n          subscribeForReact,\n          // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n          // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n          actualChildPropsSelector,\n          getServerState\n            ? () => childPropsSelector(getServerState(), wrapperProps)\n            : actualChildPropsSelector,\n        )\n      } catch (err) {\n        if (latestSubscriptionCallbackError.current) {\n          // eslint-disable-next-line no-extra-semi\n          ;(err as Error).message +=\n            `\\nThe error may be correlated with this previous error:\\n${latestSubscriptionCallbackError.current.stack}\\n\\n`\n        }\n\n        throw err\n      }\n\n      useIsomorphicLayoutEffect(() => {\n        latestSubscriptionCallbackError.current = undefined\n        childPropsFromStoreUpdate.current = undefined\n        lastChildProps.current = actualChildProps\n      })\n\n      // Now that all that's done, we can finally try to actually render the child component.\n      // We memoize the elements for the rendered child component as an optimization.\n      const renderedWrappedComponent = React.useMemo(() => {\n        const effectiveProps = { ...actualChildProps }\n        if (forwardRef) {\n          effectiveProps.ref = reactReduxForwardedRef\n        }\n        return (\n          // @ts-ignore\n          <WrappedComponent {...effectiveProps} />\n        )\n      }, [reactReduxForwardedRef, WrappedComponent, actualChildProps])\n\n      // If React sees the exact same element reference as last time, it bails out of re-rendering\n      // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.\n      const renderedChild = React.useMemo(() => {\n        if (shouldHandleStateChanges) {\n          // If this component is subscribed to store updates, we need to pass its own\n          // subscription instance down to our descendants. That means rendering the same\n          // Context instance, and putting a different value into the context.\n          return (\n            <ContextToUse.Provider value={overriddenContextValue}>\n              {renderedWrappedComponent}\n            </ContextToUse.Provider>\n          )\n        }\n\n        return renderedWrappedComponent\n      }, [ContextToUse, renderedWrappedComponent, overriddenContextValue])\n\n      return renderedChild\n    }\n\n    const _Connect = React.memo(ConnectFunction)\n\n    type ConnectedWrapperComponent = typeof _Connect & {\n      WrappedComponent: typeof WrappedComponent\n    }\n\n    // Add a hacky cast to get the right output type\n    const Connect = _Connect as unknown as ConnectedComponent<\n      typeof WrappedComponent,\n      WrappedComponentProps\n    >\n    Connect.WrappedComponent = WrappedComponent\n    Connect.displayName = ConnectFunction.displayName = displayName\n\n    if (forwardRef) {\n      const _forwarded = React.forwardRef(\n        function forwardConnectRef(props, ref) {\n          // @ts-ignore\n          return <Connect {...props} reactReduxForwardedRef={ref} />\n        },\n      )\n\n      const forwarded = _forwarded as ConnectedWrapperComponent\n      forwarded.displayName = displayName\n      forwarded.WrappedComponent = WrappedComponent\n      return /*#__PURE__*/ hoistStatics(forwarded, WrappedComponent)\n    }\n\n    return /*#__PURE__*/ hoistStatics(Connect, WrappedComponent)\n  }\n\n  return wrapWithConnect\n}\n\n/**\n *  * @deprecated\n *\n * **We recommend using the `useSelector` and `useDispatch` hooks instead.**\n * See https://react-redux.js.org/api/hooks\n *\n * If you need to use `connect` without this visual deprecation warning,\n * import `legacy_connect` instead:\n *\n * `import { legacy_connect as connect } from 'react-redux'`\n */\nexport const connect: Connect = _connect as Connect\n\n/**\n * Connects a React component to a Redux store. Same as `connect` but without\n * the deprecation warning.\n *\n * **We recommend using the `useSelector` and `useDispatch` hooks instead.**\n * See https://react-redux.js.org/api/hooks\n */\nexport const legacy_connect: Connect = _connect as Connect\n", "import type { Context, ReactNode } from 'react'\nimport { React } from '../utils/react'\nimport type { Action, Store, UnknownAction } from 'redux'\nimport type { DevModeCheckFrequency } from '../hooks/useSelector'\nimport { createSubscription } from '../utils/Subscription'\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'\nimport type { ReactReduxContextValue } from './Context'\nimport { ReactReduxContext } from './Context'\n\nexport interface ProviderProps<\n  A extends Action<string> = UnknownAction,\n  S = unknown,\n> {\n  /**\n   * The single Redux store in your application.\n   */\n  store: Store<S, A>\n\n  /**\n   * An optional server state snapshot. Will be used during initial hydration render if available, to ensure that the UI output is consistent with the HTML generated on the server.\n   */\n  serverState?: S\n\n  /**\n   * Optional context to be used internally in react-redux. Use React.createContext() to create a context to be used.\n   * If this is used, you'll need to customize `connect` by supplying the same context provided to the Provider.\n   * Set the initial value to null, and the hooks will error\n   * if this is not overwritten by Provider.\n   */\n  context?: Context<ReactReduxContextValue<S, A> | null>\n\n  /**\n   * Determines the frequency of stability checks for all selectors.\n   * This setting overrides the global configuration for\n   * the `useSelector` stability check, allowing you to specify how often\n   * these checks should occur in development mode.\n   *\n   * @since 8.1.0\n   */\n  stabilityCheck?: DevModeCheckFrequency\n\n  /**\n   * Determines the frequency of identity function checks for all selectors.\n   * This setting overrides the global configuration for\n   * the `useSelector` identity function check, allowing you to specify how often\n   * these checks should occur in development mode.\n   *\n   * **Note**: Previously referred to as `noopCheck`.\n   *\n   * @since 9.0.0\n   */\n  identityFunctionCheck?: DevModeCheckFrequency\n\n  children: ReactNode\n}\n\nfunction Provider<A extends Action<string> = UnknownAction, S = unknown>(\n  providerProps: ProviderProps<A, S>,\n) {\n  if (process.env.NODE_ENV !== 'production') {\n    // The React Server Components build of React has no effect hooks\n    if (typeof useIsomorphicLayoutEffect !== 'function') {\n      throw new Error(\n        'The React Redux `<Provider>` component requires React hooks that are ' +\n          'not available in a React Server Component. This usually means you are ' +\n          'rendering `<Provider>` in a Server Component. Add the `\"use client\"` ' +\n          'directive to the top of the file that renders `<Provider>` (or a ' +\n          'parent that ends up rendering it) so it is treated as a Client ' +\n          'Component. See https://react.dev/reference/rsc/use-client for more ' +\n          'information.',\n      )\n    }\n  }\n\n  const { children, context, serverState, store } = providerProps\n\n  const contextValue = React.useMemo(() => {\n    const subscription = createSubscription(store)\n\n    const baseContextValue = {\n      store,\n      subscription,\n      getServerState: serverState != null ? () => serverState : undefined,\n    }\n\n    if (process.env.NODE_ENV === 'production') {\n      return baseContextValue\n    } else {\n      const { identityFunctionCheck = 'once', stabilityCheck = 'once' } =\n        providerProps\n\n      return /* @__PURE__ */ Object.assign(baseContextValue, {\n        stabilityCheck,\n        identityFunctionCheck,\n      })\n    }\n  }, [store, serverState])\n\n  const previousState = React.useMemo(() => store.getState(), [store])\n\n  useIsomorphicLayoutEffect(() => {\n    const { subscription } = contextValue\n    subscription.onStateChange = subscription.notifyNestedSubs\n    subscription.trySubscribe()\n\n    if (previousState !== store.getState()) {\n      subscription.notifyNestedSubs()\n    }\n    return () => {\n      subscription.tryUnsubscribe()\n      subscription.onStateChange = undefined\n    }\n  }, [contextValue, previousState])\n\n  const Context = context || ReactReduxContext\n\n  return <Context.Provider value={contextValue}>{children}</Context.Provider>\n}\n\nexport default Provider\n", "import { React } from '../utils/react'\nimport { ReactReduxContext } from '../components/Context'\nimport type { ReactReduxContextValue } from '../components/Context'\n\n/**\n * Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level\n * hook that you should usually not need to call directly.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useReduxContext` hook bound to the specified context.\n */\nexport function createReduxContextHook(context = ReactReduxContext) {\n  return function useReduxContext(): ReactReduxContextValue {\n    const contextValue = React.useContext(context)\n\n    if (process.env.NODE_ENV !== 'production' && !contextValue) {\n      throw new Error(\n        'could not find react-redux context value; please ensure the component is wrapped in a <Provider>',\n      )\n    }\n\n    return contextValue!\n  }\n}\n\n/**\n * A hook to access the value of the `ReactReduxContext`. This is a low-level\n * hook that you should usually not need to call directly.\n *\n * @returns {any} the value of the `ReactReduxContext`\n *\n * @example\n *\n * import React from 'react'\n * import { useReduxContext } from 'react-redux'\n *\n * export const CounterComponent = () => {\n *   const { store } = useReduxContext()\n *   return <div>{store.getState()}</div>\n * }\n */\nexport const useReduxContext = /*#__PURE__*/ createReduxContextHook()\n", "import type { Context } from 'react'\nimport type { Action, Store } from 'redux'\nimport type { ReactReduxContextValue } from '../components/Context'\nimport { ReactReduxContext } from '../components/Context'\nimport {\n  createReduxContextHook,\n  useReduxContext as useDefaultReduxContext,\n} from './useReduxContext'\n\n/**\n * Represents a type that extracts the action type from a given Redux store.\n *\n * @template StoreType - The specific type of the Redux store.\n *\n * @since 9.1.0\n * @internal\n */\nexport type ExtractStoreActionType<StoreType extends Store> =\n  StoreType extends Store<any, infer ActionType> ? ActionType : never\n\n/**\n * Represents a custom hook that provides access to the Redux store.\n *\n * @template StoreType - The specific type of the Redux store that gets returned.\n *\n * @since 9.1.0\n * @public\n */\nexport interface UseStore<StoreType extends Store> {\n  /**\n   * Returns the Redux store instance.\n   *\n   * @returns The Redux store instance.\n   */\n  (): StoreType\n\n  /**\n   * Returns the Redux store instance with specific state and action types.\n   *\n   * @returns The Redux store with the specified state and action types.\n   *\n   * @template StateType - The specific type of the state used in the store.\n   * @template ActionType - The specific type of the actions used in the store.\n   */\n  <\n    StateType extends ReturnType<StoreType['getState']> = ReturnType<\n      StoreType['getState']\n    >,\n    ActionType extends Action = ExtractStoreActionType<Store>,\n  >(): Store<StateType, ActionType>\n\n  /**\n   * Creates a \"pre-typed\" version of {@linkcode useStore useStore}\n   * where the type of the Redux `store` is predefined.\n   *\n   * This allows you to set the `store` type once, eliminating the need to\n   * specify it with every {@linkcode useStore useStore} call.\n   *\n   * @returns A pre-typed `useStore` with the store type already defined.\n   *\n   * @example\n   * ```ts\n   * export const useAppStore = useStore.withTypes<AppStore>()\n   * ```\n   *\n   * @template OverrideStoreType - The specific type of the Redux store that gets returned.\n   *\n   * @since 9.1.0\n   */\n  withTypes: <\n    OverrideStoreType extends StoreType,\n  >() => UseStore<OverrideStoreType>\n}\n\n/**\n * Hook factory, which creates a `useStore` hook bound to a given context.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useStore` hook bound to the specified context.\n */\nexport function createStoreHook<\n  StateType = unknown,\n  ActionType extends Action = Action,\n>(\n  // @ts-ignore\n  context: Context<ReactReduxContextValue<\n    StateType,\n    ActionType\n  > | null> = ReactReduxContext,\n) {\n  const useReduxContext =\n    context === ReactReduxContext\n      ? useDefaultReduxContext\n      : // @ts-ignore\n        createReduxContextHook(context)\n  const useStore = () => {\n    const { store } = useReduxContext()\n    return store\n  }\n\n  Object.assign(useStore, {\n    withTypes: () => useStore,\n  })\n\n  return useStore as UseStore<Store<StateType, ActionType>>\n}\n\n/**\n * A hook to access the redux store.\n *\n * @returns {any} the redux store\n *\n * @example\n *\n * import React from 'react'\n * import { useStore } from 'react-redux'\n *\n * export const ExampleComponent = () => {\n *   const store = useStore()\n *   return <div>{store.getState()}</div>\n * }\n */\nexport const useStore = /*#__PURE__*/ createStoreHook()\n", "import type { Context } from 'react'\nimport type { Action, Dispatch, UnknownAction } from 'redux'\nimport type { ReactReduxContextValue } from '../components/Context'\nimport { ReactReduxContext } from '../components/Context'\nimport { createStoreHook, useStore as useDefaultStore } from './useStore'\n\n/**\n * Represents a custom hook that provides a dispatch function\n * from the Redux store.\n *\n * @template DispatchType - The specific type of the dispatch function.\n *\n * @since 9.1.0\n * @public\n */\nexport interface UseDispatch<\n  DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,\n> {\n  /**\n   * Returns the dispatch function from the Redux store.\n   *\n   * @returns The dispatch function from the Redux store.\n   *\n   * @template AppDispatch - The specific type of the dispatch function.\n   */\n  <AppDispatch extends DispatchType = DispatchType>(): AppDispatch\n\n  /**\n   * Creates a \"pre-typed\" version of {@linkcode useDispatch useDispatch}\n   * where the type of the `dispatch` function is predefined.\n   *\n   * This allows you to set the `dispatch` type once, eliminating the need to\n   * specify it with every {@linkcode useDispatch useDispatch} call.\n   *\n   * @returns A pre-typed `useDispatch` with the dispatch type already defined.\n   *\n   * @example\n   * ```ts\n   * export const useAppDispatch = useDispatch.withTypes<AppDispatch>()\n   * ```\n   *\n   * @template OverrideDispatchType - The specific type of the dispatch function.\n   *\n   * @since 9.1.0\n   */\n  withTypes: <\n    OverrideDispatchType extends DispatchType,\n  >() => UseDispatch<OverrideDispatchType>\n}\n\n/**\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useDispatch` hook bound to the specified context.\n */\nexport function createDispatchHook<\n  StateType = unknown,\n  ActionType extends Action = UnknownAction,\n>(\n  // @ts-ignore\n  context: Context<ReactReduxContextValue<\n    StateType,\n    ActionType\n  > | null> = ReactReduxContext,\n) {\n  const useStore =\n    context === ReactReduxContext ? useDefaultStore : createStoreHook(context)\n\n  const useDispatch = () => {\n    const store = useStore()\n    return store.dispatch\n  }\n\n  Object.assign(useDispatch, {\n    withTypes: () => useDispatch,\n  })\n\n  return useDispatch as UseDispatch<Dispatch<ActionType>>\n}\n\n/**\n * A hook to access the redux `dispatch` function.\n *\n * @returns {any|function} redux store's `dispatch` function\n *\n * @example\n *\n * import React, { useCallback } from 'react'\n * import { useDispatch } from 'react-redux'\n *\n * export const CounterComponent = ({ value }) => {\n *   const dispatch = useDispatch()\n *   const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\n *   return (\n *     <div>\n *       <span>{value}</span>\n *       <button onClick={increaseCounter}>Increase counter</button>\n *     </div>\n *   )\n * }\n */\nexport const useDispatch = /*#__PURE__*/ createDispatchHook()\n", "//import * as React from 'react'\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js'\nimport type { ReactReduxContextValue } from '../components/Context'\nimport { ReactReduxContext } from '../components/Context'\nimport type { EqualityFn } from '../types'\nimport { React } from '../utils/react'\nimport {\n  createReduxContextHook,\n  useReduxContext as useDefaultReduxContext,\n} from './useReduxContext'\n\n/**\n * The frequency of development mode checks.\n *\n * @since 8.1.0\n * @internal\n */\nexport type DevModeCheckFrequency = 'never' | 'once' | 'always'\n\n/**\n * Represents the configuration for development mode checks.\n *\n * @since 9.0.0\n * @internal\n */\nexport interface DevModeChecks {\n  /**\n   * Overrides the global stability check for the selector.\n   * - `once` - Run only the first time the selector is called.\n   * - `always` - Run every time the selector is called.\n   * - `never` - Never run the stability check.\n   *\n   * @default 'once'\n   *\n   * @since 8.1.0\n   */\n  stabilityCheck: DevModeCheckFrequency\n\n  /**\n   * Overrides the global identity function check for the selector.\n   * - `once` - Run only the first time the selector is called.\n   * - `always` - Run every time the selector is called.\n   * - `never` - Never run the identity function check.\n   *\n   * **Note**: Previously referred to as `noopCheck`.\n   *\n   * @default 'once'\n   *\n   * @since 9.0.0\n   */\n  identityFunctionCheck: DevModeCheckFrequency\n}\n\nexport interface UseSelectorOptions<Selected = unknown> {\n  equalityFn?: EqualityFn<Selected>\n\n  /**\n   * `useSelector` performs additional checks in development mode to help\n   * identify and warn about potential issues in selector behavior. This\n   * option allows you to customize the behavior of these checks per selector.\n   *\n   * @since 9.0.0\n   */\n  devModeChecks?: Partial<DevModeChecks>\n}\n\n/**\n * Represents a custom hook that allows you to extract data from the\n * Redux store state, using a selector function. The selector function\n * takes the current state as an argument and returns a part of the state\n * or some derived data. The hook also supports an optional equality\n * function or options object to customize its behavior.\n *\n * @template StateType - The specific type of state this hook operates on.\n *\n * @public\n */\nexport interface UseSelector<StateType = unknown> {\n  /**\n   * A function that takes a selector function as its first argument.\n   * The selector function is responsible for selecting a part of\n   * the Redux store's state or computing derived data.\n   *\n   * @param selector - A function that receives the current state and returns a part of the state or some derived data.\n   * @param equalityFnOrOptions - An optional equality function or options object for customizing the behavior of the selector.\n   * @returns The selected part of the state or derived data.\n   *\n   * @template TState - The specific type of state this hook operates on.\n   * @template Selected - The type of the value that the selector function will return.\n   */\n  <TState extends StateType = StateType, Selected = unknown>(\n    selector: (state: TState) => Selected,\n    equalityFnOrOptions?: EqualityFn<Selected> | UseSelectorOptions<Selected>,\n  ): Selected\n\n  /**\n   * Creates a \"pre-typed\" version of {@linkcode useSelector useSelector}\n   * where the `state` type is predefined.\n   *\n   * This allows you to set the `state` type once, eliminating the need to\n   * specify it with every {@linkcode useSelector useSelector} call.\n   *\n   * @returns A pre-typed `useSelector` with the state type already defined.\n   *\n   * @example\n   * ```ts\n   * export const useAppSelector = useSelector.withTypes<RootState>()\n   * ```\n   *\n   * @template OverrideStateType - The specific type of state this hook operates on.\n   *\n   * @since 9.1.0\n   */\n  withTypes: <\n    OverrideStateType extends StateType,\n  >() => UseSelector<OverrideStateType>\n}\n\nconst refEquality: EqualityFn<any> = (a, b) => a === b\n\n/**\n * Hook factory, which creates a `useSelector` hook bound to a given context.\n *\n * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.\n * @returns {Function} A `useSelector` hook bound to the specified context.\n */\nexport function createSelectorHook(\n  context: React.Context<ReactReduxContextValue<\n    any,\n    any\n  > | null> = ReactReduxContext,\n): UseSelector {\n  const useReduxContext =\n    context === ReactReduxContext\n      ? useDefaultReduxContext\n      : createReduxContextHook(context)\n\n  const useSelector = <TState, Selected>(\n    selector: (state: TState) => Selected,\n    equalityFnOrOptions:\n      | EqualityFn<NoInfer<Selected>>\n      | UseSelectorOptions<NoInfer<Selected>> = {},\n  ): Selected => {\n    const { equalityFn = refEquality } =\n      typeof equalityFnOrOptions === 'function'\n        ? { equalityFn: equalityFnOrOptions }\n        : equalityFnOrOptions\n    if (process.env.NODE_ENV !== 'production') {\n      if (!selector) {\n        throw new Error(`You must pass a selector to useSelector`)\n      }\n      if (typeof selector !== 'function') {\n        throw new Error(`You must pass a function as a selector to useSelector`)\n      }\n      if (typeof equalityFn !== 'function') {\n        throw new Error(\n          `You must pass a function as an equality function to useSelector`,\n        )\n      }\n    }\n\n    const reduxContext = useReduxContext()\n\n    const { store, subscription, getServerState } = reduxContext\n\n    const firstRun = React.useRef(true)\n\n    const wrappedSelector = React.useCallback<typeof selector>(\n      {\n        [selector.name](state: TState) {\n          const selected = selector(state)\n          if (process.env.NODE_ENV !== 'production') {\n            const { devModeChecks = {} } =\n              typeof equalityFnOrOptions === 'function'\n                ? {}\n                : equalityFnOrOptions\n            const { identityFunctionCheck, stabilityCheck } = reduxContext\n            const {\n              identityFunctionCheck: finalIdentityFunctionCheck,\n              stabilityCheck: finalStabilityCheck,\n            } = {\n              stabilityCheck,\n              identityFunctionCheck,\n              ...devModeChecks,\n            }\n            if (\n              finalStabilityCheck === 'always' ||\n              (finalStabilityCheck === 'once' && firstRun.current)\n            ) {\n              const toCompare = selector(state)\n              if (!equalityFn(selected, toCompare)) {\n                let stack: string | undefined = undefined\n                try {\n                  throw new Error()\n                } catch (e) {\n                  // eslint-disable-next-line no-extra-semi\n                  ;({ stack } = e as Error)\n                }\n                console.warn(\n                  'Selector ' +\n                    (selector.name || 'unknown') +\n                    ' returned a different result when called with the same parameters. This can lead to unnecessary rerenders.' +\n                    '\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization',\n                  {\n                    state,\n                    selected,\n                    selected2: toCompare,\n                    stack,\n                  },\n                )\n              }\n            }\n            if (\n              finalIdentityFunctionCheck === 'always' ||\n              (finalIdentityFunctionCheck === 'once' && firstRun.current)\n            ) {\n              // @ts-ignore\n              if (selected === state) {\n                let stack: string | undefined = undefined\n                try {\n                  throw new Error()\n                } catch (e) {\n                  // eslint-disable-next-line no-extra-semi\n                  ;({ stack } = e as Error)\n                }\n                console.warn(\n                  'Selector ' +\n                    (selector.name || 'unknown') +\n                    ' returned the root state when called. This can lead to unnecessary rerenders.' +\n                    '\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.',\n                  { stack },\n                )\n              }\n            }\n            if (firstRun.current) firstRun.current = false\n          }\n          return selected\n        },\n      }[selector.name],\n      [selector],\n    )\n\n    const selectedState = useSyncExternalStoreWithSelector(\n      subscription.addNestedSub,\n      store.getState,\n      getServerState || store.getState,\n      wrappedSelector,\n      equalityFn,\n    )\n\n    React.useDebugValue(selectedState)\n\n    return selectedState\n  }\n\n  Object.assign(useSelector, {\n    withTypes: () => useSelector,\n  })\n\n  return useSelector as UseSelector\n}\n\n/**\n * A hook to access the redux store's state. This hook takes a selector function\n * as an argument. The selector is called with the store state.\n *\n * This hook takes an optional equality comparison function as the second parameter\n * that allows you to customize the way the selected state is compared to determine\n * whether the component needs to be re-rendered.\n *\n * @param {Function} selector the selector function\n * @param {Function=} equalityFn the function that will be used to determine equality\n *\n * @returns {any} the selected state\n *\n * @example\n *\n * import React from 'react'\n * import { useSelector } from 'react-redux'\n *\n * export const CounterComponent = () => {\n *   const counter = useSelector(state => state.counter)\n *   return <div>{counter}</div>\n * }\n */\nexport const useSelector = /*#__PURE__*/ createSelectorHook()\n", "import { connect, legacy_connect } from './components/connect'\nexport type {\n  Connect,\n  ConnectProps,\n  ConnectedProps,\n} from './components/connect'\n\nimport shallowEqual from './utils/shallowEqual'\n\nimport Provider from './components/Provider'\nimport { defaultNoopBatch } from './utils/batch'\n\nexport { ReactReduxContext } from './components/Context'\nexport type { ReactReduxContextValue } from './components/Context'\n\nexport type { ProviderProps } from './components/Provider'\n\nexport type {\n  MapDispatchToProps,\n  MapDispatchToPropsFactory,\n  MapDispatchToPropsFunction,\n  MapDispatchToPropsNonObject,\n  MapDispatchToPropsParam,\n  MapStateToProps,\n  MapStateToPropsFactory,\n  MapStateToPropsParam,\n  MergeProps,\n  Selector,\n  SelectorFactory,\n} from './connect/selectorFactory'\n\nexport { createDispatchHook, useDispatch } from './hooks/useDispatch'\nexport type { UseDispatch } from './hooks/useDispatch'\n\nexport { createSelectorHook, useSelector } from './hooks/useSelector'\nexport type { UseSelector } from './hooks/useSelector'\n\nexport { createStoreHook, useStore } from './hooks/useStore'\nexport type { UseStore } from './hooks/useStore'\n\nexport type { Subscription } from './utils/Subscription'\n\nexport * from './types'\n\n/**\n * @deprecated As of React 18, batching is enabled by default for ReactDOM and React Native.\n * This is now a no-op that immediately runs the callback.\n */\nconst batch = defaultNoopBatch\n\nexport { Provider, batch, connect, legacy_connect, shallowEqual }\n", "// Global styles are now static (top of src/css/tailwind.css), so the old\n// createGlobalStyle component is a no-op that just renders its children.\n// `theme`/`theme2` are kept as plain objects for import compatibility.\nimport React from \"react\";\n\nexport const GlobalStyle: React.FC<{ children?: React.ReactNode; [k: string]: any }> = ({\n  children,\n}) => <>{children}</>;\n\nexport const theme = { colors: { primary: \"#0070f3\" } };\nexport const theme2 = { colors: { primary: \"black\" } };\n", "// Theme wrapper: styled-components' ThemeProvider is gone. Global styles are\n// static (src/css/tailwind.css -> public/js/client.css, linked in <head>), so\n// the wrapper just passes children through; GlobalStyle stays a no-op mount.\nimport React from \"react\";\nimport { GlobalStyle } from \"@styled/common\";\n\ninterface ThemeProps {\n  children: React.ReactNode\n}\n\nconst Theme = ({ children }: ThemeProps) => {\n  return (\n    <>\n      <GlobalStyle />\n      {children}\n    </>\n  )\n}\n\nexport default Theme\n", "/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nexport function formatProdErrorMessage(code: number) {\n  return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or ` + 'use the non-minified dev environment for full errors. ';\n}", "declare global {\n  interface SymbolConstructor {\n    readonly observable: symbol;\n  }\n}\nconst $$observable = /* #__PURE__ */(() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\nexport default $$observable;", "/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\n\nconst randomString = () => Math.random().toString(36).substring(7).split('').join('.');\nconst ActionTypes = {\n  INIT: `@@redux/INIT${/* #__PURE__ */randomString()}`,\n  REPLACE: `@@redux/REPLACE${/* #__PURE__ */randomString()}`,\n  PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nexport default ActionTypes;", "/**\n * @param obj The object to inspect.\n * @returns True if the argument appears to be a plain object.\n */\nexport default function isPlainObject(obj: any): obj is object {\n  if (typeof obj !== 'object' || obj === null) return false;\n  let proto = obj;\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n  return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}", "// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of\nexport function miniKindOf(val: any): string {\n  if (val === void 0) return 'undefined';\n  if (val === null) return 'null';\n  const type = typeof val;\n  switch (type) {\n    case 'boolean':\n    case 'string':\n    case 'number':\n    case 'symbol':\n    case 'function':\n      {\n        return type;\n      }\n  }\n  if (Array.isArray(val)) return 'array';\n  if (isDate(val)) return 'date';\n  if (isError(val)) return 'error';\n  const constructorName = ctorName(val);\n  switch (constructorName) {\n    case 'Symbol':\n    case 'Promise':\n    case 'WeakMap':\n    case 'WeakSet':\n    case 'Map':\n    case 'Set':\n      return constructorName;\n  }\n\n  // other\n  return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, '');\n}\nfunction ctorName(val: any): string | null {\n  return typeof val.constructor === 'function' ? val.constructor.name : null;\n}\nfunction isError(val: any) {\n  return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';\n}\nfunction isDate(val: any) {\n  if (val instanceof Date) return true;\n  return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';\n}\nexport function kindOf(val: any) {\n  let typeOfVal: string = typeof val;\n  if (process.env.NODE_ENV !== 'production') {\n    typeOfVal = miniKindOf(val);\n  }\n  return typeOfVal;\n}", "import { formatProdErrorMessage as _formatProdErrorMessage13 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage12 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage11 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage10 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage9 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage8 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage7 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage6 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage5 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage4 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage3 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage2 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage } from \"src/utils/formatProdErrorMessage\";\nimport $$observable from './utils/symbol-observable';\nimport { Store, StoreEnhancer, Dispatch, Observer, ListenerCallback, UnknownIfNonSpecific } from './types/store';\nimport { Action } from './types/actions';\nimport { Reducer } from './types/reducers';\nimport ActionTypes from './utils/actionTypes';\nimport isPlainObject from './utils/isPlainObject';\nimport { kindOf } from './utils/kindOf';\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from 'redux'`\n *\n */\nexport function createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from 'redux'`\n *\n */\nexport function createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;\nexport function createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | StoreEnhancer<Ext, StateExt> | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext {\n  if (typeof reducer !== 'function') {\n    throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);\n  }\n  if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n    throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage2(0) : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');\n  }\n  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n    enhancer = (preloadedState as StoreEnhancer<Ext, StateExt>);\n    preloadedState = undefined;\n  }\n  if (typeof enhancer !== 'undefined') {\n    if (typeof enhancer !== 'function') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage3(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);\n    }\n    return enhancer(createStore)(reducer, (preloadedState as PreloadedState | undefined));\n  }\n  let currentReducer = reducer;\n  let currentState: S | PreloadedState | undefined = (preloadedState as PreloadedState | undefined);\n  let currentListeners: Map<number, ListenerCallback> | null = new Map();\n  let nextListeners = currentListeners;\n  let listenerIdCounter = 0;\n  let isDispatching = false;\n\n  /**\n   * This makes a shallow copy of currentListeners so we can use\n   * nextListeners as a temporary list while dispatching.\n   *\n   * This prevents any bugs around consumers calling\n   * subscribe/unsubscribe in the middle of a dispatch.\n   */\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = new Map();\n      currentListeners.forEach((listener, key) => {\n        nextListeners.set(key, listener);\n      });\n    }\n  }\n\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns The current state tree of your application.\n   */\n  function getState(): S {\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage4(3) : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n    }\n    return (currentState as S);\n  }\n\n  /**\n   * Adds a change listener. It will be called any time an action is dispatched,\n   * and some part of the state tree may potentially have changed. You may then\n   * call `getState()` to read the current state tree inside the callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked, this\n   * will not have any effect on the `dispatch()` that is currently in progress.\n   * However, the next `dispatch()` call, whether nested or not, will use a more\n   * recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all state changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param listener A callback to be invoked on every dispatch.\n   * @returns A function to remove this change listener.\n   */\n  function subscribe(listener: () => void) {\n    if (typeof listener !== 'function') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage5(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);\n    }\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage6(5) : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');\n    }\n    let isSubscribed = true;\n    ensureCanMutateNextListeners();\n    const listenerId = listenerIdCounter++;\n    nextListeners.set(listenerId, listener);\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n      if (isDispatching) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage7(6) : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');\n      }\n      isSubscribed = false;\n      ensureCanMutateNextListeners();\n      nextListeners.delete(listenerId);\n      currentListeners = null;\n    };\n  }\n\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will\n   * be considered the **next** state of the tree, and the change listeners\n   * will be notified.\n   *\n   * The base implementation only supports plain object actions. If you want to\n   * dispatch a Promise, an Observable, a thunk, or something else, you need to\n   * wrap your store creating function into the corresponding middleware. For\n   * example, see the documentation for the `redux-thunk` package. Even the\n   * middleware will eventually dispatch plain object actions using this method.\n   *\n   * @param action A plain object representing “what changed”. It is\n   * a good idea to keep actions serializable so you can record and replay user\n   * sessions, or use the time travelling `redux-devtools`. An action must have\n   * a `type` property which may not be `undefined`. It is a good idea to use\n   * string constants for action types.\n   *\n   * @returns For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n  function dispatch(action: A) {\n    if (!isPlainObject(action)) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage8(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);\n    }\n    if (typeof action.type === 'undefined') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage9(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n    }\n    if (typeof action.type !== 'string') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage10(17) : `Action \"type\" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);\n    }\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage11(9) : 'Reducers may not dispatch actions.');\n    }\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n    const listeners = currentListeners = nextListeners;\n    listeners.forEach(listener => {\n      listener();\n    });\n    return action;\n  }\n\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param nextReducer The reducer for the store to use instead.\n   */\n  function replaceReducer(nextReducer: Reducer<S, A>): void {\n    if (typeof nextReducer !== 'function') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage12(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);\n    }\n    currentReducer = ((nextReducer as unknown) as Reducer<S, A, PreloadedState>);\n\n    // This action has a similar effect to ActionTypes.INIT.\n    // Any reducers that existed in both the new and old rootReducer\n    // will receive the previous state. This effectively populates\n    // the new state tree with any relevant data from the old one.\n    dispatch(({\n      type: ActionTypes.REPLACE\n    } as A));\n  }\n\n  /**\n   * Interoperability point for observable/reactive libraries.\n   * @returns A minimal observable of state changes.\n   * For more information, see the observable proposal:\n   * https://github.com/tc39/proposal-observable\n   */\n  function observable() {\n    const outerSubscribe = subscribe;\n    return {\n      /**\n       * The minimal observable subscription method.\n       * @param observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe(observer: unknown) {\n        if (typeof observer !== 'object' || observer === null) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage13(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);\n        }\n        function observeState() {\n          const observerAsObserver = (observer as Observer<S>);\n          if (observerAsObserver.next) {\n            observerAsObserver.next(getState());\n          }\n        }\n        observeState();\n        const unsubscribe = outerSubscribe(observeState);\n        return {\n          unsubscribe\n        };\n      },\n      [$$observable]() {\n        return this;\n      }\n    };\n  }\n\n  // When a store is created, an \"INIT\" action is dispatched so that every\n  // reducer returns their initial state. This effectively populates\n  // the initial state tree.\n  dispatch(({\n    type: ActionTypes.INIT\n  } as A));\n  const store = (({\n    dispatch: (dispatch as Dispatch<A>),\n    subscribe,\n    getState,\n    replaceReducer,\n    [$$observable]: observable\n  } as unknown) as Store<S, A, StateExt> & Ext);\n  return store;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nexport function legacy_createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nexport function legacy_createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;\nexport function legacy_createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A>, preloadedState?: PreloadedState | StoreEnhancer<Ext, StateExt> | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext {\n  return createStore(reducer, (preloadedState as any), enhancer);\n}", "/**\n * Prints a warning in the console if it exists.\n *\n * @param message The warning message.\n */\nexport default function warning(message: string): void {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n  } catch (e) {} // eslint-disable-line no-empty\n}", "import { formatProdErrorMessage as _formatProdErrorMessage3 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage2 } from \"src/utils/formatProdErrorMessage\";\nimport { formatProdErrorMessage as _formatProdErrorMessage } from \"src/utils/formatProdErrorMessage\";\nimport { Action } from './types/actions';\nimport { ActionFromReducersMapObject, PreloadedStateShapeFromReducersMapObject, Reducer, StateFromReducersMapObject } from './types/reducers';\nimport ActionTypes from './utils/actionTypes';\nimport isPlainObject from './utils/isPlainObject';\nimport warning from './utils/warning';\nimport { kindOf } from './utils/kindOf';\nfunction getUnexpectedStateShapeWarningMessage(inputState: object, reducers: {\n  [key: string]: Reducer<any, any, any>;\n}, action: Action, unexpectedKeyCache: {\n  [key: string]: true;\n}) {\n  const reducerKeys = Object.keys(reducers);\n  const argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n  if (reducerKeys.length === 0) {\n    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n  }\n  if (!isPlainObject(inputState)) {\n    return `The ${argumentName} has unexpected type of \"${kindOf(inputState)}\". Expected argument to be an object with the following ` + `keys: \"${reducerKeys.join('\", \"')}\"`;\n  }\n  const unexpectedKeys = Object.keys(inputState).filter(key => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);\n  unexpectedKeys.forEach(key => {\n    unexpectedKeyCache[key] = true;\n  });\n  if (action && action.type === ActionTypes.REPLACE) return;\n  if (unexpectedKeys.length > 0) {\n    return `Unexpected ${unexpectedKeys.length > 1 ? 'keys' : 'key'} ` + `\"${unexpectedKeys.join('\", \"')}\" found in ${argumentName}. ` + `Expected to find one of the known reducer keys instead: ` + `\"${reducerKeys.join('\", \"')}\". Unexpected keys will be ignored.`;\n  }\n}\nfunction assertReducerShape(reducers: {\n  [key: string]: Reducer<any, any, any>;\n}) {\n  Object.keys(reducers).forEach(key => {\n    const reducer = reducers[key];\n    const initialState = reducer(undefined, {\n      type: ActionTypes.INIT\n    });\n    if (typeof initialState === 'undefined') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage(12) : `The slice reducer for key \"${key}\" returned undefined during initialization. ` + `If the state passed to the reducer is undefined, you must ` + `explicitly return the initial state. The initial state may ` + `not be undefined. If you don't want to set a value for this reducer, ` + `you can use null instead of undefined.`);\n    }\n    if (typeof reducer(undefined, {\n      type: ActionTypes.PROBE_UNKNOWN_ACTION()\n    }) === 'undefined') {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage2(13) : `The slice reducer for key \"${key}\" returned undefined when probed with a random type. ` + `Don't try to handle '${ActionTypes.INIT}' or other actions in \"redux/*\" ` + `namespace. They are considered private. Instead, you must return the ` + `current state for any unknown actions, unless it is undefined, ` + `in which case you must return the initial state, regardless of the ` + `action type. The initial state may not be undefined, but can be null.`);\n    }\n  });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @template S Combined state object type.\n *\n * @param reducers An object whose values correspond to different reducer\n *   functions that need to be combined into one. One handy way to obtain it\n *   is to use `import * as reducers` syntax. The reducers may never\n *   return undefined for any action. Instead, they should return their\n *   initial state if the state passed to them was undefined, and the current\n *   state for any unrecognized action.\n *\n * @returns A reducer function that invokes every reducer inside the passed\n *   object, and builds a state object with the same shape.\n */\nexport default function combineReducers<M>(reducers: M): M[keyof M] extends Reducer<any, any, any> | undefined ? Reducer<StateFromReducersMapObject<M>, ActionFromReducersMapObject<M>, Partial<PreloadedStateShapeFromReducersMapObject<M>>> : never;\nexport default function combineReducers(reducers: {\n  [key: string]: Reducer<any, any, any>;\n}) {\n  const reducerKeys = Object.keys(reducers);\n  const finalReducers: {\n    [key: string]: Reducer<any, any, any>;\n  } = {};\n  for (let i = 0; i < reducerKeys.length; i++) {\n    const key = reducerKeys[i];\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof reducers[key] === 'undefined') {\n        warning(`No reducer provided for key \"${key}\"`);\n      }\n    }\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n  const finalReducerKeys = Object.keys(finalReducers);\n\n  // This is used to make sure we don't warn about the same\n  // keys multiple times.\n  let unexpectedKeyCache: {\n    [key: string]: true;\n  };\n  if (process.env.NODE_ENV !== 'production') {\n    unexpectedKeyCache = {};\n  }\n  let shapeAssertionError: unknown;\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n  return function combination(state: StateFromReducersMapObject<typeof reducers> = {}, action: Action) {\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n    if (process.env.NODE_ENV !== 'production') {\n      const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n    let hasChanged = false;\n    const nextState: StateFromReducersMapObject<typeof reducers> = {};\n    for (let i = 0; i < finalReducerKeys.length; i++) {\n      const key = finalReducerKeys[i];\n      const reducer = finalReducers[key];\n      const previousStateForKey = state[key];\n      const nextStateForKey = reducer(previousStateForKey, action);\n      if (typeof nextStateForKey === 'undefined') {\n        const actionType = action && action.type;\n        throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage3(14) : `When called with an action of type ${actionType ? `\"${String(actionType)}\"` : '(unknown type)'}, the slice reducer for key \"${key}\" returned undefined. ` + `To ignore an action, you must explicitly return the previous state. ` + `If you want this reducer to hold no value, you can return null instead of undefined.`);\n      }\n      nextState[key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n    hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n    return hasChanged ? nextState : state;\n  };\n}", "import { formatProdErrorMessage as _formatProdErrorMessage } from \"src/utils/formatProdErrorMessage\";\nimport { Dispatch } from './types/store';\nimport { ActionCreator, ActionCreatorsMapObject, Action } from './types/actions';\nimport { kindOf } from './utils/kindOf';\nfunction bindActionCreator<A extends Action>(actionCreator: ActionCreator<A>, dispatch: Dispatch<A>) {\n  return function (this: any, ...args: any[]) {\n    return dispatch(actionCreator.apply(this, args));\n  };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use `import * as`\n * syntax. You may also pass a single function.\n *\n * @param dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators<A, C extends ActionCreator<A>>(actionCreator: C, dispatch: Dispatch): C;\nexport default function bindActionCreators<A extends ActionCreator<any>, B extends ActionCreator<any>>(actionCreator: A, dispatch: Dispatch): B;\nexport default function bindActionCreators<A, M extends ActionCreatorsMapObject<A>>(actionCreators: M, dispatch: Dispatch): M;\nexport default function bindActionCreators<M extends ActionCreatorsMapObject, N extends ActionCreatorsMapObject>(actionCreators: M, dispatch: Dispatch): N;\nexport default function bindActionCreators(actionCreators: ActionCreator<any> | ActionCreatorsMapObject, dispatch: Dispatch) {\n  if (typeof actionCreators === 'function') {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n  if (typeof actionCreators !== 'object' || actionCreators === null) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage(16) : `bindActionCreators expected an object or a function, but instead received: '${kindOf(actionCreators)}'. ` + `Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?`);\n  }\n  const boundActionCreators: ActionCreatorsMapObject = {};\n  for (const key in actionCreators) {\n    const actionCreator = actionCreators[key];\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n  return boundActionCreators;\n}", "type Func<T extends any[], R> = (...a: T) => R;\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for the\n * resulting composite function.\n *\n * @param funcs The functions to compose.\n * @returns A function obtained by composing the argument functions from right\n *   to left. For example, `compose(f, g, h)` is identical to doing\n *   `(...args) => f(g(h(...args)))`.\n */\nexport default function compose(): <R>(a: R) => R;\nexport default function compose<F extends Function>(f: F): F;\n\n/* two functions */\nexport default function compose<A, T extends any[], R>(f1: (a: A) => R, f2: Func<T, A>): Func<T, R>;\n\n/* three functions */\nexport default function compose<A, B, T extends any[], R>(f1: (b: B) => R, f2: (a: A) => B, f3: Func<T, A>): Func<T, R>;\n\n/* four functions */\nexport default function compose<A, B, C, T extends any[], R>(f1: (c: C) => R, f2: (b: B) => C, f3: (a: A) => B, f4: Func<T, A>): Func<T, R>;\n\n/* rest */\nexport default function compose<R>(f1: (a: any) => R, ...funcs: Function[]): (...args: any[]) => R;\nexport default function compose<R>(...funcs: Function[]): (...args: any[]) => R;\nexport default function compose(...funcs: Function[]) {\n  if (funcs.length === 0) {\n    // infer the argument type so it is usable in inference down the line\n    return <T,>(arg: T) => arg;\n  }\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n  return funcs.reduce((a, b) => (...args: any) => a(b(...args)));\n}", "import { formatProdErrorMessage as _formatProdErrorMessage } from \"src/utils/formatProdErrorMessage\";\nimport compose from './compose';\nimport { Middleware, MiddlewareAPI } from './types/middleware';\nimport { StoreEnhancer, Dispatch } from './types/store';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param middlewares The middleware chain to be applied.\n * @returns A store enhancer applying the middleware.\n *\n * @template Ext Dispatch signature added by a middleware.\n * @template S The type of the state supported by a middleware.\n */\nexport default function applyMiddleware(): StoreEnhancer;\nexport default function applyMiddleware<Ext1, S>(middleware1: Middleware<Ext1, S, any>): StoreEnhancer<{\n  dispatch: Ext1;\n}>;\nexport default function applyMiddleware<Ext1, Ext2, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>): StoreEnhancer<{\n  dispatch: Ext1 & Ext2;\n}>;\nexport default function applyMiddleware<Ext1, Ext2, Ext3, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>): StoreEnhancer<{\n  dispatch: Ext1 & Ext2 & Ext3;\n}>;\nexport default function applyMiddleware<Ext1, Ext2, Ext3, Ext4, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>, middleware4: Middleware<Ext4, S, any>): StoreEnhancer<{\n  dispatch: Ext1 & Ext2 & Ext3 & Ext4;\n}>;\nexport default function applyMiddleware<Ext1, Ext2, Ext3, Ext4, Ext5, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>, middleware4: Middleware<Ext4, S, any>, middleware5: Middleware<Ext5, S, any>): StoreEnhancer<{\n  dispatch: Ext1 & Ext2 & Ext3 & Ext4 & Ext5;\n}>;\nexport default function applyMiddleware<Ext, S = any>(...middlewares: Middleware<any, S, any>[]): StoreEnhancer<{\n  dispatch: Ext;\n}>;\nexport default function applyMiddleware(...middlewares: Middleware[]): StoreEnhancer<any> {\n  return createStore => (reducer, preloadedState) => {\n    const store = createStore(reducer, preloadedState);\n    let dispatch: Dispatch = () => {\n      throw new Error(process.env.NODE_ENV === \"production\" ? _formatProdErrorMessage(15) : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n    };\n    const middlewareAPI: MiddlewareAPI = {\n      getState: store.getState,\n      dispatch: (action, ...args) => dispatch(action, ...args)\n    };\n    const chain = middlewares.map(middleware => middleware(middlewareAPI));\n    dispatch = compose<typeof dispatch>(...chain)(store.dispatch);\n    return {\n      ...store,\n      dispatch\n    };\n  };\n}", "import { Action } from '../types/actions';\nimport isPlainObject from './isPlainObject';\nexport default function isAction(action: unknown): action is Action<string> {\n  return isPlainObject(action) && 'type' in action && typeof (action as Record<'type', unknown>).type === 'string';\n}", "// src/index.ts\nfunction createThunkMiddleware(extraArgument) {\n  const middleware = ({ dispatch, getState }) => (next) => (action) => {\n    if (typeof action === \"function\") {\n      return action(dispatch, getState, extraArgument);\n    }\n    return next(action);\n  };\n  return middleware;\n}\nvar thunk = createThunkMiddleware();\nvar withExtraArgument = createThunkMiddleware;\nexport {\n  thunk,\n  withExtraArgument\n};\n", "import { current, isDraft } from './immerImports'\nimport { createSelectorCreator, weakMapMemoize } from './reselectImports'\n\nexport const createDraftSafeSelectorCreator: typeof createSelectorCreator = (\n  ...args: unknown[]\n) => {\n  const createSelector = (createSelectorCreator as any)(...args)\n  const createDraftSafeSelector = Object.assign(\n    (...args: unknown[]) => {\n      const selector = createSelector(...args)\n      const wrappedSelector = (value: unknown, ...rest: unknown[]) =>\n        selector(isDraft(value) ? current(value) : value, ...rest)\n      Object.assign(wrappedSelector, selector)\n      return wrappedSelector as any\n    },\n    { withTypes: () => createDraftSafeSelector },\n  )\n  return createDraftSafeSelector\n}\n\n/**\n * \"Draft-Safe\" version of `reselect`'s `createSelector`:\n * If an `immer`-drafted object is passed into the resulting selector's first argument,\n * the selector will act on the current draft value, instead of returning a cached value\n * that might be possibly outdated if the draft has been modified since.\n * @public\n */\nexport const createDraftSafeSelector =\n  /* @__PURE__ */\n  createDraftSafeSelectorCreator(weakMapMemoize)\n", "import type { Action, ActionCreator, StoreEnhancer } from 'redux'\nimport { compose } from './reduxImports'\n\n/**\n * @public\n */\nexport interface DevToolsEnhancerOptions {\n  /**\n   * the instance name to be showed on the monitor page. Default value is `document.title`.\n   * If not specified and there's no document title, it will consist of `tabId` and `instanceId`.\n   */\n  name?: string\n  /**\n   * action creators functions to be available in the Dispatcher.\n   */\n  actionCreators?: ActionCreator<any>[] | { [key: string]: ActionCreator<any> }\n  /**\n   * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once.\n   * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly.\n   * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value).\n   *\n   * @default 500 ms.\n   */\n  latency?: number\n  /**\n   * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance.\n   *\n   * @default 50\n   */\n  maxAge?: number\n  /**\n   * Customizes how actions and state are serialized and deserialized. Can be a boolean or object. If given a boolean, the behavior is the same as if you\n   * were to pass an object and specify `options` as a boolean. Giving an object allows fine-grained customization using the `replacer` and `reviver`\n   * functions.\n   */\n  serialize?:\n    | boolean\n    | {\n        /**\n         * - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode).\n         * - `false` - will handle also circular references.\n         * - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions.\n         * - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys.\n         *   For each of them you can indicate if to include (by setting as `true`).\n         *   For `function` key you can also specify a custom function which handles serialization.\n         *   See [`jsan`](https://github.com/kolodny/jsan) for more details.\n         */\n        options?:\n          | undefined\n          | boolean\n          | {\n              date?: true\n              regex?: true\n              undefined?: true\n              error?: true\n              symbol?: true\n              map?: true\n              set?: true\n              function?: true | ((fn: (...args: any[]) => any) => string)\n            }\n        /**\n         * [JSON replacer function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) used for both actions and states stringify.\n         * In addition, you can specify a data type by adding a [`__serializedType__`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/helpers/index.js#L4)\n         * key. So you can deserialize it back while importing or persisting data.\n         * Moreover, it will also [show a nice preview showing the provided custom type](https://cloud.githubusercontent.com/assets/7957859/21814330/a17d556a-d761-11e6-85ef-159dd12f36c5.png):\n         */\n        replacer?: (key: string, value: unknown) => any\n        /**\n         * [JSON `reviver` function](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter)\n         * used for parsing the imported actions and states. See [`remotedev-serialize`](https://github.com/zalmoxisus/remotedev-serialize/blob/master/immutable/serialize.js#L8-L41)\n         * as an example on how to serialize special data types and get them back.\n         */\n        reviver?: (key: string, value: unknown) => any\n        /**\n         * Automatically serialize/deserialize immutablejs via [remotedev-serialize](https://github.com/zalmoxisus/remotedev-serialize).\n         * Just pass the Immutable library. It will support all ImmutableJS structures. You can even export them into a file and get them back.\n         * The only exception is `Record` class, for which you should pass this in addition the references to your classes in `refs`.\n         */\n        immutable?: any\n        /**\n         * ImmutableJS `Record` classes used to make possible restore its instances back when importing, persisting...\n         */\n        refs?: any\n      }\n  /**\n   * function which takes `action` object and id number as arguments, and should return `action` object back.\n   */\n  actionSanitizer?: <A extends Action>(action: A, id: number) => A\n  /**\n   * function which takes `state` object and index as arguments, and should return `state` object back.\n   */\n  stateSanitizer?: <S>(state: S, index: number) => S\n  /**\n   * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\n   * If `actionsAllowlist` specified, `actionsDenylist` is ignored.\n   */\n  actionsDenylist?: string | string[]\n  /**\n   * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).\n   * If `actionsAllowlist` specified, `actionsDenylist` is ignored.\n   */\n  actionsAllowlist?: string | string[]\n  /**\n   * called for every action before sending, takes `state` and `action` object, and returns `true` in case it allows sending the current data to the monitor.\n   * Use it as a more advanced version of `actionsDenylist`/`actionsAllowlist` parameters.\n   */\n  predicate?: <S, A extends Action>(state: S, action: A) => boolean\n  /**\n   * if specified as `false`, it will not record the changes till clicking on `Start recording` button.\n   * Available only for Redux enhancer, for others use `autoPause`.\n   *\n   * @default true\n   */\n  shouldRecordChanges?: boolean\n  /**\n   * if specified, whenever clicking on `Pause recording` button and there are actions in the history log, will add this action type.\n   * If not specified, will commit when paused. Available only for Redux enhancer.\n   *\n   * @default \"@@PAUSED\"\"\n   */\n  pauseActionType?: string\n  /**\n   * auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\n   * Not available for Redux enhancer (as it already does it but storing the data to be sent).\n   *\n   * @default false\n   */\n  autoPause?: boolean\n  /**\n   * if specified as `true`, it will not allow any non-monitor actions to be dispatched till clicking on `Unlock changes` button.\n   * Available only for Redux enhancer.\n   *\n   * @default false\n   */\n  shouldStartLocked?: boolean\n  /**\n   * if set to `false`, will not recompute the states on hot reloading (or on replacing the reducers). Available only for Redux enhancer.\n   *\n   * @default true\n   */\n  shouldHotReload?: boolean\n  /**\n   * if specified as `true`, whenever there's an exception in reducers, the monitors will show the error message, and next actions will not be dispatched.\n   *\n   * @default false\n   */\n  shouldCatchErrors?: boolean\n  /**\n   * If you want to restrict the extension, specify the features you allow.\n   * If not specified, all of the features are enabled. When set as an object, only those included as `true` will be allowed.\n   * Note that except `true`/`false`, `import` and `export` can be set as `custom` (which is by default for Redux enhancer), meaning that the importing/exporting occurs on the client side.\n   * Otherwise, you'll get/set the data right from the monitor part.\n   */\n  features?: {\n    /**\n     * start/pause recording of dispatched actions\n     */\n    pause?: boolean\n    /**\n     * lock/unlock dispatching actions and side effects\n     */\n    lock?: boolean\n    /**\n     * persist states on page reloading\n     */\n    persist?: boolean\n    /**\n     * export history of actions in a file\n     */\n    export?: boolean | 'custom'\n    /**\n     * import history of actions from a file\n     */\n    import?: boolean | 'custom'\n    /**\n     * jump back and forth (time traveling)\n     */\n    jump?: boolean\n    /**\n     * skip (cancel) actions\n     */\n    skip?: boolean\n    /**\n     * drag and drop actions in the history list\n     */\n    reorder?: boolean\n    /**\n     * dispatch custom actions or action creators\n     */\n    dispatch?: boolean\n    /**\n     * generate tests for the selected actions\n     */\n    test?: boolean\n  }\n  /**\n   * Set to true or a stacktrace-returning function to record call stack traces for dispatched actions.\n   * Defaults to false.\n   */\n  trace?: boolean | (<A extends Action>(action: A) => string)\n  /**\n   * The maximum number of stack trace entries to record per action. Defaults to 10.\n   */\n  traceLimit?: number\n}\n\ntype Compose = typeof compose\n\ninterface ComposeWithDevTools {\n  (options: DevToolsEnhancerOptions): Compose\n  <StoreExt extends {}>(\n    ...funcs: StoreEnhancer<StoreExt>[]\n  ): StoreEnhancer<StoreExt>\n}\n\n/**\n * @public\n */\nexport const composeWithDevTools: ComposeWithDevTools =\n  typeof window !== 'undefined' &&\n  (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\n    ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\n    : function () {\n        if (arguments.length === 0) return undefined\n        if (typeof arguments[0] === 'object') return compose\n        return compose.apply(null, arguments as any as Function[])\n      }\n\n/**\n * @public\n */\nexport const devToolsEnhancer: {\n  (options: DevToolsEnhancerOptions): StoreEnhancer<any>\n} =\n  typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__\n    ? (window as any).__REDUX_DEVTOOLS_EXTENSION__\n    : function () {\n        return function (noop) {\n          return noop\n        }\n      }\n", "import type { Middleware, StoreEnhancer } from 'redux'\nimport type { Tuple } from './utils'\n\nexport function safeAssign<T extends object>(\n  target: T,\n  ...args: Array<Partial<NoInfer<T>>>\n) {\n  Object.assign(target, ...args)\n}\n\n/**\n * return True if T is `any`, otherwise return False\n * taken from https://github.com/joonhocho/tsdef\n *\n * @internal\n */\nexport type IsAny<T, True, False = never> =\n  // test if we are going the left AND right path in the condition\n  true | false extends (T extends never ? true : false) ? True : False\n\nexport type CastAny<T, CastTo> = IsAny<T, CastTo, T>\n\n/**\n * return True if T is `unknown`, otherwise return False\n * taken from https://github.com/joonhocho/tsdef\n *\n * @internal\n */\nexport type IsUnknown<T, True, False = never> = unknown extends T\n  ? IsAny<T, False, True>\n  : False\n\nexport type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>\n\n/**\n * @internal\n */\nexport type IfMaybeUndefined<P, True, False> = [undefined] extends [P]\n  ? True\n  : False\n\n/**\n * @internal\n */\nexport type IfVoid<P, True, False> = [void] extends [P] ? True : False\n\n/**\n * @internal\n */\nexport type IsEmptyObj<T, True, False = never> = T extends any\n  ? keyof T extends never\n    ? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>\n    : False\n  : never\n\n/**\n * returns True if TS version is above 3.5, False if below.\n * uses feature detection to detect TS version >= 3.5\n * * versions below 3.5 will return `{}` for unresolvable interference\n * * versions above will return `unknown`\n *\n * @internal\n */\nexport type AtLeastTS35<True, False> = [True, False][IsUnknown<\n  ReturnType<<T>() => T>,\n  0,\n  1\n>]\n\n/**\n * @internal\n */\nexport type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<\n  IsUnknown<T, True, False>,\n  IsEmptyObj<T, True, IsUnknown<T, True, False>>\n>\n\n/**\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\n */\nexport type UnionToIntersection<U> = (\n  U extends any ? (k: U) => void : never\n) extends (k: infer I) => void\n  ? I\n  : never\n\n// Appears to have a convenient side effect of ignoring `never` even if that's not what you specified\nexport type ExcludeFromTuple<T, E, Acc extends unknown[] = []> = T extends [\n  infer Head,\n  ...infer Tail,\n]\n  ? ExcludeFromTuple<Tail, E, [...Acc, ...([Head] extends [E] ? [] : [Head])]>\n  : Acc\n\ntype ExtractDispatchFromMiddlewareTuple<\n  MiddlewareTuple extends readonly any[],\n  Acc extends {},\n> = MiddlewareTuple extends [infer Head, ...infer Tail]\n  ? ExtractDispatchFromMiddlewareTuple<\n      Tail,\n      Acc & (Head extends Middleware<infer D> ? IsAny<D, {}, D> : {})\n    >\n  : Acc\n\nexport type ExtractDispatchExtensions<M> =\n  M extends Tuple<infer MiddlewareTuple>\n    ? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}>\n    : M extends ReadonlyArray<Middleware>\n      ? ExtractDispatchFromMiddlewareTuple<[...M], {}>\n      : never\n\ntype ExtractStoreExtensionsFromEnhancerTuple<\n  EnhancerTuple extends readonly any[],\n  Acc extends {},\n> = EnhancerTuple extends [infer Head, ...infer Tail]\n  ? ExtractStoreExtensionsFromEnhancerTuple<\n      Tail,\n      Acc & (Head extends StoreEnhancer<infer Ext> ? IsAny<Ext, {}, Ext> : {})\n    >\n  : Acc\n\nexport type ExtractStoreExtensions<E> =\n  E extends Tuple<infer EnhancerTuple>\n    ? ExtractStoreExtensionsFromEnhancerTuple<EnhancerTuple, {}>\n    : E extends ReadonlyArray<StoreEnhancer>\n      ? UnionToIntersection<\n          E[number] extends StoreEnhancer<infer Ext>\n            ? Ext extends {}\n              ? IsAny<Ext, {}, Ext>\n              : {}\n            : {}\n        >\n      : never\n\ntype ExtractStateExtensionsFromEnhancerTuple<\n  EnhancerTuple extends readonly any[],\n  Acc extends {},\n> = EnhancerTuple extends [infer Head, ...infer Tail]\n  ? ExtractStateExtensionsFromEnhancerTuple<\n      Tail,\n      Acc &\n        (Head extends StoreEnhancer<any, infer StateExt>\n          ? IsAny<StateExt, {}, StateExt>\n          : {})\n    >\n  : Acc\n\nexport type ExtractStateExtensions<E> =\n  E extends Tuple<infer EnhancerTuple>\n    ? ExtractStateExtensionsFromEnhancerTuple<EnhancerTuple, {}>\n    : E extends ReadonlyArray<StoreEnhancer>\n      ? UnionToIntersection<\n          E[number] extends StoreEnhancer<any, infer StateExt>\n            ? StateExt extends {}\n              ? IsAny<StateExt, {}, StateExt>\n              : {}\n            : {}\n        >\n      : never\n\nexport type NonUndefined<T> = T extends undefined ? never : T\n\nexport type WithRequiredProp<T, K extends keyof T> = Omit<T, K> &\n  Required<Pick<T, K>>\n\nexport type WithOptionalProp<T, K extends keyof T> = Omit<T, K> &\n  Partial<Pick<T, K>>\n\nexport interface TypeGuard<T> {\n  (value: any): value is T\n}\n\nexport interface HasMatchFunction<T> {\n  match: TypeGuard<T>\n}\n\nexport const hasMatchFunction = <T>(\n  v: Matcher<T>,\n): v is HasMatchFunction<T> => {\n  return v && typeof (v as HasMatchFunction<T>).match === 'function'\n}\n\n/** @public */\nexport type Matcher<T> = HasMatchFunction<T> | TypeGuard<T>\n\n/** @public */\nexport type ActionFromMatcher<M extends Matcher<any>> =\n  M extends Matcher<infer T> ? T : never\n\nexport type Id<T> = { [K in keyof T]: T[K] } & {}\n\nexport type Tail<T extends any[]> = T extends [any, ...infer Tail]\n  ? Tail\n  : never\n\nexport type UnknownIfNonSpecific<T> = {} extends T ? unknown : T\n\n/**\n * A Promise that will never reject.\n * @see https://github.com/reduxjs/redux-toolkit/issues/4101\n */\nexport type SafePromise<T> = Promise<T> & {\n  __linterBrands: 'SafePromise'\n}\n\n/**\n * Properly wraps a Promise as a {@link SafePromise} with .catch(fallback).\n */\nexport function asSafePromise<Resolved, Rejected>(\n  promise: Promise<Resolved>,\n  fallback: (error: unknown) => Rejected,\n) {\n  return promise.catch(fallback) as SafePromise<Resolved | Rejected>\n}\n", "import { isAction } from './reduxImports'\nimport type {\n  IsUnknownOrNonInferrable,\n  IfMaybeUndefined,\n  IfVoid,\n  IsAny,\n} from './tsHelpers'\nimport { hasMatchFunction } from './tsHelpers'\n\n/**\n * An action with a string type and an associated payload. This is the\n * type of action returned by `createAction()` action creators.\n *\n * @template P The type of the action's payload.\n * @template T the type used for the action type.\n * @template M The type of the action's meta (optional)\n * @template E The type of the action's error (optional)\n *\n * @public\n */\nexport type PayloadAction<\n  P = void,\n  T extends string = string,\n  M = never,\n  E = never,\n> = {\n  payload: P\n  type: T\n} & ([M] extends [never]\n  ? {}\n  : {\n      meta: M\n    }) &\n  ([E] extends [never]\n    ? {}\n    : {\n        error: E\n      })\n\n/**\n * A \"prepare\" method to be used as the second parameter of `createAction`.\n * Takes any number of arguments and returns a Flux Standard Action without\n * type (will be added later) that *must* contain a payload (might be undefined).\n *\n * @public\n */\nexport type PrepareAction<P> =\n  | ((...args: any[]) => { payload: P })\n  | ((...args: any[]) => { payload: P; meta: any })\n  | ((...args: any[]) => { payload: P; error: any })\n  | ((...args: any[]) => { payload: P; meta: any; error: any })\n\n/**\n * Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.\n *\n * @internal\n */\nexport type _ActionCreatorWithPreparedPayload<\n  PA extends PrepareAction<any> | void,\n  T extends string = string,\n> =\n  PA extends PrepareAction<infer P>\n    ? ActionCreatorWithPreparedPayload<\n        Parameters<PA>,\n        P,\n        T,\n        ReturnType<PA> extends {\n          error: infer E\n        }\n          ? E\n          : never,\n        ReturnType<PA> extends {\n          meta: infer M\n        }\n          ? M\n          : never\n      >\n    : void\n\n/**\n * Basic type for all action creators.\n *\n * @inheritdoc {redux#ActionCreator}\n */\nexport type BaseActionCreator<P, T extends string, M = never, E = never> = {\n  type: T\n  match: (action: unknown) => action is PayloadAction<P, T, M, E>\n}\n\n/**\n * An action creator that takes multiple arguments that are passed\n * to a `PrepareAction` method to create the final Action.\n * @typeParam Args arguments for the action creator function\n * @typeParam P `payload` type\n * @typeParam T `type` name\n * @typeParam E optional `error` type\n * @typeParam M optional `meta` type\n *\n * @inheritdoc {redux#ActionCreator}\n *\n * @public\n */\nexport interface ActionCreatorWithPreparedPayload<\n  Args extends unknown[],\n  P,\n  T extends string = string,\n  E = never,\n  M = never,\n> extends BaseActionCreator<P, T, M, E> {\n  /**\n   * Calling this {@link redux#ActionCreator} with `Args` will return\n   * an Action with a payload of type `P` and (depending on the `PrepareAction`\n   * method used) a `meta`- and `error` property of types `M` and `E` respectively.\n   */\n  (...args: Args): PayloadAction<P, T, M, E>\n}\n\n/**\n * An action creator of type `T` that takes an optional payload of type `P`.\n *\n * @inheritdoc {redux#ActionCreator}\n *\n * @public\n */\nexport interface ActionCreatorWithOptionalPayload<\n  P,\n  T extends string = string,\n> extends BaseActionCreator<P, T> {\n  /**\n   * Calling this {@link redux#ActionCreator} with an argument will\n   * return a {@link PayloadAction} of type `T` with a payload of `P`.\n   * Calling it without an argument will return a PayloadAction with a payload of `undefined`.\n   */\n  (payload?: P): PayloadAction<P, T>\n}\n\n/**\n * An action creator of type `T` that takes no payload.\n *\n * @inheritdoc {redux#ActionCreator}\n *\n * @public\n */\nexport interface ActionCreatorWithoutPayload<\n  T extends string = string,\n> extends BaseActionCreator<undefined, T> {\n  /**\n   * Calling this {@link redux#ActionCreator} will\n   * return a {@link PayloadAction} of type `T` with a payload of `undefined`\n   */\n  (noArgument: void): PayloadAction<undefined, T>\n}\n\n/**\n * An action creator of type `T` that requires a payload of type P.\n *\n * @inheritdoc {redux#ActionCreator}\n *\n * @public\n */\nexport interface ActionCreatorWithPayload<\n  P,\n  T extends string = string,\n> extends BaseActionCreator<P, T> {\n  /**\n   * Calling this {@link redux#ActionCreator} with an argument will\n   * return a {@link PayloadAction} of type `T` with a payload of `P`\n   */\n  (payload: P): PayloadAction<P, T>\n}\n\n/**\n * An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.\n *\n * @inheritdoc {redux#ActionCreator}\n *\n * @public\n */\nexport interface ActionCreatorWithNonInferrablePayload<\n  T extends string = string,\n> extends BaseActionCreator<unknown, T> {\n  /**\n   * Calling this {@link redux#ActionCreator} with an argument will\n   * return a {@link PayloadAction} of type `T` with a payload\n   * of exactly the type of the argument.\n   */\n  <PT extends unknown>(payload: PT): PayloadAction<PT, T>\n}\n\n/**\n * An action creator that produces actions with a `payload` attribute.\n *\n * @typeParam P the `payload` type\n * @typeParam T the `type` of the resulting action\n * @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.\n *\n * @public\n */\nexport type PayloadActionCreator<\n  P = void,\n  T extends string = string,\n  PA extends PrepareAction<P> | void = void,\n> = IfPrepareActionMethodProvided<\n  PA,\n  _ActionCreatorWithPreparedPayload<PA, T>,\n  // else\n  IsAny<\n    P,\n    ActionCreatorWithPayload<any, T>,\n    IsUnknownOrNonInferrable<\n      P,\n      ActionCreatorWithNonInferrablePayload<T>,\n      // else\n      IfVoid<\n        P,\n        ActionCreatorWithoutPayload<T>,\n        // else\n        IfMaybeUndefined<\n          P,\n          ActionCreatorWithOptionalPayload<P, T>,\n          // else\n          ActionCreatorWithPayload<P, T>\n        >\n      >\n    >\n  >\n>\n\n/**\n * A utility function to create an action creator for the given action type\n * string. The action creator accepts a single argument, which will be included\n * in the action object as a field called payload. The action creator function\n * will also have its toString() overridden so that it returns the action type.\n *\n * @param type The action type to use for created actions.\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\n *                If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\n *\n * @public\n */\nexport function createAction<P = void, T extends string = string>(\n  type: T,\n): PayloadActionCreator<P, T>\n\n/**\n * A utility function to create an action creator for the given action type\n * string. The action creator accepts a single argument, which will be included\n * in the action object as a field called payload. The action creator function\n * will also have its toString() overridden so that it returns the action type.\n *\n * @param type The action type to use for created actions.\n * @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.\n *                If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.\n *\n * @public\n */\nexport function createAction<\n  PA extends PrepareAction<any>,\n  T extends string = string,\n>(\n  type: T,\n  prepareAction: PA,\n): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>\n\nexport function createAction(type: string, prepareAction?: Function): any {\n  function actionCreator(...args: any[]) {\n    if (prepareAction) {\n      let prepared = prepareAction(...args)\n      if (!prepared) {\n        throw new Error('prepareAction did not return an object')\n      }\n\n      return {\n        type,\n        payload: prepared.payload,\n        ...('meta' in prepared && { meta: prepared.meta }),\n        ...('error' in prepared && { error: prepared.error }),\n      }\n    }\n    return { type, payload: args[0] }\n  }\n\n  actionCreator.toString = () => `${type}`\n\n  actionCreator.type = type\n\n  actionCreator.match = (action: unknown): action is PayloadAction =>\n    isAction(action) && action.type === type\n\n  return actionCreator\n}\n\n/**\n * Returns true if value is an RTK-like action creator, with a static type property and match method.\n */\nexport function isActionCreator(\n  action: unknown,\n): action is BaseActionCreator<unknown, string> & Function {\n  return (\n    typeof action === 'function' &&\n    'type' in action &&\n    // hasMatchFunction only wants Matchers but I don't see the point in rewriting it\n    hasMatchFunction(action as any)\n  )\n}\n\n/**\n * Returns true if value is an action with a string type and valid Flux Standard Action keys.\n */\nexport function isFSA(action: unknown): action is {\n  type: string\n  payload?: unknown\n  error?: unknown\n  meta?: unknown\n} {\n  return isAction(action) && Object.keys(action).every(isValidKey)\n}\n\nfunction isValidKey(key: string) {\n  return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1\n}\n\n// helper types for more readable typings\n\ntype IfPrepareActionMethodProvided<\n  PA extends PrepareAction<any> | void,\n  True,\n  False,\n> = PA extends (...args: any[]) => any ? True : False\n", "import type { Middleware } from 'redux'\nimport { isActionCreator as isRTKAction } from './createAction'\n\nexport interface ActionCreatorInvariantMiddlewareOptions {\n  /**\n   * The function to identify whether a value is an action creator.\n   * The default checks for a function with a static type property and match method.\n   */\n  isActionCreator?: (action: unknown) => action is Function & { type?: unknown }\n}\n\nexport function getMessage(type?: unknown) {\n  const splitType = type ? `${type}`.split('/') : []\n  const actionName = splitType[splitType.length - 1] || 'actionCreator'\n  return `Detected an action creator with type \"${\n    type || 'unknown'\n  }\" being dispatched.\nMake sure you're calling the action creator before dispatching, i.e. \\`dispatch(${actionName}())\\` instead of \\`dispatch(${actionName})\\`. This is necessary even if the action has no payload.`\n}\n\nexport function createActionCreatorInvariantMiddleware(\n  options: ActionCreatorInvariantMiddlewareOptions = {},\n): Middleware {\n  if (process.env.NODE_ENV === 'production') {\n    return () => (next) => (action) => next(action)\n  }\n  const { isActionCreator = isRTKAction } = options\n  return () => (next) => (action) => {\n    if (isActionCreator(action)) {\n      console.warn(getMessage(action.type))\n    }\n    return next(action)\n  }\n}\n", "import { createNextState, isDraftable } from './immerImports'\n\nexport function getTimeMeasureUtils(maxDelay: number, fnName: string) {\n  let elapsed = 0\n  return {\n    measureTime<T>(fn: () => T): T {\n      const started = Date.now()\n      try {\n        return fn()\n      } finally {\n        const finished = Date.now()\n        elapsed += finished - started\n      }\n    },\n    warnIfExceeded() {\n      if (elapsed > maxDelay) {\n        console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)\n      }\n    },\n  }\n}\n\nexport function delay(ms: number) {\n  return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nexport class Tuple<Items extends ReadonlyArray<unknown> = []> extends Array<\n  Items[number]\n> {\n  constructor(length: number)\n  constructor(...items: Items)\n  constructor(...items: any[]) {\n    super(...items)\n    Object.setPrototypeOf(this, Tuple.prototype)\n  }\n\n  static override get [Symbol.species]() {\n    return Tuple as any\n  }\n\n  override concat<AdditionalItems extends ReadonlyArray<unknown>>(\n    items: Tuple<AdditionalItems>,\n  ): Tuple<[...Items, ...AdditionalItems]>\n  override concat<AdditionalItems extends ReadonlyArray<unknown>>(\n    items: AdditionalItems,\n  ): Tuple<[...Items, ...AdditionalItems]>\n  override concat<AdditionalItems extends ReadonlyArray<unknown>>(\n    ...items: AdditionalItems\n  ): Tuple<[...Items, ...AdditionalItems]>\n  override concat(...arr: any[]) {\n    return super.concat.apply(this, arr)\n  }\n\n  prepend<AdditionalItems extends ReadonlyArray<unknown>>(\n    items: Tuple<AdditionalItems>,\n  ): Tuple<[...AdditionalItems, ...Items]>\n  prepend<AdditionalItems extends ReadonlyArray<unknown>>(\n    items: AdditionalItems,\n  ): Tuple<[...AdditionalItems, ...Items]>\n  prepend<AdditionalItems extends ReadonlyArray<unknown>>(\n    ...items: AdditionalItems\n  ): Tuple<[...AdditionalItems, ...Items]>\n  prepend(...arr: any[]) {\n    if (arr.length === 1 && Array.isArray(arr[0])) {\n      return new Tuple(...arr[0].concat(this))\n    }\n    return new Tuple(...arr.concat(this))\n  }\n}\n\nexport function freezeDraftable<T>(val: T) {\n  return isDraftable(val) ? createNextState(val, () => {}) : val\n}\n\nexport function getOrInsert<K extends object, V>(\n  map: WeakMap<K, V>,\n  key: K,\n  value: V,\n): V\nexport function getOrInsert<K, V>(map: Map<K, V>, key: K, value: V): V\nexport function getOrInsert<K extends object, V>(\n  map: Map<K, V> | WeakMap<K, V>,\n  key: K,\n  value: V,\n): V {\n  if (map.has(key)) return map.get(key) as V\n\n  return map.set(key, value).get(key) as V\n}\n\nexport function getOrInsertComputed<K extends object, V>(\n  map: WeakMap<K, V>,\n  key: K,\n  compute: (key: K) => V,\n): V\nexport function getOrInsertComputed<K, V>(\n  map: Map<K, V>,\n  key: K,\n  compute: (key: K) => V,\n): V\nexport function getOrInsertComputed<K extends object, V>(\n  map: Map<K, V> | WeakMap<K, V>,\n  key: K,\n  compute: (key: K) => V,\n): V {\n  if (map.has(key)) return map.get(key) as V\n\n  return map.set(key, compute(key)).get(key) as V\n}\n\nexport function promiseWithResolvers<T>(): {\n  promise: Promise<T>\n  resolve: (value: T | PromiseLike<T>) => void\n  reject: (reason?: any) => void\n} {\n  let resolve: any\n  let reject: any\n  const promise = new Promise<T>((res, rej) => {\n    resolve = res\n    reject = rej\n  })\n  return { promise, resolve, reject }\n}\n", "import type { Middleware } from 'redux'\nimport type { IgnoredPaths } from './serializableStateInvariantMiddleware'\nimport { getTimeMeasureUtils } from './utils'\n\ntype EntryProcessor = (key: string, value: any) => any\n\n/**\n * The default `isImmutable` function.\n *\n * @public\n */\nexport function isImmutableDefault(value: unknown): boolean {\n  return typeof value !== 'object' || value == null || Object.isFrozen(value)\n}\n\nexport function trackForMutations(\n  isImmutable: IsImmutableFunc,\n  ignoredPaths: IgnoredPaths | undefined,\n  obj: any,\n) {\n  const trackedProperties = trackProperties(isImmutable, ignoredPaths, obj)\n  return {\n    detectMutations() {\n      return detectMutations(isImmutable, ignoredPaths, trackedProperties, obj)\n    },\n  }\n}\n\ninterface TrackedProperty {\n  value: any\n  children: Record<string, any>\n}\n\nfunction trackProperties(\n  isImmutable: IsImmutableFunc,\n  ignoredPaths: IgnoredPaths = [],\n  obj: Record<string, any>,\n  path: string = '',\n  inProgress: Map<Record<string, any>, TrackedProperty> = new Map(),\n) {\n  const tracked: Partial<TrackedProperty> = { value: obj }\n\n  if (!isImmutable(obj)) {\n    // An object already being tracked further up the stack contains itself\n    const alreadyInProgress = inProgress.get(obj)\n    if (alreadyInProgress) {\n      return alreadyInProgress\n    }\n\n    tracked.children = {}\n    // Registered before walking children, so a circular reference finds it\n    inProgress.set(obj, tracked as TrackedProperty)\n\n    const hasIgnoredPaths = ignoredPaths.length > 0\n\n    for (const key in obj) {\n      const nestedPath = path ? path + '.' + key : key\n\n      if (hasIgnoredPaths) {\n        const hasMatches = ignoredPaths.some((ignored) => {\n          if (ignored instanceof RegExp) {\n            return ignored.test(nestedPath)\n          }\n          return nestedPath === ignored\n        })\n        if (hasMatches) {\n          continue\n        }\n      }\n\n      tracked.children[key] = trackProperties(\n        isImmutable,\n        ignoredPaths,\n        obj[key],\n        nestedPath,\n        inProgress,\n      )\n    }\n\n    inProgress.delete(obj)\n  }\n  return tracked as TrackedProperty\n}\n\nfunction detectMutations(\n  isImmutable: IsImmutableFunc,\n  ignoredPaths: IgnoredPaths = [],\n  trackedProperty: TrackedProperty,\n  obj: any,\n  sameParentRef: boolean = false,\n  path: string = '',\n  seen: Map<TrackedProperty, Set<unknown>> = new Map(),\n): { wasMutated: boolean; path?: string } {\n  const prevObj = trackedProperty ? trackedProperty.value : undefined\n\n  const sameRef = prevObj === obj\n\n  if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\n    return { wasMutated: true, path }\n  }\n\n  if (isImmutable(prevObj) || isImmutable(obj)) {\n    return { wasMutated: false }\n  }\n\n  // Compare each (tracked node, value) pair once, so cycles terminate\n  let seenValues = seen.get(trackedProperty)\n\n  if (!seenValues) {\n    seenValues = new Set()\n    seen.set(trackedProperty, seenValues)\n  } else if (seenValues.has(obj)) {\n    return { wasMutated: false }\n  }\n\n  seenValues.add(obj)\n\n  // Gather all keys from prev (tracked) and after objs\n  const keysToDetect: Record<string, boolean> = {}\n  for (let key in trackedProperty.children) {\n    keysToDetect[key] = true\n  }\n  for (let key in obj) {\n    keysToDetect[key] = true\n  }\n\n  const hasIgnoredPaths = ignoredPaths.length > 0\n\n  for (let key in keysToDetect) {\n    const nestedPath = path ? path + '.' + key : key\n\n    if (hasIgnoredPaths) {\n      const hasMatches = ignoredPaths.some((ignored) => {\n        if (ignored instanceof RegExp) {\n          return ignored.test(nestedPath)\n        }\n        return nestedPath === ignored\n      })\n      if (hasMatches) {\n        continue\n      }\n    }\n\n    const result = detectMutations(\n      isImmutable,\n      ignoredPaths,\n      trackedProperty.children[key],\n      obj[key],\n      sameRef,\n      nestedPath,\n      seen,\n    )\n\n    if (result.wasMutated) {\n      return result\n    }\n  }\n  return { wasMutated: false }\n}\n\ntype IsImmutableFunc = (value: any) => boolean\n\n/**\n * Options for `createImmutableStateInvariantMiddleware()`.\n *\n * @public\n */\nexport interface ImmutableStateInvariantMiddlewareOptions {\n  /**\n    Callback function to check if a value is considered to be immutable.\n    This function is applied recursively to every value contained in the state.\n    The default implementation will return true for primitive types\n    (like numbers, strings, booleans, null and undefined).\n   */\n  isImmutable?: IsImmutableFunc\n  /**\n    An array of dot-separated path strings that match named nodes from\n    the root state to ignore when checking for immutability.\n    Defaults to undefined\n   */\n  ignoredPaths?: IgnoredPaths\n  /** Print a warning if checks take longer than N ms. Default: 32ms */\n  warnAfter?: number\n}\n\n/**\n * Creates a middleware that checks whether any state was mutated in between\n * dispatches or during a dispatch. If any mutations are detected, an error is\n * thrown.\n *\n * @param options Middleware options.\n *\n * @public\n */\nexport function createImmutableStateInvariantMiddleware(\n  options: ImmutableStateInvariantMiddlewareOptions = {},\n): Middleware {\n  if (process.env.NODE_ENV === 'production') {\n    return () => (next) => (action) => next(action)\n  } else {\n    function stringify(\n      obj: any,\n      serializer?: EntryProcessor,\n      indent?: string | number,\n      decycler?: EntryProcessor,\n    ): string {\n      return JSON.stringify(obj, getSerialize(serializer, decycler), indent)\n    }\n\n    function getSerialize(\n      serializer?: EntryProcessor,\n      decycler?: EntryProcessor,\n    ): EntryProcessor {\n      let stack: any[] = [],\n        keys: any[] = []\n\n      if (!decycler)\n        decycler = function (_: string, value: any) {\n          if (stack[0] === value) return '[Circular ~]'\n          return (\n            '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'\n          )\n        }\n\n      return function (this: any, key: string, value: any) {\n        if (stack.length > 0) {\n          var thisPos = stack.indexOf(this)\n          if (~thisPos) {\n            stack.splice(thisPos + 1)\n            keys.splice(thisPos, Infinity, key)\n          } else {\n            stack.push(this)\n            keys.push(key)\n          }\n          if (~stack.indexOf(value)) value = decycler!.call(this, key, value)\n        } else stack.push(value)\n\n        return serializer == null ? value : serializer.call(this, key, value)\n      }\n    }\n\n    let {\n      isImmutable = isImmutableDefault,\n      ignoredPaths,\n      warnAfter = 32,\n    } = options\n\n    const track = trackForMutations.bind(null, isImmutable, ignoredPaths)\n\n    return ({ getState }) => {\n      let state = getState()\n      let tracker = track(state)\n\n      let result\n      return (next) => (action) => {\n        const measureUtils = getTimeMeasureUtils(\n          warnAfter,\n          'ImmutableStateInvariantMiddleware',\n        )\n\n        measureUtils.measureTime(() => {\n          state = getState()\n\n          result = tracker.detectMutations()\n          // Track before potentially not meeting the invariant\n          tracker = track(state)\n\n          if (result.wasMutated) {\n            throw new Error(\n              `A state mutation was detected between dispatches, in the path '${\n                result.path || ''\n              }'.  This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`,\n            )\n          }\n        })\n\n        const dispatchedAction = next(action)\n\n        measureUtils.measureTime(() => {\n          state = getState()\n\n          result = tracker.detectMutations()\n          // Track before potentially not meeting the invariant\n          tracker = track(state)\n\n          if (result.wasMutated) {\n            throw new Error(\n              `A state mutation was detected inside a dispatch, in the path: ${\n                result.path || ''\n              }. Take a look at the reducer(s) handling the action ${stringify(\n                action,\n              )}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`,\n            )\n          }\n        })\n\n        measureUtils.warnIfExceeded()\n\n        return dispatchedAction\n      }\n    }\n  }\n}\n", "import type { Middleware } from 'redux'\nimport { isAction, isPlainObject } from './reduxImports'\nimport { getTimeMeasureUtils } from './utils'\n\n/**\n * Returns true if the passed value is \"plain\", i.e. a value that is either\n * directly JSON-serializable (boolean, number, string, array, plain object)\n * or `undefined`.\n *\n * @param val The value to check.\n *\n * @public\n */\nexport function isPlain(val: any) {\n  const type = typeof val\n  return (\n    val == null ||\n    type === 'string' ||\n    type === 'boolean' ||\n    type === 'number' ||\n    Array.isArray(val) ||\n    isPlainObject(val)\n  )\n}\n\ninterface NonSerializableValue {\n  keyPath: string\n  value: unknown\n}\n\nexport type IgnoredPaths = readonly (string | RegExp)[]\n\n/**\n * @public\n */\nexport function findNonSerializableValue(\n  value: unknown,\n  path: string = '',\n  isSerializable: (value: unknown) => boolean = isPlain,\n  getEntries?: (value: unknown) => [string, any][],\n  ignoredPaths: IgnoredPaths = [],\n  cache?: WeakSet<object>,\n): NonSerializableValue | false {\n  let foundNestedSerializable: NonSerializableValue | false\n\n  if (!isSerializable(value)) {\n    return {\n      keyPath: path || '<root>',\n      value: value,\n    }\n  }\n\n  if (typeof value !== 'object' || value === null) {\n    return false\n  }\n\n  if (cache?.has(value)) return false\n\n  const entries = getEntries != null ? getEntries(value) : Object.entries(value)\n\n  const hasIgnoredPaths = ignoredPaths.length > 0\n\n  for (const [key, nestedValue] of entries) {\n    const nestedPath = path ? path + '.' + key : key\n\n    if (hasIgnoredPaths) {\n      const hasMatches = ignoredPaths.some((ignored) => {\n        if (ignored instanceof RegExp) {\n          return ignored.test(nestedPath)\n        }\n        return nestedPath === ignored\n      })\n      if (hasMatches) {\n        continue\n      }\n    }\n\n    if (!isSerializable(nestedValue)) {\n      return {\n        keyPath: nestedPath,\n        value: nestedValue,\n      }\n    }\n\n    if (typeof nestedValue === 'object') {\n      foundNestedSerializable = findNonSerializableValue(\n        nestedValue,\n        nestedPath,\n        isSerializable,\n        getEntries,\n        ignoredPaths,\n        cache,\n      )\n\n      if (foundNestedSerializable) {\n        return foundNestedSerializable\n      }\n    }\n  }\n\n  if (cache && isNestedFrozen(value)) cache.add(value)\n\n  return false\n}\n\nexport function isNestedFrozen(value: object) {\n  if (!Object.isFrozen(value)) return false\n\n  for (const nestedValue of Object.values(value)) {\n    if (typeof nestedValue !== 'object' || nestedValue === null) continue\n\n    if (!isNestedFrozen(nestedValue)) return false\n  }\n\n  return true\n}\n\n/**\n * Options for `createSerializableStateInvariantMiddleware()`.\n *\n * @public\n */\nexport interface SerializableStateInvariantMiddlewareOptions {\n  /**\n   * The function to check if a value is considered serializable. This\n   * function is applied recursively to every value contained in the\n   * state. Defaults to `isPlain()`.\n   */\n  isSerializable?: (value: any) => boolean\n  /**\n   * The function that will be used to retrieve entries from each\n   * value.  If unspecified, `Object.entries` will be used. Defaults\n   * to `undefined`.\n   */\n  getEntries?: (value: any) => [string, any][]\n\n  /**\n   * An array of action types to ignore when checking for serializability.\n   * Defaults to []\n   */\n  ignoredActions?: string[]\n\n  /**\n   * An array of dot-separated path strings or regular expressions to ignore\n   * when checking for serializability, Defaults to\n   * ['meta.arg', 'meta.baseQueryMeta']\n   */\n  ignoredActionPaths?: (string | RegExp)[]\n\n  /**\n   * An array of dot-separated path strings or regular expressions to ignore\n   * when checking for serializability, Defaults to []\n   */\n  ignoredPaths?: (string | RegExp)[]\n  /**\n   * Execution time warning threshold. If the middleware takes longer\n   * than `warnAfter` ms, a warning will be displayed in the console.\n   * Defaults to 32ms.\n   */\n  warnAfter?: number\n\n  /**\n   * Opt out of checking state. When set to `true`, other state-related params will be ignored.\n   */\n  ignoreState?: boolean\n\n  /**\n   * Opt out of checking actions. When set to `true`, other action-related params will be ignored.\n   */\n  ignoreActions?: boolean\n\n  /**\n   * Opt out of caching the results. The cache uses a WeakSet and speeds up repeated checking processes.\n   * The cache is automatically disabled if no browser support for WeakSet is present.\n   */\n  disableCache?: boolean\n}\n\n/**\n * Creates a middleware that, after every state change, checks if the new\n * state is serializable. If a non-serializable value is found within the\n * state, an error is printed to the console.\n *\n * @param options Middleware options.\n *\n * @public\n */\nexport function createSerializableStateInvariantMiddleware(\n  options: SerializableStateInvariantMiddlewareOptions = {},\n): Middleware {\n  if (process.env.NODE_ENV === 'production') {\n    return () => (next) => (action) => next(action)\n  } else {\n    const {\n      isSerializable = isPlain,\n      getEntries,\n      ignoredActions = [],\n      ignoredActionPaths = ['meta.arg', 'meta.baseQueryMeta'],\n      ignoredPaths = [],\n      warnAfter = 32,\n      ignoreState = false,\n      ignoreActions = false,\n      disableCache = false,\n    } = options\n\n    const cache: WeakSet<object> | undefined =\n      !disableCache && WeakSet ? new WeakSet() : undefined\n\n    return (storeAPI) => (next) => (action) => {\n      if (!isAction(action)) {\n        return next(action)\n      }\n\n      const result = next(action)\n\n      const measureUtils = getTimeMeasureUtils(\n        warnAfter,\n        'SerializableStateInvariantMiddleware',\n      )\n\n      if (\n        !ignoreActions &&\n        !(\n          ignoredActions.length &&\n          ignoredActions.indexOf(action.type as any) !== -1\n        )\n      ) {\n        measureUtils.measureTime(() => {\n          const foundActionNonSerializableValue = findNonSerializableValue(\n            action,\n            '',\n            isSerializable,\n            getEntries,\n            ignoredActionPaths,\n            cache,\n          )\n\n          if (foundActionNonSerializableValue) {\n            const { keyPath, value } = foundActionNonSerializableValue\n\n            console.error(\n              `A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`,\n              value,\n              '\\nTake a look at the logic that dispatched this action: ',\n              action,\n              '\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-why-should-my-action-types-be-constants)',\n              '\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)',\n            )\n          }\n        })\n      }\n\n      if (!ignoreState) {\n        measureUtils.measureTime(() => {\n          const state = storeAPI.getState()\n\n          const foundStateNonSerializableValue = findNonSerializableValue(\n            state,\n            '',\n            isSerializable,\n            getEntries,\n            ignoredPaths,\n            cache,\n          )\n\n          if (foundStateNonSerializableValue) {\n            const { keyPath, value } = foundStateNonSerializableValue\n\n            console.error(\n              `A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`,\n              value,\n              `\nTake a look at the reducer(s) handling this action type: ${action.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`,\n            )\n          }\n        })\n\n        measureUtils.warnIfExceeded()\n      }\n\n      return result\n    }\n  }\n}\n", "import type { Middleware, UnknownAction } from 'redux'\nimport type { ThunkMiddleware } from 'redux-thunk'\nimport { thunk as thunkMiddleware, withExtraArgument } from 'redux-thunk'\nimport type { ActionCreatorInvariantMiddlewareOptions } from './actionCreatorInvariantMiddleware'\nimport { createActionCreatorInvariantMiddleware } from './actionCreatorInvariantMiddleware'\nimport type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'\n/* PROD_START_REMOVE_UMD */\nimport { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'\n/* PROD_STOP_REMOVE_UMD */\n\nimport type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'\nimport { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'\nimport type { ExcludeFromTuple } from './tsHelpers'\nimport { Tuple } from './utils'\n\nfunction isBoolean(x: any): x is boolean {\n  return typeof x === 'boolean'\n}\n\ninterface ThunkOptions<E = any> {\n  extraArgument: E\n}\n\ninterface GetDefaultMiddlewareOptions {\n  thunk?: boolean | ThunkOptions\n  immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions\n  serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions\n  actionCreatorCheck?: boolean | ActionCreatorInvariantMiddlewareOptions\n}\n\nexport type ThunkMiddlewareFor<\n  S,\n  O extends GetDefaultMiddlewareOptions = {},\n> = O extends {\n  thunk: false\n}\n  ? never\n  : O extends { thunk: { extraArgument: infer E } }\n    ? ThunkMiddleware<S, UnknownAction, E>\n    : ThunkMiddleware<S, UnknownAction>\n\nexport type GetDefaultMiddleware<S = any> = <\n  O extends GetDefaultMiddlewareOptions = {\n    thunk: true\n    immutableCheck: true\n    serializableCheck: true\n    actionCreatorCheck: true\n  },\n>(\n  options?: O,\n) => Tuple<ExcludeFromTuple<[ThunkMiddlewareFor<S, O>], never>>\n\nexport const buildGetDefaultMiddleware = <S = any>(): GetDefaultMiddleware<S> =>\n  function getDefaultMiddleware(options) {\n    const {\n      thunk = true,\n      immutableCheck = true,\n      serializableCheck = true,\n      actionCreatorCheck = true,\n    } = options ?? {}\n\n    let middlewareArray = new Tuple<Middleware[]>()\n\n    if (thunk) {\n      if (isBoolean(thunk)) {\n        middlewareArray.push(thunkMiddleware)\n      } else {\n        middlewareArray.push(withExtraArgument(thunk.extraArgument))\n      }\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (immutableCheck) {\n        /* PROD_START_REMOVE_UMD */\n        let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}\n\n        if (!isBoolean(immutableCheck)) {\n          immutableOptions = immutableCheck\n        }\n\n        middlewareArray.unshift(\n          createImmutableStateInvariantMiddleware(immutableOptions),\n        )\n        /* PROD_STOP_REMOVE_UMD */\n      }\n\n      if (serializableCheck) {\n        let serializableOptions: SerializableStateInvariantMiddlewareOptions =\n          {}\n\n        if (!isBoolean(serializableCheck)) {\n          serializableOptions = serializableCheck\n        }\n\n        middlewareArray.push(\n          createSerializableStateInvariantMiddleware(serializableOptions),\n        )\n      }\n      if (actionCreatorCheck) {\n        let actionCreatorOptions: ActionCreatorInvariantMiddlewareOptions = {}\n\n        if (!isBoolean(actionCreatorCheck)) {\n          actionCreatorOptions = actionCreatorCheck\n        }\n\n        middlewareArray.unshift(\n          createActionCreatorInvariantMiddleware(actionCreatorOptions),\n        )\n      }\n    }\n\n    return middlewareArray as any\n  }\n", "import type { StoreEnhancer } from 'redux'\n\nexport const SHOULD_AUTOBATCH = 'RTK_autoBatch'\n\nexport const prepareAutoBatched =\n  <T>() =>\n  (payload: T): { payload: T; meta: unknown } => ({\n    payload,\n    meta: { [SHOULD_AUTOBATCH]: true },\n  })\n\nconst createQueueWithTimer = (timeout: number) => {\n  return (notify: () => void) => {\n    setTimeout(notify, timeout)\n  }\n}\n\nconst createRafWithFallbackTimer = (\n  raf: typeof requestAnimationFrame,\n  timeout: number,\n) => {\n  return (notify: () => void) => {\n    let called = false\n    let rafId: number\n    let timerId: ReturnType<typeof setTimeout>\n    const callback = () => {\n      if (called) return\n      called = true\n      cancelAnimationFrame(rafId)\n      clearTimeout(timerId)\n      notify()\n    }\n    rafId = raf(callback)\n    timerId = setTimeout(callback, timeout)\n  }\n}\n\nexport type AutoBatchOptions =\n  | { type: 'tick' }\n  | { type: 'timer'; timeout: number }\n  | { type: 'raf' }\n  | { type: 'callback'; queueNotification: (notify: () => void) => void }\n\n/**\n * A Redux store enhancer that watches for \"low-priority\" actions, and delays\n * notifying subscribers until either the queued callback executes or the\n * next \"standard-priority\" action is dispatched.\n *\n * This allows dispatching multiple \"low-priority\" actions in a row with only\n * a single subscriber notification to the UI after the sequence of actions\n * is finished, thus improving UI re-render performance.\n *\n * Watches for actions with the `action.meta[SHOULD_AUTOBATCH]` attribute.\n * This can be added to `action.meta` manually, or by using the\n * `prepareAutoBatched` helper.\n *\n * By default, it will queue a notification using `requestAnimationFrame`.\n * However, you can pass several other options to configure the behavior:\n * - `{type: 'tick'}`: queues using `queueMicrotask`\n * - `{type: 'timer', timeout: number}`: queues using `setTimeout`\n * - `{type: 'raf'}`: queues using `requestAnimationFrame` (default)\n * - `{type: 'callback', queueNotification: (notify: () => void) => void}`: lets you provide your own callback\n *\n *\n */\nexport const autoBatchEnhancer =\n  (options: AutoBatchOptions = { type: 'raf' }): StoreEnhancer =>\n  (next) =>\n  (...args) => {\n    const store = next(...args)\n\n    let notifying = true\n    let shouldNotifyAtEndOfTick = false\n    let notificationQueued = false\n\n    const listeners = new Set<() => void>()\n\n    const queueCallback =\n      options.type === 'tick'\n        ? queueMicrotask\n        : options.type === 'raf'\n          ? // requestAnimationFrame won't exist in SSR environments. Fall back to a vague approximation just to keep from erroring.\n            typeof window !== 'undefined' && window.requestAnimationFrame\n            ? createRafWithFallbackTimer(window.requestAnimationFrame, 100)\n            : createQueueWithTimer(10)\n          : options.type === 'callback'\n            ? options.queueNotification\n            : createQueueWithTimer(options.timeout)\n\n    const notifyListeners = () => {\n      // We're running at the end of the event loop tick.\n      // Run the real listener callbacks to actually update the UI.\n      notificationQueued = false\n      if (shouldNotifyAtEndOfTick) {\n        shouldNotifyAtEndOfTick = false\n        listeners.forEach((l) => l())\n      }\n    }\n\n    return Object.assign({}, store, {\n      // Override the base `store.subscribe` method to keep original listeners\n      // from running if we're delaying notifications\n      subscribe(listener: () => void) {\n        // Each wrapped listener will only call the real listener if\n        // the `notifying` flag is currently active when it's called.\n        // This lets the base store work as normal, while the actual UI\n        // update becomes controlled by this enhancer.\n        const wrappedListener: typeof listener = () => notifying && listener()\n        const unsubscribe = store.subscribe(wrappedListener)\n        listeners.add(listener)\n        return () => {\n          unsubscribe()\n          listeners.delete(listener)\n        }\n      },\n      // Override the base `store.dispatch` method so that we can check actions\n      // for the `shouldAutoBatch` flag and determine if batching is active\n      dispatch(action: any) {\n        try {\n          // If the action does _not_ have the `shouldAutoBatch` flag,\n          // we resume/continue normal notify-after-each-dispatch behavior\n          notifying = !action?.meta?.[SHOULD_AUTOBATCH]\n          // If a `notifyListeners` microtask was queued, you can't cancel it.\n          // Instead, we set a flag so that it's a no-op when it does run\n          shouldNotifyAtEndOfTick = !notifying\n          if (shouldNotifyAtEndOfTick) {\n            // We've seen at least 1 action with `SHOULD_AUTOBATCH`. Try to queue\n            // a microtask to notify listeners at the end of the event loop tick.\n            // Make sure we only enqueue this _once_ per tick.\n            if (!notificationQueued) {\n              notificationQueued = true\n              queueCallback(notifyListeners)\n            }\n          }\n          // Go ahead and process the action as usual, including reducers.\n          // If normal notification behavior is enabled, the store will notify\n          // all of its own listeners, and the wrapper callbacks above will\n          // see `notifying` is true and pass on to the real listener callbacks.\n          // If we're \"batching\" behavior, then the wrapped callbacks will\n          // bail out, causing the base store notification behavior to be no-ops.\n          return store.dispatch(action)\n        } finally {\n          // Assume we're back to normal behavior after each action\n          notifying = true\n        }\n      },\n    })\n  }\n", "import type { StoreEnhancer } from 'redux'\nimport type { AutoBatchOptions } from './autoBatchEnhancer'\nimport { autoBatchEnhancer } from './autoBatchEnhancer'\nimport { Tuple } from './utils'\nimport type { Middlewares } from './configureStore'\nimport type { ExtractDispatchExtensions } from './tsHelpers'\n\ntype GetDefaultEnhancersOptions = {\n  autoBatch?: boolean | AutoBatchOptions\n}\n\nexport type GetDefaultEnhancers<M extends Middlewares<any>> = (\n  options?: GetDefaultEnhancersOptions,\n) => Tuple<[StoreEnhancer<{ dispatch: ExtractDispatchExtensions<M> }>]>\n\nexport const buildGetDefaultEnhancers = <M extends Middlewares<any>>(\n  middlewareEnhancer: StoreEnhancer<{ dispatch: ExtractDispatchExtensions<M> }>,\n): GetDefaultEnhancers<M> =>\n  function getDefaultEnhancers(options) {\n    const { autoBatch = true } = options ?? {}\n\n    let enhancerArray = new Tuple<StoreEnhancer[]>(middlewareEnhancer)\n    if (autoBatch) {\n      enhancerArray.push(\n        autoBatchEnhancer(\n          typeof autoBatch === 'object' ? autoBatch : undefined,\n        ),\n      )\n    }\n    return enhancerArray as any\n  }\n", "import type {\n  Reducer,\n  ReducersMapObject,\n  Middleware,\n  Action,\n  StoreEnhancer,\n  Store,\n  UnknownAction,\n} from 'redux'\nimport {\n  applyMiddleware,\n  createStore,\n  compose,\n  combineReducers,\n  isPlainObject,\n} from './reduxImports'\nimport type { DevToolsEnhancerOptions as DevToolsOptions } from './devtoolsExtension'\nimport { composeWithDevTools } from './devtoolsExtension'\n\nimport type {\n  ThunkMiddlewareFor,\n  GetDefaultMiddleware,\n} from './getDefaultMiddleware'\nimport { buildGetDefaultMiddleware } from './getDefaultMiddleware'\nimport type {\n  ExtractDispatchExtensions,\n  ExtractStoreExtensions,\n  ExtractStateExtensions,\n  UnknownIfNonSpecific,\n} from './tsHelpers'\nimport type { Tuple } from './utils'\nimport type { GetDefaultEnhancers } from './getDefaultEnhancers'\nimport { buildGetDefaultEnhancers } from './getDefaultEnhancers'\n\n/**\n * Options for `configureStore()`.\n *\n * @public\n */\nexport interface ConfigureStoreOptions<\n  S = any,\n  A extends Action = UnknownAction,\n  M extends Tuple<Middlewares<S>> = Tuple<Middlewares<S>>,\n  E extends Tuple<Enhancers> = Tuple<Enhancers>,\n  P = S,\n> {\n  /**\n   * A single reducer function that will be used as the root reducer, or an\n   * object of slice reducers that will be passed to `combineReducers()`.\n   */\n  reducer: Reducer<S, A, P> | ReducersMapObject<S, A, P>\n\n  /**\n   * An array of Redux middleware to install, or a callback receiving `getDefaultMiddleware` and returning a Tuple of middleware.\n   * If not supplied, defaults to the set of middleware returned by `getDefaultMiddleware()`.\n   *\n   * @example `middleware: (gDM) => gDM().concat(logger, apiMiddleware, yourCustomMiddleware)`\n   * @see https://redux-toolkit.js.org/api/getDefaultMiddleware#intended-usage\n   */\n  middleware?: (getDefaultMiddleware: GetDefaultMiddleware<S>) => M\n\n  /**\n   * Whether to enable Redux DevTools integration. Defaults to `true`.\n   *\n   * Additional configuration can be done by passing Redux DevTools options\n   */\n  devTools?: boolean | DevToolsOptions\n\n  /**\n   * Whether to check for duplicate middleware instances. Defaults to `true`.\n   */\n  duplicateMiddlewareCheck?: boolean\n\n  /**\n   * The initial state, same as Redux's createStore.\n   * You may optionally specify it to hydrate the state\n   * from the server in universal apps, or to restore a previously serialized\n   * user session. If you use `combineReducers()` to produce the root reducer\n   * function (either directly or indirectly by passing an object as `reducer`),\n   * this must be an object with the same shape as the reducer map keys.\n   */\n  // we infer here, and instead complain if the reducer doesn't match\n  preloadedState?: P\n\n  /**\n   * The store enhancers to apply. See Redux's `createStore()`.\n   * All enhancers will be included before the DevTools Extension enhancer.\n   * If you need to customize the order of enhancers, supply a callback\n   * function that will receive a `getDefaultEnhancers` function that returns a Tuple,\n   * and should return a Tuple of enhancers (such as `getDefaultEnhancers().concat(offline)`).\n   * If you only need to add middleware, you can use the `middleware` parameter instead.\n   */\n  enhancers?: (getDefaultEnhancers: GetDefaultEnhancers<M>) => E\n}\n\nexport type Middlewares<S> = ReadonlyArray<Middleware<{}, S>>\n\ntype Enhancers = ReadonlyArray<StoreEnhancer>\n\n/**\n * A Redux store returned by `configureStore()`. Supports dispatching\n * side-effectful _thunks_ in addition to plain actions.\n *\n * @public\n */\nexport type EnhancedStore<\n  S = any,\n  A extends Action = UnknownAction,\n  E extends Enhancers = Enhancers,\n> = ExtractStoreExtensions<E> &\n  Store<S, A, UnknownIfNonSpecific<ExtractStateExtensions<E>>>\n\n/**\n * A friendly abstraction over the standard Redux `createStore()` function.\n *\n * @param options The store configuration.\n * @returns A configured Redux store.\n *\n * @public\n */\nexport function configureStore<\n  S = any,\n  A extends Action = UnknownAction,\n  M extends Tuple<Middlewares<S>> = Tuple<[ThunkMiddlewareFor<S>]>,\n  E extends Tuple<Enhancers> = Tuple<\n    [StoreEnhancer<{ dispatch: ExtractDispatchExtensions<M> }>, StoreEnhancer]\n  >,\n  P = S,\n>(options: ConfigureStoreOptions<S, A, M, E, P>): EnhancedStore<S, A, E> {\n  const getDefaultMiddleware = buildGetDefaultMiddleware<S>()\n\n  const {\n    reducer = undefined,\n    middleware,\n    devTools = true,\n    duplicateMiddlewareCheck = true,\n    preloadedState = undefined,\n    enhancers = undefined,\n  } = options || {}\n\n  let rootReducer: Reducer<S, A, P>\n\n  if (typeof reducer === 'function') {\n    rootReducer = reducer\n  } else if (isPlainObject(reducer)) {\n    rootReducer = combineReducers(reducer) as unknown as Reducer<S, A, P>\n  } else {\n    throw new Error(\n      '`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers',\n    )\n  }\n\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    middleware &&\n    typeof middleware !== 'function'\n  ) {\n    throw new Error('`middleware` field must be a callback')\n  }\n\n  let finalMiddleware: Tuple<Middlewares<S>>\n  if (typeof middleware === 'function') {\n    finalMiddleware = middleware(getDefaultMiddleware)\n\n    if (\n      process.env.NODE_ENV !== 'production' &&\n      !Array.isArray(finalMiddleware)\n    ) {\n      throw new Error(\n        'when using a middleware builder function, an array of middleware must be returned',\n      )\n    }\n  } else {\n    finalMiddleware = getDefaultMiddleware()\n  }\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    finalMiddleware.some((item: any) => typeof item !== 'function')\n  ) {\n    throw new Error(\n      'each middleware provided to configureStore must be a function',\n    )\n  }\n\n  if (process.env.NODE_ENV !== 'production' && duplicateMiddlewareCheck) {\n    let middlewareReferences = new Set<Middleware<any, S>>()\n    finalMiddleware.forEach((middleware) => {\n      if (middlewareReferences.has(middleware)) {\n        throw new Error(\n          'Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.',\n        )\n      }\n      middlewareReferences.add(middleware)\n    })\n  }\n\n  let finalCompose = compose\n\n  if (devTools) {\n    finalCompose = composeWithDevTools({\n      // Enable capture of stack traces for dispatched Redux actions\n      trace: process.env.NODE_ENV !== 'production',\n      ...(typeof devTools === 'object' && devTools),\n    })\n  }\n\n  const middlewareEnhancer = applyMiddleware(...finalMiddleware)\n\n  const getDefaultEnhancers = buildGetDefaultEnhancers<M>(middlewareEnhancer)\n\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    enhancers &&\n    typeof enhancers !== 'function'\n  ) {\n    throw new Error('`enhancers` field must be a callback')\n  }\n\n  let storeEnhancers =\n    typeof enhancers === 'function'\n      ? enhancers(getDefaultEnhancers)\n      : getDefaultEnhancers()\n\n  if (process.env.NODE_ENV !== 'production' && !Array.isArray(storeEnhancers)) {\n    throw new Error('`enhancers` callback must return an array')\n  }\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    storeEnhancers.some((item: any) => typeof item !== 'function')\n  ) {\n    throw new Error(\n      'each enhancer provided to configureStore must be a function',\n    )\n  }\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    finalMiddleware.length &&\n    !storeEnhancers.includes(middlewareEnhancer)\n  ) {\n    console.error(\n      'middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`',\n    )\n  }\n\n  const composedEnhancer: StoreEnhancer<any> = finalCompose(...storeEnhancers)\n\n  return createStore(rootReducer, preloadedState as P, composedEnhancer)\n}\n", "import type { Action } from 'redux'\nimport type {\n  CaseReducer,\n  CaseReducers,\n  ActionMatcherDescriptionCollection,\n} from './createReducer'\nimport type { TypeGuard } from './tsHelpers'\nimport type { AsyncThunk, AsyncThunkConfig } from './createAsyncThunk'\n\nexport type AsyncThunkReducers<\n  State,\n  ThunkArg extends any,\n  Returned = unknown,\n  ThunkApiConfig extends AsyncThunkConfig = {},\n> = {\n  pending?: CaseReducer<\n    State,\n    ReturnType<AsyncThunk<Returned, ThunkArg, ThunkApiConfig>['pending']>\n  >\n  rejected?: CaseReducer<\n    State,\n    ReturnType<AsyncThunk<Returned, ThunkArg, ThunkApiConfig>['rejected']>\n  >\n  fulfilled?: CaseReducer<\n    State,\n    ReturnType<AsyncThunk<Returned, ThunkArg, ThunkApiConfig>['fulfilled']>\n  >\n  settled?: CaseReducer<\n    State,\n    ReturnType<\n      AsyncThunk<Returned, ThunkArg, ThunkApiConfig>['rejected' | 'fulfilled']\n    >\n  >\n}\n\nexport type TypedActionCreator<Type extends string> = {\n  (...args: any[]): Action<Type>\n  type: Type\n}\n\n/**\n * A builder for an action <-> reducer map.\n *\n * @public\n */\nexport interface ActionReducerMapBuilder<State> {\n  /**\n   * Adds a case reducer to handle a single exact action type.\n   * @remarks\n   * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\n   * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\n   * @param reducer - The actual case reducer function.\n   */\n  addCase<ActionCreator extends TypedActionCreator<string>>(\n    actionCreator: ActionCreator,\n    reducer: CaseReducer<State, ReturnType<ActionCreator>>,\n  ): ActionReducerMapBuilder<State>\n  /**\n   * Adds a case reducer to handle a single exact action type.\n   * @remarks\n   * All calls to `builder.addCase` must come before any calls to `builder.addAsyncThunk`, `builder.addMatcher` or `builder.addDefaultCase`.\n   * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\n   * @param reducer - The actual case reducer function.\n   */\n  addCase<Type extends string, A extends Action<Type>>(\n    type: Type,\n    reducer: CaseReducer<State, A>,\n  ): ActionReducerMapBuilder<State>\n\n  /**\n   * Adds case reducers to handle actions based on a `AsyncThunk` action creator.\n   * @remarks\n   * All calls to `builder.addAsyncThunk` must come before after any calls to `builder.addCase` and before any calls to `builder.addMatcher` or `builder.addDefaultCase`.\n   * @param asyncThunk - The async thunk action creator itself.\n   * @param reducers - A mapping from each of the `AsyncThunk` action types to the case reducer that should handle those actions.\n   * @example\n   * ```ts no-transpile\n   * import { createAsyncThunk, createReducer } from '@reduxjs/toolkit';\n   *\n   * const fetchUserById = createAsyncThunk('users/fetchUser', async (id) => {\n   *   const response = await fetch(`https://reqres.in/api/users/${id}`);\n   *   return (await response.json()).data;\n   * });\n   *\n   * const reducer = createReducer(initialState, (builder) => {\n   *   builder.addAsyncThunk(fetchUserById, {\n   *     pending: (state, action) => {\n   *       state.fetchUserById.loading = 'pending';\n   *     },\n   *     fulfilled: (state, action) => {\n   *       state.fetchUserById.data = action.payload;\n   *     },\n   *     rejected: (state, action) => {\n   *       state.fetchUserById.error = action.error;\n   *     },\n   *     settled: (state, action) => {\n   *       state.fetchUserById.loading = action.meta.requestStatus;\n   *     },\n   *   });\n   * });\n   * ```\n   */\n  addAsyncThunk<\n    Returned,\n    ThunkArg,\n    ThunkApiConfig extends AsyncThunkConfig = {},\n  >(\n    asyncThunk: AsyncThunk<Returned, ThunkArg, ThunkApiConfig>,\n    reducers: AsyncThunkReducers<State, ThunkArg, Returned, ThunkApiConfig>,\n  ): Omit<ActionReducerMapBuilder<State>, 'addCase'>\n\n  /**\n   * Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.\n   * @remarks\n   * If multiple matcher reducers match, all of them will be executed in the order\n   * they were defined in - even if a case reducer already matched.\n   * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and `builder.addAsyncThunk` and before any calls to `builder.addDefaultCase`.\n   * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)\n   *   function\n   * @param reducer - The actual case reducer function.\n   *\n   * @example\n   * ```ts\n   * import type { AsyncThunk, UnknownAction } from '@reduxjs/toolkit';\n   * import { createAction, createReducer } from '@reduxjs/toolkit';\n   *\n   * type GenericAsyncThunk = AsyncThunk<unknown, unknown, any>;\n   *\n   * type PendingAction = ReturnType<GenericAsyncThunk['pending']>;\n   * type RejectedAction = ReturnType<GenericAsyncThunk['rejected']>;\n   * type FulfilledAction = ReturnType<GenericAsyncThunk['fulfilled']>;\n   *\n   * const initialState: Record<string, string> = {};\n   * const resetAction = createAction('reset-tracked-loading-state');\n   *\n   * function isPendingAction(action: UnknownAction): action is PendingAction {\n   *   return typeof action.type === 'string' && action.type.endsWith('/pending');\n   * }\n   *\n   * const reducer = createReducer(initialState, (builder) => {\n   *   builder\n   *     .addCase(resetAction, () => initialState)\n   *     // matcher can be defined outside as a type predicate function\n   *     .addMatcher(isPendingAction, (state, action) => {\n   *       state[action.meta.requestId] = 'pending';\n   *     })\n   *     .addMatcher(\n   *       // matcher can be defined inline as a type predicate function\n   *       (action): action is RejectedAction => action.type.endsWith('/rejected'),\n   *       (state, action) => {\n   *         state[action.meta.requestId] = 'rejected';\n   *       },\n   *     )\n   *     // matcher can just return boolean and the matcher can receive a generic argument\n   *     .addMatcher<FulfilledAction>(\n   *       (action) => action.type.endsWith('/fulfilled'),\n   *       (state, action) => {\n   *         state[action.meta.requestId] = 'fulfilled';\n   *       },\n   *     );\n   * });\n   * ```\n   */\n  addMatcher<A>(\n    matcher: TypeGuard<A> | ((action: any) => boolean),\n    reducer: CaseReducer<State, A extends Action ? A : A & Action>,\n  ): Omit<ActionReducerMapBuilder<State>, 'addCase' | 'addAsyncThunk'>\n\n  /**\n   * Adds a \"default case\" reducer that is executed if no case reducer and no matcher\n   * reducer was executed for this action.\n   * @param reducer - The fallback \"default case\" reducer function.\n   *\n   * @example\n   * ```ts\n   * import { createReducer } from '@reduxjs/toolkit';\n   *\n   * const initialState = { otherActions: 0 };\n   *\n   * const reducer = createReducer(initialState, (builder) => {\n   *   builder\n   *     // .addCase(...)\n   *     // .addMatcher(...)\n   *     .addDefaultCase((state, action) => {\n   *       state.otherActions++;\n   *     });\n   * });\n   * ```\n   */\n  addDefaultCase(reducer: CaseReducer<State, Action>): {}\n}\n\nexport function executeReducerBuilderCallback<S>(\n  builderCallback: (builder: ActionReducerMapBuilder<S>) => void,\n): [\n  CaseReducers<S, any>,\n  ActionMatcherDescriptionCollection<S>,\n  CaseReducer<S, Action> | undefined,\n] {\n  const actionsMap: CaseReducers<S, any> = {}\n  const actionMatchers: ActionMatcherDescriptionCollection<S> = []\n  let defaultCaseReducer: CaseReducer<S, Action> | undefined\n  const builder: ActionReducerMapBuilder<S> = {\n    addCase(\n      typeOrActionCreator: string | TypedActionCreator<any>,\n      reducer: CaseReducer<S>,\n    ) {\n      if (process.env.NODE_ENV !== 'production') {\n        /*\n         to keep the definition by the user in line with actual behavior,\n         we enforce `addCase` to always be called before calling `addMatcher`\n         as matching cases take precedence over matchers\n         */\n        if (actionMatchers.length > 0) {\n          throw new Error(\n            '`builder.addCase` should only be called before calling `builder.addMatcher`',\n          )\n        }\n        if (defaultCaseReducer) {\n          throw new Error(\n            '`builder.addCase` should only be called before calling `builder.addDefaultCase`',\n          )\n        }\n      }\n      const type =\n        typeof typeOrActionCreator === 'string'\n          ? typeOrActionCreator\n          : typeOrActionCreator.type\n      if (!type) {\n        throw new Error(\n          '`builder.addCase` cannot be called with an empty action type',\n        )\n      }\n      if (type in actionsMap) {\n        throw new Error(\n          '`builder.addCase` cannot be called with two reducers for the same action type ' +\n            `'${type}'`,\n        )\n      }\n      actionsMap[type] = reducer\n      return builder\n    },\n    addAsyncThunk<\n      Returned,\n      ThunkArg,\n      ThunkApiConfig extends AsyncThunkConfig = {},\n    >(\n      asyncThunk: AsyncThunk<Returned, ThunkArg, ThunkApiConfig>,\n      reducers: AsyncThunkReducers<S, ThunkArg, Returned, ThunkApiConfig>,\n    ) {\n      if (process.env.NODE_ENV !== 'production') {\n        // since this uses both action cases and matchers, we can't enforce the order in runtime other than checking for default case\n        if (defaultCaseReducer) {\n          throw new Error(\n            '`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`',\n          )\n        }\n      }\n      if (reducers.pending)\n        actionsMap[asyncThunk.pending.type] = reducers.pending\n      if (reducers.rejected)\n        actionsMap[asyncThunk.rejected.type] = reducers.rejected\n      if (reducers.fulfilled)\n        actionsMap[asyncThunk.fulfilled.type] = reducers.fulfilled\n      if (reducers.settled)\n        actionMatchers.push({\n          matcher: asyncThunk.settled,\n          reducer: reducers.settled,\n        })\n      return builder\n    },\n    addMatcher(matcher: TypeGuard<any>, reducer: CaseReducer<S, any>) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (defaultCaseReducer) {\n          throw new Error(\n            '`builder.addMatcher` should only be called before calling `builder.addDefaultCase`',\n          )\n        }\n      }\n      actionMatchers.push({ matcher, reducer })\n      return builder\n    },\n    addDefaultCase(reducer: CaseReducer<S, Action>) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (defaultCaseReducer) {\n          throw new Error('`builder.addDefaultCase` can only be called once')\n        }\n      }\n      defaultCaseReducer = reducer\n      return builder\n    },\n  }\n  builderCallback(builder)\n  return [actionsMap, actionMatchers, defaultCaseReducer]\n}\n", "import type { Draft } from 'immer'\nimport type { Action, Reducer, UnknownAction } from 'redux'\nimport { createNextState, isDraft, isDraftable } from './immerImports'\nimport type { ActionReducerMapBuilder } from './mapBuilders'\nimport { executeReducerBuilderCallback } from './mapBuilders'\nimport type { TypeGuard } from './tsHelpers'\nimport { freezeDraftable } from './utils'\n\n/**\n * Defines a mapping from action types to corresponding action object shapes.\n *\n * @deprecated This should not be used manually - it is only used for internal\n *             inference purposes and should not have any further value.\n *             It might be removed in the future.\n * @public\n */\nexport type Actions<T extends keyof any = string> = Record<T, Action>\n\nexport type ActionMatcherDescription<S, A extends Action> = {\n  matcher: TypeGuard<A>\n  reducer: CaseReducer<S, NoInfer<A>>\n}\n\nexport type ReadonlyActionMatcherDescriptionCollection<S> = ReadonlyArray<\n  ActionMatcherDescription<S, any>\n>\n\nexport type ActionMatcherDescriptionCollection<S> = Array<\n  ActionMatcherDescription<S, any>\n>\n\n/**\n * A *case reducer* is a reducer function for a specific action type. Case\n * reducers can be composed to full reducers using `createReducer()`.\n *\n * Unlike a normal Redux reducer, a case reducer is never called with an\n * `undefined` state to determine the initial state. Instead, the initial\n * state is explicitly specified as an argument to `createReducer()`.\n *\n * In addition, a case reducer can choose to mutate the passed-in `state`\n * value directly instead of returning a new state. This does not actually\n * cause the store state to be mutated directly; instead, thanks to\n * [immer](https://github.com/mweststrate/immer), the mutations are\n * translated to copy operations that result in a new state.\n *\n * @public\n */\nexport type CaseReducer<S = any, A extends Action = UnknownAction> = (\n  state: Draft<S>,\n  action: A,\n) => NoInfer<S> | void | Draft<NoInfer<S>>\n\n/**\n * A mapping from action types to case reducers for `createReducer()`.\n *\n * @deprecated This should not be used manually - it is only used\n *             for internal inference purposes and using it manually\n *             would lead to type erasure.\n *             It might be removed in the future.\n * @public\n */\nexport type CaseReducers<S, AS extends Actions> = {\n  [T in keyof AS]: AS[T] extends Action ? CaseReducer<S, AS[T]> : void\n}\n\nexport type NotFunction<T> = T extends Function ? never : T\n\nfunction isStateFunction<S>(x: unknown): x is () => S {\n  return typeof x === 'function'\n}\n\nexport type ReducerWithInitialState<S extends NotFunction<any>> = Reducer<S> & {\n  getInitialState: () => S\n}\n\n/**\n * A utility function that allows defining a reducer as a mapping from action\n * type to *case reducer* functions that handle these action types. The\n * reducer's initial state is passed as the first argument.\n *\n * @remarks\n * The body of every case reducer is implicitly wrapped with a call to\n * `produce()` from the [immer](https://github.com/mweststrate/immer) library.\n * This means that rather than returning a new state object, you can also\n * mutate the passed-in state object directly; these mutations will then be\n * automatically and efficiently translated into copies, giving you both\n * convenience and immutability.\n *\n * @overloadSummary\n * This function accepts a callback that receives a `builder` object as its argument.\n * That builder provides `addCase`, `addMatcher` and `addDefaultCase` functions that may be\n * called to define what actions this reducer will handle.\n *\n * @param initialState - `State | (() => State)`: The initial state that should be used when the reducer is called the first time. This may also be a \"lazy initializer\" function, which should return an initial state value when called. This will be used whenever the reducer is called with `undefined` as its state value, and is primarily useful for cases like reading initial state from `localStorage`.\n * @param builderCallback - `(builder: Builder) => void` A callback that receives a *builder* object to define\n *   case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\n * @example\n * ```ts\n * import type { PayloadAction, UnknownAction } from '@reduxjs/toolkit';\n * import { createAction, createReducer } from '@reduxjs/toolkit';\n *\n * const increment = createAction<number>('increment');\n * const decrement = createAction<number>('decrement');\n *\n * function isActionWithNumberPayload(\n *   action: UnknownAction,\n * ): action is PayloadAction<number> {\n *   return typeof action.payload === 'number';\n * }\n *\n * const reducer = createReducer(\n *   {\n *     counter: 0,\n *     sumOfNumberPayloads: 0,\n *     unhandledActions: 0,\n *   },\n *   (builder) => {\n *     builder\n *       .addCase(increment, (state, action) => {\n *         // action is inferred correctly here\n *         state.counter += action.payload;\n *       })\n *       // You can chain calls, or have separate `builder.addCase()` lines each time\n *       .addCase(decrement, (state, action) => {\n *         state.counter -= action.payload;\n *       })\n *       // You can apply a \"matcher function\" to incoming actions\n *       .addMatcher(isActionWithNumberPayload, (state, action) => {})\n *       // and provide a default case if no other handlers matched\n *       .addDefaultCase((state, action) => {});\n *   },\n * );\n * ```\n * @public\n */\nexport function createReducer<S extends NotFunction<any>>(\n  initialState: S | (() => S),\n  mapOrBuilderCallback: (builder: ActionReducerMapBuilder<S>) => void,\n): ReducerWithInitialState<S> {\n  if (process.env.NODE_ENV !== 'production') {\n    if (typeof mapOrBuilderCallback === 'object') {\n      throw new Error(\n        \"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\",\n      )\n    }\n  }\n\n  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] =\n    executeReducerBuilderCallback(mapOrBuilderCallback)\n\n  // Ensure the initial state gets frozen either way (if draftable)\n  let getInitialState: () => S\n  if (isStateFunction(initialState)) {\n    getInitialState = () => freezeDraftable(initialState())\n  } else {\n    const frozenInitialState = freezeDraftable(initialState)\n    getInitialState = () => frozenInitialState\n  }\n\n  function reducer(state = getInitialState(), action: any): S {\n    let caseReducers = [\n      actionsMap[action.type],\n      ...finalActionMatchers\n        .filter(({ matcher }) => matcher(action))\n        .map(({ reducer }) => reducer),\n    ]\n    if (caseReducers.filter((cr) => !!cr).length === 0) {\n      caseReducers = [finalDefaultCaseReducer]\n    }\n\n    return caseReducers.reduce((previousState, caseReducer): S => {\n      if (caseReducer) {\n        if (isDraft(previousState)) {\n          // If it's already a draft, we must already be inside a `createNextState` call,\n          // likely because this is being wrapped in `createReducer`, `createSlice`, or nested\n          // inside an existing draft. It's safe to just pass the draft to the mutator.\n          const draft = previousState as Draft<S> // We can assume this is already a draft\n          const result = caseReducer(draft, action)\n\n          if (result === undefined) {\n            return previousState\n          }\n\n          return result as S\n        } else if (!isDraftable(previousState)) {\n          // If state is not draftable (ex: a primitive, such as 0), we want to directly\n          // return the caseReducer func and not wrap it with produce.\n          const result = caseReducer(previousState as any, action)\n\n          if (result === undefined) {\n            if (previousState === null) {\n              return previousState\n            }\n            throw new Error(\n              'A case reducer on a non-draftable value must not return undefined',\n            )\n          }\n\n          return result as S\n        } else {\n          // @ts-ignore createNextState() produces an Immutable<Draft<S>> rather\n          // than an Immutable<S>, and TypeScript cannot find out how to reconcile\n          // these two types.\n          return createNextState(previousState, (draft: Draft<S>) => {\n            return caseReducer(draft, action)\n          })\n        }\n      }\n\n      return previousState\n    }, state)\n  }\n\n  reducer.getInitialState = getInitialState\n\n  return reducer as ReducerWithInitialState<S>\n}\n", "import type {\n  ActionFromMatcher,\n  Matcher,\n  UnionToIntersection,\n} from './tsHelpers'\nimport { hasMatchFunction } from './tsHelpers'\nimport type {\n  AsyncThunk,\n  AsyncThunkFulfilledActionCreator,\n  AsyncThunkPendingActionCreator,\n  AsyncThunkRejectedActionCreator,\n} from './createAsyncThunk'\n\n/** @public */\nexport type ActionMatchingAnyOf<Matchers extends Matcher<any>[]> =\n  ActionFromMatcher<Matchers[number]>\n\n/** @public */\nexport type ActionMatchingAllOf<Matchers extends Matcher<any>[]> =\n  UnionToIntersection<ActionMatchingAnyOf<Matchers>>\n\nconst matches = (matcher: Matcher<any>, action: any) => {\n  if (hasMatchFunction(matcher)) {\n    return matcher.match(action)\n  } else {\n    return matcher(action)\n  }\n}\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action matches any one of the supplied type guards or action\n * creators.\n *\n * @param matchers The type guards or action creators to match against.\n *\n * @public\n */\nexport function isAnyOf<Matchers extends Matcher<any>[]>(\n  ...matchers: Matchers\n) {\n  return (action: any): action is ActionMatchingAnyOf<Matchers> => {\n    return matchers.some((matcher) => matches(matcher, action))\n  }\n}\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action matches all of the supplied type guards or action\n * creators.\n *\n * @param matchers The type guards or action creators to match against.\n *\n * @public\n */\nexport function isAllOf<Matchers extends Matcher<any>[]>(\n  ...matchers: Matchers\n) {\n  return (action: any): action is ActionMatchingAllOf<Matchers> => {\n    return matchers.every((matcher) => matches(matcher, action))\n  }\n}\n\n/**\n * @param action A redux action\n * @param validStatus An array of valid meta.requestStatus values\n *\n * @internal\n */\nexport function hasExpectedRequestMetadata(\n  action: any,\n  validStatus: readonly string[],\n) {\n  if (!action || !action.meta) return false\n\n  const hasValidRequestId = typeof action.meta.requestId === 'string'\n  const hasValidRequestStatus =\n    validStatus.indexOf(action.meta.requestStatus) > -1\n\n  return hasValidRequestId && hasValidRequestStatus\n}\n\nfunction isAsyncThunkArray(a: [any] | AnyAsyncThunk[]): a is AnyAsyncThunk[] {\n  return (\n    typeof a[0] === 'function' &&\n    'pending' in a[0] &&\n    'fulfilled' in a[0] &&\n    'rejected' in a[0]\n  )\n}\n\nexport type UnknownAsyncThunkPendingAction = ReturnType<\n  AsyncThunkPendingActionCreator<unknown>\n>\n\nexport type PendingActionFromAsyncThunk<T extends AnyAsyncThunk> =\n  ActionFromMatcher<T['pending']>\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action was created by an async thunk action creator, and that\n * the action is pending.\n *\n * @public\n */\nexport function isPending(): (\n  action: any,\n) => action is UnknownAsyncThunkPendingAction\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action belongs to one of the provided async thunk action creators,\n * and that the action is pending.\n *\n * @param asyncThunks (optional) The async thunk action creators to match against.\n *\n * @public\n */\nexport function isPending<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(\n  ...asyncThunks: AsyncThunks\n): (action: any) => action is PendingActionFromAsyncThunk<AsyncThunks[number]>\n/**\n * Tests if `action` is a pending thunk action\n * @public\n */\nexport function isPending(action: any): action is UnknownAsyncThunkPendingAction\nexport function isPending<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(...asyncThunks: AsyncThunks | [any]) {\n  if (asyncThunks.length === 0) {\n    return (action: any) => hasExpectedRequestMetadata(action, ['pending'])\n  }\n\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isPending()(asyncThunks[0])\n  }\n\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.pending))\n}\n\nexport type UnknownAsyncThunkRejectedAction = ReturnType<\n  AsyncThunkRejectedActionCreator<unknown, unknown>\n>\n\nexport type RejectedActionFromAsyncThunk<T extends AnyAsyncThunk> =\n  ActionFromMatcher<T['rejected']>\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action was created by an async thunk action creator, and that\n * the action is rejected.\n *\n * @public\n */\nexport function isRejected(): (\n  action: any,\n) => action is UnknownAsyncThunkRejectedAction\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action belongs to one of the provided async thunk action creators,\n * and that the action is rejected.\n *\n * @param asyncThunks (optional) The async thunk action creators to match against.\n *\n * @public\n */\nexport function isRejected<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(\n  ...asyncThunks: AsyncThunks\n): (action: any) => action is RejectedActionFromAsyncThunk<AsyncThunks[number]>\n/**\n * Tests if `action` is a rejected thunk action\n * @public\n */\nexport function isRejected(\n  action: any,\n): action is UnknownAsyncThunkRejectedAction\nexport function isRejected<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(...asyncThunks: AsyncThunks | [any]) {\n  if (asyncThunks.length === 0) {\n    return (action: any) => hasExpectedRequestMetadata(action, ['rejected'])\n  }\n\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isRejected()(asyncThunks[0])\n  }\n\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.rejected))\n}\n\nexport type UnknownAsyncThunkRejectedWithValueAction = ReturnType<\n  AsyncThunkRejectedActionCreator<unknown, unknown>\n>\n\nexport type RejectedWithValueActionFromAsyncThunk<T extends AnyAsyncThunk> =\n  ActionFromMatcher<T['rejected']> &\n    (T extends AsyncThunk<any, any, { rejectValue: infer RejectedValue }>\n      ? { payload: RejectedValue }\n      : unknown)\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action was created by an async thunk action creator, and that\n * the action is rejected with value.\n *\n * @public\n */\nexport function isRejectedWithValue(): (\n  action: any,\n) => action is UnknownAsyncThunkRejectedAction\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action belongs to one of the provided async thunk action creators,\n * and that the action is rejected with value.\n *\n * @param asyncThunks (optional) The async thunk action creators to match against.\n *\n * @public\n */\nexport function isRejectedWithValue<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(\n  ...asyncThunks: AsyncThunks\n): (\n  action: any,\n) => action is RejectedWithValueActionFromAsyncThunk<AsyncThunks[number]>\n/**\n * Tests if `action` is a rejected thunk action with value\n * @public\n */\nexport function isRejectedWithValue(\n  action: any,\n): action is UnknownAsyncThunkRejectedAction\nexport function isRejectedWithValue<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(...asyncThunks: AsyncThunks | [any]) {\n  const hasFlag = (action: any): action is any => {\n    return action && action.meta && action.meta.rejectedWithValue\n  }\n\n  if (asyncThunks.length === 0) {\n    return isAllOf(isRejected(...asyncThunks), hasFlag)\n  }\n\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isRejectedWithValue()(asyncThunks[0])\n  }\n\n  return isAllOf(isRejected(...asyncThunks), hasFlag)\n}\n\nexport type UnknownAsyncThunkFulfilledAction = ReturnType<\n  AsyncThunkFulfilledActionCreator<unknown, unknown>\n>\n\nexport type FulfilledActionFromAsyncThunk<T extends AnyAsyncThunk> =\n  ActionFromMatcher<T['fulfilled']>\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action was created by an async thunk action creator, and that\n * the action is fulfilled.\n *\n * @public\n */\nexport function isFulfilled(): (\n  action: any,\n) => action is UnknownAsyncThunkFulfilledAction\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action belongs to one of the provided async thunk action creators,\n * and that the action is fulfilled.\n *\n * @param asyncThunks (optional) The async thunk action creators to match against.\n *\n * @public\n */\nexport function isFulfilled<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(\n  ...asyncThunks: AsyncThunks\n): (action: any) => action is FulfilledActionFromAsyncThunk<AsyncThunks[number]>\n/**\n * Tests if `action` is a fulfilled thunk action\n * @public\n */\nexport function isFulfilled(\n  action: any,\n): action is UnknownAsyncThunkFulfilledAction\nexport function isFulfilled<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(...asyncThunks: AsyncThunks | [any]) {\n  if (asyncThunks.length === 0) {\n    return (action: any) => hasExpectedRequestMetadata(action, ['fulfilled'])\n  }\n\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isFulfilled()(asyncThunks[0])\n  }\n\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.fulfilled))\n}\n\nexport type UnknownAsyncThunkAction =\n  | UnknownAsyncThunkPendingAction\n  | UnknownAsyncThunkRejectedAction\n  | UnknownAsyncThunkFulfilledAction\n\nexport type AnyAsyncThunk = {\n  pending: { match: (action: any) => action is any }\n  fulfilled: { match: (action: any) => action is any }\n  rejected: { match: (action: any) => action is any }\n}\n\nexport type ActionsFromAsyncThunk<T extends AnyAsyncThunk> =\n  | ActionFromMatcher<T['pending']>\n  | ActionFromMatcher<T['fulfilled']>\n  | ActionFromMatcher<T['rejected']>\n\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action was created by an async thunk action creator.\n *\n * @public\n */\nexport function isAsyncThunkAction(): (\n  action: any,\n) => action is UnknownAsyncThunkAction\n/**\n * A higher-order function that returns a function that may be used to check\n * whether an action belongs to one of the provided async thunk action creators.\n *\n * @param asyncThunks (optional) The async thunk action creators to match against.\n *\n * @public\n */\nexport function isAsyncThunkAction<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(\n  ...asyncThunks: AsyncThunks\n): (action: any) => action is ActionsFromAsyncThunk<AsyncThunks[number]>\n/**\n * Tests if `action` is a thunk action\n * @public\n */\nexport function isAsyncThunkAction(\n  action: any,\n): action is UnknownAsyncThunkAction\nexport function isAsyncThunkAction<\n  AsyncThunks extends [AnyAsyncThunk, ...AnyAsyncThunk[]],\n>(...asyncThunks: AsyncThunks | [any]) {\n  if (asyncThunks.length === 0) {\n    return (action: any) =>\n      hasExpectedRequestMetadata(action, ['pending', 'fulfilled', 'rejected'])\n  }\n\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isAsyncThunkAction()(asyncThunks[0])\n  }\n\n  return isAnyOf(\n    ...asyncThunks.flatMap((asyncThunk) => [\n      asyncThunk.pending,\n      asyncThunk.rejected,\n      asyncThunk.fulfilled,\n    ]),\n  )\n}\n", "// Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\n// This alphabet uses `A-Za-z0-9_-` symbols. A genetic algorithm helped\n// optimize the gzip compression for this alphabet.\nlet urlAlphabet =\n  'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\n\n/**\n *\n * @public\n */\nexport let nanoid = (size = 21) => {\n  let id = ''\n  // A compact alternative for `for (var i = 0; i < step; i++)`.\n  let i = size\n  while (i--) {\n    // `| 0` is more compact and faster than `Math.floor()`.\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\n", "import type { Dispatch, UnknownAction } from 'redux'\nimport type { ThunkDispatch } from 'redux-thunk'\nimport type { ActionCreatorWithPreparedPayload } from './createAction'\nimport { createAction } from './createAction'\nimport { isAnyOf } from './matchers'\nimport { nanoid } from './nanoid'\nimport type {\n  FallbackIfUnknown,\n  Id,\n  IsAny,\n  IsUnknown,\n  SafePromise,\n} from './tsHelpers'\n\nexport type BaseThunkAPI<\n  S,\n  E,\n  D extends Dispatch = Dispatch,\n  RejectedValue = unknown,\n  RejectedMeta = unknown,\n  FulfilledMeta = unknown,\n> = {\n  dispatch: D\n  getState: () => S\n  extra: E\n  requestId: string\n  signal: AbortSignal\n  abort: (reason?: string) => void\n  rejectWithValue: IsUnknown<\n    RejectedMeta,\n    (value: RejectedValue) => RejectWithValue<RejectedValue, RejectedMeta>,\n    (\n      value: RejectedValue,\n      meta: RejectedMeta,\n    ) => RejectWithValue<RejectedValue, RejectedMeta>\n  >\n  fulfillWithValue: IsUnknown<\n    FulfilledMeta,\n    <FulfilledValue>(value: FulfilledValue) => FulfilledValue,\n    <FulfilledValue>(\n      value: FulfilledValue,\n      meta: FulfilledMeta,\n    ) => FulfillWithMeta<FulfilledValue, FulfilledMeta>\n  >\n}\n\n/**\n * @public\n */\nexport interface SerializedError {\n  name?: string\n  message?: string\n  stack?: string\n  code?: string\n}\n\nconst commonProperties: Array<keyof SerializedError> = [\n  'name',\n  'message',\n  'stack',\n  'code',\n]\n\nclass RejectWithValue<Payload, RejectedMeta> {\n  /*\n  type-only property to distinguish between RejectWithValue and FulfillWithMeta\n  does not exist at runtime\n  */\n  private readonly _type!: 'RejectWithValue'\n  constructor(\n    public readonly payload: Payload,\n    public readonly meta: RejectedMeta,\n  ) {}\n}\n\nclass FulfillWithMeta<Payload, FulfilledMeta> {\n  /*\n  type-only property to distinguish between RejectWithValue and FulfillWithMeta\n  does not exist at runtime\n  */\n  private readonly _type!: 'FulfillWithMeta'\n  constructor(\n    public readonly payload: Payload,\n    public readonly meta: FulfilledMeta,\n  ) {}\n}\n\n/**\n * Serializes an error into a plain object.\n * Reworked from https://github.com/sindresorhus/serialize-error\n *\n * @public\n */\nexport const miniSerializeError = (value: any): SerializedError => {\n  if (typeof value === 'object' && value !== null) {\n    const simpleError: SerializedError = {}\n    for (const property of commonProperties) {\n      if (typeof value[property] === 'string') {\n        simpleError[property] = value[property]\n      }\n    }\n\n    return simpleError\n  }\n\n  return { message: String(value) }\n}\n\nexport type AsyncThunkConfig = {\n  state?: unknown\n  dispatch?: ThunkDispatch<unknown, unknown, UnknownAction>\n  extra?: unknown\n  rejectValue?: unknown\n  serializedErrorType?: unknown\n  pendingMeta?: unknown\n  fulfilledMeta?: unknown\n  rejectedMeta?: unknown\n}\n\nexport type GetState<ThunkApiConfig> = ThunkApiConfig extends {\n  state: infer State\n}\n  ? State\n  : unknown\n\ntype GetExtra<ThunkApiConfig> = ThunkApiConfig extends { extra: infer Extra }\n  ? Extra\n  : unknown\ntype GetDispatch<ThunkApiConfig> = ThunkApiConfig extends {\n  dispatch: infer Dispatch\n}\n  ? FallbackIfUnknown<\n      Dispatch,\n      ThunkDispatch<\n        GetState<ThunkApiConfig>,\n        GetExtra<ThunkApiConfig>,\n        UnknownAction\n      >\n    >\n  : ThunkDispatch<\n      GetState<ThunkApiConfig>,\n      GetExtra<ThunkApiConfig>,\n      UnknownAction\n    >\n\nexport type GetThunkAPI<ThunkApiConfig> = BaseThunkAPI<\n  GetState<ThunkApiConfig>,\n  GetExtra<ThunkApiConfig>,\n  GetDispatch<ThunkApiConfig>,\n  GetRejectValue<ThunkApiConfig>,\n  GetRejectedMeta<ThunkApiConfig>,\n  GetFulfilledMeta<ThunkApiConfig>\n>\n\ntype GetRejectValue<ThunkApiConfig> = ThunkApiConfig extends {\n  rejectValue: infer RejectValue\n}\n  ? RejectValue\n  : unknown\n\ntype GetPendingMeta<ThunkApiConfig> = ThunkApiConfig extends {\n  pendingMeta: infer PendingMeta\n}\n  ? PendingMeta\n  : unknown\n\ntype GetFulfilledMeta<ThunkApiConfig> = ThunkApiConfig extends {\n  fulfilledMeta: infer FulfilledMeta\n}\n  ? FulfilledMeta\n  : unknown\n\ntype GetRejectedMeta<ThunkApiConfig> = ThunkApiConfig extends {\n  rejectedMeta: infer RejectedMeta\n}\n  ? RejectedMeta\n  : unknown\n\ntype GetSerializedErrorType<ThunkApiConfig> = ThunkApiConfig extends {\n  serializedErrorType: infer GetSerializedErrorType\n}\n  ? GetSerializedErrorType\n  : SerializedError\n\ntype MaybePromise<T> = T | Promise<T> | (T extends any ? Promise<T> : never)\n\n/**\n * A type describing the return value of the `payloadCreator` argument to `createAsyncThunk`.\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\n *\n * @public\n */\nexport type AsyncThunkPayloadCreatorReturnValue<\n  Returned,\n  ThunkApiConfig extends AsyncThunkConfig,\n> = MaybePromise<\n  | IsUnknown<\n      GetFulfilledMeta<ThunkApiConfig>,\n      Returned,\n      FulfillWithMeta<Returned, GetFulfilledMeta<ThunkApiConfig>>\n    >\n  | RejectWithValue<\n      GetRejectValue<ThunkApiConfig>,\n      GetRejectedMeta<ThunkApiConfig>\n    >\n>\n/**\n * A type describing the `payloadCreator` argument to `createAsyncThunk`.\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\n *\n * @public\n */\nexport type AsyncThunkPayloadCreator<\n  Returned,\n  ThunkArg = void,\n  ThunkApiConfig extends AsyncThunkConfig = {},\n> = (\n  arg: ThunkArg,\n  thunkAPI: GetThunkAPI<ThunkApiConfig>,\n) => AsyncThunkPayloadCreatorReturnValue<Returned, ThunkApiConfig>\n\n/**\n * A ThunkAction created by `createAsyncThunk`.\n * Dispatching it returns a Promise for either a\n * fulfilled or rejected action.\n * Also, the returned value contains an `abort()` method\n * that allows the asyncAction to be cancelled from the outside.\n *\n * @public\n */\nexport type AsyncThunkAction<\n  Returned,\n  ThunkArg,\n  ThunkApiConfig extends AsyncThunkConfig,\n> = (\n  dispatch: NonNullable<GetDispatch<ThunkApiConfig>>,\n  getState: () => GetState<ThunkApiConfig>,\n  extra: GetExtra<ThunkApiConfig>,\n) => SafePromise<\n  | ReturnType<AsyncThunkFulfilledActionCreator<Returned, ThunkArg>>\n  | ReturnType<AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>>\n> & {\n  abort: (reason?: string) => void\n  requestId: string\n  arg: ThunkArg\n  unwrap: () => Promise<Returned>\n}\n\n/**\n * Config provided when calling the async thunk action creator.\n */\nexport interface AsyncThunkDispatchConfig {\n  /**\n   * An external `AbortSignal` that will be tracked by the internal `AbortSignal`.\n   */\n  signal?: AbortSignal\n}\n\ntype AsyncThunkActionCreator<\n  Returned,\n  ThunkArg,\n  ThunkApiConfig extends AsyncThunkConfig,\n> = IsAny<\n  ThunkArg,\n  // any handling\n  (\n    arg: ThunkArg,\n    config?: AsyncThunkDispatchConfig,\n  ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\n  // unknown handling\n  unknown extends ThunkArg\n    ? (\n        arg: ThunkArg,\n        config?: AsyncThunkDispatchConfig,\n      ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument not specified or specified as void or undefined\n    : [ThunkArg] extends [void] | [undefined]\n      ? (\n          arg?: undefined,\n          config?: AsyncThunkDispatchConfig,\n        ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains void\n      : [void] extends [ThunkArg] // make optional\n        ? (\n            arg?: ThunkArg,\n            config?: AsyncThunkDispatchConfig,\n          ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig> // argument contains undefined\n        : [undefined] extends [ThunkArg]\n          ? WithStrictNullChecks<\n              // with strict nullChecks: make optional\n              (\n                arg?: ThunkArg,\n                config?: AsyncThunkDispatchConfig,\n              ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>,\n              // without strict null checks this will match everything, so don't make it optional\n              (\n                arg: ThunkArg,\n                config?: AsyncThunkDispatchConfig,\n              ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\n            > // default case: normal argument\n          : (\n              arg: ThunkArg,\n              config?: AsyncThunkDispatchConfig,\n            ) => AsyncThunkAction<Returned, ThunkArg, ThunkApiConfig>\n>\n\n/**\n * Options object for `createAsyncThunk`.\n *\n * @public\n */\nexport type AsyncThunkOptions<\n  ThunkArg = void,\n  ThunkApiConfig extends AsyncThunkConfig = {},\n> = {\n  /**\n   * A method to control whether the asyncThunk should be executed. Has access to the\n   * `arg`, `api.getState()` and `api.extra` arguments.\n   *\n   * @returns `false` if it should be skipped\n   */\n  condition?(\n    arg: ThunkArg,\n    api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>,\n  ): MaybePromise<boolean | undefined>\n  /**\n   * If `condition` returns `false`, the asyncThunk will be skipped.\n   * This option allows you to control whether a `rejected` action with `meta.condition == false`\n   * will be dispatched or not.\n   *\n   * @default `false`\n   */\n  dispatchConditionRejection?: boolean\n\n  serializeError?: (x: unknown) => GetSerializedErrorType<ThunkApiConfig>\n\n  /**\n   * A function to use when generating the `requestId` for the request sequence.\n   *\n   * @default `nanoid`\n   */\n  idGenerator?: (arg: ThunkArg) => string\n} & IsUnknown<\n  GetPendingMeta<ThunkApiConfig>,\n  {\n    /**\n     * A method to generate additional properties to be added to `meta` of the pending action.\n     *\n     * Using this optional overload will not modify the types correctly, this overload is only in place to support JavaScript users.\n     * Please use the `ThunkApiConfig` parameter `pendingMeta` to get access to a correctly typed overload\n     */\n    getPendingMeta?(\n      base: {\n        arg: ThunkArg\n        requestId: string\n      },\n      api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>,\n    ): GetPendingMeta<ThunkApiConfig>\n  },\n  {\n    /**\n     * A method to generate additional properties to be added to `meta` of the pending action.\n     */\n    getPendingMeta(\n      base: {\n        arg: ThunkArg\n        requestId: string\n      },\n      api: Pick<GetThunkAPI<ThunkApiConfig>, 'getState' | 'extra'>,\n    ): GetPendingMeta<ThunkApiConfig>\n  }\n>\n\nexport type AsyncThunkPendingActionCreator<\n  ThunkArg,\n  ThunkApiConfig = {},\n> = ActionCreatorWithPreparedPayload<\n  [string, ThunkArg, GetPendingMeta<ThunkApiConfig>?],\n  undefined,\n  string,\n  never,\n  {\n    arg: ThunkArg\n    requestId: string\n    requestStatus: 'pending'\n  } & GetPendingMeta<ThunkApiConfig>\n>\n\nexport type AsyncThunkRejectedActionCreator<\n  ThunkArg,\n  ThunkApiConfig = {},\n> = ActionCreatorWithPreparedPayload<\n  [\n    Error | null,\n    string,\n    ThunkArg,\n    GetRejectValue<ThunkApiConfig>?,\n    GetRejectedMeta<ThunkApiConfig>?,\n  ],\n  GetRejectValue<ThunkApiConfig> | undefined,\n  string,\n  GetSerializedErrorType<ThunkApiConfig>,\n  {\n    arg: ThunkArg\n    requestId: string\n    requestStatus: 'rejected'\n    aborted: boolean\n    condition: boolean\n  } & (\n    | ({ rejectedWithValue: false } & {\n        [K in keyof GetRejectedMeta<ThunkApiConfig>]?: undefined\n      })\n    | ({ rejectedWithValue: true } & GetRejectedMeta<ThunkApiConfig>)\n  )\n>\n\nexport type AsyncThunkFulfilledActionCreator<\n  Returned,\n  ThunkArg,\n  ThunkApiConfig = {},\n> = ActionCreatorWithPreparedPayload<\n  [Returned, string, ThunkArg, GetFulfilledMeta<ThunkApiConfig>?],\n  Returned,\n  string,\n  never,\n  {\n    arg: ThunkArg\n    requestId: string\n    requestStatus: 'fulfilled'\n  } & GetFulfilledMeta<ThunkApiConfig>\n>\n\n/**\n * A type describing the return value of `createAsyncThunk`.\n * Might be useful for wrapping `createAsyncThunk` in custom abstractions.\n *\n * @public\n */\nexport type AsyncThunk<\n  Returned,\n  ThunkArg,\n  ThunkApiConfig extends AsyncThunkConfig,\n> = AsyncThunkActionCreator<Returned, ThunkArg, ThunkApiConfig> & {\n  pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig>\n  rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\n  fulfilled: AsyncThunkFulfilledActionCreator<\n    Returned,\n    ThunkArg,\n    ThunkApiConfig\n  >\n  // matchSettled?\n  settled: (\n    action: any,\n  ) => action is ReturnType<\n    | AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig>\n    | AsyncThunkFulfilledActionCreator<Returned, ThunkArg, ThunkApiConfig>\n  >\n  typePrefix: string\n}\n\nexport type OverrideThunkApiConfigs<OldConfig, NewConfig> = Id<\n  NewConfig & Omit<OldConfig, keyof NewConfig>\n>\n\nexport type CreateAsyncThunkFunction<\n  CurriedThunkApiConfig extends AsyncThunkConfig,\n> = {\n  /**\n   *\n   * @param typePrefix\n   * @param payloadCreator\n   * @param options\n   *\n   * @public\n   */\n  // separate signature without `AsyncThunkConfig` for better inference\n  <Returned, ThunkArg = void>(\n    typePrefix: string,\n    payloadCreator: AsyncThunkPayloadCreator<\n      Returned,\n      ThunkArg,\n      CurriedThunkApiConfig\n    >,\n    options?: AsyncThunkOptions<ThunkArg, CurriedThunkApiConfig>,\n  ): AsyncThunk<Returned, ThunkArg, CurriedThunkApiConfig>\n\n  /**\n   *\n   * @param typePrefix\n   * @param payloadCreator\n   * @param options\n   *\n   * @public\n   */\n  <Returned, ThunkArg, ThunkApiConfig extends AsyncThunkConfig>(\n    typePrefix: string,\n    payloadCreator: AsyncThunkPayloadCreator<\n      Returned,\n      ThunkArg,\n      OverrideThunkApiConfigs<CurriedThunkApiConfig, ThunkApiConfig>\n    >,\n    options?: AsyncThunkOptions<\n      ThunkArg,\n      OverrideThunkApiConfigs<CurriedThunkApiConfig, ThunkApiConfig>\n    >,\n  ): AsyncThunk<\n    Returned,\n    ThunkArg,\n    OverrideThunkApiConfigs<CurriedThunkApiConfig, ThunkApiConfig>\n  >\n}\n\ntype CreateAsyncThunk<CurriedThunkApiConfig extends AsyncThunkConfig> =\n  CreateAsyncThunkFunction<CurriedThunkApiConfig> & {\n    withTypes<ThunkApiConfig extends AsyncThunkConfig>(): CreateAsyncThunk<\n      OverrideThunkApiConfigs<CurriedThunkApiConfig, ThunkApiConfig>\n    >\n  }\n\nconst externalAbortMessage = 'External signal was aborted'\n\nexport const createAsyncThunk = /* @__PURE__ */ (() => {\n  function createAsyncThunk<\n    Returned,\n    ThunkArg,\n    ThunkApiConfig extends AsyncThunkConfig,\n  >(\n    typePrefix: string,\n    payloadCreator: AsyncThunkPayloadCreator<\n      Returned,\n      ThunkArg,\n      ThunkApiConfig\n    >,\n    options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>,\n  ): AsyncThunk<Returned, ThunkArg, ThunkApiConfig> {\n    type RejectedValue = GetRejectValue<ThunkApiConfig>\n    type PendingMeta = GetPendingMeta<ThunkApiConfig>\n    type FulfilledMeta = GetFulfilledMeta<ThunkApiConfig>\n    type RejectedMeta = GetRejectedMeta<ThunkApiConfig>\n\n    const fulfilled: AsyncThunkFulfilledActionCreator<\n      Returned,\n      ThunkArg,\n      ThunkApiConfig\n    > = createAction(\n      typePrefix + '/fulfilled',\n      (\n        payload: Returned,\n        requestId: string,\n        arg: ThunkArg,\n        meta?: FulfilledMeta,\n      ) => ({\n        payload,\n        meta: {\n          ...((meta as any) || {}),\n          arg,\n          requestId,\n          requestStatus: 'fulfilled' as const,\n        },\n      }),\n    )\n\n    const pending: AsyncThunkPendingActionCreator<ThunkArg, ThunkApiConfig> =\n      createAction(\n        typePrefix + '/pending',\n        (requestId: string, arg: ThunkArg, meta?: PendingMeta) => ({\n          payload: undefined,\n          meta: {\n            ...((meta as any) || {}),\n            arg,\n            requestId,\n            requestStatus: 'pending' as const,\n          },\n        }),\n      )\n\n    const rejected: AsyncThunkRejectedActionCreator<ThunkArg, ThunkApiConfig> =\n      createAction(\n        typePrefix + '/rejected',\n        (\n          error: Error | null,\n          requestId: string,\n          arg: ThunkArg,\n          payload?: RejectedValue,\n          meta?: RejectedMeta,\n        ) => ({\n          payload,\n          error: ((options && options.serializeError) || miniSerializeError)(\n            error || 'Rejected',\n          ) as GetSerializedErrorType<ThunkApiConfig>,\n          meta: {\n            ...((meta as any) || {}),\n            arg,\n            requestId,\n            rejectedWithValue: payload !== undefined,\n            requestStatus: 'rejected' as const,\n            aborted: error?.name === 'AbortError',\n            condition: error?.name === 'ConditionError',\n          },\n        }),\n      )\n\n    function actionCreator(\n      arg: ThunkArg,\n      { signal }: AsyncThunkDispatchConfig = {},\n    ): AsyncThunkAction<Returned, ThunkArg, Required<ThunkApiConfig>> {\n      return (dispatch, getState, extra) => {\n        const requestId = options?.idGenerator\n          ? options.idGenerator(arg)\n          : nanoid()\n\n        const abortController = new AbortController()\n        let abortHandler: (() => void) | undefined\n        let abortReason: string | undefined\n\n        function abort(reason?: string) {\n          abortReason = reason\n          abortController.abort()\n        }\n\n        if (signal) {\n          if (signal.aborted) {\n            abort(externalAbortMessage)\n          } else {\n            signal.addEventListener(\n              'abort',\n              () => abort(externalAbortMessage),\n              { once: true },\n            )\n          }\n        }\n\n        const promise = (async function () {\n          let finalAction: ReturnType<typeof fulfilled | typeof rejected>\n          try {\n            let conditionResult = options?.condition?.(arg, { getState, extra })\n            if (isThenable(conditionResult)) {\n              conditionResult = await conditionResult\n            }\n\n            if (conditionResult === false) {\n              // eslint-disable-next-line no-throw-literal\n              throw {\n                name: 'ConditionError',\n                message: 'Aborted due to condition callback returning false.',\n              }\n            }\n            if (abortController.signal.aborted) {\n              // The request was aborted (e.g. via an already-aborted external\n              // signal, or `abort()` called during an async `condition`) before\n              // the `pending` action was dispatched. Treat this as an abort\n              // rather than a condition rejection, so the reason is preserved\n              // and the `rejected` action is not silently swallowed.\n              // eslint-disable-next-line no-throw-literal\n              throw {\n                name: 'AbortError',\n                message: abortReason || 'Aborted',\n              }\n            }\n\n            const abortedPromise = new Promise<never>((_, reject) => {\n              abortHandler = () => {\n                reject({\n                  name: 'AbortError',\n                  message: abortReason || 'Aborted',\n                })\n              }\n              abortController.signal.addEventListener('abort', abortHandler, {\n                once: true,\n              })\n            })\n            dispatch(\n              pending(\n                requestId,\n                arg,\n                options?.getPendingMeta?.(\n                  { requestId, arg },\n                  { getState, extra },\n                ),\n              ) as any,\n            )\n            finalAction = await Promise.race([\n              abortedPromise,\n              Promise.resolve(\n                payloadCreator(arg, {\n                  dispatch,\n                  getState,\n                  extra,\n                  requestId,\n                  signal: abortController.signal,\n                  abort,\n                  rejectWithValue: ((\n                    value: RejectedValue,\n                    meta?: RejectedMeta,\n                  ) => {\n                    return new RejectWithValue(value, meta)\n                  }) as any,\n                  fulfillWithValue: ((value: unknown, meta?: FulfilledMeta) => {\n                    return new FulfillWithMeta(value, meta)\n                  }) as any,\n                }),\n              ).then((result) => {\n                if (result instanceof RejectWithValue) {\n                  throw result\n                }\n                if (result instanceof FulfillWithMeta) {\n                  return fulfilled(result.payload, requestId, arg, result.meta)\n                }\n                return fulfilled(result as any, requestId, arg)\n              }),\n            ])\n          } catch (err) {\n            finalAction =\n              err instanceof RejectWithValue\n                ? rejected(null, requestId, arg, err.payload, err.meta)\n                : rejected(err as any, requestId, arg)\n          } finally {\n            if (abortHandler) {\n              abortController.signal.removeEventListener('abort', abortHandler)\n            }\n          }\n          // We dispatch the result action _after_ the catch, to avoid having any errors\n          // here get swallowed by the try/catch block,\n          // per https://twitter.com/dan_abramov/status/770914221638942720\n          // and https://github.com/reduxjs/redux-toolkit/blob/e85eb17b39a2118d859f7b7746e0f3fee523e089/docs/tutorials/advanced-tutorial.md#async-error-handling-logic-in-thunks\n\n          const skipDispatch =\n            options &&\n            !options.dispatchConditionRejection &&\n            rejected.match(finalAction) &&\n            (finalAction as any).meta.condition\n\n          if (!skipDispatch) {\n            dispatch(finalAction as any)\n          }\n          return finalAction\n        })()\n        return Object.assign(promise as SafePromise<any>, {\n          abort,\n          requestId,\n          arg,\n          unwrap() {\n            return promise.then<any>(unwrapResult)\n          },\n        })\n      }\n    }\n\n    return Object.assign(\n      actionCreator as AsyncThunkActionCreator<\n        Returned,\n        ThunkArg,\n        ThunkApiConfig\n      >,\n      {\n        pending,\n        rejected,\n        fulfilled,\n        settled: isAnyOf(rejected, fulfilled),\n        typePrefix,\n      },\n    )\n  }\n  createAsyncThunk.withTypes = () => createAsyncThunk\n\n  return createAsyncThunk as CreateAsyncThunk<AsyncThunkConfig>\n})()\n\ninterface UnwrappableAction {\n  payload: any\n  meta?: any\n  error?: any\n}\n\ntype UnwrappedActionPayload<T extends UnwrappableAction> = Exclude<\n  T,\n  { error: any }\n>['payload']\n\n/**\n * @public\n */\nexport function unwrapResult<R extends UnwrappableAction>(\n  action: R,\n): UnwrappedActionPayload<R> {\n  if (action.meta && action.meta.rejectedWithValue) {\n    throw action.payload\n  }\n  if (action.error) {\n    throw action.error\n  }\n  return action.payload\n}\n\ntype WithStrictNullChecks<True, False> = undefined extends boolean\n  ? False\n  : True\n\nfunction isThenable(value: any): value is PromiseLike<any> {\n  return (\n    value !== null &&\n    typeof value === 'object' &&\n    typeof value.then === 'function'\n  )\n}\n", "import type { Action, Reducer, UnknownAction } from 'redux'\nimport type { Selector } from 'reselect'\nimport type { InjectConfig } from './combineSlices'\nimport type {\n  ActionCreatorWithoutPayload,\n  PayloadAction,\n  PayloadActionCreator,\n  PrepareAction,\n  _ActionCreatorWithPreparedPayload,\n} from './createAction'\nimport { createAction } from './createAction'\nimport type {\n  AsyncThunk,\n  AsyncThunkConfig,\n  AsyncThunkOptions,\n  AsyncThunkPayloadCreator,\n  OverrideThunkApiConfigs,\n} from './createAsyncThunk'\nimport { createAsyncThunk as _createAsyncThunk } from './createAsyncThunk'\nimport type {\n  ActionMatcherDescriptionCollection,\n  CaseReducer,\n  ReducerWithInitialState,\n} from './createReducer'\nimport { createReducer } from './createReducer'\nimport type {\n  ActionReducerMapBuilder,\n  AsyncThunkReducers,\n  TypedActionCreator,\n} from './mapBuilders'\nimport { executeReducerBuilderCallback } from './mapBuilders'\nimport type { Id, TypeGuard } from './tsHelpers'\nimport { getOrInsertComputed } from './utils'\n\nconst asyncThunkSymbol = /* @__PURE__ */ Symbol.for(\n  'rtk-slice-createasyncthunk',\n)\n// type is annotated because it's too long to infer\nexport const asyncThunkCreator: {\n  [asyncThunkSymbol]: typeof _createAsyncThunk\n} = {\n  [asyncThunkSymbol]: _createAsyncThunk,\n}\n\ntype InjectIntoConfig<NewReducerPath extends string> = InjectConfig & {\n  reducerPath?: NewReducerPath\n}\n\n/**\n * The return value of `createSlice`\n *\n * @public\n */\nexport interface Slice<\n  State = any,\n  CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\n  Name extends string = string,\n  ReducerPath extends string = Name,\n  Selectors extends SliceSelectors<State> = SliceSelectors<State>,\n> {\n  /**\n   * The slice name.\n   */\n  name: Name\n\n  /**\n   *  The slice reducer path.\n   */\n  reducerPath: ReducerPath\n\n  /**\n   * The slice's reducer.\n   */\n  reducer: Reducer<State>\n\n  /**\n   * Action creators for the types of actions that are handled by the slice\n   * reducer.\n   */\n  actions: CaseReducerActions<CaseReducers, Name>\n\n  /**\n   * The individual case reducer functions that were passed in the `reducers` parameter.\n   * This enables reuse and testing if they were defined inline when calling `createSlice`.\n   */\n  caseReducers: SliceDefinedCaseReducers<CaseReducers>\n\n  /**\n   * Provides access to the initial state value given to the slice.\n   * If a lazy state initializer was provided, it will be called and a fresh value returned.\n   */\n  getInitialState: () => State\n\n  /**\n   * Get localised slice selectors (expects to be called with *just* the slice's state as the first parameter)\n   */\n  getSelectors(): Id<SliceDefinedSelectors<State, Selectors, State>>\n\n  /**\n   * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state)\n   */\n  getSelectors<RootState>(\n    selectState: (rootState: RootState) => State,\n  ): Id<SliceDefinedSelectors<State, Selectors, RootState>>\n\n  /**\n   * Selectors that assume the slice's state is `rootState[slice.reducerPath]` (which is usually the case)\n   *\n   * Equivalent to `slice.getSelectors((state: RootState) => state[slice.reducerPath])`.\n   */\n  get selectors(): Id<\n    SliceDefinedSelectors<State, Selectors, { [K in ReducerPath]: State }>\n  >\n\n  /**\n   * Inject slice into provided reducer (return value from `combineSlices`), and return injected slice.\n   */\n  injectInto<NewReducerPath extends string = ReducerPath>(\n    this: this,\n    injectable: {\n      inject: (\n        slice: { reducerPath: string; reducer: Reducer },\n        config?: InjectConfig,\n      ) => void\n    },\n    config?: InjectIntoConfig<NewReducerPath>,\n  ): InjectedSlice<State, CaseReducers, Name, NewReducerPath, Selectors>\n\n  /**\n   * Select the slice state, using the slice's current reducerPath.\n   *\n   * Will throw an error if slice is not found.\n   */\n  selectSlice(state: { [K in ReducerPath]: State }): State\n}\n\n/**\n * A slice after being called with `injectInto(reducer)`.\n *\n * Selectors can now be called with an `undefined` value, in which case they use the slice's initial state.\n */\ntype InjectedSlice<\n  State = any,\n  CaseReducers extends SliceCaseReducers<State> = SliceCaseReducers<State>,\n  Name extends string = string,\n  ReducerPath extends string = Name,\n  Selectors extends SliceSelectors<State> = SliceSelectors<State>,\n> = Omit<\n  Slice<State, CaseReducers, Name, ReducerPath, Selectors>,\n  'getSelectors' | 'selectors'\n> & {\n  /**\n   * Get localised slice selectors (expects to be called with *just* the slice's state as the first parameter)\n   */\n  getSelectors(): Id<SliceDefinedSelectors<State, Selectors, State | undefined>>\n\n  /**\n   * Get globalised slice selectors (`selectState` callback is expected to receive first parameter and return slice state)\n   */\n  getSelectors<RootState>(\n    selectState: (rootState: RootState) => State | undefined,\n  ): Id<SliceDefinedSelectors<State, Selectors, RootState>>\n\n  /**\n   * Selectors that assume the slice's state is `rootState[slice.name]` (which is usually the case)\n   *\n   * Equivalent to `slice.getSelectors((state: RootState) => state[slice.name])`.\n   */\n  get selectors(): Id<\n    SliceDefinedSelectors<\n      State,\n      Selectors,\n      { [K in ReducerPath]?: State | undefined }\n    >\n  >\n\n  /**\n   * Select the slice state, using the slice's current reducerPath.\n   *\n   * Returns initial state if slice is not found.\n   */\n  selectSlice(state: { [K in ReducerPath]?: State | undefined }): State\n}\n\n/**\n * Options for `createSlice()`.\n *\n * @public\n */\nexport interface CreateSliceOptions<\n  State = any,\n  CR extends SliceCaseReducers<State> = SliceCaseReducers<State>,\n  Name extends string = string,\n  ReducerPath extends string = Name,\n  Selectors extends SliceSelectors<State> = SliceSelectors<State>,\n> {\n  /**\n   * The slice's name. Used to namespace the generated action types.\n   */\n  name: Name\n\n  /**\n   * The slice's reducer path. Used when injecting into a combined slice reducer.\n   */\n  reducerPath?: ReducerPath\n\n  /**\n   * The initial state that should be used when the reducer is called the first time. This may also be a \"lazy initializer\" function, which should return an initial state value when called. This will be used whenever the reducer is called with `undefined` as its state value, and is primarily useful for cases like reading initial state from `localStorage`.\n   */\n  initialState: State | (() => State)\n\n  /**\n   * A mapping from action types to action-type-specific *case reducer*\n   * functions. For every action type, a matching action creator will be\n   * generated using `createAction()`.\n   */\n  reducers:\n    | ValidateSliceCaseReducers<State, CR>\n    | ((creators: ReducerCreators<State>) => CR)\n\n  /**\n   * A callback that receives a *builder* object to define\n   * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.\n   *\n   *\n   * @example\n   * ```ts\n   * import type { Action } from '@reduxjs/toolkit';\n   * import { createAction, createSlice } from '@reduxjs/toolkit';\n   *\n   * const incrementBy = createAction<number>('incrementBy');\n   * const decrement = createAction('decrement');\n   *\n   * interface RejectedAction extends Action {\n   *   error: Error;\n   * }\n   *\n   * function isRejectedAction(action: Action): action is RejectedAction {\n   *   return action.type.endsWith('rejected');\n   * }\n   *\n   * createSlice({\n   *   name: 'counter',\n   *   initialState: 0,\n   *   reducers: {},\n   *   extraReducers: (builder) => {\n   *     builder\n   *       .addCase(incrementBy, (state, action) => {\n   *         // action is inferred correctly here if using TS\n   *       })\n   *       // You can chain calls, or have separate `builder.addCase()` lines each time\n   *       .addCase(decrement, (state, action) => {})\n   *       // You can match a range of action types\n   *       .addMatcher(\n   *         isRejectedAction,\n   *         // `action` will be inferred as a RejectedAction due to isRejectedAction being defined as a type guard\n   *         (state, action) => {},\n   *       )\n   *       // and provide a default case if no other handlers matched\n   *       .addDefaultCase((state, action) => {});\n   *   },\n   * });\n   * ```\n   */\n  extraReducers?: (builder: ActionReducerMapBuilder<State>) => void\n\n  /**\n   * A map of selectors that receive the slice's state and any additional arguments, and return a result.\n   */\n  selectors?: Selectors\n}\n\nexport enum ReducerType {\n  reducer = 'reducer',\n  reducerWithPrepare = 'reducerWithPrepare',\n  asyncThunk = 'asyncThunk',\n}\n\ntype ReducerDefinition<T extends ReducerType = ReducerType> = {\n  _reducerDefinitionType: T\n}\n\nexport type CaseReducerDefinition<\n  S = any,\n  A extends Action = UnknownAction,\n> = CaseReducer<S, A> & ReducerDefinition<ReducerType.reducer>\n\n/**\n * A CaseReducer with a `prepare` method.\n *\n * @public\n */\nexport type CaseReducerWithPrepare<State, Action extends PayloadAction> = {\n  reducer: CaseReducer<State, Action>\n  prepare: PrepareAction<Action['payload']>\n}\n\nexport interface CaseReducerWithPrepareDefinition<\n  State,\n  Action extends PayloadAction,\n>\n  extends\n    CaseReducerWithPrepare<State, Action>,\n    ReducerDefinition<ReducerType.reducerWithPrepare> {}\n\ntype AsyncThunkSliceReducerConfig<\n  State,\n  ThunkArg extends any,\n  Returned = unknown,\n  ThunkApiConfig extends AsyncThunkConfig = {},\n> = AsyncThunkReducers<State, ThunkArg, Returned, ThunkApiConfig> & {\n  options?: AsyncThunkOptions<ThunkArg, ThunkApiConfig>\n}\n\ntype AsyncThunkSliceReducerDefinition<\n  State,\n  ThunkArg extends any,\n  Returned = unknown,\n  ThunkApiConfig extends AsyncThunkConfig = {},\n> = AsyncThunkSliceReducerConfig<State, ThunkArg, Returned, ThunkApiConfig> &\n  ReducerDefinition<ReducerType.asyncThunk> & {\n    payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>\n  }\n\n/**\n * Providing these as part of the config would cause circular types, so we disallow passing them\n */\ntype PreventCircular<ThunkApiConfig> = {\n  [K in keyof ThunkApiConfig]: K extends 'state' | 'dispatch'\n    ? never\n    : ThunkApiConfig[K]\n}\n\ninterface AsyncThunkCreator<\n  State,\n  CurriedThunkApiConfig extends PreventCircular<AsyncThunkConfig> =\n    PreventCircular<AsyncThunkConfig>,\n> {\n  <Returned, ThunkArg = void>(\n    payloadCreator: AsyncThunkPayloadCreator<\n      Returned,\n      ThunkArg,\n      CurriedThunkApiConfig\n    >,\n    config?: AsyncThunkSliceReducerConfig<\n      State,\n      ThunkArg,\n      Returned,\n      CurriedThunkApiConfig\n    >,\n  ): AsyncThunkSliceReducerDefinition<\n    State,\n    ThunkArg,\n    Returned,\n    CurriedThunkApiConfig\n  >\n  <\n    Returned,\n    ThunkArg,\n    ThunkApiConfig extends PreventCircular<AsyncThunkConfig> = {},\n  >(\n    payloadCreator: AsyncThunkPayloadCreator<\n      Returned,\n      ThunkArg,\n      ThunkApiConfig\n    >,\n    config?: AsyncThunkSliceReducerConfig<\n      State,\n      ThunkArg,\n      Returned,\n      ThunkApiConfig\n    >,\n  ): AsyncThunkSliceReducerDefinition<State, ThunkArg, Returned, ThunkApiConfig>\n  withTypes<\n    ThunkApiConfig extends PreventCircular<AsyncThunkConfig>,\n  >(): AsyncThunkCreator<\n    State,\n    OverrideThunkApiConfigs<CurriedThunkApiConfig, ThunkApiConfig>\n  >\n}\n\nexport interface ReducerCreators<State> {\n  reducer(\n    caseReducer: CaseReducer<State, PayloadAction>,\n  ): CaseReducerDefinition<State, PayloadAction>\n  reducer<Payload>(\n    caseReducer: CaseReducer<State, PayloadAction<Payload>>,\n  ): CaseReducerDefinition<State, PayloadAction<Payload>>\n\n  asyncThunk: AsyncThunkCreator<State>\n\n  preparedReducer<Prepare extends PrepareAction<any>>(\n    prepare: Prepare,\n    reducer: CaseReducer<\n      State,\n      ReturnType<_ActionCreatorWithPreparedPayload<Prepare>>\n    >,\n  ): {\n    _reducerDefinitionType: ReducerType.reducerWithPrepare\n    prepare: Prepare\n    reducer: CaseReducer<\n      State,\n      ReturnType<_ActionCreatorWithPreparedPayload<Prepare>>\n    >\n  }\n}\n\n/**\n * The type describing a slice's `reducers` option.\n *\n * @public\n */\nexport type SliceCaseReducers<State> =\n  | Record<string, ReducerDefinition>\n  | Record<\n      string,\n      | CaseReducer<State, PayloadAction<any>>\n      | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>\n    >\n\n/**\n * The type describing a slice's `selectors` option.\n */\nexport type SliceSelectors<State> = {\n  [K: string]: (sliceState: State, ...args: any[]) => any\n}\n\ntype SliceActionType<\n  SliceName extends string,\n  ActionName extends keyof any,\n> = ActionName extends string | number ? `${SliceName}/${ActionName}` : string\n\n/**\n * Derives the slice's `actions` property from the `reducers` options\n *\n * @public\n */\nexport type CaseReducerActions<\n  CaseReducers extends SliceCaseReducers<any>,\n  SliceName extends string,\n> = {\n  [Type in keyof CaseReducers]: CaseReducers[Type] extends infer Definition\n    ? Definition extends { prepare: any }\n      ? ActionCreatorForCaseReducerWithPrepare<\n          Definition,\n          SliceActionType<SliceName, Type>\n        >\n      : Definition extends AsyncThunkSliceReducerDefinition<\n            any,\n            infer ThunkArg,\n            infer Returned,\n            infer ThunkApiConfig\n          >\n        ? AsyncThunk<Returned, ThunkArg, ThunkApiConfig>\n        : Definition extends { reducer: any }\n          ? ActionCreatorForCaseReducer<\n              Definition['reducer'],\n              SliceActionType<SliceName, Type>\n            >\n          : ActionCreatorForCaseReducer<\n              Definition,\n              SliceActionType<SliceName, Type>\n            >\n    : never\n}\n\n/**\n * Get a `PayloadActionCreator` type for a passed `CaseReducerWithPrepare`\n *\n * @internal\n */\ntype ActionCreatorForCaseReducerWithPrepare<\n  CR extends { prepare: any },\n  Type extends string,\n> = _ActionCreatorWithPreparedPayload<CR['prepare'], Type>\n\n/**\n * Get a `PayloadActionCreator` type for a passed `CaseReducer`\n *\n * @internal\n */\ntype ActionCreatorForCaseReducer<CR, Type extends string> = CR extends (\n  state: any,\n  action: infer Action,\n) => any\n  ? Action extends { payload: infer P }\n    ? PayloadActionCreator<P, Type>\n    : ActionCreatorWithoutPayload<Type>\n  : ActionCreatorWithoutPayload<Type>\n\n/**\n * Extracts the CaseReducers out of a `reducers` object, even if they are\n * tested into a `CaseReducerWithPrepare`.\n *\n * @internal\n */\ntype SliceDefinedCaseReducers<CaseReducers extends SliceCaseReducers<any>> = {\n  [Type in keyof CaseReducers]: CaseReducers[Type] extends infer Definition\n    ? Definition extends AsyncThunkSliceReducerDefinition<any, any, any>\n      ? Id<\n          Pick<\n            Required<Definition>,\n            'fulfilled' | 'rejected' | 'pending' | 'settled'\n          >\n        >\n      : Definition extends {\n            reducer: infer Reducer\n          }\n        ? Reducer\n        : Definition\n    : never\n}\n\ntype RemappedSelector<S extends Selector, NewState> =\n  S extends Selector<any, infer R, infer P>\n    ? Selector<NewState, R, P> & { unwrapped: S }\n    : never\n\n/**\n * Extracts the final selector type from the `selectors` object.\n *\n * Removes the `string` index signature from the default value.\n */\ntype SliceDefinedSelectors<\n  State,\n  Selectors extends SliceSelectors<State>,\n  RootState,\n> = {\n  [K in keyof Selectors as string extends K ? never : K]: RemappedSelector<\n    Selectors[K],\n    RootState\n  >\n}\n\n/**\n * Used on a SliceCaseReducers object.\n * Ensures that if a CaseReducer is a `CaseReducerWithPrepare`, that\n * the `reducer` and the `prepare` function use the same type of `payload`.\n *\n * Might do additional such checks in the future.\n *\n * This type is only ever useful if you want to write your own wrapper around\n * `createSlice`. Please don't use it otherwise!\n *\n * @public\n */\nexport type ValidateSliceCaseReducers<\n  S,\n  ACR extends SliceCaseReducers<S>,\n> = ACR & {\n  [T in keyof ACR]: ACR[T] extends {\n    reducer(s: S, action?: infer A): any\n  }\n    ? {\n        prepare(...a: never[]): Omit<A, 'type'>\n      }\n    : {}\n}\n\nfunction getType(slice: string, actionKey: string): string {\n  return `${slice}/${actionKey}`\n}\n\ninterface BuildCreateSliceConfig {\n  creators?: {\n    asyncThunk?: typeof asyncThunkCreator\n  }\n}\n\nexport function buildCreateSlice({ creators }: BuildCreateSliceConfig = {}) {\n  const cAT = creators?.asyncThunk?.[asyncThunkSymbol]\n  return function createSlice<\n    State,\n    CaseReducers extends SliceCaseReducers<State>,\n    Name extends string,\n    Selectors extends SliceSelectors<State>,\n    ReducerPath extends string = Name,\n  >(\n    options: CreateSliceOptions<\n      State,\n      CaseReducers,\n      Name,\n      ReducerPath,\n      Selectors\n    >,\n  ): Slice<State, CaseReducers, Name, ReducerPath, Selectors> {\n    const { name, reducerPath = name as unknown as ReducerPath } = options\n    if (!name) {\n      throw new Error('`name` is a required option for createSlice')\n    }\n\n    if (\n      typeof process !== 'undefined' &&\n      process.env.NODE_ENV === 'development'\n    ) {\n      if (options.initialState === undefined) {\n        console.error(\n          'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`',\n        )\n      }\n    }\n\n    const reducers =\n      (typeof options.reducers === 'function'\n        ? options.reducers(buildReducerCreators<State>())\n        : options.reducers) || {}\n\n    const reducerNames = Object.keys(reducers)\n\n    const context: ReducerHandlingContext<State> = {\n      sliceCaseReducersByName: {},\n      sliceCaseReducersByType: {},\n      actionCreators: {},\n      sliceMatchers: [],\n    }\n\n    const contextMethods: ReducerHandlingContextMethods<State> = {\n      addCase(\n        typeOrActionCreator: string | TypedActionCreator<any>,\n        reducer: CaseReducer<State>,\n      ) {\n        const type =\n          typeof typeOrActionCreator === 'string'\n            ? typeOrActionCreator\n            : typeOrActionCreator.type\n        if (!type) {\n          throw new Error(\n            '`context.addCase` cannot be called with an empty action type',\n          )\n        }\n        if (type in context.sliceCaseReducersByType) {\n          throw new Error(\n            '`context.addCase` cannot be called with two reducers for the same action type: ' +\n              type,\n          )\n        }\n        context.sliceCaseReducersByType[type] = reducer\n        return contextMethods\n      },\n      addMatcher(matcher, reducer) {\n        context.sliceMatchers.push({ matcher, reducer })\n        return contextMethods\n      },\n      exposeAction(name, actionCreator) {\n        context.actionCreators[name] = actionCreator\n        return contextMethods\n      },\n      exposeCaseReducer(name, reducer) {\n        context.sliceCaseReducersByName[name] = reducer\n        return contextMethods\n      },\n    }\n\n    reducerNames.forEach((reducerName) => {\n      const reducerDefinition = reducers[reducerName]\n      const reducerDetails: ReducerDetails = {\n        reducerName,\n        type: getType(name, reducerName),\n        createNotation: typeof options.reducers === 'function',\n      }\n      if (isAsyncThunkSliceReducerDefinition<State>(reducerDefinition)) {\n        handleThunkCaseReducerDefinition(\n          reducerDetails,\n          reducerDefinition,\n          contextMethods,\n          cAT,\n        )\n      } else {\n        handleNormalReducerDefinition<State>(\n          reducerDetails,\n          reducerDefinition as any,\n          contextMethods,\n        )\n      }\n    })\n\n    function buildReducer() {\n      if (process.env.NODE_ENV !== 'production') {\n        if (typeof options.extraReducers === 'object') {\n          throw new Error(\n            \"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\",\n          )\n        }\n      }\n      const [\n        extraReducers = {},\n        actionMatchers = [],\n        defaultCaseReducer = undefined,\n      ] =\n        typeof options.extraReducers === 'function'\n          ? executeReducerBuilderCallback(options.extraReducers)\n          : [options.extraReducers]\n\n      const finalCaseReducers = {\n        ...extraReducers,\n        ...context.sliceCaseReducersByType,\n      }\n\n      return createReducer(options.initialState, (builder) => {\n        for (let key in finalCaseReducers) {\n          builder.addCase(key, finalCaseReducers[key] as CaseReducer<any>)\n        }\n        for (let sM of context.sliceMatchers) {\n          builder.addMatcher(sM.matcher, sM.reducer)\n        }\n        for (let m of actionMatchers) {\n          builder.addMatcher(m.matcher, m.reducer)\n        }\n        if (defaultCaseReducer) {\n          builder.addDefaultCase(defaultCaseReducer)\n        }\n      })\n    }\n\n    const selectSelf = (state: State) => state\n\n    const injectedSelectorCache = new Map<\n      boolean,\n      WeakMap<\n        (rootState: any) => State | undefined,\n        Record<string, (rootState: any) => any>\n      >\n    >()\n\n    const injectedStateCache = new WeakMap<(rootState: any) => State, State>()\n\n    let _reducer: ReducerWithInitialState<State>\n\n    function reducer(state: State | undefined, action: UnknownAction) {\n      if (!_reducer) _reducer = buildReducer()\n\n      return _reducer(state, action)\n    }\n\n    function getInitialState() {\n      if (!_reducer) _reducer = buildReducer()\n\n      return _reducer.getInitialState()\n    }\n\n    function makeSelectorProps<CurrentReducerPath extends string = ReducerPath>(\n      reducerPath: CurrentReducerPath,\n      injected = false,\n    ): Pick<\n      Slice<State, CaseReducers, Name, CurrentReducerPath, Selectors>,\n      'getSelectors' | 'selectors' | 'selectSlice' | 'reducerPath'\n    > {\n      function selectSlice(state: { [K in CurrentReducerPath]: State }) {\n        let sliceState = state[reducerPath]\n        if (typeof sliceState === 'undefined') {\n          if (injected) {\n            sliceState = getOrInsertComputed(\n              injectedStateCache,\n              selectSlice,\n              getInitialState,\n            )\n          } else if (process.env.NODE_ENV !== 'production') {\n            throw new Error(\n              'selectSlice returned undefined for an uninjected slice reducer',\n            )\n          }\n        }\n        return sliceState\n      }\n\n      function getSelectors(\n        selectState: (rootState: any) => State = selectSelf,\n      ) {\n        const selectorCache = getOrInsertComputed(\n          injectedSelectorCache,\n          injected,\n          () => new WeakMap(),\n        )\n\n        return getOrInsertComputed(selectorCache, selectState, () => {\n          const map: Record<string, Selector<any, any>> = {}\n          for (const [name, selector] of Object.entries(\n            options.selectors ?? {},\n          )) {\n            map[name] = wrapSelector(\n              selector,\n              selectState,\n              () =>\n                getOrInsertComputed(\n                  injectedStateCache,\n                  selectState,\n                  getInitialState,\n                ),\n              injected,\n            )\n          }\n          return map\n        }) as any\n      }\n      return {\n        reducerPath,\n        getSelectors,\n        get selectors() {\n          return getSelectors(selectSlice)\n        },\n        selectSlice,\n      }\n    }\n\n    const slice: Slice<State, CaseReducers, Name, ReducerPath, Selectors> = {\n      name,\n      reducer,\n      actions: context.actionCreators as any,\n      caseReducers: context.sliceCaseReducersByName as any,\n      getInitialState,\n      ...makeSelectorProps(reducerPath),\n      injectInto(\n        injectable,\n        { reducerPath: pathOpt, ...config }: InjectIntoConfig<string> = {},\n      ) {\n        const newReducerPath = pathOpt ?? reducerPath\n        injectable.inject({ reducerPath: newReducerPath, reducer }, config)\n        return {\n          ...slice,\n          ...makeSelectorProps(newReducerPath, true),\n        } as any\n      },\n    }\n    return slice\n  }\n}\n\nfunction wrapSelector<State, NewState, S extends Selector<State>>(\n  selector: S,\n  selectState: Selector<NewState, State>,\n  getInitialState: () => State,\n  injected?: boolean,\n) {\n  function wrapper(rootState: NewState, ...args: any[]) {\n    let sliceState = selectState(rootState)\n    if (typeof sliceState === 'undefined') {\n      if (injected) {\n        sliceState = getInitialState()\n      } else if (process.env.NODE_ENV !== 'production') {\n        throw new Error(\n          'selectState returned undefined for an uninjected slice reducer',\n        )\n      }\n    }\n    return selector(sliceState, ...args)\n  }\n  wrapper.unwrapped = selector\n  return wrapper as RemappedSelector<S, NewState>\n}\n\n/**\n * A function that accepts an initial state, an object full of reducer\n * functions, and a \"slice name\", and automatically generates\n * action creators and action types that correspond to the\n * reducers and state.\n *\n * @public\n */\nexport const createSlice = /* @__PURE__ */ buildCreateSlice()\n\ninterface ReducerHandlingContext<State> {\n  sliceCaseReducersByName: Record<\n    string,\n    | CaseReducer<State, any>\n    | Pick<\n        AsyncThunkSliceReducerDefinition<State, any, any, any>,\n        'fulfilled' | 'rejected' | 'pending' | 'settled'\n      >\n  >\n  sliceCaseReducersByType: Record<string, CaseReducer<State, any>>\n  sliceMatchers: ActionMatcherDescriptionCollection<State>\n  actionCreators: Record<string, Function>\n}\n\ninterface ReducerHandlingContextMethods<State> {\n  /**\n   * Adds a case reducer to handle a single action type.\n   * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\n   * @param reducer - The actual case reducer function.\n   */\n  addCase<ActionCreator extends TypedActionCreator<string>>(\n    actionCreator: ActionCreator,\n    reducer: CaseReducer<State, ReturnType<ActionCreator>>,\n  ): ReducerHandlingContextMethods<State>\n  /**\n   * Adds a case reducer to handle a single action type.\n   * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.\n   * @param reducer - The actual case reducer function.\n   */\n  addCase<Type extends string, A extends Action<Type>>(\n    type: Type,\n    reducer: CaseReducer<State, A>,\n  ): ReducerHandlingContextMethods<State>\n\n  /**\n   * Allows you to match incoming actions against your own filter function instead of only the `action.type` property.\n   * @remarks\n   * If multiple matcher reducers match, all of them will be executed in the order\n   * they were defined in - even if a case reducer already matched.\n   * All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.\n   * @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)\n   *   function\n   * @param reducer - The actual case reducer function.\n   *\n   */\n  addMatcher<A>(\n    matcher: TypeGuard<A>,\n    reducer: CaseReducer<State, A extends Action ? A : A & Action>,\n  ): ReducerHandlingContextMethods<State>\n  /**\n   * Add an action to be exposed under the final `slice.actions` key.\n   * @param name The key to be exposed as.\n   * @param actionCreator The action to expose.\n   * @example\n   * ```ts\n   * context.exposeAction('addPost', createAction<Post>('addPost'));\n   *\n   * export const { addPost } = slice.actions;\n   *\n   * dispatch(addPost(post));\n   * ```\n   */\n  exposeAction(\n    name: string,\n    actionCreator: Function,\n  ): ReducerHandlingContextMethods<State>\n  /**\n   * Add a case reducer to be exposed under the final `slice.caseReducers` key.\n   * @param name The key to be exposed as.\n   * @param reducer The reducer to expose.\n   * @example\n   * ```ts\n   * context.exposeCaseReducer('addPost', (state, action: PayloadAction<Post>) => {\n   *   state.push(action.payload);\n   * });\n   *\n   * slice.caseReducers.addPost([], addPost(post));\n   * ```\n   */\n  exposeCaseReducer(\n    name: string,\n    reducer:\n      | CaseReducer<State, any>\n      | Pick<\n          AsyncThunkSliceReducerDefinition<State, any, any, any>,\n          'fulfilled' | 'rejected' | 'pending' | 'settled'\n        >,\n  ): ReducerHandlingContextMethods<State>\n}\n\ninterface ReducerDetails {\n  /** The key the reducer was defined under */\n  reducerName: string\n  /** The predefined action type, i.e. `${slice.name}/${reducerName}` */\n  type: string\n  /** Whether create. notation was used when defining reducers */\n  createNotation: boolean\n}\n\nfunction buildReducerCreators<State>(): ReducerCreators<State> {\n  function asyncThunk(\n    payloadCreator: AsyncThunkPayloadCreator<any, any>,\n    config: AsyncThunkSliceReducerConfig<State, any>,\n  ): AsyncThunkSliceReducerDefinition<State, any> {\n    return {\n      _reducerDefinitionType: ReducerType.asyncThunk,\n      payloadCreator,\n      ...config,\n    }\n  }\n  asyncThunk.withTypes = () => asyncThunk\n  return {\n    reducer(caseReducer: CaseReducer<State, any>) {\n      return Object.assign(\n        {\n          // hack so the wrapping function has the same name as the original\n          // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original\n          [caseReducer.name](...args: Parameters<typeof caseReducer>) {\n            return caseReducer(...args)\n          },\n        }[caseReducer.name],\n        {\n          _reducerDefinitionType: ReducerType.reducer,\n        } as const,\n      )\n    },\n    preparedReducer(prepare, reducer) {\n      return {\n        _reducerDefinitionType: ReducerType.reducerWithPrepare,\n        prepare,\n        reducer,\n      }\n    },\n    asyncThunk: asyncThunk as any,\n  }\n}\n\nfunction handleNormalReducerDefinition<State>(\n  { type, reducerName, createNotation }: ReducerDetails,\n  maybeReducerWithPrepare:\n    | CaseReducer<State, { payload: any; type: string }>\n    | CaseReducerWithPrepare<State, PayloadAction<any, string, any, any>>,\n  context: ReducerHandlingContextMethods<State>,\n) {\n  let caseReducer: CaseReducer<State, any>\n  let prepareCallback: PrepareAction<any> | undefined\n  if ('reducer' in maybeReducerWithPrepare) {\n    if (\n      createNotation &&\n      !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)\n    ) {\n      throw new Error(\n        'Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.',\n      )\n    }\n    caseReducer = maybeReducerWithPrepare.reducer\n    prepareCallback = maybeReducerWithPrepare.prepare\n  } else {\n    caseReducer = maybeReducerWithPrepare\n  }\n  context\n    .addCase(type, caseReducer)\n    .exposeCaseReducer(reducerName, caseReducer)\n    .exposeAction(\n      reducerName,\n      prepareCallback\n        ? createAction(type, prepareCallback)\n        : createAction(type),\n    )\n}\n\nfunction isAsyncThunkSliceReducerDefinition<State>(\n  reducerDefinition: any,\n): reducerDefinition is AsyncThunkSliceReducerDefinition<State, any, any, any> {\n  return reducerDefinition._reducerDefinitionType === ReducerType.asyncThunk\n}\n\nfunction isCaseReducerWithPrepareDefinition<State>(\n  reducerDefinition: any,\n): reducerDefinition is CaseReducerWithPrepareDefinition<State, any> {\n  return (\n    reducerDefinition._reducerDefinitionType === ReducerType.reducerWithPrepare\n  )\n}\n\nfunction handleThunkCaseReducerDefinition<State>(\n  { type, reducerName }: ReducerDetails,\n  reducerDefinition: AsyncThunkSliceReducerDefinition<State, any, any, any>,\n  context: ReducerHandlingContextMethods<State>,\n  cAT: typeof _createAsyncThunk | undefined,\n) {\n  if (!cAT) {\n    throw new Error(\n      'Cannot use `create.asyncThunk` in the built-in `createSlice`. ' +\n        'Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.',\n    )\n  }\n  const { payloadCreator, fulfilled, pending, rejected, settled, options } =\n    reducerDefinition\n  const thunk = cAT(type, payloadCreator, options as any)\n  context.exposeAction(reducerName, thunk)\n\n  if (fulfilled) {\n    context.addCase(thunk.fulfilled, fulfilled)\n  }\n  if (pending) {\n    context.addCase(thunk.pending, pending)\n  }\n  if (rejected) {\n    context.addCase(thunk.rejected, rejected)\n  }\n  if (settled) {\n    context.addMatcher(thunk.settled, settled)\n  }\n\n  context.exposeCaseReducer(reducerName, {\n    fulfilled: fulfilled || noop,\n    pending: pending || noop,\n    rejected: rejected || noop,\n    settled: settled || noop,\n  })\n}\n\nfunction noop() {}\n", "import type {\n  EntityId,\n  EntityState,\n  EntityStateAdapter,\n  EntityStateFactory,\n} from './models'\n\nexport function getInitialEntityState<T, Id extends EntityId>(): EntityState<\n  T,\n  Id\n> {\n  return {\n    ids: [],\n    entities: {} as Record<Id, T>,\n  }\n}\n\nexport function createInitialStateFactory<T, Id extends EntityId>(\n  stateAdapter: EntityStateAdapter<T, Id>,\n): EntityStateFactory<T, Id> {\n  function getInitialState(\n    state?: undefined,\n    entities?: readonly T[] | Record<Id, T>,\n  ): EntityState<T, Id>\n  function getInitialState<S extends object>(\n    additionalState: S,\n    entities?: readonly T[] | Record<Id, T>,\n  ): EntityState<T, Id> & S\n  function getInitialState(\n    additionalState: any = {},\n    entities?: readonly T[] | Record<Id, T>,\n  ): any {\n    const state = Object.assign(getInitialEntityState(), additionalState)\n    return entities ? stateAdapter.setAll(state, entities) : state\n  }\n\n  return { getInitialState }\n}\n", "import type { CreateSelectorFunction, Selector } from 'reselect'\nimport { createDraftSafeSelector } from '../createDraftSafeSelector'\nimport type { EntityId, EntitySelectors, EntityState } from './models'\n\ntype AnyCreateSelectorFunction = CreateSelectorFunction<any, any, any>\n\nexport type GetSelectorsOptions = {\n  createSelector?: AnyCreateSelectorFunction\n}\n\nexport function createSelectorsFactory<T, Id extends EntityId>() {\n  function getSelectors(\n    selectState?: undefined,\n    options?: GetSelectorsOptions,\n  ): EntitySelectors<T, EntityState<T, Id>, Id>\n  function getSelectors<V>(\n    selectState: (state: V) => EntityState<T, Id>,\n    options?: GetSelectorsOptions,\n  ): EntitySelectors<T, V, Id>\n  function getSelectors<V>(\n    selectState?: (state: V) => EntityState<T, Id>,\n    options: GetSelectorsOptions = {},\n  ): EntitySelectors<T, any, Id> {\n    const {\n      createSelector = createDraftSafeSelector as AnyCreateSelectorFunction,\n    } = options\n\n    const selectIds = (state: EntityState<T, Id>) => state.ids\n\n    const selectEntities = (state: EntityState<T, Id>) => state.entities\n\n    const selectAll = createSelector(\n      selectIds,\n      selectEntities,\n      (ids, entities): T[] => ids.map((id) => entities[id]!),\n    )\n\n    const selectId = (_: unknown, id: Id) => id\n\n    const selectById = (entities: Record<Id, T>, id: Id) => entities[id]\n\n    const selectTotal = createSelector(selectIds, (ids) => ids.length)\n\n    if (!selectState) {\n      return {\n        selectIds,\n        selectEntities,\n        selectAll,\n        selectTotal,\n        selectById: createSelector(selectEntities, selectId, selectById),\n      }\n    }\n\n    const selectGlobalizedEntities = createSelector(\n      selectState as Selector<V, EntityState<T, Id>>,\n      selectEntities,\n    )\n\n    return {\n      selectIds: createSelector(selectState, selectIds),\n      selectEntities: selectGlobalizedEntities,\n      selectAll: createSelector(selectState, selectAll),\n      selectTotal: createSelector(selectState, selectTotal),\n      selectById: createSelector(\n        selectGlobalizedEntities,\n        selectId,\n        selectById,\n      ),\n    }\n  }\n\n  return { getSelectors }\n}\n", "import { createNextState, isDraft } from '../immerImports'\nimport type { Draft } from 'immer'\nimport type { EntityId, DraftableEntityState, PreventAny } from './models'\nimport type { PayloadAction } from '../createAction'\nimport { isFSA } from '../createAction'\n\nexport const isDraftTyped = isDraft as <T>(\n  value: T | Draft<T>,\n) => value is Draft<T>\n\nexport function createSingleArgumentStateOperator<T, Id extends EntityId>(\n  mutator: (state: DraftableEntityState<T, Id>) => void,\n) {\n  const operator = createStateOperator(\n    (_: undefined, state: DraftableEntityState<T, Id>) => mutator(state),\n  )\n\n  return function operation<S extends DraftableEntityState<T, Id>>(\n    state: PreventAny<S, T, Id>,\n  ): S {\n    return operator(state as S, undefined)\n  }\n}\n\nexport function createStateOperator<T, Id extends EntityId, R>(\n  mutator: (arg: R, state: DraftableEntityState<T, Id>) => void,\n) {\n  return function operation<S extends DraftableEntityState<T, Id>>(\n    state: S,\n    arg: R | PayloadAction<R>,\n  ): S {\n    function isPayloadActionArgument(\n      arg: R | PayloadAction<R>,\n    ): arg is PayloadAction<R> {\n      return isFSA(arg)\n    }\n\n    const runMutator = (draft: DraftableEntityState<T, Id>) => {\n      if (isPayloadActionArgument(arg)) {\n        mutator(arg.payload, draft)\n      } else {\n        mutator(arg, draft)\n      }\n    }\n\n    if (isDraftTyped<DraftableEntityState<T, Id>>(state)) {\n      // we must already be inside a `createNextState` call, likely because\n      // this is being wrapped in `createReducer` or `createSlice`.\n      // It's safe to just pass the draft to the mutator.\n      runMutator(state)\n\n      // since it's a draft, we'll just return it\n      return state\n    }\n\n    return createNextState(state, runMutator)\n  }\n}\n", "import type { Draft } from 'immer'\nimport { current, isDraft } from '../immerImports'\nimport type {\n  DraftableEntityState,\n  EntityId,\n  IdSelector,\n  Update,\n} from './models'\n\nexport function selectIdValue<T, Id extends EntityId>(\n  entity: T,\n  selectId: IdSelector<T, Id>,\n) {\n  const key = selectId(entity)\n\n  if (process.env.NODE_ENV !== 'production' && key === undefined) {\n    console.warn(\n      'The entity passed to the `selectId` implementation returned undefined.',\n      'You should probably provide your own `selectId` implementation.',\n      'The entity that was passed:',\n      entity,\n      'The `selectId` implementation:',\n      selectId.toString(),\n    )\n  }\n\n  return key\n}\n\nexport function ensureEntitiesArray<T, Id extends EntityId>(\n  entities: readonly T[] | Record<Id, T>,\n): readonly T[] {\n  if (!Array.isArray(entities)) {\n    entities = Object.values(entities)\n  }\n\n  return entities\n}\n\nexport function getCurrent<T>(value: T | Draft<T>): T {\n  return (isDraft(value) ? current(value) : value) as T\n}\n\nexport function splitAddedUpdatedEntities<T, Id extends EntityId>(\n  newEntities: readonly T[] | Record<Id, T>,\n  selectId: IdSelector<T, Id>,\n  state: DraftableEntityState<T, Id>,\n): [T[], Update<T, Id>[], Id[]] {\n  newEntities = ensureEntitiesArray(newEntities)\n\n  const existingIdsArray = getCurrent(state.ids)\n  const existingIds = new Set<Id>(existingIdsArray)\n\n  const added: T[] = []\n  const addedIds = new Set<Id>([])\n  const updated: Update<T, Id>[] = []\n\n  for (const entity of newEntities) {\n    const id = selectIdValue(entity, selectId)\n    if (existingIds.has(id) || addedIds.has(id)) {\n      updated.push({ id, changes: entity })\n    } else {\n      addedIds.add(id)\n      added.push(entity)\n    }\n  }\n  return [added, updated, existingIdsArray]\n}\n", "import type { Draft } from 'immer'\nimport type {\n  EntityStateAdapter,\n  IdSelector,\n  Update,\n  EntityId,\n  DraftableEntityState,\n} from './models'\nimport {\n  createStateOperator,\n  createSingleArgumentStateOperator,\n} from './state_adapter'\nimport {\n  selectIdValue,\n  ensureEntitiesArray,\n  splitAddedUpdatedEntities,\n} from './utils'\n\nexport function createUnsortedStateAdapter<T, Id extends EntityId>(\n  selectId: IdSelector<T, Id>,\n): EntityStateAdapter<T, Id> {\n  type R = DraftableEntityState<T, Id>\n\n  function addOneMutably(entity: T, state: R): void {\n    const key = selectIdValue(entity, selectId)\n\n    if (key in state.entities) {\n      return\n    }\n\n    state.ids.push(key as Id & Draft<Id>)\n    ;(state.entities as Record<Id, T>)[key] = entity\n  }\n\n  function addManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    newEntities = ensureEntitiesArray(newEntities)\n\n    for (const entity of newEntities) {\n      addOneMutably(entity, state)\n    }\n  }\n\n  function setOneMutably(entity: T, state: R): void {\n    const key = selectIdValue(entity, selectId)\n    if (!(key in state.entities)) {\n      state.ids.push(key as Id & Draft<Id>)\n    }\n    ;(state.entities as Record<Id, T>)[key] = entity\n  }\n\n  function setManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    newEntities = ensureEntitiesArray(newEntities)\n    for (const entity of newEntities) {\n      setOneMutably(entity, state)\n    }\n  }\n\n  function setAllMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    newEntities = ensureEntitiesArray(newEntities)\n\n    state.ids = []\n    state.entities = {} as Record<Id, T>\n\n    setManyMutably(newEntities, state)\n  }\n\n  function removeOneMutably(key: Id, state: R): void {\n    return removeManyMutably([key], state)\n  }\n\n  function removeManyMutably(keys: readonly Id[], state: R): void {\n    let didMutate = false\n\n    keys.forEach((key) => {\n      if (key in state.entities) {\n        delete (state.entities as Record<Id, T>)[key]\n        didMutate = true\n      }\n    })\n\n    if (didMutate) {\n      state.ids = (state.ids as Id[]).filter((id) => id in state.entities) as\n        | Id[]\n        | Draft<Id[]>\n    }\n  }\n\n  function removeAllMutably(state: R): void {\n    Object.assign(state, {\n      ids: [],\n      entities: {},\n    })\n  }\n\n  function takeNewKey(\n    keys: { [id: string]: Id },\n    update: Update<T, Id>,\n    state: R,\n  ): boolean {\n    const original: T | undefined = (state.entities as Record<Id, T>)[update.id]\n    if (original === undefined) {\n      return false\n    }\n    const updated: T = Object.assign({}, original, update.changes)\n    const newKey = selectIdValue(updated, selectId)\n    const hasNewKey = newKey !== update.id\n\n    if (hasNewKey) {\n      keys[update.id] = newKey\n      delete (state.entities as Record<Id, T>)[update.id]\n    }\n\n    ;(state.entities as Record<Id, T>)[newKey] = updated\n\n    return hasNewKey\n  }\n\n  function updateOneMutably(update: Update<T, Id>, state: R): void {\n    return updateManyMutably([update], state)\n  }\n\n  function updateManyMutably(\n    updates: ReadonlyArray<Update<T, Id>>,\n    state: R,\n  ): void {\n    const newKeys: { [id: string]: Id } = {}\n\n    const updatesPerEntity: { [id: string]: Update<T, Id> } = {}\n\n    updates.forEach((update) => {\n      // Only apply updates to entities that currently exist\n      if (update.id in state.entities) {\n        // If there are multiple updates to one entity, merge them together\n        updatesPerEntity[update.id] = {\n          id: update.id,\n          // Spreads ignore falsy values, so this works even if there isn't\n          // an existing update already at this key\n          changes: {\n            ...updatesPerEntity[update.id]?.changes,\n            ...update.changes,\n          },\n        }\n      }\n    })\n\n    updates = Object.values(updatesPerEntity)\n\n    const didMutateEntities = updates.length > 0\n\n    if (didMutateEntities) {\n      const didMutateIds =\n        updates.filter((update) => takeNewKey(newKeys, update, state)).length >\n        0\n\n      if (didMutateIds) {\n        state.ids = Object.values(state.entities).map((e) =>\n          selectIdValue(e as T, selectId),\n        )\n      }\n    }\n  }\n\n  function upsertOneMutably(entity: T, state: R): void {\n    return upsertManyMutably([entity], state)\n  }\n\n  function upsertManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    const [added, updated] = splitAddedUpdatedEntities<T, Id>(\n      newEntities,\n      selectId,\n      state,\n    )\n\n    addManyMutably(added, state)\n    updateManyMutably(updated, state)\n  }\n\n  return {\n    removeAll: createSingleArgumentStateOperator(removeAllMutably),\n    addOne: createStateOperator(addOneMutably),\n    addMany: createStateOperator(addManyMutably),\n    setOne: createStateOperator(setOneMutably),\n    setMany: createStateOperator(setManyMutably),\n    setAll: createStateOperator(setAllMutably),\n    updateOne: createStateOperator(updateOneMutably),\n    updateMany: createStateOperator(updateManyMutably),\n    upsertOne: createStateOperator(upsertOneMutably),\n    upsertMany: createStateOperator(upsertManyMutably),\n    removeOne: createStateOperator(removeOneMutably),\n    removeMany: createStateOperator(removeManyMutably),\n  }\n}\n", "import type {\n  IdSelector,\n  Comparer,\n  EntityStateAdapter,\n  Update,\n  EntityId,\n  DraftableEntityState,\n} from './models'\nimport { createStateOperator } from './state_adapter'\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\nimport {\n  selectIdValue,\n  ensureEntitiesArray,\n  splitAddedUpdatedEntities,\n  getCurrent,\n} from './utils'\n\n// Borrowed from Replay\nexport function findInsertIndex<T>(\n  sortedItems: T[],\n  item: T,\n  comparisonFunction: Comparer<T>,\n): number {\n  let lowIndex = 0\n  let highIndex = sortedItems.length\n  while (lowIndex < highIndex) {\n    let middleIndex = (lowIndex + highIndex) >>> 1\n    const currentItem = sortedItems[middleIndex]\n    const res = comparisonFunction(item, currentItem)\n    if (res >= 0) {\n      lowIndex = middleIndex + 1\n    } else {\n      highIndex = middleIndex\n    }\n  }\n\n  return lowIndex\n}\n\nexport function insert<T>(\n  sortedItems: T[],\n  item: T,\n  comparisonFunction: Comparer<T>,\n): T[] {\n  const insertAtIndex = findInsertIndex(sortedItems, item, comparisonFunction)\n\n  sortedItems.splice(insertAtIndex, 0, item)\n\n  return sortedItems\n}\n\nexport function createSortedStateAdapter<T, Id extends EntityId>(\n  selectId: IdSelector<T, Id>,\n  comparer: Comparer<T>,\n): EntityStateAdapter<T, Id> {\n  type R = DraftableEntityState<T, Id>\n\n  const { removeOne, removeMany, removeAll } =\n    createUnsortedStateAdapter(selectId)\n\n  function addOneMutably(entity: T, state: R): void {\n    return addManyMutably([entity], state)\n  }\n\n  function addManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n    existingIds?: Id[],\n  ): void {\n    newEntities = ensureEntitiesArray(newEntities)\n\n    const existingKeys = new Set<Id>(existingIds ?? getCurrent(state.ids))\n    const addedKeys = new Set<Id>()\n    const models = newEntities.filter((model) => {\n      const modelId = selectIdValue(model, selectId)\n      const notAdded = !addedKeys.has(modelId)\n      if (notAdded) addedKeys.add(modelId)\n      return !existingKeys.has(modelId) && notAdded\n    })\n\n    if (models.length !== 0) {\n      mergeFunction(state, models)\n    }\n  }\n\n  function setOneMutably(entity: T, state: R): void {\n    return setManyMutably([entity], state)\n  }\n\n  function setManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    let deduplicatedEntities = {} as Record<Id, T>\n    newEntities = ensureEntitiesArray(newEntities)\n    if (newEntities.length !== 0) {\n      for (const item of newEntities) {\n        const entityId = selectId(item)\n        // For multiple items with the same ID, we should keep the last one.\n        deduplicatedEntities[entityId] = item\n        delete (state.entities as Record<Id, T>)[entityId]\n      }\n      newEntities = ensureEntitiesArray(deduplicatedEntities)\n      mergeFunction(state, newEntities)\n    }\n  }\n\n  function setAllMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    newEntities = ensureEntitiesArray(newEntities)\n    state.entities = {} as Record<Id, T>\n    state.ids = []\n\n    setManyMutably(newEntities, state)\n  }\n\n  function updateOneMutably(update: Update<T, Id>, state: R): void {\n    return updateManyMutably([update], state)\n  }\n\n  function updateManyMutably(\n    updates: ReadonlyArray<Update<T, Id>>,\n    state: R,\n  ): void {\n    let appliedUpdates = false\n    let replacedIds = false\n\n    // Pre-merge all updates that target the same entity ID so that later\n    // changes always win for every field—including `id`.  Without this step,\n    // the first rename moves the entity to a new key; a subsequent update that\n    // still targets the original key finds nothing and is silently dropped,\n    // producing results inconsistent with the unsorted adapter.\n    const updatesPerEntity: { [id: string]: Update<T, Id> } = {}\n    for (const update of updates) {\n      // Only collect updates for entities that currently exist (same guard\n      // used by the unsorted adapter).\n      if (update.id in (state.entities as Record<Id, T>)) {\n        updatesPerEntity[update.id] = {\n          id: update.id,\n          changes: {\n            ...updatesPerEntity[update.id]?.changes,\n            ...update.changes,\n          },\n        }\n      }\n    }\n\n    for (const update of Object.values(updatesPerEntity) as Update<T, Id>[]) {\n      const entity: T | undefined = (state.entities as Record<Id, T>)[update.id]\n      if (!entity) {\n        continue\n      }\n\n      appliedUpdates = true\n\n      Object.assign(entity, update.changes)\n      const newId = selectId(entity)\n\n      if (update.id !== newId) {\n        // We do support the case where updates can change an item's ID.\n        // This makes things trickier - go ahead and swap the IDs in state now.\n        replacedIds = true\n        delete (state.entities as Record<Id, T>)[update.id]\n        const oldIndex = (state.ids as Id[]).indexOf(update.id)\n        state.ids[oldIndex] = newId\n        ;(state.entities as Record<Id, T>)[newId] = entity\n      }\n    }\n\n    if (appliedUpdates) {\n      mergeFunction(state, [], appliedUpdates, replacedIds)\n    }\n  }\n\n  function upsertOneMutably(entity: T, state: R): void {\n    return upsertManyMutably([entity], state)\n  }\n\n  function upsertManyMutably(\n    newEntities: readonly T[] | Record<Id, T>,\n    state: R,\n  ): void {\n    const [added, updated, existingIdsArray] = splitAddedUpdatedEntities<T, Id>(\n      newEntities,\n      selectId,\n      state,\n    )\n\n    if (added.length) {\n      addManyMutably(added, state, existingIdsArray)\n    }\n    if (updated.length) {\n      updateManyMutably(updated, state)\n    }\n  }\n\n  function areArraysEqual(a: readonly unknown[], b: readonly unknown[]) {\n    if (a.length !== b.length) {\n      return false\n    }\n\n    for (let i = 0; i < a.length; i++) {\n      if (a[i] === b[i]) {\n        continue\n      }\n      return false\n    }\n    return true\n  }\n\n  function mergeFunction(\n    state: R,\n    addedItems: readonly T[],\n    appliedUpdates?: boolean,\n    replacedIds?: boolean,\n  ): void {\n    const currentEntities = getCurrent(state.entities)\n    const currentIds = getCurrent(state.ids)\n\n    const stateEntities = state.entities as Record<Id, T>\n\n    let ids: Iterable<Id> = currentIds\n    if (replacedIds) {\n      ids = new Set(currentIds)\n    }\n\n    let sortedEntities: T[] = []\n    for (const id of ids) {\n      const entity = currentEntities[id]\n      if (entity) {\n        sortedEntities.push(entity)\n      }\n    }\n    const wasPreviouslyEmpty = sortedEntities.length === 0\n\n    // Insert/overwrite all new/updated\n    for (const item of addedItems) {\n      stateEntities[selectId(item)] = item\n\n      if (!wasPreviouslyEmpty) {\n        // Binary search insertion generally requires fewer comparisons\n        insert(sortedEntities, item, comparer)\n      }\n    }\n\n    if (wasPreviouslyEmpty) {\n      // All we have is the incoming values, sort them\n      sortedEntities = addedItems.slice().sort(comparer)\n    } else if (appliedUpdates) {\n      // We should have a _mostly_-sorted array already\n      sortedEntities.sort(comparer)\n    }\n\n    const newSortedIds = sortedEntities.map(selectId)\n\n    if (!areArraysEqual(currentIds, newSortedIds)) {\n      state.ids = newSortedIds\n    }\n  }\n\n  return {\n    removeOne,\n    removeMany,\n    removeAll,\n    addOne: createStateOperator(addOneMutably),\n    updateOne: createStateOperator(updateOneMutably),\n    upsertOne: createStateOperator(upsertOneMutably),\n    setOne: createStateOperator(setOneMutably),\n    setMany: createStateOperator(setManyMutably),\n    setAll: createStateOperator(setAllMutably),\n    addMany: createStateOperator(addManyMutably),\n    updateMany: createStateOperator(updateManyMutably),\n    upsertMany: createStateOperator(upsertManyMutably),\n  }\n}\n", "import type { EntityAdapter, EntityId, EntityAdapterOptions } from './models'\nimport { createInitialStateFactory } from './entity_state'\nimport { createSelectorsFactory } from './state_selectors'\nimport { createSortedStateAdapter } from './sorted_state_adapter'\nimport { createUnsortedStateAdapter } from './unsorted_state_adapter'\nimport type { WithRequiredProp } from '../tsHelpers'\n\nexport function createEntityAdapter<T, Id extends EntityId>(\n  options: WithRequiredProp<EntityAdapterOptions<T, Id>, 'selectId'>,\n): EntityAdapter<T, Id>\n\nexport function createEntityAdapter<T extends { id: EntityId }>(\n  options?: Omit<EntityAdapterOptions<T, T['id']>, 'selectId'>,\n): EntityAdapter<T, T['id']>\n\n/**\n *\n * @param options\n *\n * @public\n */\nexport function createEntityAdapter<T>(\n  options: EntityAdapterOptions<T, EntityId> = {},\n): EntityAdapter<T, EntityId> {\n  const {\n    selectId,\n    sortComparer,\n  }: Required<EntityAdapterOptions<T, EntityId>> = {\n    sortComparer: false,\n    selectId: (instance: any) => instance.id,\n    ...options,\n  }\n\n  const stateAdapter = sortComparer\n    ? createSortedStateAdapter(selectId, sortComparer)\n    : createUnsortedStateAdapter(selectId)\n  const stateFactory = createInitialStateFactory(stateAdapter)\n  const selectorsFactory = createSelectorsFactory<T, EntityId>()\n\n  return {\n    selectId,\n    sortComparer,\n    ...stateFactory,\n    ...selectorsFactory,\n    ...stateAdapter,\n  }\n}\n", "import type { SerializedError } from '@reduxjs/toolkit'\n\nconst task = 'task'\nconst listener = 'listener'\nconst completed = 'completed'\nconst cancelled = 'cancelled'\n\n/* TaskAbortError error codes  */\nexport const taskCancelled = `task-${cancelled}` as const\nexport const taskCompleted = `task-${completed}` as const\nexport const listenerCancelled = `${listener}-${cancelled}` as const\nexport const listenerCompleted = `${listener}-${completed}` as const\n\nexport class TaskAbortError implements SerializedError {\n  name = 'TaskAbortError'\n  message: string\n  constructor(public code: string | undefined) {\n    this.message = `${task} ${cancelled} (reason: ${code})`\n  }\n}\n", "export const assertFunction: (\n  func: unknown,\n  expected: string,\n) => asserts func is (...args: unknown[]) => unknown = (\n  func: unknown,\n  expected: string,\n) => {\n  if (typeof func !== 'function') {\n    throw new TypeError(`${expected} is not a function`)\n  }\n}\n\nexport const noop = () => {}\n\nexport const catchRejection = <T>(\n  promise: Promise<T>,\n  onError = noop,\n): Promise<T> => {\n  promise.catch(onError)\n\n  return promise\n}\n\nexport const addAbortSignalListener = (\n  abortSignal: AbortSignal,\n  callback: (evt: Event) => void,\n) => {\n  abortSignal.addEventListener('abort', callback, { once: true })\n  return () => abortSignal.removeEventListener('abort', callback)\n}\n", "import { TaskAbortError } from './exceptions'\nimport type { TaskResult } from './types'\nimport { addAbortSignalListener, catchRejection, noop } from './utils'\n\n/**\n * Synchronously raises {@link TaskAbortError} if the task tied to the input `signal` has been cancelled.\n * @param signal\n * @see {TaskAbortError}\n * @throws {TaskAbortError} if the task tied to the input `signal` has been cancelled.\n */\nexport const validateActive = (signal: AbortSignal): void => {\n  if (signal.aborted) {\n    throw new TaskAbortError(signal.reason)\n  }\n}\n\n/**\n * Generates a race between the promise(s) and the AbortSignal\n * This avoids `Promise.race()`-related memory leaks:\n * https://github.com/nodejs/node/issues/17469#issuecomment-349794909\n */\nexport function raceWithSignal<T>(\n  signal: AbortSignal,\n  promise: Promise<T>,\n): Promise<T> {\n  let cleanup = noop\n  return new Promise<T>((resolve, reject) => {\n    const notifyRejection = () => reject(new TaskAbortError(signal.reason))\n\n    if (signal.aborted) {\n      notifyRejection()\n      return\n    }\n\n    cleanup = addAbortSignalListener(signal, notifyRejection)\n    promise.finally(() => cleanup()).then(resolve, reject)\n  }).finally(() => {\n    // after this point, replace `cleanup` with a noop, so there is no reference to `signal` any more\n    cleanup = noop\n  })\n}\n\n/**\n * Runs a task and returns promise that resolves to {@link TaskResult}.\n * Second argument is an optional `cleanUp` function that always runs after task.\n *\n * **Note:** `runTask` runs the executor in the next microtask.\n * @returns\n */\nexport const runTask = async <T>(\n  task: () => Promise<T>,\n  cleanUp?: () => void,\n): Promise<TaskResult<T>> => {\n  try {\n    await Promise.resolve()\n    const value = await task()\n    return {\n      status: 'ok',\n      value,\n    }\n  } catch (error: any) {\n    return {\n      status: error instanceof TaskAbortError ? 'cancelled' : 'rejected',\n      error,\n    }\n  } finally {\n    cleanUp?.()\n  }\n}\n\n/**\n * Given an input `AbortSignal` and a promise returns another promise that resolves\n * as soon the input promise is provided or rejects as soon as\n * `AbortSignal.abort` is `true`.\n * @param signal\n * @returns\n */\nexport const createPause = <T>(signal: AbortSignal) => {\n  return (promise: Promise<T>): Promise<T> => {\n    return catchRejection(\n      raceWithSignal(signal, promise).then((output) => {\n        validateActive(signal)\n        return output\n      }),\n    )\n  }\n}\n\n/**\n * Given an input `AbortSignal` and `timeoutMs` returns a promise that resolves\n * after `timeoutMs` or rejects as soon as `AbortSignal.abort` is `true`.\n * @param signal\n * @returns\n */\nexport const createDelay = (signal: AbortSignal) => {\n  const pause = createPause<void>(signal)\n  return (timeoutMs: number): Promise<void> => {\n    return pause(new Promise<void>((resolve) => setTimeout(resolve, timeoutMs)))\n  }\n}\n", "import type { Action, Dispatch, MiddlewareAPI, UnknownAction } from 'redux'\nimport { isAction } from '../reduxImports'\nimport type { ThunkDispatch } from 'redux-thunk'\nimport { createAction } from '../createAction'\nimport { nanoid } from '../nanoid'\n\nimport {\n  TaskAbortError,\n  listenerCancelled,\n  listenerCompleted,\n  taskCancelled,\n  taskCompleted,\n} from './exceptions'\nimport {\n  createDelay,\n  createPause,\n  raceWithSignal,\n  runTask,\n  validateActive,\n} from './task'\nimport type {\n  AddListenerOverloads,\n  AnyListenerPredicate,\n  CreateListenerMiddlewareOptions,\n  FallbackAddListenerOptions,\n  ForkOptions,\n  ForkedTask,\n  ForkedTaskExecutor,\n  ListenerEntry,\n  ListenerErrorHandler,\n  ListenerErrorInfo,\n  ListenerMiddleware,\n  ListenerMiddlewareInstance,\n  TakePattern,\n  TaskResult,\n  TypedAddListener,\n  TypedCreateListenerEntry,\n  TypedRemoveListener,\n  UnsubscribeListener,\n  UnsubscribeListenerOptions,\n} from './types'\nimport {\n  addAbortSignalListener,\n  assertFunction,\n  catchRejection,\n  noop,\n} from './utils'\nexport { TaskAbortError } from './exceptions'\nexport type {\n  AsyncTaskExecutor,\n  CreateListenerMiddlewareOptions,\n  ForkedTask,\n  ForkedTaskAPI,\n  ForkedTaskExecutor,\n  ListenerEffect,\n  ListenerEffectAPI,\n  ListenerErrorHandler,\n  ListenerMiddleware,\n  ListenerMiddlewareInstance,\n  SyncTaskExecutor,\n  TaskCancelled,\n  TaskRejected,\n  TaskResolved,\n  TaskResult,\n  TypedAddListener,\n  TypedRemoveListener,\n  TypedStartListening,\n  TypedStopListening,\n  UnsubscribeListener,\n  UnsubscribeListenerOptions,\n} from './types'\n\n//Overly-aggressive byte-shaving\nconst { assign } = Object\n/**\n * @internal\n */\nconst INTERNAL_NIL_TOKEN = {} as const\n\nconst alm = 'listenerMiddleware' as const\n\nconst createFork = (\n  parentAbortSignal: AbortSignal,\n  parentBlockingPromises: Promise<any>[],\n) => {\n  const linkControllers = (controller: AbortController) =>\n    addAbortSignalListener(parentAbortSignal, () =>\n      controller.abort(parentAbortSignal.reason),\n    )\n\n  return <T>(\n    taskExecutor: ForkedTaskExecutor<T>,\n    opts?: ForkOptions,\n  ): ForkedTask<T> => {\n    assertFunction(taskExecutor, 'taskExecutor')\n    const childAbortController = new AbortController()\n\n    linkControllers(childAbortController)\n\n    const result = runTask<T>(\n      async (): Promise<T> => {\n        validateActive(parentAbortSignal)\n        validateActive(childAbortController.signal)\n        const result = (await taskExecutor({\n          pause: createPause(childAbortController.signal),\n          delay: createDelay(childAbortController.signal),\n          signal: childAbortController.signal,\n        })) as T\n        validateActive(childAbortController.signal)\n        return result\n      },\n      () => childAbortController.abort(taskCompleted),\n    )\n\n    if (opts?.autoJoin) {\n      parentBlockingPromises.push(result.catch(noop))\n    }\n\n    return {\n      result: createPause<TaskResult<T>>(parentAbortSignal)(result),\n      cancel() {\n        childAbortController.abort(taskCancelled)\n      },\n    }\n  }\n}\n\nconst createTakePattern = <S>(\n  startListening: AddListenerOverloads<UnsubscribeListener, S, Dispatch>,\n  signal: AbortSignal,\n): TakePattern<S> => {\n  /**\n   * A function that takes a ListenerPredicate and an optional timeout,\n   * and resolves when either the predicate returns `true` based on an action\n   * state combination or when the timeout expires.\n   * If the parent listener is canceled while waiting, this will throw a\n   * TaskAbortError.\n   */\n  const take = async <P extends AnyListenerPredicate<S>>(\n    predicate: P,\n    timeout: number | undefined,\n  ) => {\n    validateActive(signal)\n\n    // Placeholder unsubscribe function until the listener is added\n    let unsubscribe: UnsubscribeListener = () => {}\n\n    const tuplePromise = new Promise<[Action, S, S]>((resolve, reject) => {\n      // Inside the Promise, we synchronously add the listener.\n      let stopListening = startListening({\n        predicate: predicate as any,\n        effect: (action, listenerApi): void => {\n          // One-shot listener that cleans up as soon as the predicate passes\n          listenerApi.unsubscribe()\n          // Resolve the promise with the same arguments the predicate saw\n          resolve([\n            action,\n            listenerApi.getState(),\n            listenerApi.getOriginalState(),\n          ])\n        },\n      })\n      unsubscribe = () => {\n        stopListening()\n        reject()\n      }\n    })\n\n    const promises: (Promise<null> | Promise<[Action, S, S]>)[] = [tuplePromise]\n\n    if (timeout != null) {\n      promises.push(\n        new Promise<null>((resolve) => setTimeout(resolve, timeout, null)),\n      )\n    }\n\n    try {\n      const output = await raceWithSignal(signal, Promise.race(promises))\n\n      validateActive(signal)\n      return output\n    } finally {\n      // Always clean up the listener\n      unsubscribe()\n    }\n  }\n\n  return ((predicate: AnyListenerPredicate<S>, timeout: number | undefined) =>\n    catchRejection(take(predicate, timeout))) as TakePattern<S>\n}\n\nconst getListenerEntryPropsFrom = (options: FallbackAddListenerOptions) => {\n  let { type, actionCreator, matcher, predicate, effect } = options\n\n  if (type) {\n    predicate = createAction(type).match\n  } else if (actionCreator) {\n    type = actionCreator!.type\n    predicate = actionCreator.match\n  } else if (matcher) {\n    predicate = matcher\n  } else if (predicate) {\n    // pass\n  } else {\n    throw new Error(\n      'Creating or removing a listener requires one of the known fields for matching an action',\n    )\n  }\n\n  assertFunction(effect, 'options.listener')\n\n  return { predicate, type, effect }\n}\n\n/** Accepts the possible options for creating a listener, and returns a formatted listener entry */\nexport const createListenerEntry: TypedCreateListenerEntry<unknown> =\n  /* @__PURE__ */ assign(\n    (options: FallbackAddListenerOptions) => {\n      const { type, predicate, effect } = getListenerEntryPropsFrom(options)\n\n      const entry: ListenerEntry<unknown> = {\n        id: nanoid(),\n        effect,\n        type,\n        predicate,\n        pending: new Set<AbortController>(),\n        unsubscribe: () => {\n          throw new Error('Unsubscribe not initialized')\n        },\n      }\n\n      return entry\n    },\n    { withTypes: () => createListenerEntry },\n  ) as unknown as TypedCreateListenerEntry<unknown>\n\nconst findListenerEntry = (\n  listenerMap: Map<string, ListenerEntry>,\n  options: FallbackAddListenerOptions,\n) => {\n  const { type, effect, predicate } = getListenerEntryPropsFrom(options)\n\n  return Array.from(listenerMap.values()).find((entry) => {\n    const matchPredicateOrType =\n      typeof type === 'string'\n        ? entry.type === type\n        : entry.predicate === predicate\n\n    return matchPredicateOrType && entry.effect === effect\n  })\n}\n\nconst cancelActiveListeners = (\n  entry: ListenerEntry<unknown, Dispatch<UnknownAction>>,\n) => {\n  entry.pending.forEach((controller) => {\n    controller.abort(listenerCancelled)\n  })\n}\n\nconst createClearListenerMiddleware = (\n  listenerMap: Map<string, ListenerEntry>,\n  executingListeners: Map<ListenerEntry, number>,\n) => {\n  return () => {\n    for (const listener of executingListeners.keys()) {\n      cancelActiveListeners(listener)\n    }\n    listenerMap.clear()\n  }\n}\n\n/**\n * Safely reports errors to the `errorHandler` provided.\n * Errors that occur inside `errorHandler` are notified in a new task.\n * Inspired by [rxjs reportUnhandledError](https://github.com/ReactiveX/rxjs/blob/6fafcf53dc9e557439b25debaeadfd224b245a66/src/internal/util/reportUnhandledError.ts)\n * @param errorHandler\n * @param errorToNotify\n */\nconst safelyNotifyError = (\n  errorHandler: ListenerErrorHandler,\n  errorToNotify: unknown,\n  errorInfo: ListenerErrorInfo,\n): void => {\n  try {\n    errorHandler(errorToNotify, errorInfo)\n  } catch (errorHandlerError) {\n    // We cannot let an error raised here block the listener queue.\n    // The error raised here will be picked up by `window.onerror`, `process.on('error')` etc...\n    setTimeout(() => {\n      throw errorHandlerError\n    }, 0)\n  }\n}\n\n/**\n * @public\n */\nexport const addListener = /* @__PURE__ */ assign(\n  /* @__PURE__ */ createAction(`${alm}/add`),\n  {\n    withTypes: () => addListener,\n  },\n) as unknown as TypedAddListener<unknown>\n\n/**\n * @public\n */\nexport const clearAllListeners = /* @__PURE__ */ createAction(\n  `${alm}/removeAll`,\n)\n\n/**\n * @public\n */\nexport const removeListener = /* @__PURE__ */ assign(\n  /* @__PURE__ */ createAction(`${alm}/remove`),\n  {\n    withTypes: () => removeListener,\n  },\n) as unknown as TypedRemoveListener<unknown>\n\nconst defaultErrorHandler: ListenerErrorHandler = (...args: unknown[]) => {\n  console.error(`${alm}/error`, ...args)\n}\n\n/**\n * @public\n */\nexport const createListenerMiddleware = <\n  StateType = unknown,\n  DispatchType extends Dispatch<Action> = ThunkDispatch<\n    StateType,\n    unknown,\n    UnknownAction\n  >,\n  ExtraArgument = unknown,\n>(\n  middlewareOptions: CreateListenerMiddlewareOptions<ExtraArgument> = {},\n) => {\n  const listenerMap = new Map<string, ListenerEntry>()\n\n  // Track listeners whose effect is currently executing so clearListeners can\n  // abort even listeners that have become unsubscribed while executing.\n  const executingListeners = new Map<ListenerEntry, number>()\n  const trackExecutingListener = (entry: ListenerEntry) => {\n    const count = executingListeners.get(entry) ?? 0\n    executingListeners.set(entry, count + 1)\n  }\n  const untrackExecutingListener = (entry: ListenerEntry) => {\n    const count = executingListeners.get(entry) ?? 1\n    if (count === 1) {\n      executingListeners.delete(entry)\n    } else {\n      executingListeners.set(entry, count - 1)\n    }\n  }\n\n  const { extra, onError = defaultErrorHandler } = middlewareOptions\n\n  assertFunction(onError, 'onError')\n\n  const insertEntry = (entry: ListenerEntry) => {\n    entry.unsubscribe = () => listenerMap.delete(entry.id)\n\n    listenerMap.set(entry.id, entry)\n    return (cancelOptions?: UnsubscribeListenerOptions) => {\n      entry.unsubscribe()\n      if (cancelOptions?.cancelActive) {\n        cancelActiveListeners(entry)\n      }\n    }\n  }\n\n  const startListening = ((options: FallbackAddListenerOptions) => {\n    const entry =\n      findListenerEntry(listenerMap, options) ??\n      createListenerEntry(options as any)\n\n    return insertEntry(entry)\n  }) as AddListenerOverloads<any>\n\n  assign(startListening, {\n    withTypes: () => startListening,\n  })\n\n  const stopListening = (\n    options: FallbackAddListenerOptions & UnsubscribeListenerOptions,\n  ): boolean => {\n    const entry = findListenerEntry(listenerMap, options)\n\n    if (entry) {\n      entry.unsubscribe()\n      if (options.cancelActive) {\n        cancelActiveListeners(entry)\n      }\n    }\n\n    return !!entry\n  }\n\n  assign(stopListening, {\n    withTypes: () => stopListening,\n  })\n\n  const notifyListener = async (\n    entry: ListenerEntry<unknown, Dispatch<UnknownAction>>,\n    action: unknown,\n    api: MiddlewareAPI,\n    getOriginalState: () => StateType,\n  ) => {\n    const internalTaskController = new AbortController()\n    const take = createTakePattern(\n      startListening as AddListenerOverloads<any>,\n      internalTaskController.signal,\n    )\n    const autoJoinPromises: Promise<any>[] = []\n\n    try {\n      entry.pending.add(internalTaskController)\n      trackExecutingListener(entry)\n      await Promise.resolve(\n        entry.effect(\n          action,\n          // Use assign() rather than ... to avoid extra helper functions added to bundle\n          assign({}, api, {\n            getOriginalState,\n            condition: (\n              predicate: AnyListenerPredicate<any>,\n              timeout?: number,\n            ) => take(predicate, timeout).then(Boolean),\n            take,\n            delay: createDelay(internalTaskController.signal),\n            pause: createPause<any>(internalTaskController.signal),\n            extra,\n            signal: internalTaskController.signal,\n            fork: createFork(internalTaskController.signal, autoJoinPromises),\n            unsubscribe: entry.unsubscribe,\n            subscribe: () => {\n              listenerMap.set(entry.id, entry)\n            },\n            cancelActiveListeners: () => {\n              entry.pending.forEach((controller, _, set) => {\n                if (controller !== internalTaskController) {\n                  controller.abort(listenerCancelled)\n                  set.delete(controller)\n                }\n              })\n            },\n            cancel: () => {\n              internalTaskController.abort(listenerCancelled)\n              entry.pending.delete(internalTaskController)\n            },\n            throwIfCancelled: () => {\n              validateActive(internalTaskController.signal)\n            },\n          }),\n        ),\n      )\n    } catch (listenerError) {\n      if (!(listenerError instanceof TaskAbortError)) {\n        safelyNotifyError(onError, listenerError, {\n          raisedBy: 'effect',\n        })\n      }\n    } finally {\n      await Promise.all(autoJoinPromises)\n\n      internalTaskController.abort(listenerCompleted) // Notify that the task has completed\n      untrackExecutingListener(entry)\n      entry.pending.delete(internalTaskController)\n    }\n  }\n\n  const clearListenerMiddleware = createClearListenerMiddleware(\n    listenerMap,\n    executingListeners,\n  )\n\n  const middleware: ListenerMiddleware<\n    StateType,\n    DispatchType,\n    ExtraArgument\n  > = (api) => (next) => (action) => {\n    if (!isAction(action)) {\n      // we only want to notify listeners for action objects\n      return next(action)\n    }\n\n    if (addListener.match(action)) {\n      return startListening(action.payload as any)\n    }\n\n    if (clearAllListeners.match(action)) {\n      clearListenerMiddleware()\n      return\n    }\n\n    if (removeListener.match(action)) {\n      return stopListening(action.payload)\n    }\n\n    // Need to get this state _before_ the reducer processes the action\n    let originalState: StateType | typeof INTERNAL_NIL_TOKEN = api.getState()\n\n    // `getOriginalState` can only be called synchronously.\n    // @see https://github.com/reduxjs/redux-toolkit/discussions/1648#discussioncomment-1932820\n    const getOriginalState = (): StateType => {\n      if (originalState === INTERNAL_NIL_TOKEN) {\n        throw new Error(\n          `${alm}: getOriginalState can only be called synchronously`,\n        )\n      }\n\n      return originalState as StateType\n    }\n\n    let result: unknown\n\n    try {\n      // Actually forward the action to the reducer before we handle listeners\n      result = next(action)\n\n      if (listenerMap.size > 0) {\n        const currentState = api.getState()\n        // Work around ESBuild+TS transpilation issue\n        const listenerEntries = Array.from(listenerMap.values())\n        for (const entry of listenerEntries) {\n          let runListener = false\n\n          try {\n            runListener = entry.predicate(action, currentState, originalState)\n          } catch (predicateError) {\n            runListener = false\n\n            safelyNotifyError(onError, predicateError, {\n              raisedBy: 'predicate',\n            })\n          }\n\n          if (!runListener) {\n            continue\n          }\n\n          notifyListener(entry, action, api, getOriginalState)\n        }\n      }\n    } finally {\n      // Remove `originalState` store from this scope.\n      originalState = INTERNAL_NIL_TOKEN\n    }\n\n    return result\n  }\n\n  return {\n    middleware,\n    startListening,\n    stopListening,\n    clearListeners: clearListenerMiddleware,\n  } as ListenerMiddlewareInstance<StateType, DispatchType, ExtraArgument>\n}\n", "import type { Dispatch, Middleware, UnknownAction } from 'redux'\nimport { compose } from '../reduxImports'\nimport { createAction } from '../createAction'\nimport { isAllOf } from '../matchers'\nimport { nanoid } from '../nanoid'\nimport { getOrInsertComputed } from '../utils'\nimport type {\n  AddMiddleware,\n  DynamicMiddleware,\n  DynamicMiddlewareInstance,\n  MiddlewareEntry,\n  WithMiddleware,\n} from './types'\nexport type {\n  DynamicMiddlewareInstance,\n  GetDispatchType as GetDispatch,\n  MiddlewareApiConfig,\n} from './types'\n\nconst createMiddlewareEntry = <\n  State = any,\n  DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,\n>(\n  middleware: Middleware<any, State, DispatchType>,\n): MiddlewareEntry<State, DispatchType> => ({\n  middleware,\n  applied: new Map(),\n})\n\nconst matchInstance =\n  (instanceId: string) =>\n  (action: any): action is { meta: { instanceId: string } } =>\n    action?.meta?.instanceId === instanceId\n\nexport const createDynamicMiddleware = <\n  State = any,\n  DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,\n>(): DynamicMiddlewareInstance<State, DispatchType> => {\n  const instanceId = nanoid()\n  const middlewareMap = new Map<\n    Middleware<any, State, DispatchType>,\n    MiddlewareEntry<State, DispatchType>\n  >()\n  let middlewareVersion = 0\n\n  const withMiddleware = Object.assign(\n    createAction(\n      'dynamicMiddleware/add',\n      (...middlewares: Middleware<any, State, DispatchType>[]) => ({\n        payload: middlewares,\n        meta: {\n          instanceId,\n        },\n      }),\n    ),\n    { withTypes: () => withMiddleware },\n  ) as WithMiddleware<State, DispatchType>\n\n  const addMiddleware = Object.assign(\n    function addMiddleware(\n      ...middlewares: Middleware<any, State, DispatchType>[]\n    ) {\n      const previousSize = middlewareMap.size\n      middlewares.forEach((middleware) => {\n        getOrInsertComputed(middlewareMap, middleware, createMiddlewareEntry)\n      })\n      if (middlewareMap.size !== previousSize) {\n        middlewareVersion++\n      }\n    },\n    { withTypes: () => addMiddleware },\n  ) as AddMiddleware<State, DispatchType>\n\n  const getFinalMiddleware: Middleware<{}, State, DispatchType> = (api) => {\n    const appliedMiddleware = Array.from(middlewareMap.values()).map((entry) =>\n      getOrInsertComputed(entry.applied, api, entry.middleware),\n    )\n    return compose(...appliedMiddleware)\n  }\n\n  const isWithMiddleware = isAllOf(withMiddleware, matchInstance(instanceId))\n\n  const middleware: DynamicMiddleware<State, DispatchType> =\n    (api) => (next) => {\n      let appliedVersion = -1\n      let dispatch = next\n\n      return (action) => {\n        if (isWithMiddleware(action)) {\n          addMiddleware(...action.payload)\n          return api.dispatch\n        }\n\n        if (appliedVersion !== middlewareVersion) {\n          dispatch = getFinalMiddleware(api)(next)\n          appliedVersion = middlewareVersion\n        }\n\n        return dispatch(action)\n      }\n    }\n\n  return {\n    middleware,\n    addMiddleware,\n    withMiddleware,\n    instanceId,\n  }\n}\n", "import type {\n  PreloadedStateShapeFromReducersMapObject,\n  Reducer,\n  StateFromReducersMapObject,\n  UnknownAction,\n} from 'redux'\nimport { combineReducers } from 'redux'\nimport { nanoid } from './nanoid'\nimport type {\n  Id,\n  NonUndefined,\n  Tail,\n  UnionToIntersection,\n  WithOptionalProp,\n} from './tsHelpers'\nimport { getOrInsertComputed } from './utils'\n\ntype SliceLike<ReducerPath extends string, State, PreloadedState = State> = {\n  reducerPath: ReducerPath\n  reducer: Reducer<State, any, PreloadedState>\n}\n\ntype AnySliceLike = SliceLike<string, any>\n\ntype SliceLikeReducerPath<A extends AnySliceLike> =\n  A extends SliceLike<infer ReducerPath, any> ? ReducerPath : never\n\ntype SliceLikeState<A extends AnySliceLike> =\n  A extends SliceLike<any, infer State, any> ? State : never\n\ntype SliceLikePreloadedState<A extends AnySliceLike> =\n  A extends SliceLike<any, any, infer PreloadedState> ? PreloadedState : never\n\nexport type WithSlice<A extends AnySliceLike> = {\n  [Path in SliceLikeReducerPath<A>]: SliceLikeState<A>\n}\n\nexport type WithSlicePreloadedState<A extends AnySliceLike> = {\n  [Path in SliceLikeReducerPath<A>]: SliceLikePreloadedState<A>\n}\n\ntype ReducerMap = Record<string, Reducer>\n\ntype ExistingSliceLike<DeclaredState, PreloadedState> = {\n  [ReducerPath in keyof DeclaredState]: SliceLike<\n    ReducerPath & string,\n    NonUndefined<DeclaredState[ReducerPath]>,\n    NonUndefined<PreloadedState[ReducerPath & keyof PreloadedState]>\n  >\n}[keyof DeclaredState]\n\nexport type InjectConfig = {\n  /**\n   * Allow replacing reducer with a different reference. Normally, an error will be thrown if a different reducer instance to the one already injected is used.\n   */\n  overrideExisting?: boolean\n}\n\n/**\n * A reducer that allows for slices/reducers to be injected after initialisation.\n */\nexport interface CombinedSliceReducer<\n  InitialState,\n  DeclaredState extends InitialState = InitialState,\n  PreloadedState extends Partial<Record<keyof PreloadedState, any>> =\n    Partial<DeclaredState>,\n> extends Reducer<DeclaredState, UnknownAction, PreloadedState> {\n  /**\n   * Provide a type for slices that will be injected lazily.\n   *\n   * One way to do this would be with interface merging:\n   * ```ts\n   *\n   * export interface LazyLoadedSlices {}\n   *\n   * export const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices<LazyLoadedSlices>();\n   *\n   * // elsewhere\n   *\n   * declare module './reducer' {\n   *   export interface LazyLoadedSlices extends WithSlice<typeof booleanSlice> {}\n   * }\n   *\n   * const withBoolean = rootReducer.inject(booleanSlice);\n   *\n   * // elsewhere again\n   *\n   * declare module './reducer' {\n   *   export interface LazyLoadedSlices {\n   *     customName: CustomState\n   *   }\n   * }\n   *\n   * const withCustom = rootReducer.inject({ reducerPath: \"customName\", reducer: customSlice.reducer })\n   * ```\n   */\n  withLazyLoadedSlices<Lazy = {}, LazyPreloaded = Lazy>(): CombinedSliceReducer<\n    InitialState,\n    Id<DeclaredState & Partial<Lazy>>,\n    Id<PreloadedState & Partial<LazyPreloaded>>\n  >\n\n  /**\n   * Inject a slice.\n   *\n   * Accepts an individual slice, RTKQ API instance, or a \"slice-like\" { reducerPath, reducer } object.\n   *\n   * ```ts\n   * rootReducer.inject(booleanSlice)\n   * rootReducer.inject(baseApi)\n   * rootReducer.inject({ reducerPath: 'boolean' as const, reducer: newReducer }, { overrideExisting: true })\n   * ```\n   *\n   */\n  inject<Sl extends Id<ExistingSliceLike<DeclaredState, PreloadedState>>>(\n    slice: Sl,\n    config?: InjectConfig,\n  ): CombinedSliceReducer<\n    InitialState,\n    Id<DeclaredState & WithSlice<Sl>>,\n    Id<PreloadedState & Partial<WithSlicePreloadedState<Sl>>>\n  >\n\n  /**\n   * Inject a slice.\n   *\n   * Accepts an individual slice, RTKQ API instance, or a \"slice-like\" { reducerPath, reducer } object.\n   *\n   * ```ts\n   * rootReducer.inject(booleanSlice)\n   * rootReducer.inject(baseApi)\n   * rootReducer.inject({ reducerPath: 'boolean' as const, reducer: newReducer }, { overrideExisting: true })\n   * ```\n   *\n   */\n  inject<ReducerPath extends string, State, PreloadedState = State>(\n    slice: SliceLike<\n      ReducerPath,\n      State & (ReducerPath extends keyof DeclaredState ? never : State),\n      PreloadedState &\n        (ReducerPath extends keyof PreloadedState ? never : PreloadedState)\n    >,\n    config?: InjectConfig,\n  ): CombinedSliceReducer<\n    InitialState,\n    Id<DeclaredState & WithSlice<SliceLike<ReducerPath, State>>>,\n    Id<\n      PreloadedState &\n        WithSlicePreloadedState<SliceLike<ReducerPath, State, PreloadedState>>\n    >\n  >\n\n  /**\n   * Create a selector that guarantees that the slices injected will have a defined value when selector is run.\n   *\n   * ```ts\n   * const selectBooleanWithoutInjection = (state: RootState) => state.boolean;\n   * //                                                                ^? boolean | undefined\n   *\n   * const selectBoolean = rootReducer.inject(booleanSlice).selector((state) => {\n   *   // if action hasn't been dispatched since slice was injected, this would usually be undefined\n   *   // however selector() uses a Proxy around the first parameter to ensure that it evaluates to the initial state instead, if undefined\n   *   return state.boolean;\n   *   //           ^? boolean\n   * })\n   * ```\n   *\n   * If the reducer is nested inside the root state, a selectState callback can be passed to retrieve the reducer's state.\n   *\n   * ```ts\n   *\n   * export interface LazyLoadedSlices {};\n   *\n   * export const innerReducer = combineSlices(stringSlice).withLazyLoadedSlices<LazyLoadedSlices>();\n   *\n   * export const rootReducer = combineSlices({ inner: innerReducer });\n   *\n   * export type RootState = ReturnType<typeof rootReducer>;\n   *\n   * // elsewhere\n   *\n   * declare module \"./reducer.ts\" {\n   *  export interface LazyLoadedSlices extends WithSlice<typeof booleanSlice> {}\n   * }\n   *\n   * const withBool = innerReducer.inject(booleanSlice);\n   *\n   * const selectBoolean = withBool.selector(\n   *   (state) => state.boolean,\n   *   (rootState: RootState) => state.inner\n   * );\n   * //    now expects to be passed RootState instead of innerReducer state\n   *\n   * ```\n   *\n   * Value passed to selectorFn will be a Proxy - use selector.original(proxy) to get original state value (useful for debugging)\n   *\n   * ```ts\n   * const injectedReducer = rootReducer.inject(booleanSlice);\n   * const selectBoolean = injectedReducer.selector((state) => {\n   *   console.log(injectedReducer.selector.original(state).boolean) // possibly undefined\n   *   return state.boolean\n   * })\n   * ```\n   */\n  selector: {\n    /**\n     * Create a selector that guarantees that the slices injected will have a defined value when selector is run.\n     *\n     * ```ts\n     * const selectBooleanWithoutInjection = (state: RootState) => state.boolean;\n     * //                                                                ^? boolean | undefined\n     *\n     * const selectBoolean = rootReducer.inject(booleanSlice).selector((state) => {\n     *   // if action hasn't been dispatched since slice was injected, this would usually be undefined\n     *   // however selector() uses a Proxy around the first parameter to ensure that it evaluates to the initial state instead, if undefined\n     *   return state.boolean;\n     *   //           ^? boolean\n     * })\n     * ```\n     *\n     * Value passed to selectorFn will be a Proxy - use selector.original(proxy) to get original state value (useful for debugging)\n     *\n     * ```ts\n     * const injectedReducer = rootReducer.inject(booleanSlice);\n     * const selectBoolean = injectedReducer.selector((state) => {\n     *   console.log(injectedReducer.selector.original(state).boolean) // undefined\n     *   return state.boolean\n     * })\n     * ```\n     */\n    <Selector extends (state: DeclaredState, ...args: any[]) => unknown>(\n      selectorFn: Selector,\n    ): (\n      state: WithOptionalProp<\n        Parameters<Selector>[0],\n        Exclude<keyof DeclaredState, keyof InitialState>\n      >,\n      ...args: Tail<Parameters<Selector>>\n    ) => ReturnType<Selector>\n\n    /**\n     * Create a selector that guarantees that the slices injected will have a defined value when selector is run.\n     *\n     * ```ts\n     * const selectBooleanWithoutInjection = (state: RootState) => state.boolean;\n     * //                                                                ^? boolean | undefined\n     *\n     * const selectBoolean = rootReducer.inject(booleanSlice).selector((state) => {\n     *   // if action hasn't been dispatched since slice was injected, this would usually be undefined\n     *   // however selector() uses a Proxy around the first parameter to ensure that it evaluates to the initial state instead, if undefined\n     *   return state.boolean;\n     *   //           ^? boolean\n     * })\n     * ```\n     *\n     * If the reducer is nested inside the root state, a selectState callback can be passed to retrieve the reducer's state.\n     *\n     * ```ts\n     *\n     * interface LazyLoadedSlices {};\n     *\n     * const innerReducer = combineSlices(stringSlice).withLazyLoadedSlices<LazyLoadedSlices>();\n     *\n     * const rootReducer = combineSlices({ inner: innerReducer });\n     *\n     * type RootState = ReturnType<typeof rootReducer>;\n     *\n     * // elsewhere\n     *\n     * declare module \"./reducer.ts\" {\n     *  interface LazyLoadedSlices extends WithSlice<typeof booleanSlice> {}\n     * }\n     *\n     * const withBool = innerReducer.inject(booleanSlice);\n     *\n     * const selectBoolean = withBool.selector(\n     *   (state) => state.boolean,\n     *   (rootState: RootState) => state.inner\n     * );\n     * //    now expects to be passed RootState instead of innerReducer state\n     *\n     * ```\n     *\n     * Value passed to selectorFn will be a Proxy - use selector.original(proxy) to get original state value (useful for debugging)\n     *\n     * ```ts\n     * const injectedReducer = rootReducer.inject(booleanSlice);\n     * const selectBoolean = injectedReducer.selector((state) => {\n     *   console.log(injectedReducer.selector.original(state).boolean) // possibly undefined\n     *   return state.boolean\n     * })\n     * ```\n     */\n    <\n      Selector extends (state: DeclaredState, ...args: any[]) => unknown,\n      RootState,\n    >(\n      selectorFn: Selector,\n      selectState: (\n        rootState: RootState,\n        ...args: Tail<Parameters<Selector>>\n      ) => WithOptionalProp<\n        Parameters<Selector>[0],\n        Exclude<keyof DeclaredState, keyof InitialState>\n      >,\n    ): (\n      state: RootState,\n      ...args: Tail<Parameters<Selector>>\n    ) => ReturnType<Selector>\n    /**\n     * Returns the unproxied state. Useful for debugging.\n     * @param state state Proxy, that ensures injected reducers have value\n     * @returns original, unproxied state\n     * @throws if value passed is not a state Proxy\n     */\n    original: (state: DeclaredState) => InitialState & Partial<DeclaredState>\n  }\n}\n\ntype InitialState<Slices extends Array<AnySliceLike | ReducerMap>> =\n  UnionToIntersection<\n    Slices[number] extends infer Slice\n      ? Slice extends AnySliceLike\n        ? WithSlice<Slice>\n        : StateFromReducersMapObject<Slice>\n      : never\n  >\n\ntype InitialPreloadedState<Slices extends Array<AnySliceLike | ReducerMap>> =\n  UnionToIntersection<\n    Slices[number] extends infer Slice\n      ? Slice extends AnySliceLike\n        ? WithSlicePreloadedState<Slice>\n        : PreloadedStateShapeFromReducersMapObject<Slice>\n      : never\n  >\n\nconst isSliceLike = (\n  maybeSliceLike: AnySliceLike | ReducerMap,\n): maybeSliceLike is AnySliceLike =>\n  'reducerPath' in maybeSliceLike &&\n  typeof maybeSliceLike.reducerPath === 'string'\n\nconst getReducers = (slices: Array<AnySliceLike | ReducerMap>) =>\n  slices.flatMap<[string, Reducer]>((sliceOrMap) =>\n    isSliceLike(sliceOrMap)\n      ? [[sliceOrMap.reducerPath, sliceOrMap.reducer]]\n      : Object.entries(sliceOrMap),\n  )\n\nconst ORIGINAL_STATE = Symbol.for('rtk-state-proxy-original')\n\nconst isStateProxy = (value: any) => !!value && !!value[ORIGINAL_STATE]\n\nconst createStateProxy = <State extends object>(\n  stateProxyMap: WeakMap<object, object>,\n  state: State,\n  reducerMap: Partial<Record<PropertyKey, Reducer>>,\n  initialStateCache: Record<PropertyKey, unknown>,\n) =>\n  getOrInsertComputed(\n    stateProxyMap,\n    state,\n    () =>\n      new Proxy(state, {\n        get: (target, prop, receiver) => {\n          if (prop === ORIGINAL_STATE) return target\n          const result = Reflect.get(target, prop, receiver)\n          if (typeof result === 'undefined') {\n            const cached = initialStateCache[prop]\n            if (typeof cached !== 'undefined') return cached\n            const reducer = reducerMap[prop]\n            if (reducer) {\n              // ensure action type is random, to prevent reducer treating it differently\n              const reducerResult = reducer(undefined, { type: nanoid() })\n              if (typeof reducerResult === 'undefined') {\n                throw new Error(\n                  `The slice reducer for key \"${prop.toString()}\" returned undefined when called for selector(). ` +\n                    `If the state passed to the reducer is undefined, you must ` +\n                    `explicitly return the initial state. The initial state may ` +\n                    `not be undefined. If you don't want to set a value for this reducer, ` +\n                    `you can use null instead of undefined.`,\n                )\n              }\n              initialStateCache[prop] = reducerResult\n              return reducerResult\n            }\n          }\n          return result\n        },\n      }),\n  ) as State\n\nconst original = (state: any) => {\n  if (!isStateProxy(state)) {\n    throw new Error('original must be used on state Proxy')\n  }\n  return state[ORIGINAL_STATE]\n}\n\nconst emptyObject = {}\nconst noopReducer: Reducer<Record<string, any>> = (state = emptyObject) => state\n\nexport function combineSlices<Slices extends Array<AnySliceLike | ReducerMap>>(\n  ...slices: Slices\n): CombinedSliceReducer<\n  Id<InitialState<Slices>>,\n  Id<InitialState<Slices>>,\n  Partial<Id<InitialPreloadedState<Slices>>>\n> {\n  const stateProxyMap = new WeakMap<object, object>()\n  const reducerMap = Object.fromEntries(getReducers(slices))\n\n  const getReducer = () =>\n    Object.keys(reducerMap).length ? combineReducers(reducerMap) : noopReducer\n\n  let reducer = getReducer()\n\n  function combinedReducer(\n    state: Record<string, unknown>,\n    action: UnknownAction,\n  ) {\n    return reducer(state, action)\n  }\n\n  combinedReducer.withLazyLoadedSlices = () => combinedReducer\n\n  const initialStateCache: Record<PropertyKey, unknown> = {}\n\n  const inject = (\n    slice: AnySliceLike,\n    config: InjectConfig = {},\n  ): typeof combinedReducer => {\n    const { reducerPath, reducer: reducerToInject } = slice\n\n    const currentReducer = reducerMap[reducerPath]\n    if (\n      !config.overrideExisting &&\n      currentReducer &&\n      currentReducer !== reducerToInject\n    ) {\n      if (\n        typeof process !== 'undefined' &&\n        process.env.NODE_ENV === 'development'\n      ) {\n        console.error(\n          `called \\`inject\\` to override already-existing reducer ${reducerPath} without specifying \\`overrideExisting: true\\``,\n        )\n      }\n\n      return combinedReducer\n    }\n\n    if (config.overrideExisting && currentReducer !== reducerToInject) {\n      delete initialStateCache[reducerPath]\n    }\n\n    reducerMap[reducerPath] = reducerToInject\n\n    reducer = getReducer()\n\n    return combinedReducer\n  }\n\n  const selector = Object.assign(\n    function makeSelector<State extends object, RootState, Args extends any[]>(\n      selectorFn: (state: State, ...args: Args) => any,\n      selectState?: (rootState: RootState, ...args: Args) => State,\n    ) {\n      return function selector(state: State, ...args: Args) {\n        return selectorFn(\n          createStateProxy(\n            stateProxyMap,\n            selectState ? selectState(state as any, ...args) : state,\n            reducerMap,\n            initialStateCache,\n          ),\n          ...args,\n        )\n      }\n    },\n    { original },\n  )\n\n  return Object.assign(combinedReducer, { inject, selector }) as any\n}\n", "/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nexport function formatProdErrorMessage(code: number) {\n  return (\n    `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or ` +\n    'use the non-minified dev environment for full errors. '\n  )\n}\n", "export const GITHUB_ZEITNEXT_GET = 'GITHUB_ZEITNEXT_GET'\nexport const REQUEST_QUERY = 'REQUEST_QUERY'\nexport const GET_PHOTO_MENU = 'GET_PHOTO_MENU'\nexport const GET_PHOTO_WIDTH_HEIGHT = 'GET_PHOTO_WIDTH_HEIGHT'\n", "import { GITHUB_ZEITNEXT_GET } from '@store/constants'\n\ninterface HomeAction {\n  type: string\n  data?: unknown\n}\n\nexport const homeReducer = (state = { data: {} }, action: HomeAction) => {\n  const { type, data } = action\n\n  switch (type) {\n    case GITHUB_ZEITNEXT_GET:\n      return { ...state, data: data !== undefined ? data : state.data }\n    default:\n      return state\n  }\n}\n", "import { GET_PHOTO_MENU, GET_PHOTO_WIDTH_HEIGHT } from '@store/constants'\n\ninterface PhotoState {\n  data: [number, number, string][]\n  menu:\n    | Record<string, unknown>\n    | Array<{ name: string; cover?: string; count?: number }>\n}\n\ninterface PhotoAction {\n  type: string\n  data?: [number, number, string][]\n  menu?: PhotoState['menu']\n}\n\nexport const photoReducer = (\n  state: PhotoState = { data: [], menu: {} },\n  action: PhotoAction\n) => {\n  const { type, data, menu } = action\n\n  switch (type) {\n    case GET_PHOTO_MENU:\n      return { ...state, menu: menu !== undefined ? menu : state.menu }\n    case GET_PHOTO_WIDTH_HEIGHT:\n      return { ...state, data: data !== undefined ? data : state.data }\n    default:\n      return state\n  }\n}\n", "import { homeReducer } from './home'\nimport { photoReducer } from './photo'\nimport { REQUEST_QUERY } from '@store/constants'\n\ninterface QueryAction {\n  type: string\n  query?: Record<string, unknown>\n}\n\nconst queryReducer = (state = {}, action: QueryAction) => {\n  const { type, query } = action\n\n  switch (type) {\n    case REQUEST_QUERY:\n      return { ...query }\n    default:\n      return state\n  }\n}\n\nexport default {\n  name: (state = 'Erishen Sun') => state,\n  query: queryReducer,\n  home: homeReducer,\n  photo: photoReducer\n}\n", "import { configureStore, combineReducers } from '@reduxjs/toolkit'\nimport reducers from '@reducers'\n\nconst combineReducer = combineReducers({ ...reducers })\n\nconst getStore = (stateParam = {}) => {\n  return configureStore({\n    reducer: combineReducer,\n    preloadedState: stateParam || {},\n    middleware: (getDefaultMiddleware) => getDefaultMiddleware()\n  })\n}\n\nexport default getStore\n", "import React, { useEffect, useState, Suspense } from 'react'\nimport { Link } from 'react-router-dom'\nimport Layout from '@components/Layout'\nimport { Helmet } from 'react-helmet'\nimport { isSEO, usePreserveSSR } from '@/utils'\nimport { usePhotoMenu } from '@services/suspense'\nimport {\n  FeatureIconGradient,\n  IconBolt,\n  IconCog,\n  IconNetwork,\n  IconAtom,\n  IconBraces,\n  IconImage,\n  IconFeather,\n  IconSliders,\n  IconShield,\n  IconServer,\n} from '@components/FeatureIcons'\nimport {\n  GlobalStyle,\n  PageWrapper,\n  HeroSection,\n  HeroContent,\n  HeroTitle,\n  HeroSubtitle,\n  HeroBadge,\n  HeroStats,\n  StatCard,\n  StatLabel,\n  TechSection,\n  SectionHeader,\n  SectionTitle,\n  SectionDescription,\n  FeatureGrid,\n  FeatureCard,\n  CardIcon,\n  CardTitle,\n  CardDescription,\n  CodeExample,\n  ComparisonSection,\n  ComparisonTable,\n  TableHeader,\n  TableRow,\n  TableCell,\n  TableHeaderCell,\n  NsbpJSBadge,\n  NextJSBadge,\n  PhotoSection,\n  PhotoGrid,\n  PhotoCard,\n  PhotoImageWrapper,\n  PhotoImage,\n  PhotoName,\n  PhotoTitle,\n  PhotoCount,\n  LoadingContainer,\n  LoadingSpinner,\n  LoadingText,\n  ErrorContainer,\n  ErrorTitle,\n  ErrorMessage,\n  QuickStartSection,\n  QuickStartGrid,\n  QuickStartCard,\n  QuickStartTitle,\n  QuickStartCode,\n  QuickStartDescription,\n  DemoButtonLink,\n  DemoButtonIcon,\n  Footer\n} from '../styled/home'\n\ninterface PhotoMenuItem {\n  name: string\n  cover?: string\n  count?: number\n}\n\nconst Home: React.FC = () => {\n  const { withSSR } = usePreserveSSR()\n\n  const [isLoaded, setIsLoaded] = useState(false)\n\n  useEffect(() => {\n    // \u5BA2\u6237\u7AEF\u6A21\u62DF\u9875\u9762\u52A0\u8F7D\u52A8\u753B\n    const timer = setTimeout(() => {\n      setIsLoaded(true)\n    }, 500)\n    return () => clearTimeout(timer)\n  }, [])\n\n  // \u5BA2\u6237\u7AEF\u5904\u7406\u9875\u9762\u52A0\u8F7D\u5668\u7684\u6DE1\u51FA\u548C\u79FB\u9664\n  useEffect(() => {\n    if (!isLoaded) return\n\n    const removeLoader = () => {\n      const loader = document.getElementById('pageLoader')\n      if (loader) {\n        loader.classList.add('fade-out')\n        setTimeout(() => loader.remove(), 500)\n      }\n    }\n\n    // \u5EF6\u8FDF\u79FB\u9664\u52A0\u8F7D\u5668\n    const removeTimer = setTimeout(removeLoader, 300)\n    return () => clearTimeout(removeTimer)\n  }, [isLoaded])\n\n  return (\n    <GlobalStyle>\n      {!isLoaded && (\n        <div className=\"page-loader\" id=\"pageLoader\">\n          <div className=\"loader-spinner\"></div>\n        </div>\n      )}\n      <Helmet>\n        <title>nsbp-lume \u00B7 React SSR on Lume \u5F15\u64CE</title>\n        <meta\n          name=\"description\"\n          content=\"nsbp-lume - React \u670D\u52A1\u7AEF\u6E32\u67D3\u8DD1\u5728 Lume \u5F15\u64CE\uFF08AgentHTTPD\uFF09\u4E0A\uFF0C\u7ECF FastCGI relay \u5230\u5E38\u9A7B Node SSR\uFF0C\u4E13\u4E3A\u4F4E\u8D44\u6E90\u90E8\u7F72\u800C\u751F\u3002\u67E5\u770B\u7EBF\u4E0A\u6F14\u793A\uFF1Ahttps://nsbp.erishen.cn/\"\n        />\n        <meta\n          name=\"keywords\"\n          content=\"nsbp-lume, React SSR, Lume, AgentHTTPD, FastCGI, TypeScript, React 19\"\n        />\n        <meta property=\"og:title\" content=\"nsbp-lume \u00B7 React SSR on Lume \u5F15\u64CE\" />\n        <meta\n          property=\"og:description\"\n          content=\"nsbp-lume - React SSR \u7531 Lume \u5F15\u64CE\u505A\u524D\u7AEF\u3001Node \u540E\u7AEF\u771F\u6E32\u67D3\u3002\u67E5\u770B\u7EBF\u4E0A\u6F14\u793A\uFF1Ahttps://nsbp.erishen.cn/\"\n        />\n        <meta property=\"og:url\" content=\"https://nsbp.erishen.cn/\" />\n      </Helmet>\n\n      <Layout query={{}}>\n        <PageWrapper>\n          {/* \u7279\u6027\u5361\u7247\u5171\u4EAB\u7684\u6E10\u53D8\u5B9A\u4E49\uFF08SVG defs\uFF0C\u4E00\u6B21\u6E32\u67D3\uFF0C\u5404\u56FE\u6807\u5F15\u7528\uFF09 */}\n          <FeatureIconGradient />\n          {/* ========================================\n              Hero Section - \u9996\u5C4F\u89C6\u89C9\u51B2\u51FB\n              ======================================== */}\n          <HeroSection className=\"fade-in\">\n            <HeroContent>\n              <div className=\"hero-glow\"></div>\n              <div className=\"hero-glow\"></div>\n              <HeroBadge className=\"fade-in\" style={{ animationDelay: '0.1s' }}>\n                \uD83D\uDE80 \u8F7B\u91CF\u7EA7 React SSR \u6846\u67B6\n              </HeroBadge>\n              <HeroTitle className=\"fade-in\" style={{ animationDelay: '0.2s' }}>\n                nsbp-lume\n              </HeroTitle>\n              <HeroSubtitle\n                className=\"fade-in\"\n                style={{ animationDelay: '0.3s' }}\n              >\n                \u4E13\u4E3A\u4F4E\u8D44\u6E90\u90E8\u7F72\u4E0E\u9AD8\u5EA6\u53EF\u5B9A\u5236\u573A\u666F\u800C\u751F\n                <br />\n                \u7531 Lume \u5F15\u64CE\u505A\u524D\u7AEF\uFF0CFastCGI relay \u5230 Node SSR\n              </HeroSubtitle>\n\n              <DemoButtonLink\n                href=\"https://nsbp.erishen.cn/\"\n                target=\"_blank\"\n                rel=\"noopener noreferrer\"\n                className=\"fade-in\"\n                style={{ animationDelay: '0.4s' }}\n              >\n                <DemoButtonIcon>\uD83C\uDF10</DemoButtonIcon>\n                \u67E5\u770B\u7EBF\u4E0A\u6F14\u793A\n              </DemoButtonLink>\n\n              <HeroStats>\n                <StatCard>\n                  <div className=\"hero-stat-icon\">\n                    <IconFeather size={32} />\n                  </div>\n                  <StatLabel>\u8F7B\u91CF\u9AD8\u6548</StatLabel>\n                </StatCard>\n                <StatCard>\n                  <div className=\"hero-stat-icon\">\n                    <IconSliders size={32} />\n                  </div>\n                  <StatLabel>\u7075\u6D3B\u914D\u7F6E</StatLabel>\n                </StatCard>\n                <StatCard>\n                  <div className=\"hero-stat-icon\">\n                    <IconShield size={32} />\n                  </div>\n                  <StatLabel>\u7C7B\u578B\u5B89\u5168</StatLabel>\n                </StatCard>\n                <StatCard>\n                  <div className=\"hero-stat-icon\">\n                    <IconServer size={32} />\n                  </div>\n                  <StatLabel>\u670D\u52A1\u7AEF\u6E32\u67D3</StatLabel>\n                </StatCard>\n              </HeroStats>\n            </HeroContent>\n          </HeroSection>\n\n          {/* ========================================\n              \u6280\u672F\u7279\u6027\u5C55\u793A\n              ======================================== */}\n          <TechSection className=\"fade-in\" style={{ animationDelay: '0.4s' }}>\n            <SectionHeader>\n              <SectionTitle\n                className=\"fade-in\"\n                style={{ animationDelay: '0.5s' }}\n              >\n                \u6838\u5FC3\u7279\u6027\n              </SectionTitle>\n              <SectionDescription\n                className=\"fade-in\"\n                style={{ animationDelay: '0.6s' }}\n              >\n                \u57FA\u4E8E React 19 + TypeScript\uFF0C\u63D0\u4F9B\u5B8C\u6574\u7684 SSR \u80FD\u529B\u540C\u65F6\u4FDD\u6301\u6781\u81F4\u8F7B\u91CF\n              </SectionDescription>\n            </SectionHeader>\n\n            <FeatureGrid>\n              <FeatureCard>\n                <CardIcon><IconBolt /></CardIcon>\n                <CardTitle>\u6781\u901F\u670D\u52A1\u7AEF\u6E32\u67D3</CardTitle>\n                <CardDescription>\n                  \u670D\u52A1\u7AEF\u6E32\u67D3 HTML\uFF0CSEO \u53CB\u597D\uFF0C\u9996\u5C4F\u79D2\u5F00\n                </CardDescription>\n                <CodeExample>{`// \u8DEF\u7531 + \u670D\u52A1\u7AEF\u9884\u53D6\u6570\u636E\n// Routers.tsx\nexport default [\n  {\n    path: '/',\n    element: <Home />,\n    loadData: homeLoadData,\n    key: 'home'\n  }\n]`}</CodeExample>\n              </FeatureCard>\n\n              <FeatureCard>\n                <CardIcon><IconCog /></CardIcon>\n                <CardTitle>Lume C \u5F15\u64CE\u505A\u524D\u7AEF</CardTitle>\n                <CardDescription>\n                  \u5185\u5D4C AgentHTTPD\uFF0CDSL \u914D server \u8DEF\u7531\u4E0E relay\n                </CardDescription>\n                <CodeExample>{`// nsbp.lume\nserver {\n  bind = \"127.0.0.1\";\n  port = 10090;\n  react_socket = \"./.data/nsbp-ssr.sock\";\n  react_prefix = \"/\";\n};`}</CodeExample>\n              </FeatureCard>\n\n              <FeatureCard>\n                <CardIcon><IconNetwork /></CardIcon>\n                <CardTitle>FastCGI relay SSR</CardTitle>\n                <CardDescription>\n                  \u9875\u9762\u7ECF UNIX socket relay \u7ED9\u5E38\u9A7B Node \u540E\u7AEF\u6E32\u67D3\n                </CardDescription>\n                <CodeExample>{`// Lume \u628A /\u3001/photo relay \u5230\n// build/server-ssr.cjs\uFF08renderToString\uFF09\n// \u5BA2\u6237\u7AEF hydrateRoot \u63A5\u7BA1`}</CodeExample>\n              </FeatureCard>\n\n              <FeatureCard>\n                <CardIcon><IconAtom /></CardIcon>\n                <CardTitle>React 19 \u539F\u751F\u652F\u6301</CardTitle>\n                <CardDescription>\n                  \u5229\u7528\u6700\u65B0 React \u7279\u6027\uFF0C\u6027\u80FD\u548C\u5F00\u53D1\u4F53\u9A8C\u63D0\u5347\n                </CardDescription>\n                <CodeExample>{`// React 19 \u65B0\u7279\u6027\nimport { use, useTransition } from 'react'\n\n// Server Actions\n// Suspense \u8FB9\u754C\n// use Optimistic`}</CodeExample>\n              </FeatureCard>\n\n              <FeatureCard>\n                <CardIcon><IconBraces /></CardIcon>\n                <CardTitle>TypeScript \u7C7B\u578B\u5B89\u5168</CardTitle>\n                <CardDescription>\n                  \u5B8C\u6574\u7684\u7C7B\u578B\u63A8\u65AD\uFF0C\u7F16\u8BD1\u65F6\u9519\u8BEF\u68C0\u67E5\n                </CardDescription>\n                <CodeExample>{`interface PhotoMenuItem {\n  name: string\n  cover?: string\n  count?: number\n}`}</CodeExample>\n              </FeatureCard>\n\n              <FeatureCard>\n                <CardIcon><IconImage /></CardIcon>\n                <CardTitle>\u7167\u7247\u6570\u636E + Lume \u7AEF\u70B9</CardTitle>\n                <CardDescription>Node \u51FA /getPhotoMenu \u4E0E /images\uFF0CLume \u51FA /api/health</CardDescription>\n                <CodeExample>{`// Lume DSL \u539F\u751F\u7AEF\u70B9\uFF08\u4FDD\u7559\u524D\u7F00 /api\uFF09\nget \"/api/health\", (req) => {\n  return { ok: true, service: \"nsbp-lume\" };\n};`}</CodeExample>\n              </FeatureCard>\n            </FeatureGrid>\n          </TechSection>\n\n          {/* ========================================\n              \u6846\u67B6\u5BF9\u6BD4\u8BF4\u660E\n              ======================================== */}\n          <ComparisonSection\n            className=\"fade-in\"\n            style={{ animationDelay: '0.7s' }}\n          >\n            <SectionHeader>\n              <SectionTitle\n                className=\"fade-in\"\n                style={{ animationDelay: '0.8s' }}\n              >\n                \u6846\u67B6\u7279\u6027\u5BF9\u6BD4\n              </SectionTitle>\n              <SectionDescription\n                className=\"fade-in\"\n                style={{ animationDelay: '0.9s' }}\n              >\n                \u4E86\u89E3\u4E0D\u540C SSR \u6846\u67B6\u7684\u8BBE\u8BA1\u7406\u5FF5\uFF0C\u5E2E\u52A9\u4F60\u9009\u62E9\u5408\u9002\u7684\u6280\u672F\u6808\n              </SectionDescription>\n            </SectionHeader>\n\n            <ComparisonTable>\n              <TableHeader>\n                <TableRow>\n                  <TableHeaderCell>\u7279\u6027</TableHeaderCell>\n                  <TableHeaderCell>\n                    <NsbpJSBadge>nsbp-lume</NsbpJSBadge>\n                  </TableHeaderCell>\n                  <TableHeaderCell>\n                    <NextJSBadge>Next.js</NextJSBadge>\n                  </TableHeaderCell>\n                </TableRow>\n              </TableHeader>\n              <tbody>\n                <TableRow>\n                  <TableCell>\n                    <strong>\u6784\u5EFA\u914D\u7F6E</strong>\n                  </TableCell>\n                  <TableCell>Lume DSL \u58F0\u660E\u5F0F</TableCell>\n                  <TableCell>\u6846\u67B6\u81EA\u52A8\u5316</TableCell>\n                </TableRow>\n                <TableRow>\n                  <TableCell>\n                    <strong>\u4EE3\u7801\u5206\u5272</strong>\n                  </TableCell>\n                  <TableCell>esbuild \u76F4\u51FA\u5355\u5305</TableCell>\n                  <TableCell>\u81EA\u52A8\u5206\u5272</TableCell>\n                </TableRow>\n                <TableRow>\n                  <TableCell>\n                    <strong>SSR \u6E32\u67D3</strong>\n                  </TableCell>\n                  <TableCell>Node + Lume \u771F\u6E32\u67D3</TableCell>\n                  <TableCell>\u81EA\u52A8\u5904\u7406</TableCell>\n                </TableRow>\n                <TableRow>\n                  <TableCell>\n                    <strong>\u5B66\u4E60\u66F2\u7EBF</strong>\n                  </TableCell>\n                  <TableCell>\u9700\u7406\u89E3\u5F15\u64CE / relay</TableCell>\n                  <TableCell>\u4E0A\u624B\u7B80\u5355</TableCell>\n                </TableRow>\n                <TableRow>\n                  <TableCell>\n                    <strong>\u9002\u7528\u573A\u666F</strong>\n                  </TableCell>\n                  <TableCell>\u4E2A\u4EBA\u9879\u76EE\u3001\u5B66\u4E60\u7814\u7A76</TableCell>\n                  <TableCell>\u4F01\u4E1A\u5E94\u7528\u3001\u5FEB\u901F\u5F00\u53D1</TableCell>\n                </TableRow>\n              </tbody>\n            </ComparisonTable>\n            <p\n              style={{\n                marginTop: '16px',\n                fontSize: '14px',\n                color: 'rgba(255, 255, 255, 0.85)',\n                textAlign: 'center'\n              }}\n            >\n              \u6CE8\uFF1A\u4EE5\u4E0A\u5BF9\u6BD4\u57FA\u4E8E\u8BBE\u8BA1\u7406\u5FF5\u7684\u5DEE\u5F02\uFF0C\u5B9E\u9645\u4F7F\u7528\u8BF7\u6839\u636E\u9879\u76EE\u9700\u6C42\u9009\u62E9\u3002Next.js\n              \u662F\u6210\u719F\u7684 SSR \u6846\u67B6\uFF0C\u62E5\u6709\u5F3A\u5927\u7684\u751F\u6001\u548C\u5B98\u65B9\u652F\u6301\u3002\n            </p>\n          </ComparisonSection>\n\n          {/* ========================================\n              \u5FEB\u901F\u5F00\u59CB\n              ======================================== */}\n          <QuickStartSection\n            className=\"fade-in\"\n            style={{ animationDelay: '1.0s' }}\n          >\n            <SectionHeader>\n              <SectionTitle\n                className=\"fade-in\"\n                style={{ animationDelay: '1.1s' }}\n              >\n                \u5FEB\u901F\u5F00\u59CB\n              </SectionTitle>\n              <SectionDescription\n                className=\"fade-in\"\n                style={{ animationDelay: '1.2s' }}\n              >\n                \u4E09\u6B65\u542F\u52A8\u4F60\u7684\u7B2C\u4E00\u4E2A SSR \u9879\u76EE\n              </SectionDescription>\n            </SectionHeader>\n\n            <QuickStartGrid>\n              <QuickStartCard>\n                <QuickStartTitle>1\uFE0F\u20E3 \u5B89\u88C5\u4F9D\u8D56</QuickStartTitle>\n                <QuickStartCode>$ pnpm install && pnpm build</QuickStartCode>\n                <QuickStartDescription>\n                  \u88C5\u4F9D\u8D56\u5E76\u7528 esbuild \u6253 SSR \u540E\u7AEF + \u5BA2\u6237\u7AEF\n                </QuickStartDescription>\n              </QuickStartCard>\n\n              <QuickStartCard>\n                <QuickStartTitle>2\uFE0F\u20E3 \u542F\u52A8\u670D\u52A1</QuickStartTitle>\n                <QuickStartCode>$ make run</QuickStartCode>\n                <QuickStartDescription>\n                  \u8D77 Node SSR \u540E\u7AEF + Lume \u524D\u7AEF\uFF0C\u9ED8\u8BA4\u7AEF\u53E3 10090\n                </QuickStartDescription>\n              </QuickStartCard>\n\n              <QuickStartCard>\n                <QuickStartTitle>3\uFE0F\u20E3 \u8BBF\u95EE\u5E94\u7528</QuickStartTitle>\n                <QuickStartCode>http://127.0.0.1:10090</QuickStartCode>\n                <QuickStartDescription>\n                  \u6D4F\u89C8\u5668\u8BBF\u95EE\uFF0CSSR \u9996\u5C4F\u79D2\u5F00\u518D\u6C34\u5408\n                </QuickStartDescription>\n              </QuickStartCard>\n            </QuickStartGrid>\n          </QuickStartSection>\n\n          {/* ========================================\n              Photo Menu \u793A\u4F8B\n              ======================================== */}\n          <PhotoSection className=\"fade-in\" style={{ animationDelay: '1.3s' }}>\n            <SectionHeader>\n              <SectionTitle\n                className=\"fade-in\"\n                style={{ animationDelay: '1.4s' }}\n              >\n                \u56FE\u7247\u5206\u7C7B\u793A\u4F8B\n              </SectionTitle>\n              <SectionDescription\n                className=\"fade-in\"\n                style={{ animationDelay: '1.5s' }}\n              >\n                \u7531 Node SSR \u540E\u7AEF\u51FA /getPhotoMenu \u4E0E /images\uFF0C\u7ECF Lume relay\uFF0C\u5FEB\u901F\u6784\u5EFA\u56FE\u5E93\u5E94\u7528\n              </SectionDescription>\n            </SectionHeader>\n\n            <Suspense fallback={\n              <LoadingContainer>\n                <LoadingSpinner />\n                <LoadingText>\u52A0\u8F7D\u5206\u7C7B...</LoadingText>\n              </LoadingContainer>\n            }>\n              <SuspendedPhotoGrid withSSR={withSSR} />\n            </Suspense>\n          </PhotoSection>\n\n          {/* ========================================\n              Footer\n              ======================================== */}\n          <Footer>\n            <p>\u00A9 2026 nsbp-lume \u00B7 React 19 SSR + Lume \u5F15\u64CE\uFF08AgentHTTPD \u2192 FastCGI \u2192 Node\uFF09</p>\n          </Footer>\n        </PageWrapper>\n      </Layout>\n    </GlobalStyle>\n  )\n}\n\nexport default Home\n\n// Suspense data boundary: the photo grid content. On the server the use()\n// promise suspends (shell streams first, grid after); on the client with the\n// preloaded store it resolves synchronously (no flash, markup matches).\nfunction SuspendedPhotoGrid({ withSSR }: { withSSR: (u: string) => string }) {\n  const menu = usePhotoMenu()\n  if (menu.length === 0) {\n    return (\n      <ErrorContainer>\n        <ErrorTitle>\u274C \u6682\u65E0\u5206\u7C7B</ErrorTitle>\n        <ErrorMessage>\u8BF7\u5728 public/images \u76EE\u5F55\u4E0B\u521B\u5EFA\u56FE\u7247\u6587\u4EF6\u5939</ErrorMessage>\n      </ErrorContainer>\n    )\n  }\n  return (\n    <PhotoGrid>\n      {menu.map((item) => (\n        <Link key={item.name} to={withSSR(`/photo?dic=${item.name}`)}>\n          <PhotoCard>\n            <PhotoImageWrapper>\n              <PhotoImage\n                src={\n                  item.cover ||\n                  'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='\n                }\n                alt={item.name}\n                loading=\"lazy\"\n              />\n            </PhotoImageWrapper>\n            <PhotoName>\n              <PhotoTitle>{item.name}</PhotoTitle>\n              {typeof item.count === 'number' && (\n                <PhotoCount>{item.count} \u5F20</PhotoCount>\n              )}\n            </PhotoName>\n          </PhotoCard>\n        </Link>\n      ))}\n    </PhotoGrid>\n  )\n}\n\n", "import React, { useState, useEffect } from 'react'\nimport { Container } from '@styled/component/layout'\nimport Loading from './Loading'\n\ninterface LayoutProps {\n  children: React.ReactNode\n  query?: { ssr?: string | number; nsbp?: string | number }\n}\n\n// \u9996\u5C4F\u5448\u73B0\u6A21\u5F0F:\n//   - \u7701\u7565 \u6216 ssr=1 (\u6216\u65E7 nsbp=1) \u2192 pageLoad \u521D\u503C 1 \u2192 \u76F4\u63A5\u5C55\u793A children\n//     (\u771F\u6B63\u7684 SSR \u9ED8\u8BA4, \u9996\u5C4F\u5C31\u662F\u670D\u52A1\u7AEF\u6E32\u67D3\u597D\u7684\u5185\u5BB9, \u4E0D\u95EA Loading)\n//   - ssr=0 (\u6216\u65E7 nsbp=0)         \u2192 pageLoad \u521D\u503C 0 \u2192 \u5148\u6E32\u67D3 <Loading/>,\n//     effect \u7FFB 1 (\u663E\u5F0F\"\u52A8\u753B\u6F14\u793A / \u5BA2\u6237\u7AEF\u6570\u636E\u6A21\u5F0F\", \u8BA9 Photo \u8D70 isSEO()===0\n//     \u5206\u652F\u5728\u5BA2\u6237\u7AEF\u91CD\u65B0\u53D6\u6570)\n//\n// \u89C4\u8303\u53C2\u6570\u540D\u662F ssr; \u65E7\u9879\u76EE\u5206\u4EAB\u51FA\u53BB\u7684 nsbp= \u94FE\u63A5\u4FDD\u6301\u53EF\u8BFB(query \u91CC\u4E24\u4E2A\u952E\u90FD\u53EF\u80FD\u6709,\n// \u4F18\u5148 ssr)\u3002\u9ED8\u8BA4\u503C 1 \u5BF9 hydration \u5B89\u5168: \u670D\u52A1\u7AEF\u4E0E\u5BA2\u6237\u7AEF\u5BF9\u540C\u4E00\u4EFD query\n// (SSR \u6CE8\u5165\u7684 __NSBP_CONTEXT__ JSON \u5757\u91CC\u7684 state.query) \u7B97\u51FA\u76F8\u540C\u7684\u521D\u503C\u3002\nconst Layout = ({ children, query }: LayoutProps) => {\n  const mode =\n    query !== undefined && query !== null ? query.ssr ?? query.nsbp : undefined\n\n  // \u7701\u7565 = SSR \u9ED8\u8BA4(\u76F4\u63A5\u5C55\u793A); \u4EC5\u5F53\u663E\u5F0F ssr=0(\u6216\u65E7 nsbp=0) \u65F6\u5148\u64AD loading\u3002\n  const [pageLoad, setPageLoad] = useState(\n    mode !== undefined ? parseInt(String(mode), 10) : 1\n  )\n\n  useEffect(() => {\n    if (pageLoad === 0) {\n      setPageLoad(1)\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  return <Container>{pageLoad ? children : <Loading />}</Container>\n}\n\nexport default Layout\n", "// Plain-component factory that replaces the `styled.xxx` primitives of\n// styled-components. `stx(tag, className)` returns a component that renders\n// the given intrinsic tag with a fixed className (+ the consumer's className),\n// forwarding every other prop (style, onClick, href, children, ...).\n//\n// All custom visuals live verbatim in src/css/tailwind.css (Tailwind pipeline);\n// this factory only keeps the original component API so consumers (Home /\n// Photo / Header / Layout) stay unchanged.\nimport React from \"react\";\n\nexport const stx = (tag: keyof React.JSX.IntrinsicElements, cls?: string) => {\n  const Comp: React.FC<any> = (props) => {\n    const { className, children, ...rest } = props;\n    const cn = [cls, className].filter(Boolean).join(\" \");\n    const P = tag as any;\n    return (\n      <P {...rest} className={cn}>\n        {children}\n      </P>\n    );\n  };\n  Comp.displayName = \"stx(\" + String(tag) + \")\";\n  return Comp;\n};\n", "// Plain component class; visuals in src/css/tailwind.css.\nimport React from \"react\";\nimport { stx } from \"../stx\";\n\nexport const Container = stx(\"div\", \"layout-container\");\n", "import React from 'react'\n\nconst Loading = () => {\n  return <div>Loading...</div>\n}\n\nexport default Loading\n", "import PropTypes from 'prop-types';\nimport withSideEffect from 'react-side-effect';\nimport isEqual from 'react-fast-compare';\nimport React from 'react';\nimport objectAssign from 'object-assign';\n\nvar ATTRIBUTE_NAMES = {\n    BODY: \"bodyAttributes\",\n    HTML: \"htmlAttributes\",\n    TITLE: \"titleAttributes\"\n};\n\nvar TAG_NAMES = {\n    BASE: \"base\",\n    BODY: \"body\",\n    HEAD: \"head\",\n    HTML: \"html\",\n    LINK: \"link\",\n    META: \"meta\",\n    NOSCRIPT: \"noscript\",\n    SCRIPT: \"script\",\n    STYLE: \"style\",\n    TITLE: \"title\"\n};\n\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n    return TAG_NAMES[name];\n});\n\nvar TAG_PROPERTIES = {\n    CHARSET: \"charset\",\n    CSS_TEXT: \"cssText\",\n    HREF: \"href\",\n    HTTPEQUIV: \"http-equiv\",\n    INNER_HTML: \"innerHTML\",\n    ITEM_PROP: \"itemprop\",\n    NAME: \"name\",\n    PROPERTY: \"property\",\n    REL: \"rel\",\n    SRC: \"src\",\n    TARGET: \"target\"\n};\n\nvar REACT_TAG_MAP = {\n    accesskey: \"accessKey\",\n    charset: \"charSet\",\n    class: \"className\",\n    contenteditable: \"contentEditable\",\n    contextmenu: \"contextMenu\",\n    \"http-equiv\": \"httpEquiv\",\n    itemprop: \"itemProp\",\n    tabindex: \"tabIndex\"\n};\n\nvar HELMET_PROPS = {\n    DEFAULT_TITLE: \"defaultTitle\",\n    DEFER: \"defer\",\n    ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n    ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n    TITLE_TEMPLATE: \"titleTemplate\"\n};\n\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n    obj[REACT_TAG_MAP[key]] = key;\n    return obj;\n}, {});\n\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\n\nvar HELMET_ATTRIBUTE = \"data-react-helmet\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\nvar createClass = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\nvar inherits = function (subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      enumerable: false,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n  var target = {};\n\n  for (var i in obj) {\n    if (keys.indexOf(i) >= 0) continue;\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n    target[i] = obj[i];\n  }\n\n  return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n  if (!self) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n    var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n    if (encode === false) {\n        return String(str);\n    }\n\n    return String(str).replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\"/g, \"&quot;\").replace(/'/g, \"&#x27;\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n    var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n    var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n    if (innermostTemplate && innermostTitle) {\n        // use function arg to avoid need to escape $ characters\n        return innermostTemplate.replace(/%s/g, function () {\n            return Array.isArray(innermostTitle) ? innermostTitle.join(\"\") : innermostTitle;\n        });\n    }\n\n    var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n\n    return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n    return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n    return propsList.filter(function (props) {\n        return typeof props[tagType] !== \"undefined\";\n    }).map(function (props) {\n        return props[tagType];\n    }).reduce(function (tagAttrs, current) {\n        return _extends({}, tagAttrs, current);\n    }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n    return propsList.filter(function (props) {\n        return typeof props[TAG_NAMES.BASE] !== \"undefined\";\n    }).map(function (props) {\n        return props[TAG_NAMES.BASE];\n    }).reverse().reduce(function (innermostBaseTag, tag) {\n        if (!innermostBaseTag.length) {\n            var keys = Object.keys(tag);\n\n            for (var i = 0; i < keys.length; i++) {\n                var attributeKey = keys[i];\n                var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n                if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n                    return innermostBaseTag.concat(tag);\n                }\n            }\n        }\n\n        return innermostBaseTag;\n    }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n    // Calculate list of tags, giving priority innermost component (end of the propslist)\n    var approvedSeenTags = {};\n\n    return propsList.filter(function (props) {\n        if (Array.isArray(props[tagName])) {\n            return true;\n        }\n        if (typeof props[tagName] !== \"undefined\") {\n            warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n        }\n        return false;\n    }).map(function (props) {\n        return props[tagName];\n    }).reverse().reduce(function (approvedTags, instanceTags) {\n        var instanceSeenTags = {};\n\n        instanceTags.filter(function (tag) {\n            var primaryAttributeKey = void 0;\n            var keys = Object.keys(tag);\n            for (var i = 0; i < keys.length; i++) {\n                var attributeKey = keys[i];\n                var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n                // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n                if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n                    primaryAttributeKey = lowerCaseAttributeKey;\n                }\n                // Special case for innerHTML which doesn't work lowercased\n                if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n                    primaryAttributeKey = attributeKey;\n                }\n            }\n\n            if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n                return false;\n            }\n\n            var value = tag[primaryAttributeKey].toLowerCase();\n\n            if (!approvedSeenTags[primaryAttributeKey]) {\n                approvedSeenTags[primaryAttributeKey] = {};\n            }\n\n            if (!instanceSeenTags[primaryAttributeKey]) {\n                instanceSeenTags[primaryAttributeKey] = {};\n            }\n\n            if (!approvedSeenTags[primaryAttributeKey][value]) {\n                instanceSeenTags[primaryAttributeKey][value] = true;\n                return true;\n            }\n\n            return false;\n        }).reverse().forEach(function (tag) {\n            return approvedTags.push(tag);\n        });\n\n        // Update seen tags with tags from this instance\n        var keys = Object.keys(instanceSeenTags);\n        for (var i = 0; i < keys.length; i++) {\n            var attributeKey = keys[i];\n            var tagUnion = objectAssign({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n\n            approvedSeenTags[attributeKey] = tagUnion;\n        }\n\n        return approvedTags;\n    }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n    for (var i = propsList.length - 1; i >= 0; i--) {\n        var props = propsList[i];\n\n        if (props.hasOwnProperty(property)) {\n            return props[property];\n        }\n    }\n\n    return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n    return {\n        baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n        bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n        defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n        encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n        htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n        linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n        metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n        noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n        onChangeClientState: getOnChangeClientState(propsList),\n        scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n        styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n        title: getTitleFromPropsList(propsList),\n        titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n    };\n};\n\nvar rafPolyfill = function () {\n    var clock = Date.now();\n\n    return function (callback) {\n        var currentTime = Date.now();\n\n        if (currentTime - clock > 16) {\n            clock = currentTime;\n            callback(currentTime);\n        } else {\n            setTimeout(function () {\n                rafPolyfill(callback);\n            }, 0);\n        }\n    };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n    return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\n\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n    return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n    if (_helmetCallback) {\n        cancelAnimationFrame(_helmetCallback);\n    }\n\n    if (newState.defer) {\n        _helmetCallback = requestAnimationFrame(function () {\n            commitTagChanges(newState, function () {\n                _helmetCallback = null;\n            });\n        });\n    } else {\n        commitTagChanges(newState);\n        _helmetCallback = null;\n    }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n    var baseTag = newState.baseTag,\n        bodyAttributes = newState.bodyAttributes,\n        htmlAttributes = newState.htmlAttributes,\n        linkTags = newState.linkTags,\n        metaTags = newState.metaTags,\n        noscriptTags = newState.noscriptTags,\n        onChangeClientState = newState.onChangeClientState,\n        scriptTags = newState.scriptTags,\n        styleTags = newState.styleTags,\n        title = newState.title,\n        titleAttributes = newState.titleAttributes;\n\n    updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n    updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n\n    updateTitle(title, titleAttributes);\n\n    var tagUpdates = {\n        baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n        linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n        metaTags: updateTags(TAG_NAMES.META, metaTags),\n        noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n        scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n        styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n    };\n\n    var addedTags = {};\n    var removedTags = {};\n\n    Object.keys(tagUpdates).forEach(function (tagType) {\n        var _tagUpdates$tagType = tagUpdates[tagType],\n            newTags = _tagUpdates$tagType.newTags,\n            oldTags = _tagUpdates$tagType.oldTags;\n\n\n        if (newTags.length) {\n            addedTags[tagType] = newTags;\n        }\n        if (oldTags.length) {\n            removedTags[tagType] = tagUpdates[tagType].oldTags;\n        }\n    });\n\n    cb && cb();\n\n    onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n    return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n    if (typeof title !== \"undefined\" && document.title !== title) {\n        document.title = flattenArray(title);\n    }\n\n    updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n    var elementTag = document.getElementsByTagName(tagName)[0];\n\n    if (!elementTag) {\n        return;\n    }\n\n    var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n    var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n    var attributesToRemove = [].concat(helmetAttributes);\n    var attributeKeys = Object.keys(attributes);\n\n    for (var i = 0; i < attributeKeys.length; i++) {\n        var attribute = attributeKeys[i];\n        var value = attributes[attribute] || \"\";\n\n        if (elementTag.getAttribute(attribute) !== value) {\n            elementTag.setAttribute(attribute, value);\n        }\n\n        if (helmetAttributes.indexOf(attribute) === -1) {\n            helmetAttributes.push(attribute);\n        }\n\n        var indexToSave = attributesToRemove.indexOf(attribute);\n        if (indexToSave !== -1) {\n            attributesToRemove.splice(indexToSave, 1);\n        }\n    }\n\n    for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n        elementTag.removeAttribute(attributesToRemove[_i]);\n    }\n\n    if (helmetAttributes.length === attributesToRemove.length) {\n        elementTag.removeAttribute(HELMET_ATTRIBUTE);\n    } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n        elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n    }\n};\n\nvar updateTags = function updateTags(type, tags) {\n    var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n    var tagNodes = headElement.querySelectorAll(type + \"[\" + HELMET_ATTRIBUTE + \"]\");\n    var oldTags = Array.prototype.slice.call(tagNodes);\n    var newTags = [];\n    var indexToDelete = void 0;\n\n    if (tags && tags.length) {\n        tags.forEach(function (tag) {\n            var newElement = document.createElement(type);\n\n            for (var attribute in tag) {\n                if (tag.hasOwnProperty(attribute)) {\n                    if (attribute === TAG_PROPERTIES.INNER_HTML) {\n                        newElement.innerHTML = tag.innerHTML;\n                    } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n                        if (newElement.styleSheet) {\n                            newElement.styleSheet.cssText = tag.cssText;\n                        } else {\n                            newElement.appendChild(document.createTextNode(tag.cssText));\n                        }\n                    } else {\n                        var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n                        newElement.setAttribute(attribute, value);\n                    }\n                }\n            }\n\n            newElement.setAttribute(HELMET_ATTRIBUTE, \"true\");\n\n            // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n            if (oldTags.some(function (existingTag, index) {\n                indexToDelete = index;\n                return newElement.isEqualNode(existingTag);\n            })) {\n                oldTags.splice(indexToDelete, 1);\n            } else {\n                newTags.push(newElement);\n            }\n        });\n    }\n\n    oldTags.forEach(function (tag) {\n        return tag.parentNode.removeChild(tag);\n    });\n    newTags.forEach(function (tag) {\n        return headElement.appendChild(tag);\n    });\n\n    return {\n        oldTags: oldTags,\n        newTags: newTags\n    };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n    return Object.keys(attributes).reduce(function (str, key) {\n        var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n        return str ? str + \" \" + attr : attr;\n    }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n    var attributeString = generateElementAttributesAsString(attributes);\n    var flattenedTitle = flattenArray(title);\n    return attributeString ? \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"</\" + type + \">\" : \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"</\" + type + \">\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n    return tags.reduce(function (str, tag) {\n        var attributeHtml = Object.keys(tag).filter(function (attribute) {\n            return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n        }).reduce(function (string, attribute) {\n            var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n            return string ? string + \" \" + attr : attr;\n        }, \"\");\n\n        var tagContent = tag.innerHTML || tag.cssText || \"\";\n\n        var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n\n        return str + \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"</\" + type + \">\");\n    }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n    var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    return Object.keys(attributes).reduce(function (obj, key) {\n        obj[REACT_TAG_MAP[key] || key] = attributes[key];\n        return obj;\n    }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n    var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    return Object.keys(props).reduce(function (obj, key) {\n        obj[HTML_TAG_MAP[key] || key] = props[key];\n        return obj;\n    }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n    var _initProps;\n\n    // assigning into an array to define toString function on it\n    var initProps = (_initProps = {\n        key: title\n    }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n    var props = convertElementAttributestoReactProps(attributes, initProps);\n\n    return [React.createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n    return tags.map(function (tag, i) {\n        var _mappedTag;\n\n        var mappedTag = (_mappedTag = {\n            key: i\n        }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n\n        Object.keys(tag).forEach(function (attribute) {\n            var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n            if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n                var content = tag.innerHTML || tag.cssText;\n                mappedTag.dangerouslySetInnerHTML = { __html: content };\n            } else {\n                mappedTag[mappedAttribute] = tag[attribute];\n            }\n        });\n\n        return React.createElement(type, mappedTag);\n    });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n    switch (type) {\n        case TAG_NAMES.TITLE:\n            return {\n                toComponent: function toComponent() {\n                    return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n                },\n                toString: function toString() {\n                    return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n                }\n            };\n        case ATTRIBUTE_NAMES.BODY:\n        case ATTRIBUTE_NAMES.HTML:\n            return {\n                toComponent: function toComponent() {\n                    return convertElementAttributestoReactProps(tags);\n                },\n                toString: function toString() {\n                    return generateElementAttributesAsString(tags);\n                }\n            };\n        default:\n            return {\n                toComponent: function toComponent() {\n                    return generateTagsAsReactComponent(type, tags);\n                },\n                toString: function toString() {\n                    return generateTagsAsString(type, tags, encode);\n                }\n            };\n    }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n    var baseTag = _ref.baseTag,\n        bodyAttributes = _ref.bodyAttributes,\n        encode = _ref.encode,\n        htmlAttributes = _ref.htmlAttributes,\n        linkTags = _ref.linkTags,\n        metaTags = _ref.metaTags,\n        noscriptTags = _ref.noscriptTags,\n        scriptTags = _ref.scriptTags,\n        styleTags = _ref.styleTags,\n        _ref$title = _ref.title,\n        title = _ref$title === undefined ? \"\" : _ref$title,\n        titleAttributes = _ref.titleAttributes;\n    return {\n        base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n        bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n        htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n        link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n        meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n        noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n        script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n        style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n        title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)\n    };\n};\n\nvar Helmet = function Helmet(Component) {\n    var _class, _temp;\n\n    return _temp = _class = function (_React$Component) {\n        inherits(HelmetWrapper, _React$Component);\n\n        function HelmetWrapper() {\n            classCallCheck(this, HelmetWrapper);\n            return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n        }\n\n        HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n            return !isEqual(this.props, nextProps);\n        };\n\n        HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n            if (!nestedChildren) {\n                return null;\n            }\n\n            switch (child.type) {\n                case TAG_NAMES.SCRIPT:\n                case TAG_NAMES.NOSCRIPT:\n                    return {\n                        innerHTML: nestedChildren\n                    };\n\n                case TAG_NAMES.STYLE:\n                    return {\n                        cssText: nestedChildren\n                    };\n            }\n\n            throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n        };\n\n        HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n            var _babelHelpers$extends;\n\n            var child = _ref.child,\n                arrayTypeChildren = _ref.arrayTypeChildren,\n                newChildProps = _ref.newChildProps,\n                nestedChildren = _ref.nestedChildren;\n\n            return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n        };\n\n        HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n            var _babelHelpers$extends2, _babelHelpers$extends3;\n\n            var child = _ref2.child,\n                newProps = _ref2.newProps,\n                newChildProps = _ref2.newChildProps,\n                nestedChildren = _ref2.nestedChildren;\n\n            switch (child.type) {\n                case TAG_NAMES.TITLE:\n                    return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n                case TAG_NAMES.BODY:\n                    return _extends({}, newProps, {\n                        bodyAttributes: _extends({}, newChildProps)\n                    });\n\n                case TAG_NAMES.HTML:\n                    return _extends({}, newProps, {\n                        htmlAttributes: _extends({}, newChildProps)\n                    });\n            }\n\n            return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n        };\n\n        HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n            var newFlattenedProps = _extends({}, newProps);\n\n            Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n                var _babelHelpers$extends4;\n\n                newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n            });\n\n            return newFlattenedProps;\n        };\n\n        HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n            if (process.env.NODE_ENV !== \"production\") {\n                if (!VALID_TAG_NAMES.some(function (name) {\n                    return child.type === name;\n                })) {\n                    if (typeof child.type === \"function\") {\n                        return warn(\"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.\");\n                    }\n\n                    return warn(\"Only elements types \" + VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n                }\n\n                if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n                    return typeof nestedChild !== \"string\";\n                }))) {\n                    throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``}</\" + child.type + \"> ) Refer to our API for more information.\");\n                }\n            }\n\n            return true;\n        };\n\n        HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n            var _this2 = this;\n\n            var arrayTypeChildren = {};\n\n            React.Children.forEach(children, function (child) {\n                if (!child || !child.props) {\n                    return;\n                }\n\n                var _child$props = child.props,\n                    nestedChildren = _child$props.children,\n                    childProps = objectWithoutProperties(_child$props, [\"children\"]);\n\n                var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n                _this2.warnOnInvalidChildren(child, nestedChildren);\n\n                switch (child.type) {\n                    case TAG_NAMES.LINK:\n                    case TAG_NAMES.META:\n                    case TAG_NAMES.NOSCRIPT:\n                    case TAG_NAMES.SCRIPT:\n                    case TAG_NAMES.STYLE:\n                        arrayTypeChildren = _this2.flattenArrayTypeChildren({\n                            child: child,\n                            arrayTypeChildren: arrayTypeChildren,\n                            newChildProps: newChildProps,\n                            nestedChildren: nestedChildren\n                        });\n                        break;\n\n                    default:\n                        newProps = _this2.mapObjectTypeChildren({\n                            child: child,\n                            newProps: newProps,\n                            newChildProps: newChildProps,\n                            nestedChildren: nestedChildren\n                        });\n                        break;\n                }\n            });\n\n            newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n            return newProps;\n        };\n\n        HelmetWrapper.prototype.render = function render() {\n            var _props = this.props,\n                children = _props.children,\n                props = objectWithoutProperties(_props, [\"children\"]);\n\n            var newProps = _extends({}, props);\n\n            if (children) {\n                newProps = this.mapChildrenToProps(children, newProps);\n            }\n\n            return React.createElement(Component, newProps);\n        };\n\n        createClass(HelmetWrapper, null, [{\n            key: \"canUseDOM\",\n\n\n            // Component.peek comes from react-side-effect:\n            // For testing, you may use a static peek() method available on the returned component.\n            // It lets you get the current state without resetting the mounted instance stack.\n            // Don\u2019t use it for anything other than testing.\n\n            /**\n             * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n             * @param {Object} bodyAttributes: {\"className\": \"root\"}\n             * @param {String} defaultTitle: \"Default Title\"\n             * @param {Boolean} defer: true\n             * @param {Boolean} encodeSpecialCharacters: true\n             * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n             * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n             * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n             * @param {Array} noscript: [{\"innerHTML\": \"<img src='http://mysite.com/js/test.js'\"}]\n             * @param {Function} onChangeClientState: \"(newState) => console.log(newState)\"\n             * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n             * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n             * @param {String} title: \"Title\"\n             * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n             * @param {String} titleTemplate: \"MySite.com - %s\"\n             */\n            set: function set$$1(canUseDOM) {\n                Component.canUseDOM = canUseDOM;\n            }\n        }]);\n        return HelmetWrapper;\n    }(React.Component), _class.propTypes = {\n        base: PropTypes.object,\n        bodyAttributes: PropTypes.object,\n        children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n        defaultTitle: PropTypes.string,\n        defer: PropTypes.bool,\n        encodeSpecialCharacters: PropTypes.bool,\n        htmlAttributes: PropTypes.object,\n        link: PropTypes.arrayOf(PropTypes.object),\n        meta: PropTypes.arrayOf(PropTypes.object),\n        noscript: PropTypes.arrayOf(PropTypes.object),\n        onChangeClientState: PropTypes.func,\n        script: PropTypes.arrayOf(PropTypes.object),\n        style: PropTypes.arrayOf(PropTypes.object),\n        title: PropTypes.string,\n        titleAttributes: PropTypes.object,\n        titleTemplate: PropTypes.string\n    }, _class.defaultProps = {\n        defer: true,\n        encodeSpecialCharacters: true\n    }, _class.peek = Component.peek, _class.rewind = function () {\n        var mappedState = Component.rewind();\n        if (!mappedState) {\n            // provide fallback if mappedState is undefined\n            mappedState = mapStateOnServer({\n                baseTag: [],\n                bodyAttributes: {},\n                encodeSpecialCharacters: true,\n                htmlAttributes: {},\n                linkTags: [],\n                metaTags: [],\n                noscriptTags: [],\n                scriptTags: [],\n                styleTags: [],\n                title: \"\",\n                titleAttributes: {}\n            });\n        }\n\n        return mappedState;\n    }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n    return null;\n};\n\nvar HelmetSideEffects = withSideEffect(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\n\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\n\nexport default HelmetExport;\nexport { HelmetExport as Helmet };\n", "import { useMemo } from 'react'\nimport { appendSSRParam, removeSSRParam } from './index'\n\n/**\n * React Hook\uFF1A\u5728\u8DEF\u7531\u8DF3\u8F6C\u65F6\u4FDD\u7559\u9996\u5C4F\u5448\u73B0\u6A21\u5F0F\u53C2\u6570\uFF08\u89C4\u8303\u540D `ssr`\uFF09\u3002\n *\n * @example\n * const { withSSR, withSSRValue, withoutSSR } = usePreserveSSR()\n *\n * // \u4FDD\u7559\u5F53\u524D ssr \u53C2\u6570\n * <Link to={withSSR('/photo?dic=test')}>\n *\n * // \u6307\u5B9A ssr \u503C\n * <Link to={withSSRValue('/photo?dic=test', '0')}>\n *\n * // \u79FB\u9664 ssr / nsbp \u53C2\u6570\n * <Link to={withoutSSR('/photo?dic=test&ssr=0')}>\n */\nexport const usePreserveSSR = () => {\n  return useMemo(\n    () => ({\n      /** \u4FDD\u7559\u5F53\u524D URL \u7684 ssr \u53C2\u6570\uFF08\u5199\u5165\u89C4\u8303\u540D ssr=\uFF09 */\n      withSSR: (url: string) => appendSSRParam(url),\n\n      /** \u6307\u5B9A ssr \u53C2\u6570\u503C */\n      withSSRValue: (url: string, value: string) =>\n        appendSSRParam(url, value),\n\n      /** \u79FB\u9664 ssr \u4E0E\u9057\u7559\u7684 nsbp \u53C2\u6570 */\n      withoutSSR: (url: string) => removeSSRParam(url),\n    }),\n    []\n  )\n}\n", "export const getLocationParams = (param: string) => {\n  if (typeof window === 'undefined') return ''\n\n  try {\n    const url = new URL(window.location.href)\n    const value = url.searchParams.get(param)\n    return value || ''\n  } catch (e) {\n    console.error('Failed to parse URL:', e)\n    return ''\n  }\n}\n\n/**\n * \u8BFB\u53D6\u9996\u5C4F\u5448\u73B0\u6A21\u5F0F\u53C2\u6570\u3002\n * \u89C4\u8303\u53C2\u6570\u662F `ssr`\uFF08?ssr=0 \u52A8\u753B/\u5BA2\u6237\u7AEF\u6570\u636E\u6A21\u5F0F\uFF0C?ssr=1 \u6216\u7701\u7565 = \u76F4\u63A5\u5C55\u793A\n * SSR \u5185\u5BB9\uFF09\uFF1B\u65E7\u9879\u76EE\u5206\u4EAB\u51FA\u53BB\u7684 `?nsbp=0/1` \u94FE\u63A5\u4FDD\u6301\u53EF\u8BFB\uFF0C\u8BFB\u53D6\u65F6\u4F18\u5148 `ssr`\u3001\n * \u56DE\u9000 `nsbp`\u3002\u5199\u5165\u65B0\u94FE\u63A5\u4E00\u5F8B\u7528 `ssr=`\u3002\n */\nexport const getSSRParam = (): string => {\n  if (typeof window === 'undefined') return ''\n  return getLocationParams('ssr') || getLocationParams('nsbp')\n}\n\nexport const isSEO = () => {\n  if (typeof window !== 'undefined') {\n    const v = getSSRParam()\n    if (v !== '') {\n      return parseInt(v, 10)\n    }\n    return 1\n  }\n  return 1\n}\n\n/**\n * \u5728 URL \u4E2D\u4FDD\u7559/\u6DFB\u52A0 ssr \u53C2\u6570\uFF08\u5199\u5165\u89C4\u8303\u53C2\u6570\u540D ssr\uFF09\u3002\n *\n * @example\n * appendSSRParam('/photo?dic=test')\n * // \u5F53\u524D\u662F /?ssr=0 \u2192 '/photo?dic=test&ssr=0'\n */\nexport const appendSSRParam = (url: string, ssrValue?: string): string => {\n  const ssr = ssrValue !== undefined ? ssrValue : getSSRParam()\n\n  if (!ssr) {\n    return url\n  }\n\n  const separator = url.includes('?') ? '&' : '?'\n  return `${url}${separator}ssr=${ssr}`\n}\n\n/**\n * \u4ECE URL \u4E2D\u79FB\u9664\u5448\u73B0\u6A21\u5F0F\u53C2\u6570\uFF08ssr \u4E0E\u9057\u7559\u7684 nsbp \u90FD\u5220\uFF09\u3002\n */\nexport const removeSSRParam = (url: string): string => {\n  const urlObj = new URL(\n    url,\n    typeof window !== 'undefined' ? window.location.origin : 'http://localhost'\n  )\n  urlObj.searchParams.delete('ssr')\n  urlObj.searchParams.delete('nsbp')\n  return urlObj.pathname + urlObj.search\n}\n\nexport { usePreserveSSR } from './usePreserveSSR'\n", "// Photo data hooks \u2014 store-first, no Suspense `use()`.\n//\n// The SSR backend (server-ssr/main.tsx) prefetches each route's data into the\n// Redux store (buildStore runs route.loadData \u2192 GET_PHOTO_MENU /\n// GET_PHOTO_WIDTH_HEIGHT) and injects it as a __NSBP_CONTEXT__ JSON data block.\n// So:\n//\n//   SERVER           -> reads the prefetched store: the menu / carousel render\n//                       synchronously in the page shell (visible even before\n//                       hydration / with JS disabled \u2014 no hidden <div hidden>\n//                       Suspense templates).\n//\n//   CLIENT (hydrate) -> the JSON block seeds the store, so the first client\n//                       render matches the SSR markup exactly (no flash).\n//\n//   CLIENT (navigate)-> React Router swaps the route WITHOUT re-running the\n//                       server prefetch, so the store can be empty for the new\n//                       route (e.g. home \u2192 /photo). The hook subscribes via\n//                       useSelector and fetches + dispatches in an effect; the\n//                       store update re-renders the carousel once the data\n//                       lands. This is the path that used to hang forever:\n//                       the old `use()` Suspense boundary never recovered after\n//                       a client-side navigation (the \"\u52A0\u8F7D\u56FE\u7247...\" fallback\n//                       stayed on screen with 0 images).\nimport { useEffect } from \"react\";\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { GET_PHOTO_MENU, GET_PHOTO_WIDTH_HEIGHT } from \"@store/constants\";\n\nexport type PhotoMenu = Array<{ name: string; cover?: string; count?: number }>;\nexport type PhotoWH = [number, number, string][];\n\n// Kept for the SSR backend (server-ssr/main.tsx), which registers in-process\n// resolvers. The hooks no longer `use()` them (the client can't rely on the\n// Suspense `use()` recovering after a route transition), but the export\n// signature is unchanged so the server bundle still compiles.\nexport interface NSBPResolvers {\n  photoMenu?: () => Promise<PhotoMenu>;\n  photoWH?: (dic: string) => Promise<PhotoWH>;\n}\nlet serverResolvers: NSBPResolvers | undefined;\nexport function setServerResolvers(r: NSBPResolvers): void {\n  serverResolvers = r;\n}\n\ninterface RootState {\n  photo?: { data?: unknown; menu?: unknown };\n}\n\nconst arr = <T,>(v: unknown): T[] | null =>\n  Array.isArray(v) ? (v as T[]) : null;\n\n// Category menu. Store-first (prefetched on the server / seeded from the\n// __NSBP_CONTEXT__ JSON block); on the client an empty menu is fetched and\n// dispatched so the subscription re-renders when it lands.\nexport function usePhotoMenu(): PhotoMenu {\n  const menu = useSelector((s: RootState) => s.photo?.menu);\n  const dispatch = useDispatch();\n\n  useEffect(() => {\n    if (typeof window === \"undefined\") return;\n    const m = arr<unknown>(menu);\n    if (!m || m.length === 0) {\n      fetch(\"/getPhotoMenu\")\n        .then((res) => (res.ok ? res.json() : null))\n        .then((j) => {\n          const got = arr<unknown>((j as { data?: unknown } | null)?.data);\n          if (got && got.length > 0) {\n            dispatch({ type: GET_PHOTO_MENU, menu: got });\n          }\n        })\n        .catch(() => {});\n    }\n  }, [menu, dispatch]);\n\n  return arr<{ name: string; cover?: string; count?: number }>(menu) || [];\n}\n\n// Photo width/height for a category. Same store-first pattern: the SSR backend\n// prefetches getPhotoWH(dic) into the store, so the carousel renders in the\n// shell; on client-side navigation the store is empty, so we fetch + dispatch\n// (useSelector re-renders when the data lands) instead of suspending forever.\nexport function usePhotoDimensions(dic: string): PhotoWH {\n  const data = useSelector((s: RootState) => s.photo?.data);\n  const dispatch = useDispatch();\n\n  useEffect(() => {\n    if (typeof window === \"undefined\") return;\n    const d = arr<unknown>(data);\n    if (!d || d.length === 0) {\n      fetch(\"/getPhotoWH?dic=\" + encodeURIComponent(dic))\n        .then((res) => (res.ok ? res.json() : null))\n        .then((j) => {\n          const got = arr<unknown>((j as { data?: unknown } | null)?.data);\n          if (got && got.length > 0) {\n            dispatch({ type: GET_PHOTO_WIDTH_HEIGHT, data: got });\n          }\n        })\n        .catch(() => {});\n    }\n  }, [dic, data, dispatch]);\n\n  return arr<[number, number, string]>(data) || [];\n}\n", "// Feature card icons \u2014 clean inline SVG (Lucide-style, MIT) stroked with the\n// site's indigo\u2192purple gradient, replacing the mixed emoji glyphs (\u26A1\uD83D\uDD27\uD83D\uDCE6\uD83E\uDDE9\uD83D\uDCDD\uD83D\uDDBC\uFE0F)\n// that rendered with inconsistent colour/style across the \u6838\u5FC3\u7279\u6027 cards.\nimport React from \"react\";\n\n// Shared gradient definition, rendered once and referenced by all icons via\n// fill/stroke=\"url(#nsbp-feature-icon-grad)\".\nexport const FeatureIconGradient = () => (\n  <svg\n    width=\"0\"\n    height=\"0\"\n    style={{ position: \"absolute\", width: 0, height: 0, overflow: \"hidden\" }}\n    aria-hidden=\"true\"\n    focusable=\"false\"\n  >\n    <defs>\n      {/* gradientUnits=\"userSpaceOnUse\" + 0..24 coords: each icon's viewBox is\n          0 0 24 24, so the gradient spans the whole icon. objectBoundingBox\n          (the default) FAILS to paint on degenerate-bbox elements \u2014 e.g. the\n          perfectly axis-aligned <line>s of the sliders icon (zero width OR\n          height) \u2014 because their bounding box has no area, so the gradient is\n          undefined and the stroke renders nothing. userSpaceOnUse is evaluated\n          in the icon's user coordinate system, so it paints every element. */}\n      <linearGradient\n        id=\"nsbp-feature-icon-grad\"\n        gradientUnits=\"userSpaceOnUse\"\n        x1=\"0\"\n        y1=\"0\"\n        x2=\"24\"\n        y2=\"24\"\n      >\n        <stop offset=\"0%\" stopColor=\"#667eea\" />\n        <stop offset=\"100%\" stopColor=\"#764ba2\" />\n      </linearGradient>\n    </defs>\n  </svg>\n);\n\ntype IconProps = { size?: number };\n\nconst Svg = ({\n  size = 44,\n  children,\n}: {\n  size?: number;\n  children: React.ReactNode;\n}) => (\n  <svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"url(#nsbp-feature-icon-grad)\"\n    strokeWidth={2}\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n    aria-hidden=\"true\"\n    focusable=\"false\"\n    style={{ display: \"inline-block\", verticalAlign: \"middle\" }}\n  >\n    {children}\n  </svg>\n);\n\n// \u6781\u901F\u670D\u52A1\u7AEF\u6E32\u67D3 \u2014 bolt\nexport const IconBolt = (p: IconProps) => (\n  <Svg {...p}>\n    <polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\" />\n  </Svg>\n);\n\n// Lume C \u5F15\u64CE\u505A\u524D\u7AEF \u2014 cog / settings\nexport const IconCog = (p: IconProps) => (\n  <Svg {...p}>\n    <path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\" />\n    <circle cx=\"12\" cy=\"12\" r=\"3\" />\n  </Svg>\n);\n\n// FastCGI relay SSR \u2014 network (nodes + links)\nexport const IconNetwork = (p: IconProps) => (\n  <Svg {...p}>\n    <rect x=\"16\" y=\"16\" width=\"6\" height=\"6\" rx=\"1\" />\n    <rect x=\"2\" y=\"16\" width=\"6\" height=\"6\" rx=\"1\" />\n    <rect x=\"9\" y=\"2\" width=\"6\" height=\"6\" rx=\"1\" />\n    <path d=\"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3\" />\n    <path d=\"M12 12V8\" />\n  </Svg>\n);\n\n// React 19 \u539F\u751F\u652F\u6301 \u2014 atom\nexport const IconAtom = (p: IconProps) => (\n  <Svg {...p}>\n    <circle cx=\"12\" cy=\"12\" r=\"1\" />\n    <path d=\"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z\" />\n    <path d=\"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z\" />\n  </Svg>\n);\n\n// TypeScript \u7C7B\u578B\u5B89\u5168 \u2014 braces (type-safe code)\nexport const IconBraces = (p: IconProps) => (\n  <Svg {...p}>\n    <path d=\"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1\" />\n    <path d=\"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1\" />\n  </Svg>\n);\n\n// \u7167\u7247\u6570\u636E + Lume \u7AEF\u70B9 \u2014 image\nexport const IconImage = (p: IconProps) => (\n  <Svg {...p}>\n    <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n    <circle cx=\"9\" cy=\"9\" r=\"2\" />\n    <path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\" />\n  </Svg>\n);\n\n// \u2500\u2500 Hero \u7279\u6027\u5361\uFF08Light / Flex / TS / SSR\uFF09\u2500\u2500\u2500\u2500\u2500\u2500\n// \u8F7B\u91CF\u9AD8\u6548 \u2014 feather\nexport const IconFeather = (p: IconProps) => (\n  <Svg {...p}>\n    <path d=\"M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z\" />\n    <line x1=\"16\" y1=\"8\" x2=\"2\" y2=\"22\" />\n    <line x1=\"17.5\" y1=\"15\" x2=\"9\" y2=\"15\" />\n  </Svg>\n);\n\n// \u7075\u6D3B\u914D\u7F6E \u2014 sliders\nexport const IconSliders = (p: IconProps) => (\n  <Svg {...p}>\n    <line x1=\"4\" y1=\"21\" x2=\"4\" y2=\"14\" />\n    <line x1=\"4\" y1=\"10\" x2=\"4\" y2=\"3\" />\n    <line x1=\"12\" y1=\"21\" x2=\"12\" y2=\"12\" />\n    <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"3\" />\n    <line x1=\"20\" y1=\"21\" x2=\"20\" y2=\"16\" />\n    <line x1=\"20\" y1=\"12\" x2=\"20\" y2=\"3\" />\n    <line x1=\"2\" y1=\"14\" x2=\"6\" y2=\"14\" />\n    <line x1=\"10\" y1=\"8\" x2=\"14\" y2=\"8\" />\n    <line x1=\"18\" y1=\"16\" x2=\"22\" y2=\"16\" />\n  </Svg>\n);\n\n// \u7C7B\u578B\u5B89\u5168 \u2014 shield-check\nexport const IconShield = (p: IconProps) => (\n  <Svg {...p}>\n    <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1 1 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n    <path d=\"m9 12 2 2 4-4\" />\n  </Svg>\n);\n\n// \u670D\u52A1\u7AEF\u6E32\u67D3 \u2014 server rack\nexport const IconServer = (p: IconProps) => (\n  <Svg {...p}>\n    <rect x=\"2\" y=\"2\" width=\"20\" height=\"8\" rx=\"2\" />\n    <rect x=\"2\" y=\"14\" width=\"20\" height=\"8\" rx=\"2\" />\n    <line x1=\"6\" y1=\"6\" x2=\"6.01\" y2=\"6\" />\n    <line x1=\"6\" y1=\"18\" x2=\"6.01\" y2=\"18\" />\n  </Svg>\n);\n", "// Plain component classes (Tailwind pipeline). Visuals live verbatim in\n// src/css/tailwind.css; each export renders the original intrinsic tag with a\n// fixed class name and forwards all props (className/style/children/...).\n// Export names + tags are unchanged from the styled-components version so\n// Home.tsx needs no edits.\nimport React from \"react\";\nimport { stx } from \"./stx\";\n\n// The old styled GlobalStyle is a no-op now: its global rules (reset, body\n// gradient, page-loader, fade-in, link defaults) live at the top of\n// tailwind.css and are always on.\nexport const GlobalStyle: React.FC<{ children?: React.ReactNode }> = ({\n  children,\n}) => <>{children}</>;\n\nexport const PageWrapper = stx(\"div\", \"page-wrapper\");\n\n// Hero\nexport const HeroSection = stx(\"section\", \"hero-section\");\nexport const HeroContent = stx(\"div\", \"hero-content\");\nexport const HeroTitle = stx(\"h1\", \"hero-title\");\nexport const HeroSubtitle = stx(\"p\", \"hero-subtitle\");\nexport const HeroBadge = stx(\"span\", \"hero-badge\");\nexport const HeroStats = stx(\"div\", \"hero-stats\");\nexport const StatCard = stx(\"div\", \"stat-card\");\nexport const StatValue = stx(\"div\", \"stat-value\");\nexport const StatLabel = stx(\"div\", \"stat-label\");\n\n// \u6280\u672F\u7279\u6027\nexport const TechSection = stx(\"section\", \"tech-section\");\nexport const SectionHeader = stx(\"div\", \"section-header\");\nexport const SectionTitle = stx(\"h2\", \"section-title\");\nexport const SectionDescription = stx(\"p\", \"section-desc\");\nexport const FeatureGrid = stx(\"div\", \"feature-grid\");\nexport const FeatureCard = stx(\"div\", \"feature-card\");\nexport const CardIcon = stx(\"div\", \"card-icon\");\nexport const CardTitle = stx(\"h3\", \"card-title\");\nexport const CardDescription = stx(\"p\", \"card-desc\");\nexport const CodeExample = stx(\"pre\", \"code-example\");\n\n// \u5BF9\u6BD4\u8868\u683C\nexport const ComparisonSection = stx(\"section\", \"comparison-section\");\nexport const ComparisonTable = stx(\"table\", \"comparison-table\");\nexport const TableHeader = stx(\"thead\", \"table-header\");\nexport const TableRow = stx(\"tr\", \"table-row\");\nexport const TableCell = stx(\"td\", \"table-cell\");\nexport const TableHeaderCell = stx(\"th\", \"table-header-cell\");\nexport const NsbpJSBadge = stx(\"span\", \"nsbp-js-badge\");\nexport const NextJSBadge = stx(\"span\", \"next-js-badge\");\n\n// Photo Menu\nexport const PhotoSection = stx(\"section\", \"photo-section\");\nexport const PhotoGrid = stx(\"ul\", \"photo-grid\");\nexport const PhotoCard = stx(\"li\", \"photo-card\");\nexport const PhotoImageWrapper = stx(\"div\", \"photo-image-wrapper\");\nexport const PhotoImage = stx(\"img\", \"photo-image\");\nexport const PhotoName = stx(\"div\", \"photo-name\");\nexport const PhotoTitle = stx(\"h3\", \"photo-title\");\nexport const PhotoCount = stx(\"span\", \"photo-count\");\n\n// \u52A0\u8F7D / \u9519\u8BEF\nexport const LoadingContainer = stx(\"div\", \"loading-container\");\nexport const LoadingSpinner = stx(\"div\", \"loading-spinner\");\nexport const LoadingText = stx(\"span\", \"loading-text\");\nexport const ErrorContainer = stx(\"div\", \"error-container\");\nexport const ErrorTitle = stx(\"h3\", \"error-title\");\nexport const ErrorMessage = stx(\"p\", \"error-msg\");\n\n// \u5FEB\u901F\u5F00\u59CB\nexport const QuickStartSection = stx(\"section\", \"quick-start-section\");\nexport const QuickStartGrid = stx(\"div\", \"quick-start-grid\");\nexport const QuickStartCard = stx(\"div\", \"quick-start-card\");\nexport const QuickStartTitle = stx(\"h3\", \"quick-start-title\");\nexport const QuickStartCode = stx(\"pre\", \"quick-start-code\");\nexport const QuickStartDescription = stx(\"p\", \"quick-start-desc\");\n\n// Demo \u6309\u94AE\nexport const DemoButtonLink = stx(\"a\", \"demo-button\");\nexport const DemoButtonIcon = stx(\"span\", \"demo-button-icon\");\n\n// Footer\nexport const Footer = stx(\"footer\", \"nsbp-footer\");\n", "import React, { Fragment, useState } from \"react\";\nimport Header from \"@components/Header\";\nimport Layout from \"@components/Layout\";\nimport { Helmet } from \"react-helmet\";\nimport { Link } from \"react-router-dom\";\n\n// \u767B\u5F55\u9875(\u653E\u5728 /signin \u2014\u2014 /login \u662F Lume \u5F15\u64CE AgentHTTPD \u4F1A\u8BDD\u95E8\u7981\u4FDD\u7559\u8DEF\u5F84,\n// relay \u4E0D\u8F6C\u53D1, \u76F4\u63A5\u8BBF\u95EE\u4F1A 404; /signin \u4E0D\u5728\u4FDD\u7559\u5217\u8868, SSR \u6B63\u5E38)\u3002\n// \u539F\u7248 nsbp \u7684\u767B\u5F55\u9875\u662F\u811A\u624B\u67B6\u6F14\u793A(<p>login</p> + \u6D4B\u8BD5\u76D2), \u8FD9\u91CC\u91CD\u505A\u6210\u767B\u5F55\u5361\u7247\u3002\n// \u65E0\u771F\u5B9E\u9274\u6743\u540E\u7AEF: \u63D0\u4EA4\u4EC5\u505A\u672C\u5730\u6821\u9A8C + \u6F14\u793A\u6210\u529F\u63D0\u793A; \u5982\u9700\u63A5\u5165, \u53EF\u5728 node SSR\n// \u540E\u7AEF\u6216 Lume DSL \u52A0 /api/login \u6821\u9A8C\u540E\u518D\u6253\u901A\u3002\nconst Login = ({ query }: { query?: Record<string, string> }) => {\n  const [username, setUsername] = useState(\"\");\n  const [password, setPassword] = useState(\"\");\n  const [remember, setRemember] = useState(true);\n  const [error, setError] = useState(\"\");\n  const [ok, setOk] = useState(false);\n\n  const handleSubmit = (e: React.FormEvent) => {\n    e.preventDefault();\n    setOk(false);\n    if (!username.trim()) {\n      setError(\"\u8BF7\u8F93\u5165\u7528\u6237\u540D\");\n      return;\n    }\n    if (!password) {\n      setError(\"\u8BF7\u8F93\u5165\u5BC6\u7801\");\n      return;\n    }\n    // \u5360\u4F4D\u767B\u5F55: \u539F\u7248\u767B\u5F55\u9875\u65E0\u771F\u5B9E\u9274\u6743\u540E\u7AEF(\u6F14\u793A\u9875)\u3002\n    setError(\"\");\n    setOk(true);\n  };\n\n  return (\n    <Fragment>\n      <Helmet>\n        <title>\u767B\u5F55 \u00B7 nsbp-lume</title>\n        <meta name=\"description\" content=\"\u767B\u5F55 nsbp-lume\" />\n      </Helmet>\n      <Header />\n      <Layout query={query}>\n        <div className=\"login-wrapper\">\n          <form className=\"login-card\" onSubmit={handleSubmit}>\n            <div className=\"login-logo\">nsbp-lume</div>\n            <h1 className=\"login-title\">\u6B22\u8FCE\u56DE\u6765</h1>\n            <p className=\"login-sub\">\u767B\u5F55\u4EE5\u7EE7\u7EED\u8BBF\u95EE</p>\n\n            {error && <div className=\"login-msg login-error\">{error}</div>}\n            {ok && (\n              <div className=\"login-msg login-ok\">\n                \u2713 \u767B\u5F55\u6210\u529F\uFF08\u6F14\u793A\u9875\uFF0C\u672A\u63A5\u5165\u771F\u5B9E\u9274\u6743\uFF09\n              </div>\n            )}\n\n            <div className=\"login-field\">\n              <label htmlFor=\"login-user\">\u7528\u6237\u540D</label>\n              <input\n                id=\"login-user\"\n                type=\"text\"\n                value={username}\n                onChange={(e) => setUsername(e.target.value)}\n                placeholder=\"\u8BF7\u8F93\u5165\u7528\u6237\u540D\"\n                autoComplete=\"username\"\n              />\n            </div>\n            <div className=\"login-field\">\n              <label htmlFor=\"login-pass\">\u5BC6\u7801</label>\n              <input\n                id=\"login-pass\"\n                type=\"password\"\n                value={password}\n                onChange={(e) => setPassword(e.target.value)}\n                placeholder=\"\u8BF7\u8F93\u5165\u5BC6\u7801\"\n                autoComplete=\"current-password\"\n              />\n            </div>\n\n            <div className=\"login-options\">\n              <label>\n                <input\n                  type=\"checkbox\"\n                  checked={remember}\n                  onChange={(e) => setRemember(e.target.checked)}\n                />\n                \u8BB0\u4F4F\u6211\n              </label>\n              <a\n                className=\"login-forgot\"\n                href=\"#\"\n                onClick={(e) => e.preventDefault()}\n              >\n                \u5FD8\u8BB0\u5BC6\u7801\uFF1F\n              </a>\n            </div>\n\n            <button className=\"login-submit\" type=\"submit\">\n              \u767B \u5F55\n            </button>\n\n            <p className=\"login-foot\">\n              \u8FD8\u6CA1\u6709\u8D26\u53F7\uFF1F<Link to=\"/\">\u8FD4\u56DE\u9996\u9875</Link>\n            </p>\n          </form>\n        </div>\n      </Layout>\n    </Fragment>\n  );\n};\n\nexport default Login;\n", "// Plain component classes; visuals in src/css/tailwind.css.\n// `NavLink` keeps the original `$active` prop (toggles .nav-link--active).\nimport React from \"react\";\nimport { stx } from \"../stx\";\n\nexport const Container = stx(\"header\", \"header-container\");\nexport const Brand = stx(\"div\", \"brand\");\nexport const LogoWrapper = stx(\"div\", \"logo\");\nexport const Nav = stx(\"nav\", \"nav\");\n\nexport const NavLink: React.FC<{ $active?: boolean; className?: string; children?: React.ReactNode; [k: string]: any }> = ({\n  $active,\n  className,\n  children,\n  ...rest\n}) => {\n  const cn = [\"nav-link\", $active ? \"nav-link--active\" : \"\", className]\n    .filter(Boolean)\n    .join(\" \");\n  return (\n    <div {...rest} className={cn}>\n      {children}\n    </div>\n  );\n};\n", "import React from 'react'\nimport { Link, useLocation } from 'react-router-dom'\nimport {\n  Container,\n  LogoWrapper as Logo,\n  Nav,\n  NavLink,\n  Brand\n} from '@styled/component/header'\n\nconst Header = () => {\n  const location = useLocation()\n\n  return (\n    <Container>\n      <Brand>\n        <Link to=\"/\">\n          <Logo>\n            <span>N</span>sbp.js\n          </Logo>\n        </Link>\n      </Brand>\n      <Nav>\n        <Link to=\"/\">\n          <NavLink $active={location.pathname === '/'}>\uD83C\uDFE0 \u9996\u9875</NavLink>\n        </Link>\n        <Link to=\"/signin\">\n          <NavLink $active={location.pathname === '/signin'}>\uD83D\uDD10 \u767B\u5F55</NavLink>\n        </Link>\n        <Link to=\"/photo\">\n          <NavLink $active={location.pathname === '/photo'}>\uD83D\uDDBC\uFE0F \u56FE\u7247</NavLink>\n        </Link>\n      </Nav>\n    </Container>\n  )\n}\n\nexport default Header\n", "import React, { Fragment, useState, useEffect, useRef, useMemo, Suspense } from 'react'\nimport { connect } from 'react-redux'\nimport { Link, useLocation } from 'react-router-dom'\nimport Header from '@components/Header'\nimport Layout from '@components/Layout'\nimport { Helmet } from 'react-helmet'\nimport { Container, Row } from '@styled/photo'\nimport { motion } from 'framer-motion'\nimport { isSEO, getLocationParams, usePreserveSSR } from '@/utils'\nimport _ from 'lodash'\nimport { loadDataForContainer } from '@services/photo'\nimport { usePhotoMenu, usePhotoDimensions } from '@services/suspense'\n\nconst springSettings = { type: 'spring' as const, stiffness: 170, damping: 26 }\nconst NEXT = 'show-next'\n\ninterface QueryParams {\n  from?: string\n  /** \u89C4\u8303\u5448\u73B0\u6A21\u5F0F\u53C2\u6570: ssr=1/\u7701\u7565 \u76F4\u51FA, ssr=0 \u52A8\u753B+\u5BA2\u6237\u7AEF\u6570\u636E */\n  ssr?: string | number\n  /** @deprecated \u65E7\u53C2\u6570\u540D, \u4ECD\u53EF\u8BFB(Layout \u8BFB ssr ?? nsbp) */\n  nsbp?: string | number\n}\n\ninterface PhotoProps {\n  query: QueryParams\n  menu: Array<{ name: string; cover?: string; count?: number }>\n  getPhotoMenu: (dic: string) => void\n}\n\nconst Photo = ({ query, menu: _legacyMenu, getPhotoMenu }: PhotoProps) => {\n  const location = useLocation()\n  let { from } = query\n  const { withSSR } = usePreserveSSR()\n  // \u4F7F\u7528 ref \u6765\u8DDF\u8E2A\u521D\u59CB\u7684 dic \u503C\uFF0C\u7528\u4E8E\u533A\u5206\u9996\u6B21\u52A0\u8F7D\u548C\u5206\u7C7B\u5207\u6362\n  const initialDicRef = useRef<string | null>(null)\n\n  useEffect(() => {\n    const currentDic = getLocationParams('dic') || ''\n\n    // \u521D\u59CB\u5316\u65F6\u8BB0\u5F55\u521D\u59CB dic \u503C\n    if (initialDicRef.current === null) {\n      initialDicRef.current = currentDic\n    }\n\n    // \u5224\u65AD\u662F\u5426\u9700\u8981\u52A0\u8F7D\u6570\u636E\uFF1A\n    // 1. \u5BA2\u6237\u7AEF\u6E32\u67D3\u6A21\u5F0F\uFF08isSEO() === 0\uFF09- \u603B\u662F\u52A0\u8F7D\n    // 2. \u670D\u52A1\u7AEF\u6E32\u67D3\u6A21\u5F0F\uFF1A\u53EA\u6709\u5728\u6CA1\u6709\u6570\u636E\u6216\u5206\u7C7B\u5207\u6362\u65F6\u624D\u52A0\u8F7D\n    //    \uFF08Suspense \u8FB9\u754C\u5728\u6E32\u67D3\u65F6\u5DF2\u6309 dic \u6D41\u5F0F\u89E3\u6790\u4E86\u5C3A\u5BF8\u6570\u636E\uFF0C\u8FD9\u91CC\u662F\n    //     \u5206\u7C7B\u5207\u6362\u65F6\u7684\u515C\u5E95\uFF1AURL \u53D8\u4E86\u4F46 dic \u76F8\u540C\u5219\u4E0D\u91CD\u590D\u62C9\uFF09\n    const isClientMode = isSEO() === 0\n    if (isClientMode && currentDic !== initialDicRef.current) {\n      getPhotoMenu(currentDic)\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [location?.search, from])\n\n  return (\n    <Fragment>\n      <Helmet>\n        <title>Photo</title>\n        <meta name=\"description\" content=\"Photo Description\" />\n      </Helmet>\n      <Header />\n\n      <Layout query={query}>\n        <Container>\n          {/* \u83DC\u5355\u884C\uFF1ASuspense \u6570\u636E\u8FB9\u754C\u3002\u670D\u52A1\u7AEF use() \u6302\u8D77 \u2192 shell \u5148\u51B2\uFF0C\n              \u83DC\u5355\u540E\u6D41\uFF1B\u5BA2\u6237\u7AEF store \u6709\u9884\u53D6\u6001 \u2192 \u540C\u6B65\u503C\uFF0C\u4E0D\u95EA\u3002 */}\n          <Suspense\n            fallback={\n              <Row>\n                <span className=\"photo-suspense-fallback\">\u52A0\u8F7D\u83DC\u5355...</span>\n              </Row>\n            }\n          >\n            <SuspendedMenuRow withSSR={withSSR} />\n          </Suspense>\n          <Row className=\"photo-hint\">Scroll Me</Row>\n          {/* \u8F6E\u64AD\u533A\uFF1A\u5C3A\u5BF8\u6570\u636E\u4E5F\u8D70 Suspense \u8FB9\u754C\uFF0C\u670D\u52A1\u7AEF\u6D41\u5F0F\u3001\u5BA2\u6237\u7AEF\u5373\u65F6\u3002 */}\n          <Suspense\n            fallback={\n              <Row>\n                <span className=\"photo-suspense-fallback\">\u52A0\u8F7D\u56FE\u7247...</span>\n              </Row>\n            }\n          >\n            <SuspendedCarousel />\n          </Suspense>\n        </Container>\n      </Layout>\n    </Fragment>\n  )\n}\n\n// Suspense boundary #1: the category menu row.\nfunction SuspendedMenuRow({ withSSR }: { withSSR: (u: string) => string }) {\n  const menu = usePhotoMenu()\n  if (!Array.isArray(menu) || menu.length === 0) {\n    return null\n  }\n  return (\n    <Row className=\"photo-menu\">\n      {_.map(menu, (item: { name: string }, index: number) => {\n        return (\n          <Link key={`menu${index}`} to={withSSR(`/photo?dic=${item.name}`)}>\n            {item.name}\n          </Link>\n        )\n      })}\n    </Row>\n  )\n}\n\n// Suspense boundary #2: the carousel (prev/next + range + strip).\n// The strip data comes from usePhotoDimensions(dic) \u2014 the genuine streaming\n// boundary: on the server renderToPipeableStream flushes the page shell\n// first, then the carousel when the dimensions settle.\nfunction SuspendedCarousel() {\n  const location = useLocation()\n  const dic = getLocationParams('dic') || ''\n  const dims = usePhotoDimensions(dic)\n  const photos = useMemo(() => (Array.isArray(dims) ? dims : []), [dims])\n  const [currPhoto, setCurrPhoto] = useState(0)\n\n  const [currPhotoData, setCurrPhotoData] = useState<[number, number, string]>(\n    photos[0] || [0, 0, '']\n  )\n  const [currWidth, currHeight] = currPhotoData\n\n  const widths = photos.map((photo) => {\n    const [origW, origH] = photo\n    return (currHeight / origH) * origW\n  })\n\n  // \u540C\u6B65 currPhoto \u548C currPhotoData\n  useEffect(() => {\n    if (photos[currPhoto]) {\n      setCurrPhotoData(photos[currPhoto])\n    }\n  }, [currPhoto, photos])\n\n  const leftStartCoords = widths\n    .slice(0, currPhoto)\n    .reduce((sum: number, width: number) => sum - width, 0)\n\n  interface PhotoPosition {\n    left: number\n    height: number\n    width: number\n  }\n\n  const photoPositions = photos.reduce<PhotoPosition[]>((acc, _item, i) => {\n    const prevLeft =\n      i === 0 ? leftStartCoords : acc[i - 1].left + acc[i - 1].width\n    acc.push({\n      left: prevLeft,\n      height: currHeight,\n      width: widths[i] || 0\n    })\n    return acc\n  }, [])\n\n  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n    setCurrPhoto(Number(e.target.value))\n  }\n\n  const clickHandler = (btn: string) => {\n    let photoIndex = btn === NEXT ? currPhoto + 1 : currPhoto - 1\n\n    photoIndex = photoIndex >= 0 ? photoIndex : photos.length - 1\n    photoIndex = photoIndex >= photos.length ? 0 : photoIndex\n\n    setCurrPhoto(photoIndex)\n  }\n\n  // SSR/\u5BA2\u6237\u7AEF\u9996\u5E27\u4E00\u81F4\uFF1A\u63A7\u5236\u884C(\u4F9D\u8D56 photos)\u4E0E\u8F6E\u64AD\u6761\u540C\u65F6\u51FA\u73B0\uFF0C\n  // \u907F\u514D Suspense \u89E3\u6790\u540E\u7684 hydration mismatch\u3002\n  return (\n    <Fragment>\n      <Row className=\"photo-controls\">\n        <button onClick={() => clickHandler('')}>Previous</button>\n        <input\n          type=\"range\"\n          min={0}\n          max={photos.length - 1}\n          value={currPhoto}\n          onChange={handleChange}\n        />\n        <button onClick={() => clickHandler(NEXT)}>Next</button>\n      </Row>\n      <div className=\"demo4\">\n        <motion.div\n          className=\"demo4-inner\"\n          // \u663E\u5F0F\u7ED9\u5BB9\u5668\u5C3A\u5BF8: framer-motion \u7684 animate \u4E0D\u4F1A\u5199\u5165 SSR \u6807\u8BB0,\n          // \u800C .demo4-inner \u5728 CSS \u91CC overflow:hidden \u4E14\u65E0 height, \u5B50\u56FE\u53C8\u5168\u662F\n          // position:absolute \u2014\u2014 \u4E0D\u5199\u8FD9\u91CC, \u6C34\u5408\u524D/\u65E0 JS \u65F6\u5BB9\u5668\u9AD8\u5EA6\u584C\u9677\u4E3A 0,\n          // \u6574\u6761\u8F6E\u64AD\u88AB\u88C1\u6389(\u56FE\u7247\"\u4E0D\u663E\u793A\")\u3002style \u4E0E animate \u540C\u503C, \u6C34\u5408\u65E0\u95EA\u70C1;\n          // \u5207\u56FE\u65F6 currHeight/currWidth \u53D8\u5316, animate \u7167\u5E38\u8FC7\u6E21\u3002\n          style={{ height: currHeight, width: currWidth }}\n          animate={{ height: currHeight, width: currWidth }}\n          transition={springSettings}\n        >\n          {photoPositions.map((pos, i) => (\n            <motion.img\n              key={i}\n              className=\"demo4-photo\"\n              src={\n                photos[i][2]\n                  ? `/images/${photos[i][2]}`\n                  : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='\n              }\n              initial={false}\n              animate={{\n                left: pos.left,\n                height: pos.height,\n                width: pos.width\n              }}\n              transition={springSettings}\n              style={{\n                position: 'absolute',\n                top: 0\n              }}\n            />\n          ))}\n        </motion.div>\n      </div>\n    </Fragment>\n  )\n}\n\ninterface RootState {\n  query: QueryParams\n  photo: {\n    menu: Array<{ name: string; cover?: string; count?: number }>\n    data: [number, number, string][]\n  }\n}\n\nconst mapStateToProps = (state: RootState) => {\n  return {\n    query: state?.query,\n    menu: state?.photo?.menu\n  }\n}\n\nconst mapDispatchToProps = {\n  getPhotoMenu: (dic: string) => loadDataForContainer(null, dic)\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Photo)\n", "// Plain component classes; visuals in src/css/tailwind.css.\nimport React from \"react\";\nimport { stx } from \"./stx\";\n\nexport const Container = stx(\"div\", \"photo-container\");\nexport const Row = stx(\"div\", \"photo-row\");\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", "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 const isObject = (value: unknown): value is object =>\n    typeof value === \"object\" && value !== null\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 */\nexport const pipe = (...transformers: Function[]) =>\n    transformers.reduce((a, b) => (v: any) => b(a(v)))\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/*#__NO_SIDE_EFFECTS__*/\nexport const progress = (from: number, to: number, value: number) => {\n    const range = to - from\n    return range ? (value - from) / range : 1\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/*#__NO_SIDE_EFFECTS__*/\nexport const velocityPerSecond = (velocity: number, frameDuration: number) =>\n    frameDuration ? velocity * (1000 / frameDuration) : 0\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\n/*#__NO_SIDE_EFFECTS__*/\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.\n/*#__NO_SIDE_EFFECTS__*/\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.\n/*#__NO_SIDE_EFFECTS__*/\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 >= 1\n        ? 1\n        : (p *= 2) < 1\n          ? 0.5 * backIn(p)\n          : 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\n/*#__NO_SIDE_EFFECTS__*/\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\n/*#__NO_SIDE_EFFECTS__*/\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 { FrameData, Process, Step } from \"./types\"\n\nexport function createRenderStep(runNextFrame: () => void): 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    function triggerCallback(callback: Process) {\n        if (toKeepAlive.has(callback)) {\n            step.schedule(callback)\n            runNextFrame()\n        }\n\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            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            const prevFrame = thisFrame\n            thisFrame = nextFrame\n            nextFrame = prevFrame\n\n            // Execute this frame\n            thisFrame.forEach(triggerCallback)\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(flagRunNextFrame)\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 useManualTiming = MotionGlobalConfig.useManualTiming\n        const timestamp = useManualTiming\n            ? state.timestamp\n            : performance.now()\n        runNextFrame = false\n\n        if (!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", "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 buildTransformer({ split, types }: ComplexValueInfo) {\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\nfunction createTransformer(source: AnyResolvedKeyframe) {\n    return buildTransformer(analyseComplexValue(source))\n}\n\nconst convertNumbersToZero = (v: number | string) =>\n    typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v\n\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n *   \"calc(var(--gap) / 5)\"  →  values: [var(--gap), 5]\n *                               split:  [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (\n    value: ComplexValues[number],\n    splitBefore: string\n): ComplexValues[number] => {\n    if (typeof value === \"number\") {\n        return splitBefore?.trim().endsWith(\"/\") ? value : 0\n    }\n    return convertNumbersToZero(value as string)\n}\n\nfunction getAnimatableNone(v: AnyResolvedKeyframe) {\n    const info = analyseComplexValue(v)\n    const transformer = buildTransformer(info)\n    return transformer(\n        info.values.map((value, i) => convertToZero(value, info.split[i]))\n    )\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 {\n    clamp,\n    millisecondsToSeconds,\n    secondsToMilliseconds,\n    warning,\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\"\n\nconst 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\nfunction calcAngularFreq(undampedFreq: number, dampingRatio: number) {\n    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio)\n}\n\nconst rootIterations = 12\nfunction approximateRoot(\n    envelope: (num: number) => number,\n    derivative: (num: number) => number,\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\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001\n\nfunction findSpring({\n    duration = springDefaults.duration,\n    bounce = springDefaults.bounce,\n    velocity = springDefaults.velocity,\n    mass = springDefaults.mass,\n}: SpringOptions) {\n    let envelope: (num: number) => number\n    let derivative: (num: number) => number\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 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    let resolveVelocity: (t: number) => number\n\n    // Underdamped coefficients, hoisted for use in the inlined next() hot path\n    let angularFreq: number\n    let A: number\n    let sinCoeff: number\n    let cosCoeff: number\n\n    if (dampingRatio < 1) {\n        angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio)\n\n        A =\n            (initialVelocity +\n                dampingRatio * undampedAngularFreq * initialDelta) /\n            angularFreq\n\n        // Underdamped spring\n        resolveSpring = (t: number) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n            return (\n                target -\n                envelope *\n                    (A * Math.sin(angularFreq * t) +\n                        initialDelta * Math.cos(angularFreq * t))\n            )\n        }\n\n        // Analytical derivative of underdamped spring (px/ms)\n        sinCoeff =\n            dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq\n        cosCoeff =\n            dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq\n        resolveVelocity = (t: number) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n            return envelope *\n                (sinCoeff * Math.sin(angularFreq * t) +\n                    cosCoeff * Math.cos(angularFreq * t))\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\n        // Analytical derivative of critically damped spring (px/ms)\n        const C = initialVelocity + undampedAngularFreq * initialDelta\n        resolveVelocity = (t: number) =>\n            Math.exp(-undampedAngularFreq * t) *\n                (undampedAngularFreq * C * t - initialVelocity)\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        // Analytical derivative of overdamped spring (px/ms)\n        const P =\n            (initialVelocity +\n                dampingRatio * undampedAngularFreq * initialDelta) /\n            dampedAngularFreq\n        const sinhCoeff =\n            dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq\n        const coshCoeff =\n            dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq\n        resolveVelocity = (t: number) => {\n            const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n            const freqForT = Math.min(dampedAngularFreq * t, 300)\n            return envelope *\n                (sinhCoeff * Math.sinh(freqForT) +\n                    coshCoeff * Math.cosh(freqForT))\n        }\n    }\n\n    const generator = {\n        calculatedDuration: isResolvedFromDuration ? duration || null : null,\n        velocity: (t: number) => secondsToMilliseconds(resolveVelocity(t)),\n        next: (t: number) => {\n            /**\n             * For underdamped physics springs we need both position and\n             * velocity each tick. Compute shared trig values once to avoid\n             * duplicate Math.exp/sin/cos calls on the hot path.\n             */\n            if (!isResolvedFromDuration && dampingRatio < 1) {\n                const envelope = Math.exp(\n                    -dampingRatio * undampedAngularFreq * t\n                )\n                const sin = Math.sin(angularFreq * t)\n                const cos = Math.cos(angularFreq * t)\n\n                const current =\n                    target -\n                    envelope *\n                        (A * sin + initialDelta * cos)\n                const currentVelocity = secondsToMilliseconds(\n                    envelope *\n                        (sinCoeff * sin + cosCoeff * cos)\n                )\n\n                state.done =\n                    Math.abs(currentVelocity) <= restSpeed! &&\n                    Math.abs(target - current) <= restDelta!\n                state.value = state.done ? target : current\n\n                return state\n            }\n\n            const current = resolveSpring(t)\n\n            if (!isResolvedFromDuration) {\n                const currentVelocity = secondsToMilliseconds(\n                    resolveVelocity(t)\n                )\n                state.done =\n                    Math.abs(currentVelocity) <= restSpeed! &&\n                    Math.abs(target - current) <= restDelta!\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 { velocityPerSecond } from \"motion-utils\"\n\nconst velocitySampleDuration = 5 // ms\n\nexport function getGeneratorVelocity(\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", "import {\n    AnimationState,\n    KeyframeGenerator,\n    ValueAnimationOptions,\n} from \"../types\"\nimport { spring as createSpring } from \"./spring\"\nimport { getGeneratorVelocity } 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: getGeneratorVelocity(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 { 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 { getGeneratorVelocity } from \"./generators/utils/velocity\"\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    /**\n     * Reusable state object for the delay phase to avoid\n     * allocating a new object every frame.\n     */\n    private delayState: AnimationState<T> = {\n        done: false,\n        value: undefined as unknown as T,\n    }\n\n    constructor(options: ValueAnimationOptions<T>) {\n        super()\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        let state: AnimationState<T>\n        if (isInDelayPhase) {\n            this.delayState.value = keyframes[0]\n            state = this.delayState\n        } else {\n            state = frameGenerator.next(elapsed)\n        }\n\n        if (mixKeyframes && !isInDelayPhase) {\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        if (this.driver) {\n            this.driver.start(false)\n        } else {\n            this.startTime = 0\n            this.state = \"paused\"\n            this.holdTime = newTime\n            this.tick(newTime)\n        }\n    }\n\n    /**\n     * Returns the generator's velocity at the current time in units/second.\n     * Uses the analytical derivative when available (springs), avoiding\n     * the MotionValue's frame-dependent velocity estimation.\n     */\n    getGeneratorVelocity(): number {\n        const t = this.currentTime\n        if (t <= 0) return this.options.velocity || 0\n\n        if (this.generator.velocity) {\n            return this.generator.velocity(t)\n        }\n\n        // Fallback: finite difference\n        const current = this.generator.next(t).value as number\n        return getGeneratorVelocity(\n            (s) => this.generator.next(s).value as number,\n            t,\n            current\n        )\n    }\n\n    get speed() {\n        return this.playbackSpeed\n    }\n\n    set speed(newSpeed: number) {\n        const hasChanged = this.playbackSpeed !== newSpeed\n\n        if (hasChanged && this.driver) {\n            this.updateTime(time.now())\n        }\n\n        this.playbackSpeed = newSpeed\n\n        if (hasChanged && this.driver) {\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    }\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 *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nexport const transformProps = /*@__PURE__*/ (() =>\n    new Set([...transformPropOrder, \"pathRotation\"]))()\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: (\n            { x },\n            { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }\n        ) => {\n            const width = x.max - x.min\n            return boxSizing === \"border-box\"\n                ? width\n                : width - parseFloat(paddingLeft) - parseFloat(paddingRight)\n        },\n        height: (\n            { y },\n            { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }\n        ) => {\n            const height = y.max - y.min\n            return boxSizing === \"border-box\"\n                ? height\n                : height - parseFloat(paddingTop) - parseFloat(paddingBottom)\n        },\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        ViewTimeline: ViewTimeline\n    }\n}\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n    constructor(options: ScrollOptions)\n\n    currentTime: null | { value: number }\n\n    cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n    constructor(options: { subject: Element; axis?: string })\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\nexport const supportsViewTimeline = /* @__PURE__ */ memoSupports(\n    () => window.ViewTimeline !== undefined,\n    \"viewTimeline\"\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 { 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    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    return element.animate(keyframeOptions, options)\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                }\n\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                 * We always do this, even when a motion value is present, to prevent\n                 * a visual flash in Firefox where the WAAPI animation's fill is removed\n                 * during cancel() before the scheduled render can apply the correct value.\n                 */\n                setStyle(element, name, keyframe)\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        const wasFinished = this.finishedTime !== null\n        this.manualStartTime = null\n        this.finishedTime = null\n        this.animation.currentTime = secondsToMilliseconds(newTime)\n\n        if (wasFinished) {\n            this.animation.pause()\n        }\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({\n        timeline,\n        rangeStart,\n        rangeEnd,\n        observe,\n    }: 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            if (rangeStart) (this.animation as any).rangeStart = rangeStart\n            if (rangeEnd) (this.animation as any).rangeEnd = rangeEnd\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 { setStyle } from \"../render/dom/style-set\"\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        /**\n         * Only set startTime when the animation should autoplay.\n         * Setting startTime on a paused WAAPI animation unpauses it\n         * (per the WAAPI spec), which breaks autoplay: false.\n         */\n        if (options.startTime !== undefined && options.autoplay !== false) {\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        const current = sampleAnimation.sample(sampleTime).value\n\n        /**\n         * Write the estimated value to inline style so it persists\n         * after cancel(), covering the async gap before the next\n         * animation starts.\n         */\n        const { name } = this.options\n        if (element && name) setStyle(element, name, current)\n\n        motionValue.setWithVelocity(\n            sampleAnimation.sample(Math.max(0, sampleTime - delta)).value,\n            current,\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", "/**\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    \"backgroundColor\",\n])\n", "const browserColorFunctions =\n    /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/\n\nexport function hasBrowserOnlyColors(keyframes: any[]): boolean {\n    for (let i = 0; i < keyframes.length; i++) {\n        if (\n            typeof keyframes[i] === \"string\" &&\n            browserColorFunctions.test(keyframes[i])\n        ) {\n            return true\n        }\n    }\n    return false\n}\n", "import { memo } from \"motion-utils\"\nimport {\n    AnyResolvedKeyframe,\n    ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\nimport { acceleratedValues } from \"../utils/accelerated-values\"\nimport { hasBrowserOnlyColors } from \"../utils/is-browser-color\"\n\nconst colorProperties = new Set([\n    \"color\",\n    \"backgroundColor\",\n    \"outlineColor\",\n    \"fill\",\n    \"stroke\",\n    \"borderColor\",\n    \"borderTopColor\",\n    \"borderRightColor\",\n    \"borderBottomColor\",\n    \"borderLeftColor\",\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 {\n        motionValue,\n        name,\n        repeatDelay,\n        repeatType,\n        damping,\n        type,\n        keyframes,\n    } = options\n\n    const subject = motionValue?.owner?.current\n\n    /**\n     * We use instanceof checks instead of isHTMLElement()/isSVGElement()\n     * because we explicitly **don't** want elements in different timing\n     * contexts (i.e. popups) to be accelerated, as it's not possible to sync\n     * these animations properly with those driven from the main window\n     * frameloop.\n     */\n    if (\n        !(subject instanceof HTMLElement) &&\n        !(subject instanceof SVGElement)\n    ) {\n        return false\n    }\n\n    const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n    return (\n        supportsWaapi() &&\n        name &&\n        /**\n         * Force WAAPI for color properties with browser-only color formats\n         * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n         */\n        (acceleratedValues.has(name) ||\n            (colorProperties.has(name) &&\n                hasBrowserOnlyColors(keyframes))) &&\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        let canAnimateValue = true\n        if (!canAnimate(keyframes, name, type, velocity)) {\n            canAnimateValue = false\n\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         * Also skip WAAPI when keyframes aren't animatable, as the resolved\n         * values may not be valid CSS and would trigger browser warnings.\n         */\n        const useWaapi =\n            canAnimateValue &&\n            !isHandoff &&\n            supportsBrowserAnimation(resolvedOptions)\n        const element = resolvedOptions.motionValue?.owner?.current\n\n        let animation: AnimationPlaybackControls\n        if (useWaapi) {\n            try {\n                animation = new NativeAnimationExtended({\n                    ...resolvedOptions,\n                    element,\n                } as any)\n            } catch {\n                animation = new JSAnimation(resolvedOptions)\n            }\n        } else {\n            animation = new JSAnimation(resolvedOptions)\n        }\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 {\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", "/**\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 { 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 { AnyResolvedKeyframe } from \"../types\"\nimport type { Transition } from \"../types\"\n\nconst orchestrationKeys = new Set([\n    \"when\",\n    \"delay\",\n    \"delayChildren\",\n    \"staggerChildren\",\n    \"staggerDirection\",\n    \"repeat\",\n    \"repeatType\",\n    \"repeatDelay\",\n    \"from\",\n    \"elapsed\",\n])\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    transition: Transition & { elapsed?: number; from?: AnyResolvedKeyframe }\n) {\n    for (const key in transition) {\n        if (!orchestrationKeys.has(key)) return true\n    }\n    return false\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 \"../keyframes/get-final\"\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            valueTransition.skipAnimations\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 { 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 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 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 { MotionPath } from \"../types\"\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    const skipAnimations = transition?.skipAnimations\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    const path = (transition as { path?: MotionPath } | undefined)?.path\n    if (path) {\n        // path mutates `target` to claim x/y; loop below skips them.\n        path.animateVisualElement(\n            visualElement,\n            target,\n            transition,\n            delay,\n            animations\n        )\n    }\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        if (skipAnimations) valueTransition.skipAnimations = true\n\n        /**\n         * If the value is already at the defined target, skip the animation.\n         * We still re-assert the value via frame.update to take precedence\n         * over any stale transitionEnd callbacks from previous animations.\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            frame.update(() => value.set(valueTarget as any))\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    /**\n     * Internal channel for `transition.path` orientToPath. Composed onto\n     * `rotate` at the transform-build sites so the user's `rotate` is\n     * never read or overwritten. Not part of `transformPropOrder`.\n     */\n    pathRotation: 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 * The four corner-radius longhands. Shared so the projection mixer, scale\n * corrector, WAAPI px-value set and view-transition crop pass don't each carry\n * their own copy. Order is irrelevant - every consumer mixes/corrects/animates\n * each corner independently.\n */\nexport const cornerRadiusProps = [\n    \"borderTopLeftRadius\",\n    \"borderTopRightRadius\",\n    \"borderBottomRightRadius\",\n    \"borderBottomLeftRadius\",\n] as const\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 (\n        isObject(element) &&\n        \"offsetHeight\" in element &&\n        !(\"ownerSVGElement\" in element)\n    )\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        /**\n         * End listeners run in the capture phase so a descendant calling\n         * stopPropagation() in its own pointerup handler can't prevent the\n         * press gesture from ending. This also keeps the gesture-end\n         * ordering consistent with the drag gesture. See #2794.\n         */\n        const endEventOptions = { ...eventOptions, capture: true }\n\n        const onPointerEnd = (endEvent: PointerEvent, success: boolean) => {\n            window.removeEventListener(\n                \"pointerup\",\n                onPointerUp,\n                endEventOptions\n            )\n            window.removeEventListener(\n                \"pointercancel\",\n                onPointerCancel,\n                endEventOptions\n            )\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, endEventOptions)\n        window.addEventListener(\n            \"pointercancel\",\n            onPointerCancel,\n            endEventOptions\n        )\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 type { LayoutProjectionMetrics, StatsRecording } from \"./types\"\n\nexport type InactiveStatsBuffer = {\n    value: null\n    addProjectionMetrics: null\n}\n\nexport type ActiveStatsBuffer = {\n    value: StatsRecording\n    addProjectionMetrics: (metrics: LayoutProjectionMetrics) => void\n}\n\nexport const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer = {\n    value: null,\n    addProjectionMetrics: null,\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            // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n            // can resubscribe before the animation is cancelled (#3315).\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            translateAxis(box.x, -node.scroll.offset.x)\n            translateAxis(box.y, -node.scroll.offset.y)\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, node.layout?.layoutBox)\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 += distance\n    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\nfunction resolveAxisTranslate(\n    value: number | string | undefined,\n    axis: Axis\n): number | undefined {\n    if (typeof value === \"string\") {\n        return (parseFloat(value) / 100) * (axis.max - axis.min)\n    }\n    return value as number | undefined\n}\n\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nexport function transformBox(\n    box: Box,\n    transform: ResolvedValues,\n    sourceBox?: Box\n) {\n    const resolveBox = sourceBox ?? box\n    transformAxis(\n        box.x,\n        resolveAxisTranslate(transform.x, resolveBox.x),\n        transform.scaleX as number,\n        transform.scale as number,\n        transform.originX as number\n    )\n    transformAxis(\n        box.y,\n        resolveAxisTranslate(transform.y, resolveBox.y),\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    // `pathRotation` composes onto `rotate` as a separate additive term so\n    // the user's `rotate` is never clobbered. Deliberately not a slot in\n    // `transformPropOrder`.\n    const pathRotation = latestValues.pathRotation\n    if (pathRotation) {\n        transformIsDefault = false\n        transformString += `rotate(${getValueAsType(\n            pathRotation,\n            numberValueTypes.pathRotation\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 { cornerRadiusProps } from \"../../utils/border-radius\"\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: [...cornerRadiusProps],\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 { invariant, 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    mount(instance: HTMLElement) {\n        /**\n         * If a custom component forwards its ref to something other than a\n         * HTML/SVG element (a class instance, an imperative handle) there's\n         * nothing for Motion to style, measure or attach gestures to. #2777\n         */\n        invariant(\n            Boolean(instance.style),\n            \"motion.create() components must forward their ref to a HTML or SVG element\",\n            \"custom-component-ref\"\n        )\n\n        super.mount(instance)\n    }\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     * Track whether the animation state has been reset (e.g. via StrictMode\n     * double-invocation or Suspense unmount/remount). On the first\n     * animateChanges() call after a reset we need to behave like the initial\n     * render for variant-inheritance checks, even though isInitialRender is\n     * already false.\n     */\n    let wasReset = false\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 || wasReset) &&\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 =\n                        !shallowCompare(next, prev) || variantDidChange\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 (\n                (isInitialRender || wasReset) &&\n                visualElement.blockInitialAnimation\n            ) {\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 || wasReset) &&\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        wasReset = 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            wasReset = 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, Point } 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(\n    target: Axis,\n    relative: Axis,\n    parent: Axis,\n    anchor: number = 0\n) {\n    const anchorPoint = anchor\n        ? mixNumber(parent.min, parent.max, anchor)\n        : parent.min\n    target.min = anchorPoint + relative.min\n    target.max = target.min + calcLength(relative)\n}\n\nexport function calcRelativeBox(\n    target: Box,\n    relative: Box,\n    parent: Box,\n    anchor?: Point\n) {\n    calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x)\n    calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y)\n}\n\nexport function calcRelativeAxisPosition(\n    target: Axis,\n    layout: Axis,\n    parent: Axis,\n    anchor: number = 0\n) {\n    const anchorPoint = anchor\n        ? mixNumber(parent.min, parent.max, anchor)\n        : parent.min\n    target.min = layout.min - anchorPoint\n    target.max = target.min + calcLength(layout)\n}\n\nexport function calcRelativePosition(\n    target: Box,\n    layout: Box,\n    parent: Box,\n    anchor?: Point\n) {\n    calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x)\n    calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.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 {\n            transformPerspective,\n            rotate,\n            pathRotation,\n            rotateX,\n            rotateY,\n            skewX,\n            skewY,\n        } = latestTransform\n        if (transformPerspective)\n            transform = `perspective(${transformPerspective}px) ${transform}`\n        if (rotate) transform += `rotate(${rotate}deg) `\n        // Additive `rotate()` so user `rotate` isn't clobbered.\n        if (pathRotation) transform += `rotate(${pathRotation}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\"\nimport { cornerRadiusProps } from \"../../utils/border-radius\"\n\nconst numBorders = cornerRadiusProps.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 = cornerRadiusProps[i]\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, options)\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 type { 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 member = this.members[i]\n            if (member === node || member === this.lead || member === this.prevLead) continue\n            const inst = member.instance as HTMLElement | undefined\n            if ((!inst || inst.isConnected === false) && !member.snapshot) {\n                removeItem(this.members, member)\n                member.unmount()\n            }\n        }\n\n        node.scheduleRender()\n    }\n\n    remove(node: IProjectionNode) {\n        removeItem(this.members, node)\n        if (node === this.prevLead) this.prevLead = undefined\n        if (node === this.lead) {\n            const prevLead = this.members[this.members.length - 1]\n            if (prevLead) this.promote(prevLead)\n        }\n    }\n\n    relegate(node: IProjectionNode) {\n        for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {\n            const member = this.members[i]\n            if (member.isPresent !== false && (member.instance as HTMLElement)?.isConnected !== false) {\n                this.promote(member)\n                return true\n            }\n        }\n        return false\n    }\n\n    promote(node: IProjectionNode, preserveFollowOpacity?: boolean) {\n        const prevLead = this.lead\n        if (node === prevLead) return\n\n        this.prevLead = prevLead\n        this.lead = node\n        node.show()\n\n        if (prevLead) {\n            prevLead.updateSnapshot()\n            node.scheduleRender()\n\n            const { layoutDependency: prevDep } = prevLead.options\n            const { layoutDependency: nextDep } = node.options\n\n            if (prevDep === undefined || prevDep !== nextDep) {\n                node.resumeFrom = prevLead\n                if (preserveFollowOpacity) prevLead.preserveOpacity = true\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?.isUpdating) node.isLayoutDirty = true\n            }\n            if (node.options.crossfade === false) prevLead.hide()\n        }\n    }\n\n    exitAnimationComplete() {\n        this.members.forEach((member) => {\n            member.options.onExitComplete?.()\n            member.resumingFrom?.options.onExitComplete?.()\n        })\n    }\n\n    scheduleRender() {\n        this.members.forEach(\n            (member) => member.instance && member.scheduleRender(false)\n        )\n    }\n\n    removeLeadSnapshot() {\n        if (this.lead?.snapshot) this.lead.snapshot = undefined\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 {\n    MotionPath,\n    PathInterpolator,\n    Transition,\n    ValueAnimationOptions,\n} 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 { 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, copyAxisInto, 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                                (animationOptions as { path?: MotionPath })\n                                    .path\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                /**\n                 * Percentage translates resolve against layoutBox dimensions,\n                 * so ancestors with them must be re-measured after transform reset.\n                 */\n                if (\n                    typeof node.latestValues.x === \"string\" ||\n                    typeof node.latestValues.y === \"string\"\n                ) {\n                    node.isLayoutDirty = true\n                }\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                const wasBlockedByResize = this.updateBlockedByResize\n\n                this.unblockUpdate()\n                this.updateBlockedByResize = false\n                this.clearAllSnapshots()\n\n                /**\n                 * When blocked by resize, still measure layouts so\n                 * callbacks like onLayoutMeasure fire (e.g. Reorder).\n                 * Skip notifyLayoutUpdate to prevent animations.\n                 */\n                if (wasBlockedByResize) {\n                    this.nodes!.forEach(forceLayoutMeasure)\n                }\n\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                 * Ensure animation-blocked nodes (e.g. during drag)\n                 * get measured even when memoized (willUpdate skipped).\n                 */\n                this.nodes!.forEach(ensureDraggedNodesSnapshotted)\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            if (!this.layoutCorrected) 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, output?: Box): Box {\n            const withTransforms = output || 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                    translateAxis(withTransforms.x, -node.scroll.offset.x)\n                    translateAxis(withTransforms.y, -node.scroll.offset.y)\n                }\n\n                if (!hasTransform(node.latestValues)) continue\n                transformBox(\n                    withTransforms,\n                    node.latestValues,\n                    node.layout?.layoutBox\n                )\n            }\n\n            if (hasTransform(this.latestValues)) {\n                transformBox(\n                    withTransforms,\n                    this.latestValues,\n                    this.layout?.layoutBox\n                )\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 (!hasTransform(node.latestValues)) continue\n\n                let sourceBox: Box | undefined\n\n                if (node.instance) {\n                    hasScale(node.latestValues) && node.updateSnapshot()\n                    sourceBox = createBox()\n                    copyBoxInto(sourceBox, node.measurePageBox())\n                }\n\n                removeBoxTransforms(\n                    boxWithoutTransform,\n                    node.latestValues,\n                    node.snapshot?.layoutBox,\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 (\n                    this.options.layoutAnchor !== false &&\n                    relativeParent &&\n                    relativeParent.layout\n                ) {\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                    this.options.layoutAnchor || undefined\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                    this.applyTransform(\n                        this.layout.layoutBox,\n                        false,\n                        this.target\n                    )\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                    this.options.layoutAnchor !== false &&\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                this.options.layoutAnchor || undefined\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            pathFn?: MotionPath\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            // The path decides whether the layout shift is worth curving\n            // (distance floor) and resolves the interpolator from the delta.\n            const interpolate: PathInterpolator | undefined =\n                pathFn?.interpolateProjection(delta)\n\n            this.mixTargetDelta = (latest: number) => {\n                const progress = latest / 1000\n                const point = interpolate?.(progress)\n\n                if (point) {\n                    targetDelta.x.translate = point.x\n                    targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress)\n                    targetDelta.x.origin = delta.x.origin\n                    targetDelta.x.originPoint = delta.x.originPoint\n                    targetDelta.y.translate = point.y\n                    targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress)\n                    targetDelta.y.origin = delta.y.origin\n                    targetDelta.y.originPoint = delta.y.originPoint\n                } else {\n                    mixAxisDeltaLinear(targetDelta.x, delta.x, progress)\n                    mixAxisDeltaLinear(targetDelta.y, delta.y, progress)\n                }\n\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                        this.options.layoutAnchor || undefined\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                if (point && point.rotate !== undefined) {\n                    // Dedicated `pathRotation` channel, not `rotate`, so an\n                    // animating `rotate` is composed with, never clobbered.\n                    if (!this.animationValues)\n                        this.animationValues = mixedValues\n                    this.animationValues.pathRotation = point.rotate\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                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                        onComplete: () => {\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 (animationType === \"x\" || animationType === \"y\") {\n            const snapAxis = animationType === \"x\" ? \"y\" : \"x\"\n            copyAxisInto(\n                isShared\n                    ? snapshot.measuredBox[snapAxis]\n                    : snapshot.layoutBox[snapAxis],\n                layout[snapAxis]\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 anchor =\n                        node.options.layoutAnchor || undefined\n\n                    const relativeSnapshot = createBox()\n                    calcRelativePosition(\n                        relativeSnapshot,\n                        snapshot.layoutBox,\n                        parentSnapshot.layoutBox,\n                        anchor\n                    )\n\n                    const relativeLayout = createBox()\n                    calcRelativePosition(\n                        relativeLayout,\n                        layout,\n                        parentLayout.layoutBox,\n                        anchor\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 forceLayoutMeasure(node: IProjectionNode) {\n    node.isLayoutDirty = true\n    node.updateLayout()\n}\n\nfunction clearIsLayoutDirty(node: IProjectionNode) {\n    node.isLayoutDirty = false\n}\n\n/**\n * When a node is animation-blocked (e.g. during drag) and its component\n * didn't re-render (memoized), willUpdate() is never called so there's\n * no snapshot. Use the previous layout as a snapshot and mark dirty so\n * resetTransform/updateLayout/notifyLayoutUpdate process it normally.\n */\nfunction ensureDraggedNodesSnapshotted(node: IProjectionNode) {\n    if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) {\n        node.snapshot = node.layout\n        node.isLayoutDirty = true\n    }\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\nfunction mixAxisDeltaLinear(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 { isMotionValue } from \"motion-dom\"\nimport 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     * String concatenation prevents bundlers like webpack (e.g. Storybook)\n     * from statically resolving this optional dependency at build time.\n     */\n    const emotionPkg = \"@emotion/is-prop-\" + \"valid\"\n    loadExternalIsValidProp(require(emotionPkg).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 (isMotionValue(props[key as keyof typeof props])) 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            typeof window !== \"undefined\" &&\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        layoutAnchor,\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        layoutAnchor,\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 { 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 && typeof window !== \"undefined\") {\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, resolveVariant } from \"motion-dom\"\n\nlet id = 0\n\nexport class ExitAnimationFeature extends Feature<unknown> {\n    private id: number = id++\n    private isExitComplete = false\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        if (isPresent && prevIsPresent === false) {\n            /**\n             * When re-entering, if the exit animation already completed\n             * (element is at rest), reset to initial values so the enter\n             * animation replays from the correct position.\n             */\n            if (this.isExitComplete) {\n                const { initial, custom } = this.node.getProps()\n\n                if (\n                    typeof initial === \"string\" ||\n                    (typeof initial === \"object\" &&\n                        initial !== null &&\n                        !Array.isArray(initial))\n                ) {\n                    const resolved = resolveVariant(\n                        this.node,\n                        initial,\n                        custom\n                    )\n                    if (resolved) {\n                        const { transition, transitionEnd, ...target } =\n                            resolved\n                        for (const key in target) {\n                            this.node\n                                .getValue(key)\n                                ?.jump(\n                                    target[\n                                        key as keyof typeof target\n                                    ] as any\n                                )\n                        }\n                    }\n                }\n\n                this.node.animationState.reset()\n                this.node.animationState.animateChanges()\n            } else {\n                this.node.animationState.setActive(\"exit\", false)\n            }\n\n            this.isExitComplete = false\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                this.isExitComplete = true\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): EventListener =>\n    (event: PointerEvent) =>\n        isPrimaryPointer(event) && handler(event, extractEventInfo(event))\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 | \"x\" | \"y\"\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     * Raw (untransformed) event info, re-transformed each frame\n     * so transformPagePoint sees the current parent matrix.\n     * @internal\n     */\n    private lastRawMoveEventInfo: 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 | \"x\" | \"y\"\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        // Listen in the capture phase so a descendant calling\n        // stopPropagation() (e.g. in its own pointerup handler) can't\n        // prevent the gesture from ending. See #2794.\n        const eventOptions = { passive: true, capture: true }\n        this.removeListeners = pipe(\n            addPointerEvent(\n                this.contextWindow,\n                \"pointermove\",\n                this.handlePointerMove,\n                eventOptions\n            ),\n            addPointerEvent(\n                this.contextWindow,\n                \"pointerup\",\n                this.handlePointerUp,\n                eventOptions\n            ),\n            addPointerEvent(\n                this.contextWindow,\n                \"pointercancel\",\n                this.handlePointerUp,\n                eventOptions\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        // Re-transform raw point through current transformPagePoint so\n        // animated parent transforms (e.g. rotation) are picked up each frame\n        if (this.lastRawMoveEventInfo) {\n            this.lastMoveEventInfo = transformPoint(\n                this.lastRawMoveEventInfo,\n                this.transformPagePoint\n            )\n        }\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.lastRawMoveEventInfo = info\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        /**\n         * Refresh the root scroll offset so the constraint's viewport box\n         * translates to correct page coordinates. The scroll captured at\n         * drag mount can be stale if the document was scrolled afterwards —\n         * e.g. via the browser restoring scroll on refresh, or an ancestor\n         * layout effect running after this element's mount (#2829).\n         *\n         * Clear the cached scroll first so `updateScroll` bypasses its\n         * per-animationId cache and re-reads the live value.\n         */\n        if (projection.root) {\n            projection.root.scroll = undefined\n            projection.root.updateScroll()\n        }\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 (\n                dragSnapToOrigin === true ||\n                (dragSnapToOrigin as unknown) === axis\n            )\n                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                  this.visualElement.latestValues[axis] ?? 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 { visualElement, layoutAnchor } = this.props\n        const { projection } = visualElement\n        if (projection) {\n            projection.options.layoutAnchor = layoutAnchor\n\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 stopObserver?: () => void\n\n    private startObserver() {\n        this.stopObserver?.()\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        this.stopObserver = 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        this.stopObserver?.()\n        this.hasEnteredView = false\n        this.isInView = false\n    }\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", "// Native-fetch variant of nsbp's axios-based doGet. Keep the same call shape\n// (doGet returns a Promise that resolves to a response-like object with `.data`\n// and `.status`) so services/home + services/photo stay unchanged.\nexport const doGet = (action: string) => {\n  return new Promise<{ data: any; status: number }>((resolve, reject) => {\n    let url = action;\n    if (action.indexOf(\"http\") === -1) {\n      // same-origin: the Lume relay (react_prefix=\"/\") forwards /getPhoto* and\n      // /images/* to the node backend; relative URLs keep it host-agnostic.\n      if (action.charAt(0) !== \"/\") url = \"/\" + action;\n    }\n    const base =\n      typeof window !== \"undefined\" && \"fetch\" in window\n        ? window.location.origin\n        : \"\";\n    const fullUrl =\n      action.indexOf(\"http\") !== -1 ? url : base + (url.startsWith(\"/\") ? url : \"/\" + url);\n    fetch(fullUrl, { method: \"GET\" })\n      .then((res) => {\n        return res.json().then((data) => {\n          resolve({ data, status: res.status });\n        });\n      })\n      .catch(reject);\n  });\n};\n", "import { doGet } from '@utils/fetch'\nimport { GET_PHOTO_MENU, GET_PHOTO_WIDTH_HEIGHT } from '@store/constants'\n\ntype DispatchFunction = (action: {\n  type: string\n  data?: unknown\n  menu?: unknown\n}) => void\n\ntype CallbackFunction = (data?: unknown) => void\n\nconst getPhotoWH = (\n  dispatch: DispatchFunction,\n  callback: CallbackFunction,\n  dic = ''\n) => {\n  let action = 'getPhotoWH'\n  if (dic) {\n    action += `?dic=${dic}`\n  }\n\n  doGet(action)\n    .then((res: { data?: { data?: unknown } }) => {\n      // console.log('getPhotoWH_res', res)\n      // axios \u54CD\u5E94\u683C\u5F0F\u662F { data: { data: [...] }, status: ... }\uFF0C\u9700\u8981\u53D6 res.data.data\n      dispatch({\n        type: GET_PHOTO_WIDTH_HEIGHT,\n        data: res?.data?.data || []\n      })\n      callback && callback()\n    })\n    .catch(() => {\n      callback && callback()\n    })\n}\n\nconst getPhotoMenu = (\n  dispatch: DispatchFunction,\n  callback: CallbackFunction\n) => {\n  doGet('getPhotoMenu')\n    .then((res: { data?: { data?: unknown } }) => {\n      // console.log('getPhotoMenu_res', res)\n      // axios \u54CD\u5E94\u683C\u5F0F\u662F { data: { data: [...] }, status: ... }\uFF0C\u9700\u8981\u53D6 res.data.data\n      const { data } = res?.data || {}\n      dispatch({\n        type: GET_PHOTO_MENU,\n        menu: data\n      })\n\n      callback && callback(data)\n    })\n    .catch(() => {\n      callback && callback()\n    })\n}\n\ninterface MenuItem {\n  name: string\n  cover?: string\n}\n\nconst getData = (callback: CallbackFunction, dic: string) => {\n  return (dispatch: DispatchFunction) => {\n    if (dic) {\n      getPhotoMenu(dispatch, () => {\n        getPhotoWH(dispatch, callback, dic)\n      })\n    } else {\n      getPhotoMenu(dispatch, (data) => {\n        const menuData = data as MenuItem[] | undefined\n        if (menuData && menuData.length > 0) {\n          // data[0] \u662F\u5BF9\u8C61 {name, cover}\uFF0C\u9700\u8981\u53D6 name\n          getPhotoWH(dispatch, callback, menuData[0].name)\n        }\n      })\n    }\n  }\n}\n\n// \u7528\u4E8E\u8DEF\u7531\u9884\u53D6\u6570\u636E\u7684 loadData \u51FD\u6570\nexport const loadData = (\n  resolve: CallbackFunction | null = null,\n  query: { dic?: string } = {}\n) => {\n  // \u4ECE URL \u67E5\u8BE2\u53C2\u6570\u4E2D\u83B7\u53D6 dic\n  const { dic } = query\n  return getData(resolve, dic || '')\n}\n\n// \u7528\u4E8E\u5BB9\u5668\u5185\u90E8\u8C03\u7528\u7684 loadData \u51FD\u6570\uFF08\u4FDD\u6301\u5411\u540E\u517C\u5BB9\uFF09\nexport const loadDataForContainer = (\n  resolve: CallbackFunction | null = null,\n  dic = ''\n) => {\n  return getData(resolve, dic)\n}\n", "import { doGet } from \"@utils/fetch\";\nimport { GET_PHOTO_MENU } from \"@store/constants\";\nimport type { Dispatch } from \"redux\";\n\n// Prefetch the photo menu into the store during SSR (called from the node SSR\n// backend via route.loadData), and/or on the client. nsbp-lume's doGet resolves\n// to { data, status } where data is the parsed JSON body ({ data: [...] }).\nexport const loadData = (\n  resolve: ((data?: unknown) => void) | null = null\n) => {\n  return (dispatch: Dispatch) => {\n    doGet(\"/getPhotoMenu\")\n      .then((res) => {\n        if (res.status >= 200 && res.status < 300) {\n          dispatch({\n            type: GET_PHOTO_MENU,\n            menu: res.data?.data || [],\n          });\n          resolve && resolve(res.data);\n        } else {\n          throw new Error(`Status ${res.status}`);\n        }\n      })\n      .catch((err: Error) => {\n        console.error(\"Failed to preload photos:\", err);\n        resolve && resolve();\n      });\n  };\n};\n", "import React from \"react\";\nimport Home from \"@containers/Home\";\nimport Login from \"@containers/Login\";\nimport Photo from \"@containers/Photo\";\nimport { loadData as homeLoadData } from \"@services/home\";\nimport { loadData as photoLoadData } from \"@services/photo\";\n\n// nsbp-lume keeps the same route tree as nsbp (/, /login, /photo) but without\n// @loadable/component: pages import directly. The shared tree is rendered by\n// the node SSR backend (StaticRouter + renderToPipeableStream) AND hydrated on\n// the client (BrowserRouter), so the markup and state agree. `loadData` lets\n// the SSR backend prefetch data into the store before the first render.\nexport default [\n  {\n    path: \"/\",\n    element: <Home />,\n    loadData: homeLoadData,\n    key: \"home\",\n  },\n  {\n    path: \"/signin\",\n    element: <Login />,\n    key: \"login\",\n  },\n  {\n    path: \"/photo\",\n    element: <Photo />,\n    loadData: photoLoadData,\n    key: \"photo\",\n  },\n];\n"],
  "mappings": "mxBAAA,IAAAA,GAAAC,GAAAC,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWA,IAAIC,GAAqB,OAAO,IAAI,4BAA4B,EAC9DC,GAAoB,OAAO,IAAI,cAAc,EAC7CC,GAAsB,OAAO,IAAI,gBAAgB,EACjDC,GAAyB,OAAO,IAAI,mBAAmB,EACvDC,GAAsB,OAAO,IAAI,gBAAgB,EACjDC,GAAsB,OAAO,IAAI,gBAAgB,EACjDC,GAAqB,OAAO,IAAI,eAAe,EAC/CC,GAAyB,OAAO,IAAI,mBAAmB,EACvDC,GAAsB,OAAO,IAAI,gBAAgB,EACjDC,GAAkB,OAAO,IAAI,YAAY,EACzCC,GAAkB,OAAO,IAAI,YAAY,EACzCC,GAAsB,OAAO,IAAI,gBAAgB,EACjDC,GAA6B,OAAO,IAAI,uBAAuB,EAC/DC,GAAwB,OAAO,SACjC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AuBR,GAAYI,EAAa,SAAS,GAC/D,MACF,IAAK,GACHC,EAAiBL,GACjBM,EAA4BL,GAC5BD,GAAaI,EAAa,UAAU,cACpCH,GAAwB,GACxBC,GACEpB,EACArG,EACA2H,CACF,EACAJ,GAAaK,EACbJ,GAAwBK,EACxB,MACF,IAAK,GACL,IAAK,IACL,IAAK,IACL,IAAK,IACHhI,GAA4B,EAAG8H,EAAc3H,CAAsB,EACnE2E,IACE9E,GAA4B,EAAG8H,EAAc3H,CAAsB,EACrEyH,GACEpB,EACArG,EACA2H,CACF,EACA,MACF,IAAK,GACHhD,KACGjE,GAAgBiH,EAAc3H,CAAsB,EACpD4H,EAAiBD,EAAa,UAChB,OAAOC,EAAe,sBAArC,YACEzH,GACEwH,EACA3H,EACA4H,CACF,GACJH,GACEpB,EACArG,EACA2H,CACF,EACA,MACF,IAAK,IACHF,GACEpB,EACArG,EACA2H,CACF,EACA,MACF,IAAK,IACHhD,IACGiD,EAAiBjD,KACTgD,EAAa,gBAAtB,KACFF,GACEpB,EACArG,EACA2H,CACF,EACAhD,GAA4BiD,EAC5B,MACF,IAAK,IACHlH,GAAgBiH,EAAc3H,CAAsB,EACpDyH,GACEpB,EACArG,EACA2H,CACF,EACA,MACF,IAAK,GACHhD,IACEjE,GAAgBiH,EAAc3H,CAAsB,EACtDyH,GACEpB,EACArG,EACA2H,CACF,EACA,MACF,QACEF,GACEpB,EACArG,EACA2H,CACF,CACJ,CACF,CACA,SAASnB,GAAiCH,EAAc5G,EAAc,CACpE,GACWA,EAAa,gBAAtB,OACE4G,EAAe5G,EAAa,UACrB4G,IAAT,OACIA,EAAeA,EAAa,cAAyBA,IAAT,OAChD,CACAA,EAAeA,EAAa,WAC5B,GAAI,CACF2B,GAAiB3B,CAAY,CAC/B,OAAStrB,EAAO,CACd6kB,GAAwBH,EAAcA,EAAa,OAAQ1kB,CAAK,CAClE,CACF,CACF,CACA,SAAS0rB,GAAiCJ,EAAc5G,EAAc,CACpE,GACWA,EAAa,g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1kB,CAAK,CAClE,CACF,MACE2vB,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACF,MACF,IAAK,IACHD,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACA,MACF,IAAK,IACHD,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACA,MACF,IAAK,IACH,MACF,IAAK,IACHE,EAAyBpL,EAAa,UACtCqL,EAAKrL,EAAa,UACTA,EAAa,gBAAtB,MACKwG,GACU6E,IAAT,MACSA,EAAG,gBAAZ,MACAhH,GAAkCgH,CAAE,EACtCD,EAAuB,YAAc,EACjCH,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACAK,GACE3E,EACA5G,CACF,IACHwG,GACU6E,IAAT,MACSA,EAAG,gBAAZ,MACAhH,GAAkCrE,CAAY,EAChDoL,EAAuB,YAAc,EACjCH,GACErE,EACA5G,EACA4F,EACAsF,CACF,GACEE,EAAuB,aAAe,EACxCI,GACE5E,EACA5G,EACA4F,EACAsF,GACOlL,EAAa,aAAe,SAAnC,GAA6C,EAC/C,IACRD,EAAQ,MAAQ+K,GAAmCO,EAAIrL,CAAY,EACnE,MACF,IAAK,IACHiL,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACAnL,EAAQ,MACNiL,GAA8BhL,EAAa,UAAWA,CAAY,EACpE,MACF,IAAK,IACHwG,IACIzG,EAAQC,EAAa,UACdD,IAAT,OACGwD,GAAqCxD,EAAM,MAAO,EAAE,EACrDwD,GAAqCvD,EAAa,MAAO,EAAE,IAC/DiL,GACErE,EACA5G,EACA4F,EACAsF,CACF,EACA,MACF,QACED,GACErE,EACA5G,EACA4F,EACAsF,CACF,CACJ,CACF,CACA,SAASM,GACPb,EACArD,EACAmE,EACAC,EACAd,EACA,CAIA,IAHAA,EACEA,KACQtD,EAAY,aAAe,SAAlC,GAA4C,IAC1CA,EAAcA,EAAY,MAAgBA,IAAT,MAAwB,CAC5D,IAAIV,EAAe+D,EACjB3K,EAAesH,EACf1B,EAAiB6F,EACjBP,EAAuBQ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,EAAE,EAC7C,KACF,CACAlJ,EAAG,CAGD,OAFA+vC,EAAkBpF,EAClBwF,EAAsBH,EACdG,EAAqB,CAC3B,IAAK,GACL,IAAK,GACH,MAAM,MAAMnxC,EAAuB,GAAG,CAAC,EACzC,IAAK,GACH,IAAKkK,EAAQ,WAAaA,IAAUA,EAAQ,YAAcA,EACxD,MACJ,IAAK,GACHymC,GACEI,EACA7mC,EACAm0B,GACA,CAACsR,EACH,EACA,MAAM3uC,EACR,IAAK,GACHuiB,GAAsC,KACtC,MACF,IAAK,GACL,IAAK,GACH,MACF,QACE,MAAM,MAAMvjB,EAAuB,GAAG,CAAC,CAC3C,CACA,IACGkK,EAAQ,YAAcA,IACrB8mC,EAAazE,GAA+B,IAAM1jC,GAAI,EACxD,GAAKmoC,GACL,CAOA,GANAL,GACEI,EACA7mC,EACAm0B,GACA,CAACsR,EACH,EACUvlC,GAAa2mC,EAAiB,EAAG,EAAE,IAAzC,EAA4C,MAAM/vC,EACtDovC,GAAsBlmC,EACtB6mC,EAAgB,cAAgBO,GAC9BC,GAAsB,KACpB,KACAR,EACAD,EACAvtB,GACA0sB,GACAD,GACA9lC,EACAm0B,GACAyR,GACA1O,GACAuO,GACAwB,EACA,YACA,GACA,CACF,EACAH,CACF,EACA,MAAMhwC,CACR,CACAuwC,GACER,EACAD,EACAvtB,GACA0sB,GACAD,GACA9lC,EACAm0B,GACAyR,GACA1O,GACAuO,GACAwB,EACA,KACA,GACA,CACF,CACF,CACF,CACA,KACF,OAAS,IACTP,GAAsBjF,CAAa,CACrC,CACA,SAAS4F,GACPlnC,EACAs4B,EACA6O,EACAC,EACAC,EACAxnC,EACA4B,EACAC,EACAC,EACA2lC,EACAX,EACAY,EACAC,EACAC,EACA,CACAznC,EAAK,cAAgB,GACrB,IAAIw3B,EAAec,EAAa,aAC9BwG,GAA4Bj/B,EAAQ,aAAeA,EAErD,GADA0nC,EAAwB,MAEtBzI,GACAtH,EAAe,OACDA,EAAe,YAA7B,YAGI+P,E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,IAAK,QACH44C,EAAqBtiC,GACrB,MACF,IAAK,UACH/B,EAAiB,QACjBqkC,EAAqBpjC,GACrB,MACF,IAAK,WACHjB,EAAiB,OACjBqkC,EAAqBpjC,GACrB,MACF,IAAK,aACL,IAAK,YACHojC,EAAqBpjC,GACrB,MACF,IAAK,QACH,GAAUnD,EAAY,SAAlB,EAA0B,MAAMrS,EACtC,IAAK,WACL,IAAK,WACL,IAAK,YACL,IAAK,YACL,IAAK,UACL,IAAK,WACL,IAAK,YACL,IAAK,cACH44C,EAAqBxjC,GACrB,MACF,IAAK,OACL,IAAK,UACL,IAAK,YACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,YACL,IAAK,OACHwjC,EAAqBtjC,GACrB,MACF,IAAK,cACL,IAAK,WACL,IAAK,YACL,IAAK,aACHsjC,EAAqBhiC,GACrB,MACF,KAAK6E,GACL,KAAKC,GACL,KAAKC,GACHi9B,EAAqBljC,GACrB,MACF,KAAKqG,GACH68B,EAAqB9hC,GACrB,MACF,IAAK,SACL,IAAK,YACH8hC,EAAqB9jC,GACrB,MACF,IAAK,QACH8jC,EAAqB5hC,GACrB,MACF,IAAK,OACL,IAAK,MACL,IAAK,QACH4hC,EAAqBhjC,GACrB,MACF,IAAK,oBACL,IAAK,qBACL,IAAK,gBACL,IAAK,cACL,IAAK,cACL,IAAK,aACL,IAAK,cACL,IAAK,YACHgjC,EAAqBpiC,GACrB,MACF,IAAK,SACHoiC,EAAqBliC,GACrB,MACF,IAAK,SACL,IAAK,eACHkiC,EAAqB1hC,EACzB,CACA,IAAI2hC,GAAwBzB,EAAmB,KAA1B,EACnB0B,EACE,CAACD,IACalhC,IAAb,UAA6CA,IAAhB,aAChCohC,EAAiBF,EACJvkC,IAAT,KACEA,EAAY,UACZ,KACFA,EACNukC,EAAiB,CAAC,EAClB,QACMx8B,EAAWhP,EAAY2rC,EAClB38B,IAAT,MAEA,CACA,IAAI48B,EAAY58B,EAWhB,GAVA28B,EAAoBC,EAAU,UA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W,aAAantB,EAAK1R,CAAK,EACtC,MACF,IAAK,UACH8c,GAA0B,eAAgB+hB,CAAU,EACpD/hB,GAA0B,SAAU+hB,CAAU,EAC9C50B,GAAqB40B,EAAY,UAAW7+B,CAAK,EACjD,MACF,IAAK,eACHoK,GACEy0B,EACA,+BACA,gBACA7+B,CACF,EACA,MACF,IAAK,eACHoK,GACEy0B,EACA,+BACA,gBACA7+B,CACF,EACA,MACF,IAAK,YACHoK,GACEy0B,EACA,+BACA,aACA7+B,CACF,EACA,MACF,IAAK,YACHoK,GACEy0B,EACA,+BACA,aACA7+B,CACF,EACA,MACF,IAAK,aACHoK,GACEy0B,EACA,+BACA,cACA7+B,CACF,EACA,MACF,IAAK,YACHoK,GACEy0B,EACA,+BACA,aACA7+B,CACF,EACA,MACF,IAAK,UACHoK,GACEy0B,EACA,uCACA,WACA7+B,CACF,EACA,MACF,IAAK,UACHoK,GACEy0B,EACA,uCACA,WACA7+B,CACF,EACA,MACF,IAAK,WACHoK,GACEy0B,EACA,uCACA,YACA7+B,CACF,EACA,MACF,IAAK,KACHiK,GAAqB40B,EAAY,KAAM7+B,CAAK,EAC5C,MACF,IAAK,YACL,IAAK,cACH,OACF,QACE,GACE,EAAE,EAAI0R,EAAI,SACDA,EAAI,CAAC,IAAb,KAA0BA,EAAI,CAAC,IAAb,KACVA,EAAI,CAAC,IAAb,KAA0BA,EAAI,CAAC,IAAb,IAElBA,EAAMtE,GAAQ,IAAIsE,CAAG,GAAKA,EACzBzH,GAAqB40B,EAAYntB,EAAK1R,CAAK,MAC1C,OACT,CACA8J,GAAgC,EAClC,CACA,SAAS2rC,GAAuB5W,EAAYjjC,EAAK8V,EAAK1R,EAAO+N,EAAOskB,EAAW,CAC7E,OAAQ3gB,EAAK,CACX,IAAK,QACH7E,GAAkBgyB,EAAY7+B,EAAOqyB,CAAS,EAC9C,OACF,IAAK,0BACH,GAAYryB,GAAR,KAAe,CACjB,GAAiB,OAAOA,GAApB,UAA6B,EAAE,WAAYA,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,SAAUugB,EACV,oBAAqB86B,EACrB,iBAAkBG,EAClB,QAASF,CACX,CAAC,EACD5+C,GACE,KAAK,eAAe,MACpB,GACAg/C,GACA17C,EACAw7C,EACAl7B,CACF,CACF,CACA,KAAK,gBAAkBD,EACzB,EACA,SAASq7B,GAAwB/+C,EAAOqD,EAAMugB,EAAU86B,EAAqB,CAC3E,OAAA79C,GAAyBb,CAAK,EAAE,iBAC9BqD,EACAugB,EACA86B,CACF,EACO,EACT,CACAzc,GAAiB,UAAU,oBAAsB,SAC/C5+B,EACAugB,EACA86B,EACA,CACA,IAAIh7B,EAAY,KAAK,gBACrB,GACWA,IAAT,OACEE,EAAWg7B,GACXl7B,EACArgB,EACAugB,EACA86B,CACF,EACO96B,IAAP,IACA,CACA,IAAIo7B,EAAmBt7B,EAAUE,CAAQ,EACzC86B,EAAsBM,EAAiB,iBACvC,IAAIL,EAAUK,EAAiB,QAC/BA,EAAmBF,GAAiBE,EAAiB,mBAAmB,EACxEj/C,GACE,KAAK,eAAe,MACpB,GACAk/C,GACA57C,EACAq7C,EACAM,CACF,EACAt7B,EAAU,OAAOE,EAAU,CAAC,EACnB+6B,IAAT,MAAoBA,EAAQ,CAC9B,CACF,EACA,SAASM,GACPj/C,EACAqD,EACAugB,EACA86B,EACA,CACA,OAAA79C,GAAyBb,CAAK,EAAE,oBAC9BqD,EACAugB,EACA86B,CACF,EACO,EACT,CACA,SAASI,GAAiBI,EAAM,CAC9B,OAAeA,GAAR,MACS,OAAOA,GAArB,YACQA,EAAK,OAAZ,IAAoBA,EAAK,kBAAkB,aAC1C,CAAE,QAASA,EAAK,QAAS,QAASA,EAAK,OAAQ,EAC/CA,CACN,CACA,SAASC,GAAyBD,EAAM,CACtC,OAAeA,GAAR,KACH,MACc,OAAOA,GAArB,UACE,MAAQA,EAAO,IAAM,KACrB,MAAQA,EAAK,QAAU,IAAM,IACrC,CACA,SAASN,GACPQ,EACA/7C,EACAugB,EACA86B,EACA,CACA,GAAUU,EAAe,SAAr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,oBAACC,GAAA,CACE,SAAAC,GAAQ,IAAKC,MACZ,QAACC,GAAA,CAEC,KAAMD,EAAO,KACb,QAASA,EAAO,SAFXA,EAAO,GAGd,CACD,EACH,EACF,EACF,EACF,CAEJ,CAEA,IAAME,GAAY,SAAS,eAAe,MAAM,EAChD,GAAIA,GAAW,CACb,IAAMC,KAAM,QAACZ,GAAA,EAAI,EACbW,GAAU,cAAc,KAC1B,gBAAYA,GAAWC,CAAG,KAE1B,eAAWD,EAAS,EAAE,OAAOC,CAAG,CAEpC,CAKA,SAASC,IAAwB,CAC/B,GAAI,CACF,IAAIC,EAAU,aAAa,QAAQ,cAAc,GAAK,GACjDA,IACHA,EACE,KAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,EAAI,KAAK,IAAI,EAAE,SAAS,EAAE,EACrE,aAAa,QAAQ,eAAgBA,CAAO,GAI9C,IAAIC,EAAW,SAAS,SACpBA,IACFA,EAAWA,EAAS,MAAM,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,GAEhD,IAAMC,EAAU,KAAK,UAAU,CAC7B,KAAM,OAAO,SAAS,SACtB,SAAAD,EACA,GAAI,UAAU,UACd,QAASD,GAAW,OACpB,GAAI,OACF,CAAC,CAAE,UAAiD,SACtD,CACF,CAAC,EACD,GACE,OAAO,UAAU,YAAe,YAChC,UAAU,WAAW,aAAcE,CAAO,EAE1C,OAEF,MAAM,aAAc,CAClB,OAAQ,OACR,QAAS,CAAE,eAAgB,kBAAmB,EAC9C,KAAMA,EACN,UAAW,EACb,CAAC,EAAE,MAAM,IAAM,CAAC,CAAC,CACnB,MAAQ,CAER,CACF,CAEI,OAAO,OAAW,KAAe,OAAO,SAAa,KACvDH,GAAgB",
  "names": ["require_react_production", "__commonJSMin", "exports", "REACT_ELEMENT_TYPE", "REACT_PORTAL_TYPE", "REACT_FRAGMENT_TYPE", "REACT_STRICT_MODE_TYPE", "REACT_PROFILER_TYPE", "REACT_CONSUMER_TYPE", "REACT_CONTEXT_TYPE", "REACT_FORWARD_REF_TYPE", "REACT_SUSPENSE_TYPE", "REACT_MEMO_TYPE", "REACT_LAZY_TYPE", "REACT_ACTIVITY_TYPE", "REACT_VIEW_TRANSITION_TYPE", "MAYBE_ITERATOR_SYMBOL", "getIteratorFn", "maybeIterable", "ReactNoopUpdateQueue", "assign", "emptyObject", "Component", "props", "context", "updater", "partialState", "callback", "ComponentDummy", "PureComponent", "pureComponentPrototype", "isArrayImpl", "noop", "ReactSharedInternals", "hasOwnProperty", "ReactElement", "type", "key", "refProp", "cloneAndReplaceKey", "oldElement", "newKey", "isValidElement", "object", "escape", "escaperLookup", "match", "userProvidedKeyEscapeRegex", "getElementKey", "element", "index", "resolveThenable", "thenable", "fulfilledValue", "error", "mapIntoArray", "children", "array", "escapedPrefix", "nameSoFar", "invokeCallback", "c", "nextNamePrefix", "i", "mapChildren", "func", "result", "count", "child", "lazyInitializer", "payload", "ctor", "moduleObject", "reportGlobalError", "event", "startTransition", "scope", "prevTransition", "currentTransition", "returnValue", "onStartTransitionFinish", "addTransitionType", "transition", "transitionTypes", "Children", "forEachFunc", "forEachContext", "n", "size", "fn", "config", "propName", "childArray", "defaultValue", "childrenLength", "render", "compare", "usable", "action", "initialState", "permalink", "deps", "Context", "value", "initialValue", "create", "ref", "passthrough", "reducer", "initialArg", "init", "subscribe", "getSnapshot", "getServerSnapshot", "require_react", "__commonJSMin", "exports", "module", "require_scheduler_production", "__commonJSMin", "exports", "push", "heap", "node", "index", "a", "parentIndex", "parent", "compare", "peek", "pop", "first", "last", "length", "halfLength", "leftIndex", "left", "rightIndex", "right", "b", "diff", "localPerformance", "localDate", "initialTime", "taskQueue", "timerQueue", "taskIdCounter", "currentTask", "currentPriorityLevel", "isPerformingWork", "isHostCallbackScheduled", "isHostTimeoutScheduled", "needsPaint", "localSetTimeout", "localClearTimeout", "localSetImmediate", "advanceTimers", "currentTime", "timer", "handleTimeout", "isMessageLoopRunning", "schedulePerformWorkUntilDeadline", "firstTimer", "requestHostTimeout", "taskTimeoutID", "frameInterval", "startTime", "shouldYieldToHost", "performWorkUntilDeadline", "hasMoreWork", "previousPriorityLevel", "callback", "continuationCallback", "channel", "port", "ms", "task", "fps", "eventHandler", "priorityLevel", "options", "timeout", "parentPriorityLevel", "require_scheduler", "__commonJSMin", "exports", "module", "require_react_dom_production", "__commonJSMin", "exports", "React", "formatProdErrorMessage", "code", "url", "i", "noop", "Internals", "REACT_PORTAL_TYPE", "REACT_RECOVERABLE_TYPE", "REACT_OPTIMISTIC_KEY", "createPortal$1", "children", "containerInfo", "implementation", "key", "ReactSharedInternals", "getCrossOriginStringAs", "as", "input", "reason", "container", "fn", "previousTransition", "previousUpdatePriority", "href", "options", "crossOrigin", "integrity", "fetchPriority", "form", "a", "action", "initialState", "permalink", "require_react_dom", "__commonJSMin", "exports", "module", "checkDCE", "err", "require_react_dom_client_production", "__commonJSMin", "exports", "Scheduler", "React", "ReactDOM", "formatProdErrorMessage", "code", "url", "i", "isValidContainer", "node", "getNearestMountedFiber", "fiber", "nextNode", "getSuspenseInstanceFromFiber", "suspenseState", "getActivityInstanceFromFiber", "activityState", "assertIsMounted", "findCurrentFiberUsingSlowPath", "alternate", "a", "b", "parentA", "parentB", "didFindChild", "child$0", "findCurrentHostFiberImpl", "tag", "traverseVisibleInstancesAndTextInstances", "child", "searchWithinHosts", "fn", "c", "getFragmentParentInstanceOrContainerFiber", "fiberIsPortaledIntoHost", "foundPortalParent", "getFragmentInstanceOrTextInstanceSiblings", "result", "parentHostFiber", "findFragmentInstanceOrTextInstanceSiblings", "self", "state", "getInstanceFromHostFiber", "searchTarget", "searchBoundary", "isFiberPrecedingCheck", "target", "boundary", "isFiberFollowingCheck", "getParentForFragmentAncestors", "inst", "getLowestCommonAncestor", "instA", "instB", "getParent", "depthA", "tempA", "tempB", "assign", "REACT_LEGACY_ELEMENT_TYPE", "REACT_ELEMENT_TYPE", "REACT_PORTAL_TYPE", "REACT_FRAGMENT_TYPE", "REACT_STRICT_MODE_TYPE", "REACT_PROFILER_TYPE", "REACT_CONSUMER_TYPE", "REACT_CONTEXT_TYPE", "REACT_FORWARD_REF_TYPE", "REACT_SUSPENSE_TYPE", "REACT_SUSPENSE_LIST_TYPE", "REACT_MEMO_TYPE", "REACT_LAZY_TYPE", "REACT_ACTIVITY_TYPE", "REACT_LEGACY_HIDDEN_TYPE", "REACT_MEMO_CACHE_SENTINEL", "REACT_VIEW_TRANSITION_TYPE", "REACT_RECOVERABLE_TYPE", "MAYBE_ITERATOR_SYMBOL", "getIteratorFn", "maybeIterable", "REACT_CLIENT_REFERENCE", "getComponentNameFromType", "type", "innerType", "isArrayImpl", "ReactSharedInternals", "ReactDOMSharedInternals", "sharedNotPendingObject", "valueStack", "index", "createCursor", "defaultValue", "pop", "cursor", "push", "value", "contextStackCursor", "contextFiberStackCursor", "rootInstanceStackCursor", "hostTransitionProviderCursor", "pushHostContainer", "nextRootInstance", "getOwnHostContext", "getChildHostContextProd", "popHostContainer", "pushHostContext", "stateHook", "HostTransitionContext", "JSCompiler_inline_result", "popHostContext", "prefix", "suffix", "describeBuiltInComponentFrame", "name", "x", "match", "reentry", "describeNativeComponentFrame", "construct", "previousPrepareStackTrace", "RunInRootFrame", "Fake", "control", "x$1", "prevProps", "x$2", "sample", "namePropDescriptor", "_RunInRootFrame$Deter", "sampleStack", "controlStack", "sampleLines", "controlLines", "frame", "describeFiber", "childFiber", "getStackByFiberInDevAndProd", "workInProgress", "info", "previous", "hasOwnProperty", "scheduleCallback$3", "cancelCallback$1", "shouldYield", "requestPaint", "now", "getCurrentPriorityLevel", "ImmediatePriority", "UserBlockingPriority", "NormalPriority$1", "LowPriority", "IdlePriority", "log$1", "unstable_setDisableYieldValue", "rendererID", "injectedHook", "setIsStrictModeForDevtools", "newIsStrictMode", "clz32", "clz32Fallback", "log", "LN2", "nextTransitionUpdateLane", "nextTransitionDeferredLane", "nextRetryLane", "getHighestPriorityLanes", "lanes", "pendingSyncLanes", "getNextLanes", "root", "wipLanes", "rootHasPendingCommit", "pendingLanes", "nextLanes", "suspendedLanes", "pingedLanes", "nonIdlePendingLanes", "checkIfRootIsPrerendering", "renderLanes", "getEntangledLanes", "allEntangledLanes", "index$4", "lane", "computeExpirationTime", "currentTime", "claimNextRetryLane", "createLaneMap", "initial", "laneMap", "markRootUpdated$1", "updateLane", "markRootFinished", "finishedLanes", "remainingLanes", "spawnedLane", "updatedLanes", "suspendedRetryLanes", "previouslyPendingLanes", "entanglements", "expirationTimes", "hiddenUpdates", "index$7", "hiddenUpdatesForLane", "update", "markSpawnedDeferredLane", "entangledLanes", "spawnedLaneIndex", "markRootEntangled", "rootEntangledLanes", "index$8", "getBumpedLaneForHydration", "renderLane", "getBumpedLaneForHydrationByLane", "lanesToEventPriority", "resolveUpdatePriority", "updatePriority", "getEventPriority", "runWithPriority", "priority", "previousPriority", "randomKey", "internalInstanceKey", "internalPropsKey", "internalContainerInstanceKey", "internalEventHandlersKey", "internalEventHandlerListenersKey", "internalEventHandlesSetKey", "internalRootNodeResourcesKey", "internalHoistableMarker", "internalLoadPendingKey", "detachDeletedInstance", "getClosestInstanceFromNode", "targetNode", "targetInst", "parentNode", "getParentHydrationBoundary", "getInstanceFromNode", "getNodeFromInstance", "getResourcesFromRoot", "resources", "markNodeAsHoistable", "clearPendingLoadOnNode", "allNativeEvents", "registrationNameDependencies", "registerTwoPhaseEvent", "registrationName", "dependencies", "registerDirectEvent", "VALID_ATTRIBUTE_NAME_REGEX", "illegalAttributeNameCache", "validatedAttributeNameCache", "isAttributeNameSafe", "attributeName", "viewTransitionMutationContext", "pushMutationContext", "prev", "setValueForAttribute", "prefix$10", "setValueForKnownAttribute", "setValueForNamespacedAttribute", "namespace", "getToStringValue", "isCheckable", "elem", "trackValueOnNode", "valueField", "currentValue", "descriptor", "get", "set", "track", "updateValueIfChanged", "tracker", "lastValue", "escapeSelectorAttributeValueInsideDoubleQuotesRegex", "escapeSelectorAttributeValueInsideDoubleQuotes", "ch", "updateInput", "element", "lastDefaultValue", "checked", "defaultChecked", "setDefaultValue", "initInput", "isHydrating", "updateOptions", "multiple", "propValue", "setDefaultSelected", "updateTextarea", "initTextarea", "children", "setTextContent", "text", "firstChild", "unitlessNumbers", "setValueForStyle", "style", "styleName", "isCustomProperty", "setValueForStyles", "styles", "prevStyles", "styleName$16", "styleName$17", "isCustomElement", "tagName", "aliases", "isJavaScriptProtocol", "sanitizeURL", "noop$1", "currentReplayingEvent", "getEventTarget", "nativeEvent", "restoreTarget", "restoreQueue", "restoreStateOfTarget", "internalInstance", "props", "otherNode", "otherProps", "isInsideEventHandler", "batchedUpdates$1", "flushSyncWork$1", "getListener", "stateNode", "canUseDOM", "passiveBrowserEventsSupported", "options", "startText", "fallbackText", "getData", "start", "startValue", "startLength", "end", "endValue", "endLength", "minEnd", "getEventCharCode", "keyCode", "functionThatReturnsTrue", "functionThatReturnsFalse", "createSyntheticEvent", "Interface", "SyntheticBaseEvent", "reactName", "reactEventType", "nativeEventTarget", "propName", "event", "EventInterface", "SyntheticEvent", "UIEventInterface", "SyntheticUIEvent", "lastMovementX", "lastMovementY", "lastMouseEvent", "MouseEventInterface", "getEventModifierState", "SyntheticMouseEvent", "DragEventInterface", "SyntheticDragEvent", "FocusEventInterface", "SyntheticFocusEvent", "AnimationEventInterface", "SyntheticAnimationEvent", "ClipboardEventInterface", "SyntheticClipboardEvent", "CompositionEventInterface", "SyntheticCompositionEvent", "normalizeKey", "translateToKey", "modifierKeyToProp", "modifierStateGetter", "keyArg", "KeyboardEventInterface", "key", "SyntheticKeyboardEvent", "PointerEventInterface", "SyntheticPointerEvent", "SubmitEventInterface", "SyntheticSubmitEvent", "TouchEventInterface", "SyntheticTouchEvent", "TransitionEventInterface", "SyntheticTransitionEvent", "WheelEventInterface", "SyntheticWheelEvent", "ToggleEventInterface", "SyntheticToggleEvent", "END_KEYCODES", "canUseCompositionEvent", "documentMode", "canUseTextInputEvent", "useFallbackCompositionData", "SPACEBAR_CHAR", "hasSpaceKeypress", "isFallbackCompositionEnd", "domEventName", "getDataFromCustomEvent", "isComposing", "getNativeBeforeInputChars", "getFallbackBeforeInputChars", "supportedInputTypes", "isTextInputElement", "nodeName", "createAndAccumulateChangeEvent", "dispatchQueue", "accumulateTwoPhaseListeners", "activeElement$1", "activeElementInst$1", "runEventInBatch", "processDispatchQueue", "getInstIfValueChanged", "getTargetInstForChangeEvent", "isInputEventSupported", "isSupported$jscomp$inline_474", "element$jscomp$inline_475", "JSCompiler_inline_result$jscomp$318", "stopWatchingForValueChange", "handlePropertyChange", "handleEventsForInputEventPolyfill", "getTargetInstForInputEventPolyfill", "getTargetInstForClickEvent", "getTargetInstForInputOrChangeEvent", "is", "y", "objectIs", "shallowEqual", "objA", "objB", "keysA", "keysB", "currentKey", "getActiveElement", "doc", "getLeafNode", "getNodeForCharacterOffset", "offset", "nodeEnd", "containsNode", "outerNode", "innerNode", "getActiveElementDeep", "containerInfo", "hasSelectionCapabilities", "skipSelectionChangeEvent", "activeElement", "activeElementInst", "lastSelection", "mouseDown", "constructSelectEvent", "makePrefixMap", "styleProp", "eventName", "prefixes", "vendorPrefixes", "prefixedEventNames", "getVendorPrefixedEventName", "prefixMap", "ANIMATION_END", "ANIMATION_ITERATION", "ANIMATION_START", "TRANSITION_RUN", "TRANSITION_START", "TRANSITION_CANCEL", "TRANSITION_END", "topLevelEventsToReactNames", "simpleEventPluginEvents", "registerSimpleEvent", "globalClientIdCounter$1", "getViewTransitionName", "instance", "pendingEffectsRoot", "globalClientId", "getClassNameByType", "classByType", "className", "activeTypes", "pendingTransitionTypes", "getViewTransitionClassName", "defaultClass", "eventClass", "reportGlobalError", "error", "concurrentQueues", "concurrentQueuesIndex", "concurrentlyUpdatedLanes", "finishQueueingConcurrentUpdates", "endIndex", "queue", "pending", "markUpdateLaneFromFiberToRoot", "enqueueUpdate$1", "enqueueConcurrentHookUpdate", "getRootForUpdatedFiber", "enqueueConcurrentRenderForLane", "sourceFiber", "isHidden", "parent", "nestedUpdateCount", "rootWithNestedUpdates", "emptyContextObject", "FiberNode", "pendingProps", "mode", "createFiberImplClass", "shouldConstruct", "Component", "createWorkInProgress", "current", "resetWorkInProgress", "createFiberFromTypeAndProps", "owner", "fiberTag", "isHostHoistableType", "createFiberFromFragment", "elements", "createFiberFromText", "content", "createFiberFromDehydratedFragment", "dehydratedNode", "createFiberFromPortal", "portal", "CapturedStacks", "createCapturedValueAtFiber", "source", "existing", "forkStack", "forkStackIndex", "treeForkProvider", "treeForkCount", "idStack", "idStackIndex", "treeContextProvider", "treeContextId", "treeContextOverflow", "pushTreeFork", "totalChildren", "pushTreeId", "baseIdWithLeadingBit", "baseLength", "length", "numberOfOverflowBits", "pushMaterializedTreeId", "popTreeContext", "restoreSuspendedTreeContext", "suspendedContext", "hydrationParentFiber", "nextHydratableInstance", "hydrationErrors", "rootOrSingletonContext", "HydrationMismatchException", "throwOnHydrationMismatch", "queueHydrationError", "prepareToHydrateHostInstance", "listenToNonDelegatedEvent", "mediaEventTypes", "checkForUnmatchedText", "popToNextHostParent", "popHydrationState", "JSCompiler_temp", "shouldSetTextContent", "getNextHydratableInstanceAfterHydrationBoundary", "isSingletonScope", "previousHydratableOnEnteringScopedSingleton", "getNextHydratable", "resetHydrationState", "upgradeHydrationErrorsToRecoverable", "queuedErrors", "workInProgressRootRecoverableErrors", "valueCursor", "currentlyRenderingFiber$1", "lastContextDependency", "pushProvider", "providerFiber", "context", "nextValue", "popProvider", "scheduleContextWorkOnParentPath", "propagationRoot", "propagateContextChanges", "contexts", "forcePropagateEntireTree", "list", "nextFiber", "dependency", "propagateParentContextChanges", "isInsidePropagationBailout", "currentParent", "checkIfContextChanged", "currentDependencies", "prepareToReadContext", "readContext", "readContextForConsumer", "readContextDuringReconciliation", "consumer", "AbortControllerLocal", "listeners", "signal", "listener", "scheduleCallback$2", "NormalPriority", "CacheContext", "createCache", "releaseCache", "cache", "queueTransitionTypes", "transitionTypes", "queued", "transitionType", "entangledTransitionTypes", "claimQueuedTransitionTypes", "claimed", "currentEntangledListeners", "currentEntangledPendingCount", "currentEntangledLane", "currentEntangledActionThenable", "entangleAsyncAction", "transition", "thenable", "entangledListeners", "requestTransitionLane", "resolve", "pingEngtangledActionScope", "chainThenableValue", "thenableWithOverride", "prevOnStartTransitionFinish", "returnValue", "globalMostRecentTransitionTime", "root$28", "firstScheduledRoot", "root$29", "resumedCache", "peekCacheFromPool", "cacheResumedFromPreviousRender", "workInProgressRoot", "pushTransition", "offscreenWorkInProgress", "prevCachePool", "getSuspendedCache", "cacheFromPool", "SuspenseException", "SuspenseyCommitException", "SuspenseActionException", "noopSuspenseyCommitThenable", "isThenableResolved", "trackUsedThenable", "thenableState", "checkIfUseWrappedInAsyncCatch", "fulfilledValue", "fulfilledThenable", "rejectedThenable", "suspendedThenable", "resolveLazy", "lazyType", "init", "getSuspendedThenable", "rejectedReason", "thenableState$1", "thenableIndexCounter$1", "unwrapThenable", "coerceRef", "throwOnInvalidObjectTypeImpl", "returnFiber", "newChild", "createChildReconciler", "shouldTrackSideEffects", "deleteChild", "childToDelete", "deletions", "deleteRemainingChildren", "currentFirstChild", "mapRemainingChildren", "existingChildren", "useFiber", "placeChild", "newFiber", "lastPlacedIndex", "newIndex", "placeSingleChild", "updateTextNode", "textContent", "updateElement", "elementType", "updateFragment", "updatePortal", "fragment", "createChild", "updateSlot", "oldFiber", "updateFromMap", "newIdx", "reconcileChildrenArray", "newChildren", "resultingFirstChild", "previousNewFiber", "nextOldFiber", "reconcileChildrenIterator", "step", "reconcileChildFibersImpl", "firstChildFiber", "reconcileChildFibers", "mountChildFibers", "hasForceUpdate", "initializeUpdateQueue", "cloneUpdateQueue", "createUpdate", "enqueueUpdate", "updateQueue", "executionContext", "entangleTransitions", "queueLanes", "enqueueCapturedUpdate", "capturedUpdate", "newFirst", "newLast", "clone", "didReadFromEntangledAsyncAction", "suspendIfUpdateReadFromEntangledAsyncAction", "entangledActionThenable", "processUpdateQueue", "workInProgress$jscomp$0", "instance$jscomp$0", "firstBaseUpdate", "lastBaseUpdate", "pendingQueue", "lastPendingUpdate", "firstPendingUpdate", "newState", "isHiddenUpdate", "workInProgressRootRenderLanes", "workInProgressRootSkippedLanes", "callCallback", "callback", "commitCallbacks", "callbacks", "currentTreeHiddenStackCursor", "prevEntangledRenderLanesCursor", "pushHiddenContext", "entangledRenderLanes", "reuseHiddenContextOnStack", "popHiddenContext", "suspenseHandlerStackCursor", "shellBoundary", "pushPrimaryTreeSuspenseHandler", "handler", "suspenseStackCursor", "pushDehydratedActivitySuspenseHandler", "pushOffscreenSuspenseHandler", "reuseSuspenseHandlerOnStack", "popSuspenseHandler", "pushSuspenseListContext", "newContext", "popSuspenseListContext", "findFirstSuspended", "row", "isSuspenseInstancePending", "isSuspenseInstanceFallback", "currentlyRenderingFiber", "currentHook", "workInProgressHook", "didScheduleRenderPhaseUpdate", "didScheduleRenderPhaseUpdateDuringThisPass", "shouldDoubleInvokeUserFnsInHooksDEV", "localIdCounter", "thenableIndexCounter", "globalClientIdCounter", "throwInvalidHookError", "areHookInputsEqual", "nextDeps", "prevDeps", "renderWithHooks", "secondArg", "nextRenderLanes", "HooksDispatcherOnMount", "HooksDispatcherOnUpdate", "renderWithHooksAgain", "finishRenderingHooks", "ContextOnlyDispatcher", "didRenderTooFewHooks", "didReceiveUpdate", "numberOfReRenders", "HooksDispatcherOnRerender", "TransitionAwareHostComponent", "dispatcher", "maybeThenable", "useThenable", "checkDidRenderIdHook", "didRenderIdHook", "bailoutHooks", "resetHooksOnUnwind", "mountWorkInProgressHook", "hook", "updateWorkInProgressHook", "nextCurrentHook", "nextWorkInProgressHook", "createFunctionComponentUpdateQueue", "use", "usable", "useMemoCache", "size", "memoCache", "array", "basicStateReducer", "action", "updateReducer", "reducer", "updateReducerImpl", "baseQueue", "baseFirst", "newBaseQueueFirst", "newBaseQueueLast", "didReadFromEntangledAsyncAction$64", "revertLane", "rerenderReducer", "dispatch", "lastRenderPhaseUpdate", "updateSyncExternalStore", "subscribe", "getSnapshot", "getServerSnapshot", "isHydrating$jscomp$0", "snapshotChanged", "updateEffect", "subscribeToStore", "pushSimpleEffect", "updateStoreInstance", "pushStoreConsistencyCheck", "renderedSnapshot", "nextSnapshot", "checkIfSnapshotChanged", "forceStoreRerender", "latestGetSnapshot", "scheduleUpdateOnFiber", "mountStateImpl", "initialState", "initialStateInitializer", "updateOptimisticImpl", "passthrough", "dispatchActionState", "actionQueue", "setPendingState", "setState", "payload", "isRenderPhaseUpdate", "actionNode", "runActionStateAction", "prevState", "prevTransition", "currentTransition", "onStartTransitionFinish", "handleActionReturnValue", "onActionError", "error$70", "nextState", "onActionSuccess", "notifyActionListeners", "last", "actionStateReducer", "oldState", "mountActionState", "initialStateProp", "ssrFormState", "JSCompiler_inline_result$jscomp$0", "inRootOrSingleton", "dispatchSetState", "dispatchOptimisticSetState", "updateActionState", "updateActionStateImpl", "currentStateHook", "actionStateActionEffect", "rerenderActionState", "create", "deps", "updateRef", "mountEffectImpl", "fiberFlags", "hookFlags", "updateEffectImpl", "mountEffect", "useEffectEventImpl", "componentUpdateQueue", "events", "updateEvent", "ref", "updateInsertionEffect", "updateLayoutEffect", "imperativeHandleEffect", "refCleanup", "updateImperativeHandle", "mountDebugValue", "updateCallback", "updateMemo", "nextCreate", "mountDeferredValueImpl", "initialValue", "requestDeferredLane", "updateDeferredValueImpl", "prevValue", "startTransition", "pendingState", "finishedState", "thenableForFinishedState", "dispatchSetStateInternal", "requestUpdateLane", "noop", "startHostTransition", "formFiber", "formData", "ensureFormComponentIsStateful", "requestFormReset$1", "existingStateHook", "initialResetState", "useHostTransitionStatus", "updateId", "updateRefresh", "refreshCache", "provider", "root$73", "dispatchReducerAction", "enqueueRenderPhaseUpdate", "entangleTransitionUpdate", "currentState", "eagerState", "throwIfDuringRender", "initialArg", "identifierPrefix", "idWithLeadingBit", "booleanOrThenable", "applyDerivedStateFromProps", "ctor", "getDerivedStateFromProps", "nextProps", "classComponentUpdater", "checkShouldComponentUpdate", "oldProps", "newProps", "nextContext", "callComponentWillReceiveProps", "resolveClassComponentProps", "baseProps", "propName$77", "defaultOnUncaughtError", "defaultOnCaughtError", "defaultOnRecoverableError", "logUncaughtError", "errorInfo", "onUncaughtError", "e$78", "logCaughtError", "onCaughtError", "e$79", "createRootErrorUpdate", "createClassErrorUpdate", "initializeClassErrorUpdate", "getDerivedStateFromError", "legacyErrorBoundariesThatAlreadyFailed", "stack", "throwException", "rootRenderLanes", "renderDidSuspendDelayIfPossible", "workInProgressRootExitStatus", "attachPingListener", "wrapperError", "workInProgressRootConcurrentErrors", "SelectiveHydrationException", "reconcileChildren", "nextChildren", "updateForwardRef", "propsWithoutRef", "bailoutOnAlreadyFinishedWork", "updateMemoComponent", "updateSimpleMemoComponent", "checkScheduledUpdateOrContext", "updateFunctionComponent", "updateOffscreenComponent", "deferHiddenOffscreenComponent", "bailoutOffscreenComponent", "nextBaseLanes", "remainingChildLanes", "mountActivityChildren", "mountWorkInProgressOffscreenFiber", "retryActivityComponentWithoutHydrating", "updateActivityComponent", "didSuspend", "canHydrateHydrationBoundary", "dehydrated", "markRef", "replayFunctionComponent", "updateClassComponent", "contextType", "unresolvedOldProps", "oldContext", "contextType$jscomp$0", "mountHostRootWithoutHydrating", "SUSPENDED_MARKER", "mountSuspenseOffscreenState", "getRemainingWorkInPrimaryTree", "primaryTreeDidDefer", "workInProgressDeferredLane", "updateSuspenseComponent", "showFallback", "mountSuspensePrimaryChildren", "dehydrated$96", "updateDehydratedSuspenseComponent", "primaryChildren", "offscreenProps", "retrySuspenseComponentWithoutHydrating", "didPrimaryChildrenDefer", "suspenseInstance", "digest", "scheduleSuspenseWorkOnFiber", "findLastContentRow", "lastContentRow", "currentRow", "initSuspenseListRenderState", "isBackwards", "tail", "tailMode", "renderState", "reverseChildren", "nextRow", "updateSuspenseListComponent", "revealOrder", "suspenseContext", "shouldForceFallback", "updateContextProvider", "attemptEarlyBailoutIfNoScheduledUpdate", "state$108", "primaryChildLanes", "beginWork", "$$typeof", "getResource", "createHoistableInstance", "resolveSingletonInstance", "canHydrateInstance", "canHydrateTextInstance", "markUpdate", "preloadInstanceAndSuspendIfNeeded", "maySuspendCommit", "shouldRemainOnPreviousScreen", "preloadResourceAndSuspendIfNeeded", "resource", "preloadResource", "scheduleRetryEffect", "retryQueue", "workInProgressSuspendedRetryLanes", "cutOffTailIfNeeded", "hasRenderedATailFallback", "tailNode", "lastTailNode", "bubbleProperties", "completedWork", "didBailout", "newChildLanes", "subtreeFlags", "child$113", "completeWork", "nextResource", "ownerDocument", "getOwnerDocumentFromRootContainer", "setInitialProperties", "listenToAllSupportedEvents", "workInProgressRootRenderTargetTime", "unwindWork", "unwindInterruptedWork", "interruptedWork", "commitHookEffectListMount", "flags", "finishedWork", "lastEffect", "firstEffect", "captureCommitPhaseError", "commitHookEffectListUnmount", "nearestMountedAncestor$jscomp$0", "destroy", "nearestMountedAncestor", "destroy_", "commitClassCallbacks", "safelyCallComponentWillUnmount", "safelyAttachRef", "instanceToUse", "createViewTransitionInstance", "fragmentInstance", "FragmentInstance", "addFragmentHandleToFiber", "safelyDetachRef", "error$148", "commitNewChildToFragmentInstances", "parentFragmentInstances", "commitNewChildToFragmentInstance", "commitFragmentInstanceInsertionEffects", "isFragmentInstanceParent", "isFragmentInstanceHostBoundary", "commitFragmentInstanceDeletionEffects", "deleteChildFromFragmentInstance", "commitHostMount", "commitHostUpdate", "domElement", "updateProperties", "isHostParent", "getHostSibling", "insertOrAppendPlacementNodeIntoContainer", "before", "insertOrAppendPlacementNode", "commitHostSingletonAcquisition", "singleton", "attributes", "shouldStartViewTransition", "appearingViewTransitions", "trackEnterViewTransitions", "placement", "viewTransitionCancelableChildren", "pushViewTransitionCancelableScope", "prevChildren", "viewTransitionHostInstanceIdx", "applyViewTransitionToHostInstances", "collectMeasurements", "stopAtNestedViewTransitions", "applyViewTransitionToHostInstancesRecursive", "inViewport", "measurement", "measureInstance", "applyViewTransitionName", "restoreViewTransitionOnHostInstances", "restoreViewTransitionName", "commitAppearingPairViewTransitions", "commitEnterViewTransitions", "gesture", "scheduleViewTransitionEvent", "commitDeletedPairViewTransitions", "deletion", "pairs", "pair", "commitExitViewTransitions", "commitNestedViewTransitions", "changedParent", "restorePairedViewTransitions", "restoreEnterOrExitViewTransitions", "restoreNestedViewTransitions", "measureViewTransitionHostInstancesRecursive", "parentViewTransition", "newName", "oldName", "previousMeasurements", "previousMeasurement", "nextMeasurement", "newRect", "measureNestedViewTransitions", "measureClonedInstance", "offscreenSubtreeIsHidden", "offscreenSubtreeWasHidden", "offscreenDirectParentIsHidden", "needsFormReset", "PossiblyWeakSet", "nextEffect", "viewTransitionContextChanged", "inUpdateViewTransition", "rootViewTransitionAffected", "rootViewTransitionNameCanceled", "commitBeforeMutationEffects", "committedLanes", "eventsEnabled", "_enabled", "selection", "anchorOffset", "focusNode", "indexWithinAnchor", "indexWithinFocus", "next", "selectionInformation", "commitBeforeMutationEffects_complete", "isViewTransitionEligible$jscomp$0", "isViewTransitionEligible", "resolvedPrevProps", "clearContainerSparingly", "commitLayoutEffectOnFiber", "finishedRoot", "recursivelyTraverseLayoutEffects", "error$146", "commitActivityHydrationCallbacks", "commitSuspenseHydrationCallbacks", "retryDehydratedSuspenseBoundary", "registerSuspenseInstanceRetry", "newOffscreenSubtreeWasHidden", "recursivelyTraverseReappearLayoutEffects", "hideOrUnhideAllChildren", "parentFiber", "hideOrUnhideAllChildrenOnFiber", "display", "hideOrUnhideNearestPortals", "instance$jscomp$1", "hideOrUnhideDehydratedBoundary", "isHidden$jscomp$0", "detachFiberAfterEffects", "hostParent", "hostParentIsContainer", "recursivelyTraverseDeletionEffects", "commitDeletionEffectsOnFiber", "deletedFiber", "prevHostParent", "prevHostParentIsContainer", "releaseSingletonInstance", "clearHydrationBoundary", "retryIfBlockedOn", "getRetryCache", "retryCache", "attachSuspenseRetryListeners", "wakeables", "wakeable", "retry", "resolveRetryWakeable", "recursivelyTraverseMutationEffects", "root$jscomp$0", "commitMutationEffectsOnFiber", "currentHoistableRoot", "ii", "_eventPayloads$ii2", "commitReconciliationEffects", "getHydratableHoistableCache", "mountHoistable", "acquireResource", "tagCaches", "getHoistableRoot", "recursivelyResetForms", "globalMostRecentFallbackTime", "prevOffscreenSubtreeIsHidden", "prevOffscreenSubtreeWasHidden", "prevOffscreenDirectParentIsHidden$166", "recursivelyTraverseDisappearLayoutEffects", "hostParentFiber", "parent$jscomp$0", "parent$149", "before$150", "parent$151", "before$152", "recursivelyTraverseAfterMutationEffects", "commitAfterMutationEffectsOnFiber", "layoutEffectTraversalFlags$jscomp$0", "layoutEffectTraversalFlags", "finishedRoot$jscomp$0", "includeWorkInProgressEffects", "hiddenCallbacks", "commitOffscreenPassiveMountEffects", "previousCache", "commitCachePassiveMountEffect", "recursivelyTraversePassiveMountEffects", "committedTransitions", "commitPassiveMountOnFiber", "_finishedWork$memoize2", "id", "onPostCommit", "recursivelyTraverseAtomicPassiveEffects", "recursivelyTraverseReconnectPassiveEffects", "committedLanes$jscomp$0", "committedTransitions$jscomp$0", "suspenseyCommitFlag", "recursivelyAccumulateSuspenseyCommit", "suspendedState", "accumulateSuspenseyCommitOnFiber", "suspendResource", "suspendInstance", "previousHoistableRoot", "detachAlternateSiblings", "previousFiber", "recursivelyTraversePassiveUnmountEffects", "commitPassiveUnmountEffectsInsideOfDeletedTree_begin", "commitPassiveUnmountOnFiber", "recursivelyTraverseDisconnectPassiveEffects", "deletedSubtreeRoot", "sibling", "DefaultAsyncDispatcher", "resourceType", "cacheForType", "PossiblyWeakMap", "workInProgressSuspendedReason", "workInProgressThrownValue", "workInProgressRootDidSkipSuspendedSiblings", "workInProgressRootIsPrerendering", "workInProgressRootDidAttachPingListener", "workInProgressRootInterleavedUpdatedLanes", "workInProgressRootPingedLanes", "workInProgressRootDidIncludeRecursiveRenderUpdate", "workInProgressTransitions", "pendingEffectsStatus", "pendingFinishedWork", "pendingEffectsLanes", "pendingEffectsRemainingLanes", "pendingPassiveTransitions", "pendingRecoverableErrors", "pendingViewTransition", "pendingViewTransitionEvents", "prepareFreshStack", "markRootSuspended", "ensureRootIsScheduled", "performWorkOnRoot", "forceSync", "shouldTimeSlice", "exitStatus", "renderRootConcurrent", "renderRootSync", "renderWasConcurrent", "isRenderConsistentWithExternalStores", "wasRootDehydrated", "scheduleTimeout", "completeRootWhenReady", "recoverableErrors", "transitions", "didIncludeRenderPhaseUpdate", "didSkipSuspendedSiblings", "suspendedCommitReason", "completedRenderStartTime", "completedRenderEndTime", "onUnsuspend", "waitForCommitToBeReady", "completeRoot", "check", "didAttemptEntireTree", "index$6", "flushSyncWorkAcrossRoots_impl", "resetWorkInProgressStack", "timeoutHandle", "cancelTimeout", "handleThrow", "thrownValue", "pushDispatcher", "prevDispatcher", "pushAsyncDispatcher", "prevAsyncDispatcher", "shouldYieldForPrerendering", "prevExecutionContext", "unitOfWork", "reason", "throwAndUnwindWorkLoop", "workLoopSync", "thrownValue$184", "performUnitOfWork", "replaySuspendedUnitOfWork", "hostFiber", "completeUnitOfWork", "workLoopConcurrentByScheduler", "thrownValue$186", "suspendedReason", "unwindUnitOfWork", "skipSiblings", "flushPendingEffects", "commitRoot", "scheduleCallback$1", "flushPassiveEffects", "startViewTransition", "flushMutationEffects", "flushLayoutEffects", "flushAfterMutationEffects", "flushSpawnedWork", "reportViewTransitionError", "onRecoverableError", "rootMutationHasEffect", "curFocusedElem", "priorFocusedElem", "priorSelectionRange", "win", "start$jscomp$0", "end$jscomp$0", "startMarker", "endMarker", "range", "rootHasLayoutEffect", "committedViewTransition", "passiveSubtreeMask", "releaseRootPooledCache", "recoverableError", "renderPriority", "captureCommitPhaseErrorOnRoot", "rootFiber", "pingCache", "threadIDs", "pingSuspendedRoot", "retryTimedOutBoundary", "boundaryFiber", "retryLane", "priorityLevel", "lastScheduledRoot", "didScheduleMicrotask", "mightHavePendingSyncWork", "isFlushingWork", "currentEventTransitionLane", "scheduleImmediateRootScheduleTask", "syncTransitionLanes", "onlyLegacy", "didPerformSomeWork", "root$190", "performSyncWorkOnRoot", "processRootScheduleInImmediateTask", "processRootScheduleInMicrotask", "shouldAttemptEagerTransition", "scheduleTaskForRootDuringMicrotask", "index$5", "expirationTime", "performWorkOnRootViaSchedulerTask", "didTimeout", "originalCallbackNode", "workInProgressRootRenderLanes$jscomp$0", "scheduleMicrotask", "actionScopeLane", "coerceFormActionProp", "actionProp", "extractEvents$1", "maybeTargetInst", "submitter", "i$jscomp$inline_1667", "eventName$jscomp$inline_1668", "domEventName$jscomp$inline_1669", "capitalizedEvent$jscomp$inline_1670", "nonDelegatedEvents", "eventSystemFlags", "_dispatchQueue$i", "previousInstance", "i$jscomp$0", "_dispatchListeners$i", "currentTarget", "targetElement", "listenerSetKey", "addTrappedEventListener", "listenToNativeEvent", "isCapturePhaseListener", "listeningMarker", "rootContainerElement", "targetContainer", "listenerWrapper", "dispatchDiscreteEvent", "dispatchContinuousEvent", "dispatchEvent", "dispatchEventForPluginEventSystem", "targetInst$jscomp$0", "ancestorInst", "nodeTag", "container", "grandTag", "SyntheticEventCtor", "inCapturePhase", "accumulateTargetOnly", "reactEventName", "lastHostComponent", "_instance", "createDispatchListener", "accumulateEnterLeaveListenersForEvent", "getTargetInstFunc", "handleEventFunc", "fallbackData", "eventType", "targetFiber", "captureName", "_instance2", "common", "_instance3", "NORMALIZE_NEWLINES_REGEX", "NORMALIZE_NULL_AND_REPLACEMENT_REGEX", "normalizeMarkupForTextOrAttribute", "markup", "serverText", "clientText", "setProp", "setPropOnCustomElement", "hasSrc", "hasSrcSet", "propKey", "propValue$204", "emptyProps", "lastProps", "lastProp", "propKey$221", "propKey$237", "propKey$242", "propKey$247", "propKey$252", "isLikelyStaticResource", "initiatorType", "estimateBandwidth", "count", "bits", "resourceEntries", "entry", "transferSize", "duration", "overlapEntry", "overlapStartTime", "overlapTransferSize", "overlapInitiatorType", "namespaceURI", "parentNamespace", "rootContainerInstance", "internalInstanceHandle", "currentPopstateTransitionEvent", "localPromise", "localRequestAnimationFrame", "handleErrorInNextTick", "parentInstance", "hydrationInstance", "depth", "clearSingletonPreambleContribution", "node$jscomp$0", "nextNode$jscomp$0", "rect", "viewTransitionName", "createMeasurement", "computedStyle", "measuredRect", "forceLayout", "waitForImageToLoad", "rootContainer", "mutationCallback", "layoutCallback", "afterMutationCallback", "spawnedWorkCallback", "passiveCallback", "errorCallback", "ownerWindow", "pendingNavigation", "previousFontLoadingStatus", "blockingPromises", "suspenseyImages", "imgBytes", "suspenseyImage", "estimateImageBytes", "estimatedBytesWithinLimit", "viewTransitionAnimations", "animations", "animation", "effect", "pseudoElement", "height", "unchangedDimensions", "j", "keyframe", "w", "ViewTransitionPseudoElement", "pseudo", "keyframes", "scope", "selector", "fragmentFiber", "optionsOrUseCapture", "cleanup", "indexOfEventListener", "attachedListener", "getAttachOptions", "addEventListenerToChild", "_listeners$index", "removeEventListenerFromChild", "opts", "normalizeListenerOptions", "eventListeners", "item", "temp", "_eventListeners$i", "focusOptions", "setFocusOnFiberIfFocusable", "setFocusIfFocusable", "collectChildren", "collection", "blurActiveElementWithinFragment", "observer", "observeChild", "observers", "unobserveChild", "pendingIntersectionUnobserves", "intersectionUnobserveScheduled", "schedulePendingIntersectionUnobserve", "requestPostPaintCallback", "rects", "collectClientRects", "getRootNodeOptions", "parentHostInstance", "parentHostInstanceFromDOM", "firstResult", "lastResult", "otherNodeIsWithinFirstOrLastChild", "validateDocumentPositionWithFiberTree", "documentPosition", "precedingBoundaryFiber", "followingBoundaryFiber", "otherFiber", "scrollTextNodeIntoView", "textNode", "resolvedAlignToTop", "alignToTop", "hostSiblings", "addFragmentHandleToInstance", "childInstance", "_eventListeners$i3", "writeIdx", "_eventListeners$i4", "anyProps", "nodeType", "data", "targetInstance", "handleFocus", "didFocus", "time", "preloadPropsMap", "preconnectsSet", "rootNode", "previousDispatcher", "flushSyncWork", "requestFormReset", "prefetchDNS", "preconnect", "preload", "preloadModule", "preinitScript", "preinitStyle", "preinitModuleScript", "previousWasRendering", "wasRendering", "form", "formInst", "globalDocument", "preconnectAs", "rel", "href", "crossOrigin", "limitedEscapedHref", "as", "preloadSelector", "getStyleKey", "getScriptKey", "getStylesheetSelectorFromKey", "getScriptSelectorFromKey", "precedence", "adoptPreloadPropsForStylesheet", "link", "reject", "insertStylesheet", "src", "scripts", "adoptPreloadPropsForScript", "currentProps", "currentResource", "styles$268", "resource$269", "preloadStylesheet", "stylesheetPropsFromRawProps", "rawProps", "preloadProps", "hoistableRoot", "styleProps", "instance$274", "linkInstance", "nodes", "prior", "stylesheetProps", "scriptProps", "keyAttribute", "caches", "nodeKey", "hostContext", "onUnsuspendImg", "timeoutOffset", "insertSuspendedStylesheets", "commit", "stylesheetTimer", "unsuspend", "imgTimer", "checkIfFullyUnsuspended", "precedencesByRoot", "insertStylesheetIntoRoot", "precedences", "FiberRootNode", "hydrate", "onDefaultTransitionIndicator", "formState", "createFiberRoot", "initialChildren", "hydrationCallbacks", "isStrictMode", "getContextForSubtree", "parentComponent", "updateContainerImpl", "markRetryLaneImpl", "markRetryLaneIfNotHydrated", "attemptContinuousHydration", "attemptHydrationAtCurrentPriority", "blockedOn", "findInstanceBlockingEvent", "return_targetInst", "clearIfContinuousEvent", "queueIfContinuousEvent", "discreteReplayableEvents", "findInstanceBlockingTarget", "nearestMounted", "hasScheduledReplayAttempt", "queuedFocus", "queuedDrag", "queuedMouse", "queuedPointers", "queuedPointerCaptures", "queuedExplicitHydrationTargets", "accumulateOrCreateContinuousQueuedReplayableEvent", "existingQueuedEvent", "pointerId", "attemptExplicitHydrationTarget", "queuedTarget", "attemptReplayContinuousQueuedEvent", "queuedEvent", "targetContainers", "nextBlockedOn", "nativeEventClone", "attemptReplayContinuousQueuedEventInMap", "map", "replayUnblockedEvents", "scheduleCallbackIfUnblocked", "unblocked", "lastScheduledReplayQueue", "scheduleReplayQueueIfNeeded", "formReplayingQueue", "submitterOrAction", "unblock", "formProps", "defaultOnDefaultTransitionIndicator", "handleNavigate", "pendingResolve", "handleNavigateComplete", "isCancelled", "startFakeNavigation", "currentEntry", "ReactDOMRoot", "internalRoot", "ReactDOMHydrationRoot", "isomorphicReactPackageVersion$jscomp$inline_2043", "componentOrElement", "internals$jscomp$inline_2586", "hook$jscomp$inline_2587", "require_client", "__commonJSMin", "exports", "module", "checkDCE", "err", "require_use_sync_external_store_with_selector_production", "__commonJSMin", "exports", "React", "is", "x", "y", "objectIs", "useSyncExternalStore", "useRef", "useEffect", "useMemo", "useDebugValue", "subscribe", "getSnapshot", "getServerSnapshot", "selector", "isEqual", "instRef", "inst", "memoizedSelector", "nextSnapshot", "hasMemo", "memoizedSnapshot", "currentSelection", "memoizedSelection", "nextSelection", "maybeGetServerSnapshot", "value", "require_with_selector", "__commonJSMin", "exports", "module", "require_react_jsx_runtime_production", "__commonJSMin", "exports", "REACT_ELEMENT_TYPE", "REACT_FRAGMENT_TYPE", "jsxProd", "type", "config", "maybeKey", "key", "propName", "require_jsx_runtime", "__commonJSMin", "exports", "module", "require_ReactPropTypesSecret", "__commonJSMin", "exports", "module", "ReactPropTypesSecret", "require_factoryWithThrowingShims", "__commonJSMin", "exports", "module", "ReactPropTypesSecret", "emptyFunction", "emptyFunctionWithReset", "shim", "props", "propName", "componentName", "location", "propFullName", "secret", "err", "getShim", "ReactPropTypes", "require_prop_types", "__commonJSMin", "exports", "module", "ReactIs", "throwOnDirectAccess", "require_lib", "__commonJSMin", "exports", "module", "_interopDefault", "ex", "React", "React__default", "_defineProperty", "obj", "key", "value", "_inheritsLoose", "subClass", "superClass", "canUseDOM", "withSideEffect", "reducePropsToState", "handleStateChangeOnClient", "mapStateOnServer", "getDisplayName", "WrappedComponent", "mountedInstances", "state", "emitChange", "instance", "SideEffect", "_PureComponent", "recordedState", "_proto", "index", "require_react_fast_compare", "__commonJSMin", "exports", "module", "hasElementType", "hasMap", "hasSet", "hasArrayBuffer", "equal", "a", "b", "length", "i", "keys", "it", "error", "require_object_assign", "__commonJSMin", "exports", "module", "getOwnPropertySymbols", "hasOwnProperty", "propIsEnumerable", "toObject", "val", "shouldUseNative", "test1", "test2", "i", "order2", "n", "test3", "letter", "target", "source", "from", "to", "symbols", "s", "key", "require_lodash", "__commonJSMin", "exports", "module", "undefined", "VERSION", "LARGE_ARRAY_SIZE", "CORE_ERROR_TEXT", "FUNC_ERROR_TEXT", "INVALID_TEMPL_VAR_ERROR_TEXT", "INVALID_TEMPL_IMPORTS_ERROR_TEXT", "HASH_UNDEFINED", "MAX_MEMOIZE_SIZE", "PLACEHOLDER", "CLONE_DEEP_FLAG", "CLONE_FLAT_FLAG", "CLONE_SYMBOLS_FLAG", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "WRAP_BIND_FLAG", "WRAP_BIND_KEY_FLAG", "WRAP_CURRY_BOUND_FLAG", "WRAP_CURRY_FLAG", "WRAP_CURRY_RIGHT_FLAG", "WRAP_PARTIAL_FLAG", "WRAP_PARTIAL_RIGHT_FLAG", "WRAP_ARY_FLAG", "WRAP_REARG_FLAG", "WRAP_FLIP_FLAG", "DEFAULT_TRUNC_LENGTH", "DEFAULT_TRUNC_OMISSION", "HOT_COUNT", "HOT_SPAN", "LAZY_FILTER_FLAG", "LAZY_MAP_FLAG", "LAZY_WHILE_FLAG", "INFINITY", "MAX_SAFE_INTEGER", "MAX_INTEGER", "NAN", "MAX_ARRAY_LENGTH", "MAX_ARRAY_INDEX", "HALF_MAX_ARRAY_LENGTH", "wrapFlags", "argsTag", "arrayTag", "asyncTag", "boolTag", "dateTag", "domExcTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "nullTag", "objectTag", "promiseTag", "proxyTag", "regexpTag", "setTag", "stringTag", "symbolTag", "undefinedTag", "weakMapTag", "weakSetTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "reEmptyStringLeading", "reEmptyStringMiddle", "reEmptyStringTrailing", "reEscapedHtml", "reUnescapedHtml", "reHasEscapedHtml", "reHasUnescapedHtml", "reEscape", "reEvaluate", "reInterpolate", "reIsDeepProp", "reIsPlainProp", "rePropName", "reRegExpChar", "reHasRegExpChar", "reTrimStart", "reWhitespace", "reWrapComment", "reWrapDetails", "reSplitDetails", "reAsciiWord", "reForbiddenIdentifierChars", "reEscapeChar", "reEsTemplate", "reFlags", "reIsBadHex", "reIsBinary", "reIsHostCtor", "reIsOctal", "reIsUint", "reLatin", "reNoMatch", "reUnescapedString", "rsAstralRange", "rsComboMarksRange", "reComboHalfMarksRange", "rsComboSymbolsRange", "rsComboRange", "rsDingbatRange", "rsLowerRange", "rsMathOpRange", "rsNonCharRange", "rsPunctuationRange", "rsSpaceRange", "rsUpperRange", "rsVarRange", "rsBreakRange", "rsApos", "rsAstral", "rsBreak", "rsCombo", "rsDigits", "rsDingbat", "rsLower", "rsMisc", "rsFitz", "rsModifier", "rsNonAstral", "rsRegional", "rsSurrPair", "rsUpper", "rsZWJ", "rsMiscLower", "rsMiscUpper", "rsOptContrLower", "rsOptContrUpper", "reOptMod", "rsOptVar", "rsOptJoin", "rsOrdLower", "rsOrdUpper", "rsSeq", "rsEmoji", "rsSymbol", "reApos", "reComboMark", "reUnicode", "reUnicodeWord", "reHasUnicode", "reHasUnicodeWord", "contextProps", "templateCounter", "typedArrayTags", "cloneableTags", "deburredLetters", "htmlEscapes", "htmlUnescapes", "stringEscapes", "freeParseFloat", "freeParseInt", "freeGlobal", "freeSelf", "root", "freeExports", "freeModule", "moduleExports", "freeProcess", "nodeUtil", "types", "nodeIsArrayBuffer", "nodeIsDate", "nodeIsMap", "nodeIsRegExp", "nodeIsSet", "nodeIsTypedArray", "apply", "func", "thisArg", "args", "arrayAggregator", "array", "setter", "iteratee", "accumulator", "index", "length", "value", "arrayEach", "arrayEachRight", "arrayEvery", "predicate", "arrayFilter", "resIndex", "result", "arrayIncludes", "baseIndexOf", "arrayIncludesWith", "comparator", "arrayMap", "arrayPush", "values", "offset", "arrayReduce", "initAccum", "arrayReduceRight", "arraySome", "asciiSize", "baseProperty", "asciiToArray", "string", "asciiWords", "baseFindKey", "collection", "eachFunc", "key", "baseFindIndex", "fromIndex", "fromRight", "strictIndexOf", "baseIsNaN", "baseIndexOfWith", "baseMean", "baseSum", "object", "basePropertyOf", "baseReduce", "baseSortBy", "comparer", "current", "baseTimes", "n", "baseToPairs", "props", "baseTrim", "trimmedEndIndex", "baseUnary", "baseValues", "cacheHas", "cache", "charsStartIndex", "strSymbols", "chrSymbols", "charsEndIndex", "countHolders", "placeholder", "deburrLetter", "escapeHtmlChar", "escapeStringChar", "chr", "getValue", "hasUnicode", "hasUnicodeWord", "iteratorToArray", "iterator", "data", "mapToArray", "map", "overArg", "transform", "arg", "replaceHolders", "setToArray", "set", "setToPairs", "strictLastIndexOf", "stringSize", "unicodeSize", "stringToArray", "unicodeToArray", "unescapeHtmlChar", "unicodeWords", "runInContext", "context", "_", "Array", "Date", "Error", "Function", "Math", "Object", "RegExp", "String", "TypeError", "arrayProto", "funcProto", "objectProto", "coreJsData", "funcToString", "hasOwnProperty", "idCounter", "maskSrcKey", "uid", "nativeObjectToString", "objectCtorString", "oldDash", "reIsNative", "Buffer", "Symbol", "Uint8Array", "allocUnsafe", "getPrototype", "objectCreate", "propertyIsEnumerable", "splice", "spreadableSymbol", "symIterator", "symToStringTag", "defineProperty", "getNative", "ctxClearTimeout", "ctxNow", "ctxSetTimeout", "nativeCeil", "nativeFloor", "nativeGetSymbols", "nativeIsBuffer", "nativeIsFinite", "nativeJoin", "nativeKeys", "nativeMax", "nativeMin", "nativeNow", "nativeParseInt", "nativeRandom", "nativeReverse", "DataView", "Map", "Promise", "Set", "WeakMap", "nativeCreate", "metaMap", "realNames", "dataViewCtorString", "toSource", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "symbolProto", "symbolValueOf", "symbolToString", "lodash", "isObjectLike", "isArray", "LazyWrapper", "LodashWrapper", "wrapperClone", "baseCreate", "proto", "isObject", "baseLodash", "chainAll", "lazyClone", "copyArray", "lazyReverse", "lazyValue", "dir", "isArr", "isRight", "arrLength", "view", "getView", "start", "end", "iteratees", "iterLength", "takeCount", "baseWrapperValue", "outer", "iterIndex", "type", "computed", "Hash", "entries", "entry", "hashClear", "hashDelete", "hashGet", "hashHas", "hashSet", "ListCache", "listCacheClear", "listCacheDelete", "assocIndexOf", "lastIndex", "listCacheGet", "listCacheHas", "listCacheSet", "MapCache", "mapCacheClear", "mapCacheDelete", "getMapData", "mapCacheGet", "mapCacheHas", "mapCacheSet", "size", "SetCache", "setCacheAdd", "setCacheHas", "Stack", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "pairs", "arrayLikeKeys", "inherited", "isArg", "isArguments", "isBuff", "isBuffer", "isType", "isTypedArray", "skipIndexes", "isIndex", "arraySample", "baseRandom", "arraySampleSize", "shuffleSelf", "baseClamp", "arrayShuffle", "assignMergeValue", "eq", "baseAssignValue", "assignValue", "objValue", "baseAggregator", "baseEach", "baseAssign", "source", "copyObject", "keys", "baseAssignIn", "keysIn", "baseAt", "paths", "skip", "get", "number", "lower", "upper", "baseClone", "bitmask", "customizer", "stack", "isDeep", "isFlat", "isFull", "initCloneArray", "tag", "getTag", "isFunc", "cloneBuffer", "initCloneObject", "copySymbolsIn", "copySymbols", "initCloneByTag", "stacked", "isSet", "subValue", "isMap", "keysFunc", "getAllKeysIn", "getAllKeys", "baseConforms", "baseConformsTo", "baseDelay", "wait", "setTimeout", "baseDifference", "includes", "isCommon", "valuesLength", "valuesIndex", "createBaseEach", "baseForOwn", "baseEachRight", "baseForOwnRight", "baseEvery", "baseExtremum", "isSymbol", "baseFill", "toInteger", "toLength", "baseFilter", "baseFlatten", "depth", "isStrict", "isFlattenable", "baseFor", "createBaseFor", "baseForRight", "baseFunctions", "isFunction", "baseGet", "path", "castPath", "toKey", "baseGetAllKeys", "symbolsFunc", "baseGetTag", "getRawTag", "objectToString", "baseGt", "other", "baseHas", "baseHasIn", "baseInRange", "baseIntersection", "arrays", "othLength", "othIndex", "caches", "maxLength", "seen", "baseInverter", "baseInvoke", "parent", "last", "baseIsArguments", "baseIsArrayBuffer", "baseIsDate", "baseIsEqual", "baseIsEqualDeep", "equalFunc", "objIsArr", "othIsArr", "objTag", "othTag", "objIsObj", "othIsObj", "isSameTag", "equalArrays", "equalByTag", "objIsWrapped", "othIsWrapped", "objUnwrapped", "othUnwrapped", "equalObjects", "baseIsMap", "baseIsMatch", "matchData", "noCustomizer", "srcValue", "baseIsNative", "isMasked", "pattern", "baseIsRegExp", "baseIsSet", "baseIsTypedArray", "isLength", "baseIteratee", "identity", "baseMatchesProperty", "baseMatches", "property", "baseKeys", "isPrototype", "baseKeysIn", "nativeKeysIn", "isProto", "baseLt", "baseMap", "isArrayLike", "getMatchData", "matchesStrictComparable", "isKey", "isStrictComparable", "hasIn", "baseMerge", "srcIndex", "baseMergeDeep", "newValue", "safeGet", "mergeFunc", "isTyped", "isArrayLikeObject", "cloneTypedArray", "isPlainObject", "toPlainObject", "baseNth", "baseOrderBy", "orders", "getIteratee", "criteria", "compareMultiple", "basePick", "basePickBy", "baseSet", "basePropertyDeep", "basePullAll", "indexOf", "basePullAt", "indexes", "previous", "baseUnset", "baseRange", "step", "baseRepeat", "baseRest", "setToString", "overRest", "baseSample", "baseSampleSize", "nested", "baseSetData", "baseSetToString", "constant", "baseShuffle", "baseSlice", "baseSome", "baseSortedIndex", "retHighest", "low", "high", "mid", "baseSortedIndexBy", "valIsNaN", "valIsNull", "valIsSymbol", "valIsUndefined", "othIsDefined", "othIsNull", "othIsReflexive", "othIsSymbol", "setLow", "baseSortedUniq", "baseToNumber", "baseToString", "baseUniq", "createSet", "seenIndex", "obj", "baseUpdate", "updater", "baseWhile", "isDrop", "actions", "action", "baseXor", "baseZipObject", "assignFunc", "valsLength", "castArrayLikeObject", "castFunction", "stringToPath", "toString", "castRest", "castSlice", "clearTimeout", "id", "buffer", "cloneArrayBuffer", "arrayBuffer", "cloneDataView", "dataView", "cloneRegExp", "regexp", "cloneSymbol", "symbol", "typedArray", "compareAscending", "valIsDefined", "valIsReflexive", "objCriteria", "othCriteria", "ordersLength", "order", "composeArgs", "partials", "holders", "isCurried", "argsIndex", "argsLength", "holdersLength", "leftIndex", "leftLength", "rangeLength", "isUncurried", "composeArgsRight", "holdersIndex", "rightIndex", "rightLength", "isNew", "getSymbols", "getSymbolsIn", "createAggregator", "initializer", "createAssigner", "assigner", "sources", "guard", "isIterateeCall", "iterable", "createBind", "isBind", "Ctor", "createCtor", "wrapper", "fn", "createCaseFirst", "methodName", "trailing", "createCompounder", "callback", "words", "deburr", "thisBinding", "createCurry", "arity", "getHolder", "createRecurry", "createHybrid", "createFind", "findIndexFunc", "createFlow", "flatRest", "funcs", "prereq", "getFuncName", "funcName", "getData", "isLaziable", "partialsRight", "holdersRight", "argPos", "ary", "isAry", "isBindKey", "isFlip", "holdersCount", "newHolders", "reorder", "createInverter", "toIteratee", "createMathOperation", "operator", "defaultValue", "createOver", "arrayFunc", "createPadding", "chars", "charsLength", "createPartial", "createRange", "toFinite", "createRelationalOperation", "toNumber", "wrapFunc", "isCurry", "newHoldersRight", "newPartials", "newPartialsRight", "newData", "setData", "setWrapToString", "createRound", "precision", "pair", "noop", "createToPairs", "createWrap", "mergeData", "customDefaultsAssignIn", "customDefaultsMerge", "customOmitClone", "isPartial", "arrStacked", "othStacked", "arrValue", "othValue", "compared", "convert", "objProps", "objLength", "othProps", "objStacked", "skipCtor", "objCtor", "othCtor", "flatten", "otherFunc", "isKeyable", "isOwn", "unmasked", "stubArray", "ctorString", "transforms", "getWrapDetails", "match", "hasPath", "hasFunc", "insertWrapDetails", "details", "isMaskable", "stubFalse", "memoizeCapped", "memoize", "srcBitmask", "newBitmask", "isCombo", "otherArgs", "oldArray", "shortOut", "reference", "updateWrapDetails", "count", "lastCalled", "stamp", "remaining", "rand", "quote", "subString", "chunk", "compact", "concat", "difference", "differenceBy", "differenceWith", "drop", "dropRight", "dropRightWhile", "dropWhile", "fill", "findIndex", "findLastIndex", "flattenDeep", "flattenDepth", "fromPairs", "head", "initial", "intersection", "mapped", "intersectionBy", "intersectionWith", "join", "separator", "lastIndexOf", "nth", "pull", "pullAll", "pullAllBy", "pullAllWith", "pullAt", "remove", "reverse", "slice", "sortedIndex", "sortedIndexBy", "sortedIndexOf", "sortedLastIndex", "sortedLastIndexBy", "sortedLastIndexOf", "sortedUniq", "sortedUniqBy", "tail", "take", "takeRight", "takeRightWhile", "takeWhile", "union", "unionBy", "unionWith", "uniq", "uniqBy", "uniqWith", "unzip", "group", "unzipWith", "without", "xor", "xorBy", "xorWith", "zip", "zipObject", "zipObjectDeep", "zipWith", "chain", "tap", "interceptor", "thru", "wrapperAt", "wrapperChain", "wrapperCommit", "wrapperNext", "toArray", "done", "wrapperToIterator", "wrapperPlant", "clone", "wrapperReverse", "wrapped", "wrapperValue", "countBy", "every", "filter", "find", "findLast", "flatMap", "flatMapDeep", "flatMapDepth", "forEach", "forEachRight", "groupBy", "isString", "invokeMap", "keyBy", "orderBy", "partition", "reduce", "reduceRight", "reject", "negate", "sample", "sampleSize", "shuffle", "some", "sortBy", "now", "after", "before", "bind", "bindKey", "curry", "curryRight", "debounce", "options", "lastArgs", "lastThis", "maxWait", "timerId", "lastCallTime", "lastInvokeTime", "leading", "maxing", "invokeFunc", "time", "leadingEdge", "timerExpired", "remainingWait", "timeSinceLastCall", "timeSinceLastInvoke", "timeWaiting", "shouldInvoke", "trailingEdge", "cancel", "flush", "debounced", "isInvoking", "defer", "delay", "flip", "resolver", "memoized", "once", "overArgs", "funcsLength", "partial", "partialRight", "rearg", "rest", "spread", "throttle", "unary", "wrap", "castArray", "cloneWith", "cloneDeep", "cloneDeepWith", "conformsTo", "gt", "gte", "isArrayBuffer", "isBoolean", "isDate", "isElement", "isEmpty", "isEqual", "isEqualWith", "isError", "isFinite", "isInteger", "isMatch", "isMatchWith", "isNaN", "isNumber", "isNative", "isNull", "isNil", "isRegExp", "isSafeInteger", "isUndefined", "isWeakMap", "isWeakSet", "lt", "lte", "sign", "remainder", "isBinary", "toSafeInteger", "assign", "assignIn", "assignInWith", "assignWith", "at", "create", "prototype", "properties", "defaults", "propsIndex", "propsLength", "defaultsDeep", "mergeWith", "findKey", "findLastKey", "forIn", "forInRight", "forOwn", "forOwnRight", "functions", "functionsIn", "has", "invert", "invertBy", "invoke", "mapKeys", "mapValues", "merge", "omit", "omitBy", "pickBy", "pick", "prop", "setWith", "toPairs", "toPairsIn", "isArrLike", "unset", "update", "updateWith", "valuesIn", "clamp", "inRange", "random", "floating", "temp", "camelCase", "word", "capitalize", "upperFirst", "endsWith", "target", "position", "escape", "escapeRegExp", "kebabCase", "lowerCase", "lowerFirst", "pad", "strLength", "padEnd", "padStart", "parseInt", "radix", "repeat", "replace", "snakeCase", "split", "limit", "startCase", "startsWith", "template", "settings", "imports", "importsKeys", "importsValues", "isEscaping", "isEvaluating", "interpolate", "reDelimiters", "sourceURL", "escapeValue", "interpolateValue", "esTemplateValue", "evaluateValue", "variable", "attempt", "toLower", "toUpper", "trim", "trimEnd", "trimStart", "truncate", "omission", "substring", "newEnd", "unescape", "upperCase", "e", "bindAll", "methodNames", "cond", "conforms", "defaultTo", "flow", "flowRight", "matches", "matchesProperty", "method", "methodOf", "mixin", "noConflict", "nthArg", "over", "overEvery", "overSome", "propertyOf", "range", "rangeRight", "stubObject", "stubString", "stubTrue", "times", "toPath", "uniqueId", "prefix", "add", "augend", "addend", "ceil", "divide", "dividend", "divisor", "floor", "max", "maxBy", "mean", "meanBy", "min", "minBy", "multiply", "multiplier", "multiplicand", "round", "subtract", "minuend", "subtrahend", "sum", "sumBy", "isFilter", "takeName", "dropName", "checkIteratee", "isTaker", "lodashFunc", "retUnwrapped", "isLazy", "useLazy", "isHybrid", "isUnwrapped", "onlyLazy", "chainName", "import_react", "import_client", "React", "React2", "React3", "React4", "React9", "React8", "React7", "React6", "React5", "React10", "React11", "ABSOLUTE_URL_REGEX", "PROTOCOL_RELATIVE_URL_REGEX", "normalizeProtocolRelativeUrl", "url", "protocol", "PopStateEventType", "isLocation", "obj", "createBrowserHistory", "options", "createBrowserLocation", "window2", "globalHistory", "_a", "maskedLocation", "pathname", "search", "hash", "createLocation", "createBrowserHref", "to", "createPath", "getUrlBasedHistory", "invariant", "value", "message", "warning", "cond", "createKey", "getHistoryState", "location", "index", "createLocation", "current", "to", "state", "key", "mask", "parsePath", "createPath", "pathname", "search", "hash", "path", "parsedPath", "hashIndex", "searchIndex", "getUrlBasedHistory", "getLocation", "createHref2", "validateLocation", "options", "window2", "v5Compat", "globalHistory", "action", "listener", "getIndex", "handlePop", "nextIndex", "delta", "history", "push", "isLocation", "historyState", "url", "error", "replace2", "createURL", "createBrowserURLImpl", "fn", "PopStateEventType", "n", "windowImpl", "isAbsolute", "base", "href", "PROTOCOL_RELATIVE_URL_REGEX", "_map", "_map", "matchRoutes", "routes", "locationArg", "basename", "matchRoutesImpl", "allowPartial", "precomputedBranches", "location", "parsePath", "pathname", "stripBasename", "branches", "flattenAndRankRoutes", "matches", "decoded", "decodePath", "i", "matchRouteBranch", "convertRouteMatchToUiMatch", "match", "loaderData", "route", "params", "flattenRoutes", "rankRouteBranches", "parentsMeta", "parentPath", "_hasParentOptionalSegments", "flattenRoute", "index", "hasParentOptionalSegments", "relativePath", "meta", "invariant", "path", "joinPaths", "routesMeta", "computeScore", "meta2", "matcher", "compilePath", "_a", "exploded", "explodeOptionalSegments", "segments", "first", "rest", "isOptional", "required", "restExploded", "result", "subpath", "a", "b", "compareIndexes", "paramRe", "dynamicSegmentValue", "indexRouteValue", "emptySegmentValue", "staticSegmentValue", "splatPenalty", "isSplat", "s", "initialScore", "score", "segment", "n", "branch", "matchedParams", "matchedPathname", "end", "remainingPathname", "pattern", "matchPathImpl", "matchPath", "normalizePathname", "matchPath", "pattern", "pathname", "matcher", "compiledParams", "compilePath", "matchPathImpl", "match", "matchedPathname", "pathnameBase", "removeTrailingSlash", "captureGroups", "memo2", "paramName", "isOptional", "index", "splatValue", "value", "path", "caseSensitive", "end", "warning", "params", "regexpSource", "str", "nextChar", "decodePath", "v", "error", "stripBasename", "basename", "startIndex", "resolvePath", "to", "fromPathname", "toPathname", "search", "hash", "parsePath", "pathname", "removeDoubleSlashes", "resolvePathname", "normalizeSearch", "normalizeHash", "relativePath", "segments", "removeTrailingSlash", "segment", "getInvalidPathError", "char", "field", "dest", "path", "getPathContributingMatches", "matches", "match", "index", "getResolveToMatches", "pathMatches", "idx", "resolveTo", "toArg", "routePathnames", "locationPathname", "isPathRelative", "invariant", "isEmptyPath", "from", "routePathnameIndex", "toSegments", "hasExplicitTrailingSlash", "hasCurrentTrailingSlash", "joinPaths", "paths", "minLength", "end", "normalizePathname", "ErrorResponseImpl", "status", "statusText", "data2", "internal", "isRouteErrorResponse", "error", "getRoutePattern", "matches", "parts", "m", "joinPaths", "isBrowser", "parseToInfo", "_to", "basename", "to", "ABSOLUTE_URL_REGEX", "absoluteURL", "isExternal", "currentUrl", "targetUrl", "PROTOCOL_RELATIVE_URL_REGEX", "normalizeProtocolRelativeUrl", "path", "stripBasename", "warning", "UninstrumentedSymbol", "objectProtoNames", "DEFAULT_NAVIGATION_URL", "getNavigatorCurrentUrl", "navigator", "isSameOrigin", "a", "b", "isExplicitUrl", "destination", "target", "protocol", "validateNavigationTarget", "original", "resolved", "currentUrl", "externalPolicy", "originalUrl", "resolvedUrl", "originalIsExternal", "resolvedIsExternal", "validMutationMethodsArr", "validMutationMethods", "validRequestMethodsArr", "validRequestMethods", "ResetLoaderDataSymbol", "_routes", "_branches", "_hmrRoutes", "_hmrBranches", "_routes", "_branches", "_hmrRoutes", "_hmrBranches", "invalidProtocols", "hasInvalidProtocol", "location", "DataRouterContext", "DataRouterStateContext", "RSCRouterContext", "useIsRSCRouterContext", "ViewTransitionContext", "FetchersContext", "AwaitContext", "NavigationContext", "LocationContext", "RouteContext", "RouteErrorContext", "ENABLE_DEV_WARNINGS", "ERROR_DIGEST_BASE", "ERROR_DIGEST_REDIRECT", "ERROR_DIGEST_ROUTE_ERROR_RESPONSE", "decodeRedirectErrorDigest", "digest", "parsed", "decodeRouteErrorResponseDigest", "ErrorResponseImpl", "useHref", "to", "relative", "invariant", "useInRouterContext", "basename", "navigator", "hash", "pathname", "search", "useResolvedPath", "joinedPathname", "joinPaths", "useLocation", "navigateEffectWarning", "useIsomorphicLayoutEffect", "cb", "NavigationContext", "useNavigate", "isDataRoute", "RouteContext", "useNavigateStable", "useNavigateUnstable", "invariant", "useInRouterContext", "dataRouterContext", "DataRouterContext", "basename", "navigator", "matches", "locationPathname", "useLocation", "routePathnamesJson", "getResolveToMatches", "activeRef", "to", "options", "warning", "path", "resolveTo", "joinPaths", "validateNavigationTarget", "createPath", "getNavigatorCurrentUrl", "OutletContext", "useResolvedPath", "to", "relative", "matches", "RouteContext", "locationPathname", "useLocation", "routePathnamesJson", "getResolveToMatches", "resolveTo", "useRoutes", "routes", "locationArg", "useRoutesImpl", "dataRouterOpts", "_a", "invariant", "useInRouterContext", "navigator", "NavigationContext", "parentMatches", "routeMatch", "parentParams", "parentPathname", "parentPathnameBase", "parentRoute", "ENABLE_DEV_WARNINGS", "parentPath", "warningOnce", "locationFromContext", "location", "parsedLocationArg", "parsePath", "pathname", "remainingPathname", "parentSegments", "m", "matchRoutes", "warning", "renderedMatches", "_renderMatches", "match", "joinPaths", "LocationContext", "DefaultErrorComponent", "error", "useRouteError", "message", "isRouteErrorResponse", "stack", "lightgrey", "preStyles", "codeStyles", "devInfo", "defaultErrorElement", "RenderErrorBoundary", "props", "state", "errorInfo", "decoded", "decodeRouteErrorResponseDigest", "result", "RouteErrorContext", "RSCErrorHandler", "RSCRouterContext", "errorRedirectHandledMap", "children", "basename", "redirect2", "decodeRedirectErrorDigest", "existingRedirect", "parsed", "parseToInfo", "target", "validateNavigationTarget", "getNavigatorCurrentUrl", "hasInvalidProtocol", "isBrowser", "redirectPromise", "RenderedRoute", "routeContext", "dataRouterContext", "DataRouterContext", "dataRouterState", "errors", "errorIndex", "renderFallback", "fallbackIndex", "i", "loaderData", "errors2", "needsToRunLoader", "onErrorHandler", "onError", "_b", "getRoutePattern", "outlet", "index", "shouldRenderHydrateFallback", "errorElement", "hydrateFallbackElement", "matches2", "getChildren", "getDataRouterConsoleError", "hookName", "useDataRouterContext", "ctx", "useDataRouterState", "DataRouterStateContext", "useRouteContext", "route", "useCurrentRouteId", "thisRoute", "useRouteId", "useNavigation", "historyAction", "rest", "useMatches", "matches", "loaderData", "useDataRouterState", "m", "convertRouteMatchToUiMatch", "useRouteError", "_a", "error", "RouteErrorContext", "state", "useDataRouterState", "routeId", "useCurrentRouteId", "useNavigateStable", "router", "useDataRouterContext", "id", "useCurrentRouteId", "activeRef", "useIsomorphicLayoutEffect", "to", "options", "warning", "navigateEffectWarning", "alreadyWarned", "warningOnce", "key", "cond", "message", "USE_OPTIMISTIC", "useOptimisticImpl", "React3", "MemoizedDataRoutes", "DataRoutes2", "routes", "manifest", "future", "state", "isStatic", "onError", "useRoutesImpl", "Route", "props", "invariant", "Router", "basenameProp", "children", "locationProp", "navigationType", "navigator", "staticProp", "useTransitions", "useInRouterContext", "basename", "navigationContext", "parsePath", "pathname", "search", "hash", "state", "key", "mask", "locationContext", "trailingPathname", "stripBasename", "warning", "NavigationContext", "LocationContext", "Routes", "location", "useRoutes", "createRoutesFromChildren", "createRoutesFromChildren", "children", "parentPath", "routes", "element", "index", "treePath", "invariant", "Route", "route", "defaultMethod", "defaultEncType", "isHtmlElement", "object", "isButtonElement", "isFormElement", "isInputElement", "isModifiedEvent", "event", "shouldProcessLinkClick", "target", "_formDataSupportsSubmitter", "isFormDataSubmitterSupported", "supportedFormEncTypes", "getFormEncType", "encType", "warning", "defaultEncType", "getFormSubmissionInfo", "target", "basename", "method", "action", "formData", "body", "isFormElement", "attr", "stripBasename", "defaultMethod", "isButtonElement", "isInputElement", "form", "name", "type", "value", "prefix", "isHtmlElement", "objectProtoNames2", "ESCAPE_LOOKUP", "ESCAPE_REGEX", "escapeHtml", "html", "match", "invariant2", "value", "message", "SingleFetchRedirectSymbol", "singleFetchUrl", "reqUrl", "basename", "trailingSlashAware", "extension", "url", "stripBasename", "removeTrailingSlash", "loadRouteModule", "route", "routeModulesCache", "routeModule", "error", "isPageLinkDescriptor", "object", "isHtmlLinkDescriptor", "getKeyedPrefetchLinks", "matches", "manifest", "routeModules", "links", "match", "route", "mod", "loadRouteModule", "dedupeLinkDescriptors", "link", "getNewMatchesForLinks", "page", "nextMatches", "currentMatches", "location", "mode", "isNew", "index", "matchPathChanged", "_a", "manifestRoute", "routeChoice", "getModuleLinkHrefs", "includeHydrateFallback", "dedupeHrefs", "hrefs", "sortKeys", "obj", "sorted", "keys", "key", "descriptors", "preloads", "set", "preloadsSet", "deduped", "descriptor", "useDataRouterContext2", "context", "DataRouterContext", "invariant2", "useDataRouterStateContext", "DataRouterStateContext", "FrameworkContext", "useFrameworkContext", "usePrefetchBehavior", "prefetch", "theirElementProps", "frameworkContext", "maybePrefetch", "setMaybePrefetch", "shouldPrefetch", "setShouldPrefetch", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "onTouchStart", "ref", "callback", "entries", "entry", "observer", "id", "setIntent", "cancelIntent", "composeEventHandlers", "theirHandler", "ourHandler", "event", "PrefetchPageLinks", "page", "linkProps", "rsc", "useIsRSCRouterContext", "contextNonce", "useFrameworkContext", "router", "useDataRouterContext2", "matches", "matchRoutes", "RSCPrefetchPageLinksImpl", "PrefetchPageLinksImpl", "useKeyedPrefetchLinks", "manifest", "routeModules", "keyedPrefetchLinks", "setKeyedPrefetchLinks", "interrupted", "getKeyedPrefetchLinks", "links", "nextMatches", "location", "useLocation", "future", "basename", "dataHrefs", "url", "singleFetchUrl", "hasSomeRoutesWithShouldRevalidate", "targetRoutes", "match", "href", "loaderData", "useDataRouterStateContext", "newMatchesForData", "getNewMatchesForLinks", "newMatchesForAssets", "routesParams", "foundOptOutRoute", "m", "_a", "manifestRoute", "m2", "moduleHrefs", "getModuleLinkHrefs", "key", "link", "mergeRefs", "refs", "value", "ref", "isBrowser2", "BrowserRouter", "basename", "children", "useTransitions", "window2", "historyRef", "createBrowserHistory", "history", "state", "setStateImpl", "setState", "newState", "Router", "HistoryRouter", "basename", "children", "history", "useTransitions", "state", "setStateImpl", "setState", "newState", "Router", "Link", "onClick", "discover", "prefetch", "relative", "reloadDocument", "replace2", "mask", "target", "to", "preventScrollReset", "viewTransition", "defaultShouldRevalidate", "rest", "forwardedRef", "navigator", "NavigationContext", "isAbsolute", "ABSOLUTE_URL_REGEX", "parsed", "parseToInfo", "href", "useHref", "location", "useLocation", "maskedHref", "resolved", "resolveTo", "joinPaths", "shouldPrefetch", "prefetchRef", "prefetchHandlers", "usePrefetchBehavior", "internalOnClick", "useLinkClickHandler", "handleClick", "event", "isSpaLink", "link", "mergeRefs", "PrefetchPageLinks", "NavLink", "ariaCurrentProp", "caseSensitive", "classNameProp", "end", "styleProp", "ref", "path", "useResolvedPath", "routerState", "DataRouterStateContext", "isTransitioning", "useViewTransitionState", "toPathname", "locationPathname", "nextLocationPathname", "stripBasename", "endSlashPosition", "isActive", "isPending", "renderProps", "ariaCurrent", "className", "style", "Form", "fetcherKey", "navigate", "method", "defaultMethod", "action", "onSubmit", "props", "submit", "useSubmit", "formAction", "useFormAction", "formMethod", "submitter", "submitMethod", "doSubmit", "ScrollRestoration", "getKey", "storageKey", "remixContext", "FrameworkContext", "matches", "useMatches", "useScrollRestoration", "ssrKey", "userKey", "getScrollRestorationKey", "restoreScroll", "storageKey2", "restoreKey", "key", "storedY", "error", "escapeHtml", "SCROLL_RESTORATION_STORAGE_KEY", "getDataRouterConsoleError2", "hookName", "useDataRouterContext3", "ctx", "DataRouterContext", "invariant", "useDataRouterState2", "replaceProp", "useNavigate", "shouldProcessLinkClick", "createPath", "doNavigate", "fetcherId", "getUniqueFetcherId", "useSubmit", "router", "useDataRouterContext3", "basename", "NavigationContext", "currentRouteId", "useRouteId", "routerFetch", "routerNavigate", "target", "options", "action", "method", "encType", "formData", "body", "getFormSubmissionInfo", "key", "useFormAction", "relative", "routeContext", "RouteContext", "invariant", "match", "path", "useResolvedPath", "location", "useLocation", "params", "indexValues", "v", "qs", "joinPaths", "createPath", "SCROLL_RESTORATION_STORAGE_KEY", "savedScrollPositions", "getScrollRestorationKey", "location", "matches", "basename", "getKey", "key", "stripBasename", "useScrollRestoration", "storageKey", "router", "useDataRouterContext3", "restoreScrollPosition", "preventScrollReset", "useDataRouterState2", "NavigationContext", "useLocation", "useMatches", "navigation", "useNavigation", "usePageHide", "error", "warning", "sessionPositions", "disableScrollRestoration", "location2", "matches2", "el", "usePageHide", "callback", "options", "capture", "opts", "useViewTransitionState", "to", "relative", "vtContext", "ViewTransitionContext", "invariant", "basename", "useDataRouterContext3", "path", "useResolvedPath", "currentPath", "stripBasename", "nextPath", "matchPath", "IS_REACT_19", "REACT_ELEMENT_TYPE", "REACT_PORTAL_TYPE", "REACT_FRAGMENT_TYPE", "REACT_STRICT_MODE_TYPE", "REACT_PROFILER_TYPE", "REACT_CONSUMER_TYPE", "REACT_CONTEXT_TYPE", "REACT_FORWARD_REF_TYPE", "REACT_SUSPENSE_TYPE", "REACT_SUSPENSE_LIST_TYPE", "REACT_MEMO_TYPE", "REACT_LAZY_TYPE", "ForwardRef", "REACT_FORWARD_REF_TYPE", "Memo", "REACT_MEMO_TYPE", "typeOf", "object", "$$typeof", "REACT_ELEMENT_TYPE", "REACT_FRAGMENT_TYPE", "REACT_PROFILER_TYPE", "REACT_STRICT_MODE_TYPE", "REACT_SUSPENSE_TYPE", "REACT_SUSPENSE_LIST_TYPE", "REACT_CONTEXT_TYPE", "REACT_FORWARD_REF_TYPE", "REACT_LAZY_TYPE", "REACT_MEMO_TYPE", "REACT_CONSUMER_TYPE", "REACT_PORTAL_TYPE", "isMemo", "object", "typeOf", "REACT_MEMO_TYPE", "pureFinalPropsSelectorFactory", "mapStateToProps", "mapDispatchToProps", "mergeProps", "dispatch", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "hasRunAtLeastOnce", "state", "ownProps", "stateProps", "dispatchProps", "mergedProps", "handleFirstCall", "firstState", "firstOwnProps", "handleNewPropsAndNewState", "handleNewProps", "handleNewState", "nextStateProps", "statePropsChanged", "handleSubsequentCalls", "nextState", "nextOwnProps", "propsChanged", "stateChanged", "finalPropsSelectorFactory", "initMapStateToProps", "initMapDispatchToProps", "initMergeProps", "options", "bindActionCreators", "actionCreators", "boundActionCreators", "key", "actionCreator", "args", "wrapMapToPropsConstant", "getConstant", "dispatch", "constant", "constantSelector", "getDependsOnOwnProps", "mapToProps", "wrapMapToPropsFunc", "methodName", "displayName", "proxy", "stateOrDispatch", "ownProps", "props", "createInvalidArgFactory", "arg", "name", "options", "mapDispatchToPropsFactory", "mapDispatchToProps", "bindActionCreators", "mapStateToPropsFactory", "mapStateToProps", "defaultMergeProps", "stateProps", "dispatchProps", "wrapMergePropsFunc", "mergeProps", "areMergedPropsEqual", "hasRunOnce", "mergedProps", "nextMergedProps", "mergePropsFactory", "defaultNoopBatch", "callback", "createListenerCollection", "first", "last", "listener", "listeners", "isSubscribed", "nullListeners", "createSubscription", "store", "parentSub", "unsubscribe", "subscriptionsAmount", "selfSubscribed", "addNestedSub", "trySubscribe", "cleanupListener", "removed", "tryUnsubscribe", "notifyNestedSubs", "handleChangeWrapper", "subscription", "trySubscribeSelf", "tryUnsubscribeSelf", "canUseDOM", "isDOM", "isRunningInReactNative", "isReactNative", "getUseIsomorphicLayoutEffect", "useIsomorphicLayoutEffect", "is", "x", "y", "shallowEqual", "objA", "objB", "keysA", "keysB", "REACT_STATICS", "KNOWN_STATICS", "FORWARD_REF_STATICS", "MEMO_STATICS", "TYPE_STATICS", "ForwardRef", "Memo", "getStatics", "component", "isMemo", "defineProperty", "getOwnPropertyNames", "getOwnPropertySymbols", "getOwnPropertyDescriptor", "getPrototypeOf", "objectPrototype", "hoistNonReactStatics", "targetComponent", "sourceComponent", "inheritedComponent", "keys", "targetStatics", "sourceStatics", "i", "key", "descriptor", "ContextKey", "gT", "getContext", "contextMap", "realContext", "ReactReduxContext", "NO_SUBSCRIPTION_ARRAY", "useIsomorphicLayoutEffectWithArgs", "effectFunc", "effectArgs", "dependencies", "useIsomorphicLayoutEffect", "captureWrapperProps", "lastWrapperProps", "lastChildProps", "renderIsScheduled", "wrapperProps", "childPropsFromStoreUpdate", "notifyNestedSubs", "subscribeUpdates", "shouldHandleStateChanges", "store", "subscription", "childPropsSelector", "isMounted", "additionalSubscribeListener", "displayName", "didUnsubscribe", "lastThrownError", "checkForUpdates", "latestStoreState", "newChildProps", "error", "e", "strictEqual", "a", "b", "_connect", "mapStateToProps", "mapDispatchToProps", "mergeProps", "pure", "areStatesEqual", "strictEqual", "areOwnPropsEqual", "shallowEqual", "areStatePropsEqual", "areMergedPropsEqual", "forwardRef", "context", "ReactReduxContext", "Context", "initMapStateToProps", "mapStateToPropsFactory", "initMapDispatchToProps", "mapDispatchToPropsFactory", "initMergeProps", "mergePropsFactory", "shouldHandleStateChanges", "WrappedComponent", "wrappedComponentName", "displayName", "selectorFactoryOptions", "ConnectFunction", "props", "propsContext", "reactReduxForwardedRef", "wrapperProps", "ContextToUse", "ResultContext", "contextValue", "didStoreComeFromProps", "didStoreComeFromContext", "store", "getServerState", "childPropsSelector", "defaultSelectorFactory", "subscription", "notifyNestedSubs", "NO_SUBSCRIPTION_ARRAY", "createSubscription", "overriddenContextValue", "lastChildProps", "lastWrapperProps", "childPropsFromStoreUpdate", "renderIsScheduled", "isMounted", "latestSubscriptionCallbackError", "useIsomorphicLayoutEffect", "actualChildPropsSelector", "subscribeForReact", "reactListener", "subscribeUpdates", "useIsomorphicLayoutEffectWithArgs", "captureWrapperProps", "actualChildProps", "err", "renderedWrappedComponent", "effectiveProps", "Connect", "forwarded", "ref", "hoistNonReactStatics", "connect", "Provider", "providerProps", "children", "context", "serverState", "store", "contextValue", "subscription", "createSubscription", "previousState", "useIsomorphicLayoutEffect", "ReactReduxContext", "createReduxContextHook", "useReduxContext", "createStoreHook", "useDefaultReduxContext", "useStore", "createDispatchHook", "useDefaultStore", "useDispatch", "refEquality", "a", "b", "createSelectorHook", "useSelector", "selector", "equalityFnOrOptions", "equalityFn", "reduxContext", "getServerState", "firstRun", "wrappedSelector", "state", "selectedState", "import_jsx_runtime", "GlobalStyle", "children", "import_jsx_runtime", "Theme", "children", "GlobalStyle", "Theme_default", "formatProdErrorMessage", "code", "$$observable", "symbol_observable_default", "randomString", "ActionTypes", "actionTypes_default", "isPlainObject", "obj", "proto", "createStore", "reducer", "preloadedState", "enhancer", "formatProdErrorMessage", "currentReducer", "currentState", "currentListeners", "nextListeners", "listenerIdCounter", "isDispatching", "ensureCanMutateNextListeners", "listener", "key", "getState", "subscribe", "isSubscribed", "listenerId", "dispatch", "action", "isPlainObject", "replaceReducer", "nextReducer", "actionTypes_default", "observable", "outerSubscribe", "observer", "observeState", "observerAsObserver", "symbol_observable_default", "assertReducerShape", "reducers", "key", "reducer", "actionTypes_default", "formatProdErrorMessage", "combineReducers", "reducerKeys", "finalReducers", "i", "finalReducerKeys", "unexpectedKeyCache", "shapeAssertionError", "e", "state", "action", "hasChanged", "nextState", "previousStateForKey", "nextStateForKey", "actionType", "compose", "funcs", "arg", "a", "b", "args", "applyMiddleware", "middlewares", "createStore", "reducer", "preloadedState", "store", "dispatch", "formatProdErrorMessage", "middlewareAPI", "action", "chain", "middleware", "isAction", "isPlainObject", "createThunkMiddleware", "extraArgument", "dispatch", "getState", "next", "action", "thunk", "withExtraArgument", "composeWithDevTools", "window", "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__", "arguments", "length", "compose", "apply", "__REDUX_DEVTOOLS_EXTENSION__", "hasMatchFunction", "v", "match", "createAction", "type", "prepareAction", "actionCreator", "args", "prepared", "Error", "_formatProdErrorMessage", "payload", "meta", "error", "toString", "action", "isAction", "Tuple", "Array", "constructor", "items", "Object", "setPrototypeOf", "prototype", "Symbol", "species", "arr", "concat", "apply", "prepend", "length", "isArray", "isBoolean", "x", "buildGetDefaultMiddleware", "options", "thunk", "immutableCheck", "serializableCheck", "actionCreatorCheck", "middlewareArray", "Tuple", "push", "thunkMiddleware", "withExtraArgument", "extraArgument", "SHOULD_AUTOBATCH", "createQueueWithTimer", "timeout", "notify", "setTimeout", "createRafWithFallbackTimer", "raf", "called", "rafId", "timerId", "callback", "cancelAnimationFrame", "clearTimeout", "autoBatchEnhancer", "options", "type", "next", "args", "store", "notifying", "shouldNotifyAtEndOfTick", "notificationQueued", "listeners", "Set", "queueCallback", "queueMicrotask", "window", "requestAnimationFrame", "queueNotification", "notifyListeners", "forEach", "l", "Object", "assign", "subscribe", "listener", "wrappedListener", "unsubscribe", "add", "delete", "dispatch", "action", "meta", "SHOULD_AUTOBATCH", "buildGetDefaultEnhancers", "middlewareEnhancer", "autoBatch", "enhancerArray", "Tuple", "push", "undefined", "configureStore", "getDefaultMiddleware", "buildGetDefaultMiddleware", "reducer", "middleware", "devTools", "duplicateMiddlewareCheck", "preloadedState", "enhancers", "rootReducer", "isPlainObject", "combineReducers", "Error", "_formatProdErrorMessage", "finalMiddleware", "finalCompose", "compose", "composeWithDevTools", "trace", "process", "applyMiddleware", "getDefaultEnhancers", "storeEnhancers", "composedEnhancer", "createStore", "matches", "matcher", "action", "hasMatchFunction", "match", "isAnyOf", "matchers", "some", "urlAlphabet", "nanoid", "size", "id", "i", "Math", "random", "commonProperties", "RejectWithValue", "payload", "meta", "constructor", "FulfillWithMeta", "miniSerializeError", "value", "simpleError", "property", "message", "String", "externalAbortMessage", "createAsyncThunk", "typePrefix", "payloadCreator", "options", "fulfilled", "createAction", "requestId", "arg", "requestStatus", "pending", "undefined", "rejected", "error", "serializeError", "rejectedWithValue", "aborted", "name", "condition", "actionCreator", "signal", "dispatch", "getState", "extra", "idGenerator", "abortController", "AbortController", "abortHandler", "abortReason", "abort", "reason", "addEventListener", "once", "promise", "finalAction", "conditionResult", "isThenable", "abortedPromise", "Promise", "_", "reject", "getPendingMeta", "race", "resolve", "rejectWithValue", "fulfillWithValue", "then", "result", "err", "removeEventListener", "dispatchConditionRejection", "match", "Object", "assign", "unwrap", "unwrapResult", "settled", "isAnyOf", "withTypes", "action", "asyncThunkSymbol", "Symbol", "for", "asyncThunkCreator", "_createAsyncThunk", "listener", "completed", "cancelled", "taskCancelled", "taskCompleted", "listenerCancelled", "listenerCompleted", "assign", "Object", "alm", "addListener", "assign", "createAction", "alm", "withTypes", "clearAllListeners", "removeListener", "ORIGINAL_STATE", "Symbol", "for", "formatProdErrorMessage", "code", "GITHUB_ZEITNEXT_GET", "REQUEST_QUERY", "GET_PHOTO_MENU", "GET_PHOTO_WIDTH_HEIGHT", "homeReducer", "state", "action", "type", "data", "GITHUB_ZEITNEXT_GET", "photoReducer", "state", "action", "type", "data", "menu", "GET_PHOTO_MENU", "GET_PHOTO_WIDTH_HEIGHT", "queryReducer", "state", "action", "type", "query", "REQUEST_QUERY", "reducers_default", "homeReducer", "photoReducer", "combineReducer", "combineReducers", "reducers_default", "getStore", "stateParam", "configureStore", "getDefaultMiddleware", "store_default", "import_react", "import_react", "import_jsx_runtime", "stx", "tag", "cls", "Comp", "props", "className", "children", "rest", "cn", "Container", "stx", "import_jsx_runtime", "Loading", "Loading_default", "import_jsx_runtime", "Layout", "children", "query", "mode", "pageLoad", "setPageLoad", "Container", "Loading_default", "Layout_default", "import_prop_types", "import_react_side_effect", "import_react_fast_compare", "import_react", "import_object_assign", "ATTRIBUTE_NAMES", "TAG_NAMES", "VALID_TAG_NAMES", "name", "TAG_PROPERTIES", "REACT_TAG_MAP", "HELMET_PROPS", "HTML_TAG_MAP", "obj", "key", "SELF_CLOSING_TAGS", "HELMET_ATTRIBUTE", "_typeof", "classCallCheck", "instance", "Constructor", "createClass", "defineProperties", "target", "props", "i", "descriptor", "protoProps", "staticProps", "_extends", "source", "inherits", "subClass", "superClass", "objectWithoutProperties", "keys", "possibleConstructorReturn", "self", "call", "encodeSpecialCharacters", "str", "encode", "getTitleFromPropsList", "propsList", "innermostTitle", "getInnermostProperty", "innermostTemplate", "innermostDefaultTitle", "getOnChangeClientState", "getAttributesFromPropsList", "tagType", "tagAttrs", "current", "getBaseTagFromPropsList", "primaryAttributes", "innermostBaseTag", "tag", "attributeKey", "lowerCaseAttributeKey", "getTagsFromPropsList", "tagName", "approvedSeenTags", "warn", "approvedTags", "instanceTags", "instanceSeenTags", "primaryAttributeKey", "value", "tagUnion", "objectAssign", "property", "reducePropsToState", "rafPolyfill", "clock", "callback", "currentTime", "cafPolyfill", "id", "requestAnimationFrame", "cancelAnimationFrame", "msg", "_helmetCallback", "handleClientStateChange", "newState", "commitTagChanges", "cb", "baseTag", "bodyAttributes", "htmlAttributes", "linkTags", "metaTags", "noscriptTags", "onChangeClientState", "scriptTags", "styleTags", "title", "titleAttributes", "updateAttributes", "updateTitle", "tagUpdates", "updateTags", "addedTags", "removedTags", "_tagUpdates$tagType", "newTags", "oldTags", "flattenArray", "possibleArray", "attributes", "elementTag", "helmetAttributeString", "helmetAttributes", "attributesToRemove", "attributeKeys", "attribute", "indexToSave", "_i", "type", "tags", "headElement", "tagNodes", "indexToDelete", "newElement", "existingTag", "index", "generateElementAttributesAsString", "attr", "generateTitleAsString", "attributeString", "flattenedTitle", "generateTagsAsString", "attributeHtml", "string", "tagContent", "isSelfClosing", "convertElementAttributestoReactProps", "initProps", "convertReactPropstoHtmlAttributes", "initAttributes", "generateTitleAsReactComponent", "_initProps", "React", "generateTagsAsReactComponent", "_mappedTag", "mappedTag", "mappedAttribute", "content", "getMethodsForTag", "mapStateOnServer", "_ref", "_ref$title", "Helmet", "Component", "_class", "_temp", "_React$Component", "HelmetWrapper", "nextProps", "isEqual", "child", "nestedChildren", "_babelHelpers$extends", "arrayTypeChildren", "newChildProps", "_ref2", "_babelHelpers$extends2", "_babelHelpers$extends3", "newProps", "newFlattenedProps", "arrayChildName", "_babelHelpers$extends4", "children", "_this2", "_child$props", "childProps", "_props", "canUseDOM", "PropTypes", "mappedState", "NullComponent", "HelmetSideEffects", "withSideEffect", "HelmetExport", "import_react", "usePreserveSSR", "url", "appendSSRParam", "value", "removeSSRParam", "getLocationParams", "param", "e", "getSSRParam", "isSEO", "v", "appendSSRParam", "url", "ssrValue", "ssr", "separator", "removeSSRParam", "urlObj", "import_react", "arr", "v", "usePhotoMenu", "menu", "useSelector", "s", "_a", "dispatch", "useDispatch", "m", "res", "j", "got", "GET_PHOTO_MENU", "usePhotoDimensions", "dic", "data", "d", "GET_PHOTO_WIDTH_HEIGHT", "import_jsx_runtime", "FeatureIconGradient", "Svg", "size", "children", "IconBolt", "p", "IconCog", "IconNetwork", "IconAtom", "IconBraces", "IconImage", "IconFeather", "IconSliders", "IconShield", "IconServer", "import_jsx_runtime", "GlobalStyle", "children", "PageWrapper", "stx", "HeroSection", "HeroContent", "HeroTitle", "HeroSubtitle", "HeroBadge", "HeroStats", "StatCard", "StatValue", "StatLabel", "TechSection", "SectionHeader", "SectionTitle", "SectionDescription", "FeatureGrid", "FeatureCard", "CardIcon", "CardTitle", "CardDescription", "CodeExample", "ComparisonSection", "ComparisonTable", "TableHeader", "TableRow", "TableCell", "TableHeaderCell", "NsbpJSBadge", "NextJSBadge", "PhotoSection", "PhotoGrid", "PhotoCard", "PhotoImageWrapper", "PhotoImage", "PhotoName", "PhotoTitle", "PhotoCount", "LoadingContainer", "LoadingSpinner", "LoadingText", "ErrorContainer", "ErrorTitle", "ErrorMessage", "QuickStartSection", "QuickStartGrid", "QuickStartCard", "QuickStartTitle", "QuickStartCode", "QuickStartDescription", "DemoButtonLink", "DemoButtonIcon", "Footer", "import_jsx_runtime", "Home", "withSSR", "usePreserveSSR", "isLoaded", "setIsLoaded", "timer", "removeTimer", "loader", "GlobalStyle", "HelmetExport", "Layout_default", "PageWrapper", "FeatureIconGradient", "HeroSection", "HeroContent", "HeroBadge", "HeroTitle", "HeroSubtitle", "DemoButtonLink", "DemoButtonIcon", "HeroStats", "StatCard", "IconFeather", "StatLabel", "IconSliders", "IconShield", "IconServer", "TechSection", "SectionHeader", "SectionTitle", "SectionDescription", "FeatureGrid", "FeatureCard", "CardIcon", "IconBolt", "CardTitle", "CardDescription", "CodeExample", "IconCog", "IconNetwork", "IconAtom", "IconBraces", "IconImage", "ComparisonSection", "ComparisonTable", "TableHeader", "TableRow", "TableHeaderCell", "NsbpJSBadge", "NextJSBadge", "TableCell", "QuickStartSection", "QuickStartGrid", "QuickStartCard", "QuickStartTitle", "QuickStartCode", "QuickStartDescription", "PhotoSection", "LoadingContainer", "LoadingSpinner", "LoadingText", "SuspendedPhotoGrid", "Footer", "Home_default", "menu", "usePhotoMenu", "ErrorContainer", "ErrorTitle", "ErrorMessage", "PhotoGrid", "item", "Link", "PhotoCard", "PhotoImageWrapper", "PhotoImage", "PhotoName", "PhotoTitle", "PhotoCount", "import_react", "import_jsx_runtime", "Container", "stx", "Brand", "LogoWrapper", "Nav", "NavLink", "$active", "className", "children", "rest", "cn", "import_jsx_runtime", "Header", "location", "useLocation", "Container", "Brand", "Link", "LogoWrapper", "Nav", "NavLink", "Header_default", "import_jsx_runtime", "Login", "query", "username", "setUsername", "password", "setPassword", "remember", "setRemember", "error", "setError", "ok", "setOk", "HelmetExport", "Header_default", "Layout_default", "e", "Link", "Login_default", "import_react", "Container", "stx", "Row", "import_react", "LayoutGroupContext", "useConstant", "init", "ref", "isBrowser", "useIsomorphicLayoutEffect", "isBrowser", "addUniqueItem", "arr", "item", "removeItem", "index", "clamp", "min", "max", "v", "warning", "invariant", "MotionGlobalConfig", "isNumericalString", "v", "isObject", "value", "isZeroValueString", "v", "memo", "callback", "result", "noop", "any", "pipe", "transformers", "a", "b", "v", "progress", "from", "to", "value", "range", "SubscriptionManager", "handler", "addUniqueItem", "removeItem", "a", "b", "c", "numSubscriptions", "i", "secondsToMilliseconds", "seconds", "millisecondsToSeconds", "milliseconds", "velocityPerSecond", "velocity", "frameDuration", "calcBezier", "t", "a1", "a2", "subdivisionPrecision", "subdivisionMaxIterations", "binarySubdivide", "x", "lowerBound", "upperBound", "mX1", "mX2", "currentX", "currentT", "i", "cubicBezier", "mY1", "mY2", "noop", "getTForX", "aX", "mirrorEasing", "easing", "p", "reverseEasing", "easing", "p", "backOut", "cubicBezier", "backIn", "reverseEasing", "backInOut", "mirrorEasing", "anticipate", "p", "backIn", "circIn", "p", "circOut", "reverseEasing", "circInOut", "mirrorEasing", "easeIn", "cubicBezier", "easeOut", "easeInOut", "isEasingArray", "ease", "isBezierDefinition", "easing", "easingLookup", "noop", "easeIn", "easeInOut", "easeOut", "circIn", "circInOut", "circOut", "backIn", "backInOut", "backOut", "anticipate", "isValidEasing", "easing", "easingDefinitionToFunction", "definition", "isBezierDefinition", "invariant", "x1", "y1", "x2", "y2", "cubicBezier", "stepsOrder", "createRenderStep", "runNextFrame", "thisFrame", "nextFrame", "isProcessing", "flushNextFrame", "toKeepAlive", "latestFrameData", "triggerCallback", "callback", "step", "keepAlive", "immediate", "queue", "frameData", "prevFrame", "maxElapsed", "createRenderBatcher", "scheduleNextBatch", "allowKeepAlive", "runNextFrame", "useDefaultElapsed", "state", "flagRunNextFrame", "steps", "stepsOrder", "acc", "key", "createRenderStep", "setup", "read", "resolveKeyframes", "preUpdate", "update", "preRender", "render", "postRender", "processBatch", "useManualTiming", "MotionGlobalConfig", "timestamp", "wake", "step", "process", "keepAlive", "immediate", "i", "frame", "cancelFrame", "frameData", "frameSteps", "createRenderBatcher", "noop", "now", "clearTime", "time", "frameData", "MotionGlobalConfig", "newTime", "checkStringStartsWith", "token", "key", "isCSSVariableName", "startsAsVariableToken", "isCSSVariableToken", "value", "singleCssVariableRegex", "containsCSSVariable", "number", "v", "alpha", "clamp", "scale", "sanitize", "v", "floatRegex", "isNullish", "v", "singleColorRegex", "isColorString", "type", "testProp", "v", "singleColorRegex", "isNullish", "splitColor", "aName", "bName", "cName", "a", "b", "c", "alpha", "floatRegex", "clampRgbUnit", "v", "clamp", "rgbUnit", "number", "rgba", "isColorString", "splitColor", "red", "green", "blue", "alpha", "sanitize", "alphaType", "parseHex", "v", "r", "g", "b", "a", "hex", "isColorString", "rgba", "createUnitType", "unit", "v", "degrees", "percent", "px", "vh", "vw", "progressPercentage", "hsla", "isColorString", "splitColor", "hue", "saturation", "lightness", "alpha", "percent", "sanitize", "alphaType", "color", "v", "rgba", "hex", "hsla", "parsed", "colorRegex", "test", "v", "_a", "floatRegex", "_b", "colorRegex", "NUMBER_TOKEN", "COLOR_TOKEN", "VAR_TOKEN", "VAR_FUNCTION_TOKEN", "SPLIT_TOKEN", "complexRegex", "analyseComplexValue", "value", "originalValue", "values", "indexes", "types", "i", "split", "parsedValue", "color", "parseComplexValue", "buildTransformer", "numSections", "output", "type", "sanitize", "createTransformer", "source", "convertNumbersToZero", "convertToZero", "splitBefore", "getAnimatableNone", "info", "complex", "hueToRgb", "p", "q", "t", "hslaToRgba", "hue", "saturation", "lightness", "alpha", "red", "green", "blue", "mixImmediate", "a", "b", "p", "mixNumber", "from", "to", "progress", "mixLinearColor", "from", "to", "v", "fromExpo", "expo", "colorTypes", "hex", "rgba", "hsla", "getColorType", "type", "asRGBA", "color", "warning", "model", "hslaToRgba", "mixColor", "fromRGBA", "toRGBA", "mixImmediate", "blended", "mixNumber", "invisibleValues", "mixVisibility", "origin", "target", "p", "mixNumber", "a", "b", "p", "mixNumberImmediate", "getMixer", "isCSSVariableToken", "mixImmediate", "color", "mixColor", "mixComplex", "mixArray", "mixObject", "output", "numValues", "blendValue", "v", "i", "key", "matchOrder", "origin", "target", "orderedOrigin", "pointers", "type", "originIndex", "originValue", "template", "complex", "originStats", "analyseComplexValue", "targetStats", "invisibleValues", "mixVisibility", "pipe", "warning", "mix", "from", "to", "p", "mixNumberImmediate", "getMixer", "frameloopDriver", "update", "passTimestamp", "timestamp", "keepAlive", "frame", "cancelFrame", "frameData", "time", "generateLinearEasing", "easing", "duration", "resolution", "points", "numPoints", "i", "calcGeneratorDuration", "generator", "duration", "timeStep", "state", "createGeneratorEasing", "options", "scale", "createGenerator", "generator", "duration", "calcGeneratorDuration", "progress", "millisecondsToSeconds", "springDefaults", "calcAngularFreq", "undampedFreq", "dampingRatio", "rootIterations", "approximateRoot", "envelope", "derivative", "initialGuess", "result", "safeMin", "findSpring", "duration", "bounce", "velocity", "mass", "warning", "secondsToMilliseconds", "clamp", "millisecondsToSeconds", "exponentialDecay", "delta", "a", "b", "c", "d", "e", "f", "g", "stiffness", "durationKeys", "physicsKeys", "isSpringType", "options", "keys", "key", "getSpringOptions", "springOptions", "visualDuration", "root", "damping", "derived", "spring", "optionsOrVisualDuration", "restSpeed", "restDelta", "origin", "target", "state", "isResolvedFromDuration", "initialVelocity", "initialDelta", "undampedAngularFreq", "isGranularScale", "resolveSpring", "resolveVelocity", "angularFreq", "A", "sinCoeff", "cosCoeff", "t", "C", "dampedAngularFreq", "freqForT", "P", "sinhCoeff", "coshCoeff", "generator", "sin", "cos", "current", "currentVelocity", "calculatedDuration", "calcGeneratorDuration", "easing", "generateLinearEasing", "progress", "generatorOptions", "createGeneratorEasing", "velocitySampleDuration", "getGeneratorVelocity", "resolveValue", "current", "prevT", "velocityPerSecond", "inertia", "keyframes", "velocity", "power", "timeConstant", "bounceDamping", "bounceStiffness", "modifyTarget", "min", "max", "restDelta", "restSpeed", "origin", "state", "isOutOfBounds", "v", "nearestBoundary", "amplitude", "ideal", "target", "calcDelta", "t", "calcLatest", "applyFriction", "delta", "latest", "timeReachedBoundary", "spring", "checkCatchBoundary", "createSpring", "getGeneratorVelocity", "hasUpdatedFrame", "createMixers", "output", "ease", "customMixer", "mixers", "mixerFactory", "MotionGlobalConfig", "mix", "numMixers", "i", "mixer", "easingFunction", "noop", "pipe", "interpolate", "input", "isClamp", "inputLength", "invariant", "isZeroDeltaRange", "interpolator", "v", "progressInRange", "progress", "clamp", "fillOffset", "offset", "remaining", "min", "i", "offsetProgress", "progress", "mixNumber", "defaultOffset", "arr", "offset", "fillOffset", "convertOffsetToTimes", "offset", "duration", "o", "defaultEasing", "values", "easing", "easeInOut", "keyframes", "duration", "keyframeValues", "times", "ease", "easingFunctions", "isEasingArray", "easingDefinitionToFunction", "state", "absoluteTimes", "convertOffsetToTimes", "defaultOffset", "mapTimeToKeyframe", "interpolate", "t", "isNotNull", "value", "getFinalKeyframe", "keyframes", "repeat", "repeatType", "finalKeyframe", "speed", "resolvedKeyframes", "index", "transitionTypeMap", "inertia", "keyframes", "spring", "replaceTransitionType", "transition", "WithPromise", "resolve", "onResolve", "onReject", "percentToProgress", "percent", "JSAnimation", "WithPromise", "options", "motionValue", "time", "_b", "_a", "replaceTransitionType", "type", "keyframesGenerator", "repeat", "repeatDelay", "repeatType", "velocity", "keyframes", "generatorFactory", "pipe", "mix", "generator", "calcGeneratorDuration", "calculatedDuration", "timestamp", "animationTime", "sample", "totalDuration", "mixKeyframes", "mirroredGenerator", "resolvedDuration", "delay", "onUpdate", "finalKeyframe", "timeWithoutDelay", "isInDelayPhase", "elapsed", "frameGenerator", "progress", "currentIteration", "iterationProgress", "clamp", "state", "done", "isAnimationFinished", "inertia", "getFinalKeyframe", "resolve", "reject", "millisecondsToSeconds", "newTime", "secondsToMilliseconds", "current", "getGeneratorVelocity", "s", "newSpeed", "hasChanged", "driver", "frameloopDriver", "startTime", "now", "sampleTime", "timeline", "fillWildcards", "keyframes", "i", "radToDeg", "rad", "rotate", "v", "angle", "rebaseAngle", "matrix2dParsers", "rotateZ", "scaleX", "scaleY", "matrix3dParsers", "defaultTransformValue", "name", "parseValueFromTransform", "transform", "matrix3dMatch", "parsers", "match", "matrix2dMatch", "valueParser", "values", "convertTransformToNumber", "readTransformValue", "instance", "value", "transformPropOrder", "transformProps", "isNumOrPxType", "v", "number", "px", "transformKeys", "nonTranslationalTransformKeys", "transformPropOrder", "key", "removeNonTranslationalTransform", "visualElement", "removedTransforms", "value", "positionalValues", "x", "paddingLeft", "paddingRight", "boxSizing", "width", "y", "paddingTop", "paddingBottom", "height", "_bbox", "top", "left", "transform", "parseValueFromTransform", "toResolve", "isScheduled", "anyNeedsMeasurement", "isForced", "measureAllKeyframes", "resolversToMeasure", "resolver", "elementsToMeasure", "transformsToRestore", "element", "removedTransforms", "removeNonTranslationalTransform", "restore", "key", "value", "_a", "readAllKeyframes", "flushKeyframeResolvers", "KeyframeResolver", "unresolvedKeyframes", "onComplete", "name", "motionValue", "isAsync", "frame", "currentValue", "finalKeyframe", "valueAsRead", "fillWildcards", "isForcedComplete", "isCSSVar", "name", "setStyle", "element", "name", "value", "isCSSVar", "supportsFlags", "memoSupports", "callback", "supportsFlag", "memoized", "memo", "supportsFlags", "supportsScrollTimeline", "memoSupports", "supportsLinearEasing", "memoSupports", "cubicBezierAsString", "a", "b", "c", "d", "supportedWaapiEasing", "cubicBezierAsString", "mapEasingToNativeEasing", "easing", "duration", "supportsLinearEasing", "generateLinearEasing", "isBezierDefinition", "cubicBezierAsString", "segmentEasing", "supportedWaapiEasing", "startWaapiAnimation", "element", "valueName", "keyframes", "delay", "duration", "repeat", "repeatType", "ease", "times", "pseudoElement", "keyframeOptions", "easing", "mapEasingToNativeEasing", "options", "isGenerator", "type", "applyGeneratorOptions", "type", "options", "isGenerator", "supportsLinearEasing", "NativeAnimation", "WithPromise", "options", "element", "name", "keyframes", "pseudoElement", "allowFlatten", "finalKeyframe", "onComplete", "invariant", "transition", "applyGeneratorOptions", "startWaapiAnimation", "keyframe", "getFinalKeyframe", "setStyle", "_b", "_a", "state", "_c", "duration", "millisecondsToSeconds", "delay", "newTime", "wasFinished", "secondsToMilliseconds", "newSpeed", "newStartTime", "timeline", "rangeStart", "rangeEnd", "observe", "supportsScrollTimeline", "noop", "unsupportedEasingFunctions", "anticipate", "backInOut", "circInOut", "isUnsupportedEase", "key", "replaceStringEasing", "transition", "sampleDelta", "NativeAnimationExtended", "NativeAnimation", "options", "replaceStringEasing", "replaceTransitionType", "value", "motionValue", "onUpdate", "onComplete", "element", "sampleAnimation", "JSAnimation", "sampleTime", "time", "delta", "clamp", "current", "name", "setStyle", "isAnimatable", "value", "name", "complex", "hasKeyframesChanged", "keyframes", "current", "i", "canAnimate", "name", "type", "velocity", "originKeyframe", "targetKeyframe", "isOriginAnimatable", "isAnimatable", "isTargetAnimatable", "warning", "isGenerator", "makeAnimationInstant", "options", "acceleratedValues", "browserColorFunctions", "hasBrowserOnlyColors", "keyframes", "i", "colorProperties", "supportsWaapi", "memo", "supportsBrowserAnimation", "options", "motionValue", "name", "repeatDelay", "repeatType", "damping", "type", "keyframes", "subject", "_a", "onUpdate", "transformTemplate", "acceleratedValues", "hasBrowserOnlyColors", "MAX_RESOLVE_DELAY", "AsyncMotionValueAnimation", "WithPromise", "autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element", "options", "_a", "_b", "time", "optionsWithDefaults", "KeyframeResolver", "DefaultKeyframeResolver", "resolvedKeyframes", "finalKeyframe", "forced", "sync", "velocity", "isHandoff", "onUpdate", "canAnimateValue", "canAnimate", "MotionGlobalConfig", "getFinalKeyframe", "makeAnimationInstant", "resolvedOptions", "useWaapi", "supportsBrowserAnimation", "animation", "NativeAnimationExtended", "JSAnimation", "noop", "onResolve", "_onReject", "flushKeyframeResolvers", "newTime", "newSpeed", "timeline", "calcChildStagger", "children", "child", "delayChildren", "staggerChildren", "staggerDirection", "index", "a", "b", "numChildren", "maxStaggerDuration", "MAX_VELOCITY_DELTA", "isFloat", "value", "collectMotionValues", "MotionValue", "init", "options", "v", "currentTime", "time", "_a", "dependent", "current", "prevFrameValue", "subscription", "eventName", "callback", "SubscriptionManager", "unsubscribe", "frame", "eventManagers", "passiveEffect", "stopPassiveEffect", "prev", "delta", "endAnimation", "velocityPerSecond", "startAnimation", "resolve", "_b", "motionValue", "resolveTransition", "transition", "parentTransition", "_", "rest", "getValueTransition", "transition", "key", "valueTransition", "resolveTransition", "underDampedSpring", "criticallyDampedSpring", "target", "keyframesTransition", "ease", "getDefaultTransition", "valueKey", "keyframes", "transformProps", "orchestrationKeys", "isTransitionDefined", "transition", "key", "animateMotionValue", "name", "value", "target", "transition", "element", "isHandoff", "onComplete", "valueTransition", "getValueTransition", "delay", "elapsed", "secondsToMilliseconds", "options", "v", "isTransitionDefined", "getDefaultTransition", "shouldSkip", "makeAnimationInstant", "MotionGlobalConfig", "finalKeyframe", "getFinalKeyframe", "frame", "JSAnimation", "AsyncMotionValueAnimation", "splitCSSVariableRegex", "parseCSSVariable", "current", "match", "token1", "token2", "fallback", "maxDepth", "getVariableValue", "element", "depth", "invariant", "token", "resolved", "trimmed", "isNumericalString", "isCSSVariableToken", "getValueState", "visualElement", "state", "value", "key", "resolveVariantFromProps", "props", "definition", "custom", "current", "velocity", "resolveVariant", "visualElement", "definition", "custom", "props", "resolveVariantFromProps", "positionalKeys", "transformPropOrder", "isKeyframesTarget", "v", "setMotionValue", "visualElement", "key", "value", "motionValue", "resolveFinalValueInKeyframes", "v", "isKeyframesTarget", "setTarget", "definition", "resolved", "resolveVariant", "transitionEnd", "transition", "target", "isMotionValue", "value", "isWillChangeMotionValue", "value", "isMotionValue", "addValueToWillChange", "visualElement", "key", "willChange", "isWillChangeMotionValue", "MotionGlobalConfig", "newWillChange", "camelToDash", "str", "match", "optimizedAppearDataId", "optimizedAppearDataAttribute", "camelToDash", "getOptimisedAppearId", "visualElement", "optimizedAppearDataAttribute", "shouldBlockAnimation", "protectedKeys", "needsAnimating", "key", "shouldBlock", "animateTarget", "visualElement", "targetAndTransition", "delay", "transitionOverride", "type", "transition", "transitionEnd", "target", "defaultTransition", "resolveTransition", "reduceMotion", "skipAnimations", "animations", "animationTypeState", "path", "value", "valueTarget", "valueTransition", "getValueTransition", "currentValue", "frame", "isHandoff", "appearId", "getOptimisedAppearId", "startTime", "addValueToWillChange", "shouldReduceMotion", "animateMotionValue", "positionalKeys", "animation", "applyTransitionEnd", "setTarget", "animateVariant", "visualElement", "variant", "options", "resolved", "resolveVariant", "_a", "transition", "getAnimation", "animateTarget", "getChildAnimations", "forwardDelay", "delayChildren", "staggerChildren", "staggerDirection", "animateChildren", "when", "first", "last", "delay", "animations", "child", "calcChildStagger", "animateVisualElement", "visualElement", "definition", "options", "animation", "animations", "variant", "animateVariant", "resolvedDefinition", "resolveVariant", "animateTarget", "auto", "v", "testValueType", "v", "type", "dimensionValueTypes", "number", "px", "percent", "degrees", "vw", "vh", "auto", "findDimensionValueType", "v", "testValueType", "isNone", "value", "isZeroValueString", "maxDefaults", "applyDefaultFilter", "v", "name", "value", "number", "floatRegex", "unit", "defaultValue", "functionRegex", "filter", "complex", "functions", "mask", "complex", "v", "parsed", "int", "number", "transformValueTypes", "degrees", "scale", "px", "alpha", "progressPercentage", "numberValueTypes", "px", "transformValueTypes", "int", "alpha", "defaultValueTypes", "numberValueTypes", "color", "filter", "mask", "getDefaultValueType", "key", "customTypes", "filter", "mask", "getAnimatableNone", "key", "value", "defaultValueType", "getDefaultValueType", "complex", "invalidTemplates", "makeNoneKeyframesAnimatable", "unresolvedKeyframes", "noneKeyframeIndexes", "name", "i", "animatableTemplate", "keyframe", "analyseComplexValue", "noneIndex", "getAnimatableNone", "DOMKeyframesResolver", "KeyframeResolver", "unresolvedKeyframes", "onComplete", "name", "motionValue", "element", "i", "keyframe", "isCSSVariableToken", "resolved", "getVariableValue", "positionalKeys", "origin", "target", "originType", "findDimensionValueType", "targetType", "originHasVar", "containsCSSVariable", "targetHasVar", "positionalValues", "isNumOrPxType", "value", "noneKeyframeIndexes", "isNone", "makeNoneKeyframesAnimatable", "measureKeyframe", "finalKeyframeIndex", "finalKeyframe", "_a", "unsetTransformName", "unsetTransformValue", "cornerRadiusProps", "resolveElements", "elementOrSelector", "scope", "selectorCache", "root", "elements", "element", "getValueAsType", "value", "type", "isHTMLElement", "element", "isObject", "microtask", "cancelMicrotask", "createRenderBatcher", "isDragging", "isDragActive", "setDragLock", "axis", "isDragging", "setupGesture", "elementOrSelector", "options", "elements", "resolveElements", "gestureAbortController", "eventOptions", "isValidHover", "event", "isDragActive", "hover", "elementOrSelector", "onHoverStart", "options", "elements", "eventOptions", "cancel", "setupGesture", "element", "isPressed", "deferredHoverEnd", "hoverEndCallback", "removePointerLeave", "onPointerLeave", "endHover", "onPointerUp", "onPointerDown", "leaveEvent", "onPointerEnter", "enterEvent", "onHoverEnd", "isNodeOrChild", "parent", "child", "isPrimaryPointer", "event", "keyboardAccessibleElements", "isElementKeyboardAccessible", "element", "textInputElements", "isElementTextInput", "isPressing", "filterEvents", "callback", "event", "firePointerEvent", "target", "type", "enableKeyboardPress", "focusEvent", "eventOptions", "element", "handleKeydown", "isPressing", "handleKeyup", "handleBlur", "isValidPressEvent", "event", "isPrimaryPointer", "isDragActive", "claimedPointerDownEvents", "press", "targetOrSelector", "onPressStart", "options", "targets", "eventOptions", "cancelEvents", "setupGesture", "startPress", "startEvent", "target", "isPressing", "onPressEnd", "endEventOptions", "onPointerEnd", "endEvent", "success", "onPointerUp", "onPointerCancel", "upEvent", "isNodeOrChild", "cancelEvent", "isHTMLElement", "enableKeyboardPress", "isElementKeyboardAccessible", "isSVGElement", "element", "isObject", "resizeHandlers", "observer", "getSize", "borderBoxAxis", "svgAxis", "htmlAxis", "target", "borderBoxSize", "isSVGElement", "getWidth", "getHeight", "notifyTarget", "_a", "handler", "notifyAll", "entries", "createResizeObserver", "resizeElement", "elements", "resolveElements", "element", "elementHandlers", "windowCallbacks", "windowResizeHandler", "createWindowResizeHandler", "info", "callback", "resizeWindow", "resize", "a", "b", "resizeWindow", "resizeElement", "statsBuffer", "isSVGSVGElement", "element", "isSVGElement", "valueTypes", "dimensionValueTypes", "color", "complex", "findValueType", "v", "testValueType", "createAxisDelta", "createDelta", "createAxis", "createBox", "visualElementStore", "isAnimationControls", "v", "isVariantLabel", "v", "variantPriorityOrder", "variantProps", "isControllingVariants", "props", "isAnimationControls", "variantProps", "name", "isVariantLabel", "isVariantNode", "updateMotionValuesFromProps", "element", "next", "prev", "key", "nextValue", "prevValue", "isMotionValue", "motionValue", "existingValue", "latestValue", "prefersReducedMotion", "hasReducedMotionListener", "isBrowser", "initPrefersReducedMotion", "hasReducedMotionListener", "motionMediaQuery", "setReducedMotionPreferences", "prefersReducedMotion", "propEventHandlers", "featureDefinitions", "setFeatureDefinitions", "definitions", "getFeatureDefinitions", "VisualElement", "_props", "_prevProps", "_visualElement", "parent", "props", "presenceContext", "reducedMotionConfig", "skipAnimations", "blockInitialAnimation", "visualState", "options", "KeyframeResolver", "now", "time", "frame", "latestValues", "renderState", "checkIsControllingVariants", "checkIsVariantNode", "willChange", "initialMotionValues", "key", "value", "isMotionValue", "instance", "_a", "visualElementStore", "hasReducedMotionListener", "initPrefersReducedMotion", "prefersReducedMotion", "_b", "cancelFrame", "remove", "feature", "child", "acceleratedValues", "factory", "keyframes", "times", "ease", "duration", "animation", "NativeAnimation", "secondsToMilliseconds", "cleanup", "valueIsTransform", "transformProps", "removeOnChange", "latestValue", "removeSyncCheck", "other", "featureDefinition", "isEnabled", "FeatureConstructor", "createBox", "i", "listenerName", "listener", "updateMotionValuesFromProps", "name", "closestVariantNode", "existingValue", "unsubscribe", "defaultValue", "motionValue", "target", "isNumericalString", "isZeroValueString", "findValueType", "complex", "getAnimatableNone", "initial", "valueFromInitial", "variant", "resolveVariantFromProps", "eventName", "callback", "SubscriptionManager", "args", "microtask", "DOMVisualElement", "VisualElement", "DOMKeyframesResolver", "a", "b", "props", "key", "style", "vars", "children", "isMotionValue", "latest", "Feature", "node", "convertBoundingBoxToBox", "top", "left", "right", "bottom", "convertBoxToBoundingBox", "x", "y", "transformBoxPoints", "point", "transformPoint", "topLeft", "bottomRight", "isIdentityScale", "scale", "hasScale", "scaleX", "scaleY", "hasTransform", "values", "has2DTranslate", "is2DTranslate", "value", "scalePoint", "point", "scale", "originPoint", "distanceFromOrigin", "scaled", "applyPointDelta", "translate", "boxScale", "applyAxisDelta", "axis", "applyBoxDelta", "box", "x", "y", "TREE_SCALE_SNAP_MIN", "TREE_SCALE_SNAP_MAX", "applyTreeDeltas", "treeScale", "treePath", "isSharedTransition", "treeLength", "node", "delta", "i", "visualElement", "translateAxis", "hasTransform", "transformBox", "_a", "distance", "transformAxis", "axisTranslate", "axisScale", "axisOrigin", "mixNumber", "resolveAxisTranslate", "value", "transform", "sourceBox", "resolveBox", "measureViewportBox", "instance", "transformPoint", "convertBoundingBoxToBox", "transformBoxPoints", "measurePageBox", "element", "rootProjectionNode", "transformPagePoint", "viewportBox", "scroll", "translateAxis", "translateAlias", "numTransforms", "transformPropOrder", "buildTransform", "latestValues", "transform", "transformTemplate", "transformString", "transformIsDefault", "i", "key", "value", "valueIsDefault", "parsed", "valueAsType", "getValueAsType", "numberValueTypes", "transformName", "pathRotation", "buildHTMLStyles", "state", "latestValues", "transformTemplate", "style", "vars", "transformOrigin", "hasTransform", "hasTransformOrigin", "key", "value", "transformProps", "isCSSVariableName", "valueAsType", "getValueAsType", "numberValueTypes", "buildTransform", "originX", "originY", "originZ", "renderHTML", "element", "style", "vars", "styleProp", "projection", "elementStyle", "key", "pixelsToPercent", "pixels", "axis", "correctBorderRadius", "latest", "node", "px", "x", "y", "correctBoxShadow", "latest", "treeScale", "projectionDelta", "original", "shadow", "complex", "template", "offset", "xScale", "yScale", "averageScale", "mixNumber", "scaleCorrectors", "correctBorderRadius", "cornerRadiusProps", "correctBoxShadow", "isForcedMotionValue", "key", "layout", "layoutId", "transformProps", "scaleCorrectors", "scrapeMotionValuesFromProps", "props", "prevProps", "visualElement", "style", "prevStyle", "newValues", "key", "isMotionValue", "isForcedMotionValue", "_a", "getComputedStyle", "element", "HTMLVisualElement", "DOMVisualElement", "renderHTML", "instance", "invariant", "key", "transformProps", "_a", "defaultTransformValue", "readTransformValue", "computedStyle", "value", "isCSSVariableName", "transformPagePoint", "measureViewportBox", "renderState", "latestValues", "props", "buildHTMLStyles", "prevProps", "visualElement", "scrapeMotionValuesFromProps", "dashKeys", "camelKeys", "buildSVGPath", "attrs", "length", "spacing", "offset", "useDashCase", "keys", "cssMotionPathProperties", "buildSVGAttrs", "state", "attrX", "attrY", "attrScale", "pathLength", "pathSpacing", "pathOffset", "latest", "isSVGTag", "transformTemplate", "styleProp", "buildHTMLStyles", "attrs", "style", "key", "buildSVGPath", "camelCaseAttributes", "isSVGTag", "tag", "renderSVG", "element", "renderState", "_styleProp", "projection", "renderHTML", "key", "camelCaseAttributes", "camelToDash", "scrapeMotionValuesFromProps", "props", "prevProps", "visualElement", "newValues", "scrapeHTMLMotionValuesFromProps", "key", "isMotionValue", "targetKey", "transformPropOrder", "SVGVisualElement", "DOMVisualElement", "createBox", "props", "key", "instance", "transformProps", "defaultType", "getDefaultValueType", "camelCaseAttributes", "camelToDash", "prevProps", "visualElement", "scrapeMotionValuesFromProps", "renderState", "latestValues", "buildSVGAttrs", "styleProp", "projection", "renderSVG", "isSVGTag", "numVariantProps", "variantProps", "getVariantContext", "visualElement", "context", "i", "name", "prop", "isVariantLabel", "shallowCompare", "next", "prev", "prevLength", "i", "reversePriorityOrder", "variantPriorityOrder", "numAnimationTypes", "createAnimateFunction", "visualElement", "animations", "animation", "options", "animateVisualElement", "createAnimationState", "animate", "state", "createState", "isInitialRender", "wasReset", "buildResolvedTypeValues", "type", "acc", "definition", "resolved", "resolveVariant", "_a", "transition", "transitionEnd", "target", "setAnimateFunction", "makeAnimator", "animateChanges", "changedActiveType", "props", "context", "getVariantContext", "removedKeys", "encounteredKeys", "removedVariantIndex", "i", "typeState", "prop", "propIsVariant", "isVariantLabel", "activeDelta", "isInherited", "isAnimationControls", "variantDidChange", "checkVariantsDidChange", "shouldAnimateType", "handledRemovedValues", "definitionList", "resolvedValues", "prevResolvedValues", "allKeys", "markToAnimate", "key", "motionValue", "next", "prev", "valueHasChanged", "isKeyframesTarget", "shallowCompare", "willAnimateViaParent", "parent", "parentVariant", "delayChildren", "calcChildStagger", "fallbackAnimation", "initialTransition", "fallbackTarget", "shouldAnimate", "setActive", "isActive", "child", "createTypeState", "copyAxisInto", "axis", "originAxis", "copyBoxInto", "box", "originBox", "copyAxisDeltaInto", "delta", "originDelta", "SCALE_PRECISION", "SCALE_MIN", "SCALE_MAX", "TRANSLATE_PRECISION", "TRANSLATE_MIN", "TRANSLATE_MAX", "calcLength", "axis", "isNear", "value", "target", "maxDistance", "calcAxisDelta", "delta", "source", "origin", "mixNumber", "calcBoxDelta", "calcRelativeAxis", "relative", "parent", "anchor", "anchorPoint", "calcRelativeBox", "calcRelativeAxisPosition", "layout", "calcRelativePosition", "removePointDelta", "point", "translate", "scale", "originPoint", "boxScale", "scalePoint", "removeAxisDelta", "axis", "origin", "originAxis", "sourceAxis", "percent", "mixNumber", "removeAxisTransforms", "transforms", "key", "scaleKey", "originKey", "xKeys", "yKeys", "removeBoxTransforms", "box", "originBox", "sourceBox", "isAxisDeltaZero", "delta", "isDeltaZero", "axisEquals", "a", "b", "boxEquals", "axisEqualsRounded", "boxEqualsRounded", "aspectRatio", "box", "calcLength", "axisDeltaEquals", "eachAxis", "callback", "buildProjectionTransform", "delta", "treeScale", "latestTransform", "transform", "xTranslate", "yTranslate", "zTranslate", "transformPerspective", "rotate", "pathRotation", "rotateX", "rotateY", "skewX", "skewY", "elementScaleX", "elementScaleY", "numBorders", "cornerRadiusProps", "asNumber", "value", "isPx", "px", "mixValues", "target", "follow", "lead", "progress", "shouldCrossfadeOpacity", "isOnlyMember", "mixNumber", "easeCrossfadeIn", "easeCrossfadeOut", "i", "borderLabel", "followRadius", "getRadius", "leadRadius", "percent", "values", "radiusName", "compress", "circOut", "noop", "min", "max", "easing", "p", "calcProgress", "animateSingleValue", "value", "keyframes", "options", "motionValue", "isMotionValue", "createMotionValue", "animateMotionValue", "addDomEvent", "target", "eventName", "handler", "options", "compareByDepth", "a", "b", "FlatTree", "child", "addUniqueItem", "removeItem", "callback", "compareByDepth", "delay", "callback", "timeout", "start", "time", "checkElapsed", "timestamp", "elapsed", "cancelFrame", "frame", "resolveMotionValue", "value", "isMotionValue", "NodeStack", "node", "addUniqueItem", "i", "member", "inst", "removeItem", "prevLead", "_a", "preserveFollowOpacity", "prevDep", "nextDep", "_b", "_e", "_c", "_d", "globalProjectionState", "metrics", "transformAxes", "animationTarget", "id", "resetDistortingTransform", "key", "visualElement", "values", "sharedAnimationValues", "latestValues", "cancelTreeOptimisedTransformAnimations", "projectionNode", "appearId", "getOptimisedAppearId", "layout", "layoutId", "frame", "parent", "createProjectionNode", "attachResizeListener", "defaultParent", "measureScroll", "checkIsScrollRoot", "resetTransform", "statsBuffer", "propagateDirtyNodes", "resolveTargetDelta", "calcProjection", "cleanDirtyNodes", "i", "FlatTree", "name", "handler", "SubscriptionManager", "args", "subscriptionManager", "instance", "isSVGElement", "isSVGSVGElement", "cancelDelay", "innerWidth", "resizeUnblockUpdate", "newInnerWidth", "delay", "globalProjectionState", "finishAnimation", "delta", "hasLayoutChanged", "hasRelativeLayoutChanged", "newLayout", "layoutTransition", "defaultLayoutTransition", "onLayoutAnimationStart", "onLayoutAnimationComplete", "hasTargetChanged", "boxEqualsRounded", "hasOnlyRelativeTargetChanged", "animationOptions", "getValueTransition", "stack", "cancelFrame", "resetSkewAndRotation", "shouldNotifyListeners", "node", "transformTemplate", "wasBlockedByResize", "forceLayoutMeasure", "clearMeasurements", "clearIsLayoutDirty", "ensureDraggedNodesSnapshotted", "resetTransformStyle", "updateLayout", "notifyLayoutUpdate", "now", "time", "frameData", "clamp", "frameSteps", "microtask", "clearSnapshot", "removeLeadSnapshots", "calcLength", "prevLayout", "createBox", "phase", "needsMeasurement", "isRoot", "isResetRequested", "hasProjection", "isDeltaZero", "transformTemplateValue", "transformTemplateHasChanged", "hasTransform", "removeTransform", "pageBox", "layoutBox", "roundBox", "box", "_a", "checkNodeWasScrollRoot", "scroll", "translateAxis", "boxWithoutScroll", "copyBoxInto", "options", "transformOnly", "output", "withTransforms", "transformBox", "_b", "boxWithoutTransform", "sourceBox", "hasScale", "removeBoxTransforms", "forceRecalculation", "lead", "isShared", "relativeParent", "calcRelativeBox", "applyBoxDelta", "has2DTranslate", "parentLayout", "calcRelativePosition", "canSkip", "prevTreeScaleX", "prevTreeScaleY", "applyTreeDeltas", "target", "copyAxisDeltaInto", "calcBoxDelta", "axisDeltaEquals", "notifyAll", "createDelta", "pathFn", "snapshot", "snapshotLatestValues", "mixedValues", "targetDelta", "relativeLayout", "snapshotSource", "layoutSource", "isSharedLayoutAnimation", "isOnlyMember", "shouldCrossfadeOpacity", "hasOpacityCrossfade", "prevRelativeTarget", "interpolate", "latest", "progress", "point", "mixNumber", "mixAxisDeltaLinear", "mixBox", "boxEquals", "mixValues", "_c", "motionValue", "animateSingleValue", "targetWithTransforms", "shouldAnimatePositionOnly", "xLength", "yLength", "NodeStack", "config", "needsReset", "transition", "preserveFollowOpacity", "hasDistortingTransform", "resetValues", "targetStyle", "styleProp", "resolveMotionValue", "valuesToRender", "transform", "buildProjectionTransform", "x", "y", "scaleCorrectors", "correct", "applyTo", "isCSSVariable", "corrected", "num", "measuredLayout", "animationType", "eachAxis", "axis", "axisSnapshot", "length", "snapAxis", "copyAxisInto", "layoutDelta", "visualDelta", "parentSnapshot", "anchor", "relativeSnapshot", "onExitComplete", "p", "mixAxis", "from", "to", "userAgentContains", "string", "roundPoint", "noop", "roundAxis", "isNear", "aspectRatio", "DocumentProjectionNode", "createProjectionNode", "ref", "notify", "addDomEvent", "_a", "_b", "rootProjectionNode", "HTMLProjectionNode", "createProjectionNode", "instance", "documentNode", "DocumentProjectionNode", "value", "MotionConfigContext", "p", "usePresence", "subscribe", "context", "PresenceContext", "id", "register", "isPresent", "onExitComplete", "safeToRemove", "LazyContext", "featureProps", "isInitialized", "initFeatureDefinitions", "initialFeatureDefinitions", "key", "props", "name", "setFeatureDefinitions", "getInitializedFeatureDefinitions", "getFeatureDefinitions", "loadFeatures", "features", "featureDefinitions", "getInitializedFeatureDefinitions", "key", "setFeatureDefinitions", "validMotionProps", "isValidMotionProp", "key", "shouldForward", "key", "isValidMotionProp", "loadExternalIsValidProp", "isValidProp", "__require", "filterProps", "props", "isDom", "forwardMotionProps", "filteredProps", "isMotionValue", "MotionContext", "getCurrentTreeVariants", "props", "context", "isControllingVariants", "initial", "animate", "isVariantLabel", "useCreateMotionContext", "props", "initial", "animate", "getCurrentTreeVariants", "MotionContext", "variantLabelsAsDependency", "prop", "createHtmlRenderState", "key", "source", "isMotionValue", "isForcedMotionValue", "props", "useInitialMotionValues", "transformTemplate", "visualState", "state", "createHtmlRenderState", "buildHTMLStyles", "useStyle", "styleProp", "copyRawValuesOnly", "style", "useHTMLProps", "htmlProps", "createSvgRenderState", "createHtmlRenderState", "useSVGProps", "props", "visualState", "_isStatic", "Component", "visualProps", "state", "createSvgRenderState", "buildSVGAttrs", "isSVGTag", "rawStyles", "lowercaseSVGElements", "isSVGComponent", "Component", "lowercaseSVGElements", "visualProps", "isSVG", "isSVGComponent", "Component", "useSVGProps", "useHTMLProps", "props", "latestValues", "isStatic", "filteredProps", "filterProps", "forwardMotionProps", "children", "renderedChildren", "isMotionValue", "elementProps", "makeState", "scrapeMotionValuesFromProps", "createRenderState", "props", "context", "presenceContext", "makeLatestValues", "scrapeMotionValues", "key", "motionValues", "initial", "animate", "isControllingVariants$1", "isControllingVariants", "isVariantNode$1", "isVariantNode", "isInitialAnimationBlocked", "variantToSet", "isAnimationControls", "list", "i", "target", "valueTarget", "index", "values", "transitionEnd", "makeUseVisualState", "config", "isStatic", "MotionContext", "PresenceContext", "make", "useConstant", "useHTMLVisualState", "makeUseVisualState", "scrapeMotionValuesFromProps", "createHtmlRenderState", "useSVGVisualState", "makeUseVisualState", "scrapeMotionValuesFromProps", "createSvgRenderState", "motionComponentSymbol", "externalRefContainer", "externalRef", "refCleanup", "instance", "_a", "visualState", "visualElement", "ref", "cleanup", "isRefObject", "ref", "useVisualElement", "Component", "visualState", "props", "createVisualElement", "ProjectionNodeConstructor", "isSVG", "lazyContext", "LazyContext", "presenceContext", "PresenceContext", "motionConfig", "MotionConfigContext", "reducedMotionConfig", "skipAnimations", "visualElementRef", "hasMountedOnce", "visualElement", "initialLayoutGroupConfig", "SwitchLayoutGroupContext", "isMounted", "optimisedAppearId", "optimizedAppearDataAttribute", "wantsHandoff", "_a", "_b", "createProjectionNode", "initialPromotionConfig", "layoutId", "layout", "drag", "dragConstraints", "layoutScroll", "layoutRoot", "layoutAnchor", "layoutCrossfade", "isRefObject", "getClosestProjectingNode", "preloadedFeatures", "loadFeatures", "isSVG", "type", "isSVGComponent", "Component", "MotionDOMComponent", "props", "externalRef", "MeasureLayout", "configAndProps", "useLayoutId", "isStatic", "context", "useCreateMotionContext", "useStrictMode", "layoutProjection", "getProjectionFunctionality", "useVisualElement", "visualState", "createVisualElement", "MotionContext", "useRender", "useMotionRef", "forwardMotionProps", "ForwardRefMotionComponent", "motionComponentSymbol", "layoutId", "layoutGroupId", "featureDefinitions", "getInitializedFeatureDefinitions", "drag", "layout", "createMotionProxy", "preloadedFeatures", "createVisualElement", "createMotionComponent", "componentCache", "factory", "Component", "options", "deprecatedFactoryFunction", "_target", "key", "createDomVisualElement", "Component", "options", "isSVGComponent", "SVGVisualElement", "HTMLVisualElement", "AnimationFeature", "Feature", "node", "createAnimationState", "animate", "isAnimationControls", "prevAnimate", "_a", "id", "ExitAnimationFeature", "Feature", "isPresent", "onExitComplete", "prevIsPresent", "initial", "custom", "resolved", "resolveVariant", "transition", "transitionEnd", "target", "key", "_a", "exitAnimation", "register", "animations", "AnimationFeature", "ExitAnimationFeature", "extractEventInfo", "event", "addPointerInfo", "handler", "isPrimaryPointer", "addPointerEvent", "target", "eventName", "handler", "options", "addDomEvent", "addPointerInfo", "getContextWindow", "current", "distance", "a", "b", "distance2D", "xDelta", "yDelta", "overflowStyles", "PanSession", "event", "handlers", "transformPagePoint", "contextWindow", "dragSnapToOrigin", "distanceThreshold", "element", "transformPoint", "info", "getPanInfo", "isPanStarted", "isDistancePastThreshold", "distance2D", "point", "timestamp", "frameData", "onStart", "onMove", "frame", "onEnd", "onSessionEnd", "resumeAnimation", "panInfo", "isPrimaryPointer", "extractEventInfo", "initialInfo", "onSessionStart", "eventOptions", "pipe", "addPointerEvent", "current", "style", "target", "initial", "isWindow", "delta", "cancelFrame", "subtractPoint", "a", "b", "history", "lastDevicePoint", "startDevicePoint", "getVelocity", "timeDelta", "i", "timestampedPoint", "lastPoint", "secondsToMilliseconds", "time", "millisecondsToSeconds", "currentVelocity", "applyConstraints", "point", "min", "max", "elastic", "mixNumber", "calcRelativeAxisConstraints", "axis", "calcRelativeConstraints", "layoutBox", "top", "left", "bottom", "right", "calcViewportAxisConstraints", "layoutAxis", "constraintsAxis", "calcViewportConstraints", "constraintsBox", "calcOrigin", "source", "target", "origin", "sourceLength", "calcLength", "targetLength", "calcProgress", "clamp", "rebaseAxisConstraints", "layout", "constraints", "relativeConstraints", "defaultElastic", "resolveDragElastic", "dragElastic", "resolveAxisElastic", "minLabel", "maxLabel", "resolvePointElastic", "label", "elementDragControls", "VisualElementDragControls", "visualElement", "createBox", "originEvent", "snapToCursor", "distanceThreshold", "presenceContext", "onSessionStart", "event", "extractEventInfo", "onStart", "info", "drag", "dragPropagation", "onDragStart", "setDragLock", "eachAxis", "axis", "current", "percent", "projection", "measuredAxis", "calcLength", "frame", "addValueToWillChange", "animationState", "onMove", "dragDirectionLock", "onDirectionLock", "onDrag", "offset", "getCurrentDirection", "onSessionEnd", "resumeAnimation", "snap", "dragSnapToOrigin", "PanSession", "getContextWindow", "panInfo", "finalEvent", "finalPanInfo", "isDragging", "velocity", "onDragEnd", "_point", "shouldDrag", "axisValue", "next", "applyConstraints", "dragConstraints", "dragElastic", "layout", "_a", "prevConstraints", "isRefObject", "calcRelativeConstraints", "resolveDragElastic", "rebaseAxisConstraints", "constraints", "onMeasureDragConstraints", "constraintsElement", "invariant", "constraintsBox", "measurePageBox", "measuredConstraints", "calcViewportConstraints", "userConstraints", "convertBoxToBoundingBox", "convertBoundingBoxToBox", "dragMomentum", "dragTransition", "onDragTransitionEnd", "momentumAnimations", "transition", "bounceStiffness", "bounceDamping", "inertia", "animateMotionValue", "dragKey", "externalMotionValue", "point", "min", "max", "mixNumber", "boxProgress", "latest", "calcOrigin", "transformTemplate", "element", "stopPointerListener", "addPointerEvent", "dragListener", "target", "isClickingTextInputChild", "isElementTextInput", "stopResizeObservers", "measureDragConstraints", "startResizeObservers", "stopMeasureLayoutListener", "stopResizeListener", "addDomEvent", "stopLayoutUpdateListener", "delta", "hasLayoutChanged", "motionValue", "props", "defaultElastic", "skipFirstCall", "callback", "isFirst", "onResize", "stopElement", "resize", "stopContainer", "direction", "currentDirection", "lockThreshold", "DragGesture", "Feature", "node", "noop", "VisualElementDragControls", "dragControls", "prevDragControls", "asyncHandler", "handler", "event", "info", "frame", "PanGesture", "Feature", "noop", "pointerDownEvent", "PanSession", "getContextWindow", "onPanSessionStart", "onPanStart", "onPan", "onPanEnd", "addPointerEvent", "hasTakenAnySnapshot", "MeasureLayoutWithContext", "visualElement", "layoutGroup", "switchLayoutGroup", "layoutId", "projection", "globalProjectionState", "prevProps", "layoutDependency", "drag", "isPresent", "frame", "stack", "layoutAnchor", "microtask", "promoteContext", "safeToRemove", "MeasureLayout", "props", "LayoutGroupContext", "drag", "PanGesture", "DragGesture", "HTMLProjectionNode", "MeasureLayout", "handleHoverEvent", "node", "event", "lifecycle", "props", "eventName", "callback", "frame", "extractEventInfo", "HoverGesture", "Feature", "current", "hover", "_element", "startEvent", "endEvent", "FocusGesture", "Feature", "isFocusVisible", "pipe", "addDomEvent", "handlePressEvent", "node", "event", "lifecycle", "props", "eventName", "callback", "frame", "extractEventInfo", "PressGesture", "Feature", "current", "globalTapTarget", "propagate", "press", "_element", "startEvent", "endEvent", "success", "observerCallbacks", "observers", "fireObserverCallback", "entry", "callback", "fireAllObserverCallbacks", "entries", "initIntersectionObserver", "root", "options", "lookupRoot", "rootObservers", "key", "observeIntersection", "element", "rootInteresectionObserver", "thresholdNames", "InViewFeature", "Feature", "_a", "viewport", "root", "rootMargin", "amount", "once", "options", "onIntersectionUpdate", "entry", "isIntersecting", "onViewportEnter", "onViewportLeave", "callback", "observeIntersection", "props", "prevProps", "hasViewportOptionChanged", "prevViewport", "name", "gestureAnimations", "InViewFeature", "PressGesture", "FocusGesture", "HoverGesture", "layout", "HTMLProjectionNode", "MeasureLayout", "featureBundle", "animations", "gestureAnimations", "drag", "layout", "motion", "createMotionProxy", "featureBundle", "createDomVisualElement", "import_lodash", "doGet", "action", "resolve", "reject", "url", "base", "fullUrl", "res", "data", "getPhotoWH", "dispatch", "callback", "dic", "action", "doGet", "res", "_a", "GET_PHOTO_WIDTH_HEIGHT", "getPhotoMenu", "data", "GET_PHOTO_MENU", "getData", "menuData", "loadData", "resolve", "query", "loadDataForContainer", "import_jsx_runtime", "springSettings", "NEXT", "Photo", "query", "_legacyMenu", "getPhotoMenu", "location", "useLocation", "from", "withSSR", "usePreserveSSR", "initialDicRef", "currentDic", "getLocationParams", "isSEO", "HelmetExport", "Header_default", "Layout_default", "Container", "Row", "SuspendedMenuRow", "SuspendedCarousel", "menu", "usePhotoMenu", "_", "item", "index", "Link", "dic", "dims", "usePhotoDimensions", "photos", "currPhoto", "setCurrPhoto", "currPhotoData", "setCurrPhotoData", "currWidth", "currHeight", "widths", "photo", "origW", "origH", "leftStartCoords", "sum", "width", "photoPositions", "acc", "_item", "i", "prevLeft", "handleChange", "e", "clickHandler", "btn", "photoIndex", "motion", "pos", "mapStateToProps", "state", "_a", "mapDispatchToProps", "loadDataForContainer", "Photo_default", "connect", "loadData", "resolve", "dispatch", "doGet", "res", "_a", "GET_PHOTO_MENU", "err", "import_jsx_runtime", "Routers_default", "Home_default", "loadData", "Login_default", "Photo_default", "import_jsx_runtime", "readPrefetchedState", "el", "App", "store", "ctx", "store_default", "Theme_default", "Provider", "BrowserRouter", "Routes", "Routers_default", "router", "Route", "container", "app", "fireVisitBeacon", "visitor", "referrer", "payload"]
}
