@ashlr/hub 3.2.6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +290 -0
- package/README.md +4 -1
- package/dist/build-identity.json +2 -2
- package/dist/cli/activation.d.ts +41 -0
- package/dist/cli/activation.js +485 -0
- package/dist/cli/activation.js.map +1 -0
- package/dist/cli/audit.js +18 -0
- package/dist/cli/audit.js.map +1 -1
- package/dist/cli/backlog.d.ts +0 -5
- package/dist/cli/backlog.js +18 -0
- package/dist/cli/backlog.js.map +1 -1
- package/dist/cli/comms.js +20 -0
- package/dist/cli/comms.js.map +1 -1
- package/dist/cli/completions.d.ts +6 -1
- package/dist/cli/completions.js +37 -11
- package/dist/cli/completions.js.map +1 -1
- package/dist/cli/conductor-permit.d.ts +1 -0
- package/dist/cli/conductor-permit.js +122 -0
- package/dist/cli/conductor-permit.js.map +1 -0
- package/dist/cli/daemon.js +10 -3
- package/dist/cli/daemon.js.map +1 -1
- package/dist/cli/demo.d.ts +0 -27
- package/dist/cli/demo.js +17 -0
- package/dist/cli/demo.js.map +1 -1
- package/dist/cli/goals.d.ts +2 -0
- package/dist/cli/goals.js +90 -5
- package/dist/cli/goals.js.map +1 -1
- package/dist/cli/help.js +21 -3
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/inbox.d.ts +14 -2
- package/dist/cli/inbox.js +137 -23
- package/dist/cli/inbox.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +16 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/loop.js +26 -5
- package/dist/cli/loop.js.map +1 -1
- package/dist/cli/onboard.d.ts +0 -13
- package/dist/cli/onboard.js +20 -0
- package/dist/cli/onboard.js.map +1 -1
- package/dist/cli/resources.js +15 -0
- package/dist/cli/resources.js.map +1 -1
- package/dist/cli/run.js +1 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/sandbox.js +43 -0
- package/dist/cli/sandbox.js.map +1 -1
- package/dist/cli/tui.d.ts +0 -6
- package/dist/cli/tui.js +14 -0
- package/dist/cli/tui.js.map +1 -1
- package/dist/core/comms/elon-dialogue.js +16 -7
- package/dist/core/comms/elon-dialogue.js.map +1 -1
- package/dist/core/config.js +70 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/daemon/activation-permit.d.ts +357 -33
- package/dist/core/daemon/activation-permit.js +1585 -183
- package/dist/core/daemon/activation-permit.js.map +1 -1
- package/dist/core/daemon/goal-conductor-permit-operator.d.ts +75 -0
- package/dist/core/daemon/goal-conductor-permit-operator.js +842 -0
- package/dist/core/daemon/goal-conductor-permit-operator.js.map +1 -0
- package/dist/core/daemon/loop.d.ts +13 -1
- package/dist/core/daemon/loop.js +294 -29
- package/dist/core/daemon/loop.js.map +1 -1
- package/dist/core/daemon/runtime-activation-resident-start-protocol.d.ts +141 -0
- package/dist/core/daemon/runtime-activation-resident-start-protocol.js +462 -0
- package/dist/core/daemon/runtime-activation-resident-start-protocol.js.map +1 -0
- package/dist/core/daemon/runtime-activation-resident-start-runtime.d.ts +27 -0
- package/dist/core/daemon/runtime-activation-resident-start-runtime.js +28 -0
- package/dist/core/daemon/runtime-activation-resident-start-runtime.js.map +1 -0
- package/dist/core/daemon/runtime-activation-stopped-consumer.d.ts +139 -0
- package/dist/core/daemon/runtime-activation-stopped-consumer.js +995 -0
- package/dist/core/daemon/runtime-activation-stopped-consumer.js.map +1 -0
- package/dist/core/daemon/runtime-activation-stopped-runtime.d.ts +36 -0
- package/dist/core/daemon/runtime-activation-stopped-runtime.js +134 -0
- package/dist/core/daemon/runtime-activation-stopped-runtime.js.map +1 -0
- package/dist/core/daemon/runtime-activation-transaction.d.ts +41 -17
- package/dist/core/daemon/runtime-activation-transaction.js +80 -11
- package/dist/core/daemon/runtime-activation-transaction.js.map +1 -1
- package/dist/core/daemon/runtime-release-dependency-inventory.js +1 -0
- package/dist/core/daemon/runtime-release-dependency-inventory.js.map +1 -1
- package/dist/core/daemon/service-install-authority.d.ts +0 -4
- package/dist/core/daemon/service-install-authority.js +18 -3
- package/dist/core/daemon/service-install-authority.js.map +1 -1
- package/dist/core/dashboard.d.ts +10 -0
- package/dist/core/dashboard.js +103 -28
- package/dist/core/dashboard.js.map +1 -1
- package/dist/core/effective-config.js +7 -0
- package/dist/core/effective-config.js.map +1 -1
- package/dist/core/fleet/automerge-pass.js +33 -0
- package/dist/core/fleet/automerge-pass.js.map +1 -1
- package/dist/core/fleet/decisions-ledger.js +35 -12
- package/dist/core/fleet/decisions-ledger.js.map +1 -1
- package/dist/core/fleet/external-skill-git-capture.js +9 -1
- package/dist/core/fleet/external-skill-git-capture.js.map +1 -1
- package/dist/core/fleet/judge-decision-metadata.d.ts +8 -1
- package/dist/core/fleet/judge-decision-metadata.js +14 -1
- package/dist/core/fleet/judge-decision-metadata.js.map +1 -1
- package/dist/core/fleet/manager.d.ts +15 -1
- package/dist/core/fleet/manager.js +108 -30
- package/dist/core/fleet/manager.js.map +1 -1
- package/dist/core/fleet/post-merge-credit.d.ts +134 -9
- package/dist/core/fleet/post-merge-credit.js +350 -10
- package/dist/core/fleet/post-merge-credit.js.map +1 -1
- package/dist/core/fleet/quota.d.ts +74 -7
- package/dist/core/fleet/quota.js +688 -34
- package/dist/core/fleet/quota.js.map +1 -1
- package/dist/core/fleet/self-improve.d.ts +34 -1
- package/dist/core/fleet/self-improve.js +106 -1
- package/dist/core/fleet/self-improve.js.map +1 -1
- package/dist/core/fleet/skill-library.d.ts +21 -2
- package/dist/core/fleet/skill-library.js +54 -12
- package/dist/core/fleet/skill-library.js.map +1 -1
- package/dist/core/fleet/status.js +7 -5
- package/dist/core/fleet/status.js.map +1 -1
- package/dist/core/fleet/worked-ledger.d.ts +22 -0
- package/dist/core/fleet/worked-ledger.js +32 -0
- package/dist/core/fleet/worked-ledger.js.map +1 -1
- package/dist/core/foundry/automerge-scope-policy.d.ts +2 -2
- package/dist/core/foundry/automerge-scope-policy.js +9 -2
- package/dist/core/foundry/automerge-scope-policy.js.map +1 -1
- package/dist/core/goals/advance.js +34 -5
- package/dist/core/goals/advance.js.map +1 -1
- package/dist/core/goals/conductor-quota.d.ts +38 -0
- package/dist/core/goals/conductor-quota.js +110 -0
- package/dist/core/goals/conductor-quota.js.map +1 -0
- package/dist/core/goals/conductor-target.d.ts +24 -0
- package/dist/core/goals/conductor-target.js +35 -0
- package/dist/core/goals/conductor-target.js.map +1 -0
- package/dist/core/goals/conductor.d.ts +15 -0
- package/dist/core/goals/conductor.js +116 -9
- package/dist/core/goals/conductor.js.map +1 -1
- package/dist/core/goals/store.d.ts +29 -5
- package/dist/core/goals/store.js +197 -30
- package/dist/core/goals/store.js.map +1 -1
- package/dist/core/goals/timestamp-repair.d.ts +50 -0
- package/dist/core/goals/timestamp-repair.js +740 -0
- package/dist/core/goals/timestamp-repair.js.map +1 -0
- package/dist/core/inbox/apply.js +5 -2
- package/dist/core/inbox/apply.js.map +1 -1
- package/dist/core/inbox/merge.d.ts +94 -1
- package/dist/core/inbox/merge.js +349 -16
- package/dist/core/inbox/merge.js.map +1 -1
- package/dist/core/integrations/github.d.ts +2 -0
- package/dist/core/integrations/github.js +2 -1
- package/dist/core/integrations/github.js.map +1 -1
- package/dist/core/integrations/pulse-sync.js +13 -4
- package/dist/core/integrations/pulse-sync.js.map +1 -1
- package/dist/core/learn/reflect.d.ts +42 -4
- package/dist/core/learn/reflect.js +56 -5
- package/dist/core/learn/reflect.js.map +1 -1
- package/dist/core/run/best-of-n.d.ts +18 -0
- package/dist/core/run/best-of-n.js +163 -18
- package/dist/core/run/best-of-n.js.map +1 -1
- package/dist/core/run/engines.d.ts +8 -0
- package/dist/core/run/engines.js +9 -1
- package/dist/core/run/engines.js.map +1 -1
- package/dist/core/run/learned-router.js +28 -3
- package/dist/core/run/learned-router.js.map +1 -1
- package/dist/core/run/orchestrator.d.ts +7 -2
- package/dist/core/run/orchestrator.js +140 -60
- package/dist/core/run/orchestrator.js.map +1 -1
- package/dist/core/strategy/goal-planner.js +7 -1
- package/dist/core/strategy/goal-planner.js.map +1 -1
- package/dist/core/swarm/planner.d.ts +2 -2
- package/dist/core/swarm/planner.js +52 -5
- package/dist/core/swarm/planner.js.map +1 -1
- package/dist/core/swarm/rollback.d.ts +11 -0
- package/dist/core/swarm/rollback.js +54 -0
- package/dist/core/swarm/rollback.js.map +1 -1
- package/dist/core/swarm/runner.js +123 -11
- package/dist/core/swarm/runner.js.map +1 -1
- package/dist/core/types.d.ts +139 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/web/api.js +105 -7
- package/dist/core/web/api.js.map +1 -1
- package/dist/core/web/control.d.ts +20 -0
- package/dist/core/web/control.js +49 -34
- package/dist/core/web/control.js.map +1 -1
- package/dist/core/web/fleet-status-cache.d.ts +68 -0
- package/dist/core/web/fleet-status-cache.js +120 -0
- package/dist/core/web/fleet-status-cache.js.map +1 -0
- package/dist/core/web/public/next/assets/index-CY0U241s.css +1 -0
- package/dist/core/web/public/next/assets/index-Ct0mf8n4.js +69 -0
- package/dist/core/web/public/next/assets/index-Ct0mf8n4.js.map +1 -0
- package/dist/core/web/public/next/index.html +15 -0
- package/dist/release-dependency-inventory.json +1 -1
- package/dist/tui/app.js +2 -2
- package/dist/tui/app.js.map +1 -1
- package/dist/tui/render.d.ts +2 -0
- package/dist/tui/render.js +162 -4
- package/dist/tui/render.js.map +1 -1
- package/docs/RUNTIME_ACTIVATION_AUTHORITY.md +126 -21
- package/docs/contracts/CONTRACT-M521.md +102 -0
- package/package.json +20 -3
- package/schema/config.schema.json +800 -5
- package/node_modules/which/CHANGELOG.md +0 -166
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Ct0mf8n4.js","sources":["../../../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../../../node_modules/react/jsx-runtime.js","../../../../../../node_modules/react/cjs/react.production.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/scheduler/cjs/scheduler.production.js","../../../../../../node_modules/scheduler/index.js","../../../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../../../node_modules/react-dom/index.js","../../../../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../../../../node_modules/react-dom/client.js","../../../../../../node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs","../../../../../../src/web-ui/app/nav-config.ts","../../../../../../src/web-ui/components/layout/Sidebar.tsx","../../../../../../src/web-ui/data/cache.ts","../../../../../../src/web-ui/data/auth-store.ts","../../../../../../src/web-ui/data/sse.ts","../../../../../../src/web-ui/data/hooks.ts","../../../../../../src/web-ui/components/notifications/deriveNotifications.ts","../../../../../../src/web-ui/components/notifications/notification-store.ts","../../../../../../src/web-ui/components/notifications/useNotifications.ts","../../../../../../src/web-ui/components/notifications/NotificationBell.tsx","../../../../../../src/web-ui/components/primitives/Dialog.tsx","../../../../../../src/web-ui/components/primitives/Epistemic.tsx","../../../../../../src/web-ui/components/primitives/StatusBadge.tsx","../../../../../../src/web-ui/components/notifications/types.ts","../../../../../../src/web-ui/components/notifications/NotificationItem.tsx","../../../../../../src/web-ui/data/client.ts","../../../../../../src/web-ui/data/queries.ts","../../../../../../src/web-ui/components/notifications/useNotificationEngine.ts","../../../../../../src/web-ui/components/notifications/NotificationCenter.tsx","../../../../../../src/web-ui/components/layout/Topbar.tsx","../../../../../../src/web-ui/data/mutations.ts","../../../../../../src/web-ui/components/command-palette/commands.ts","../../../../../../src/web-ui/components/auth/MutationTokenDialog.tsx","../../../../../../src/web-ui/components/primitives/Toast.tsx","../../../../../../src/web-ui/components/command-palette/CommandPalette.tsx","../../../../../../src/web-ui/components/primitives/RouteErrorBoundary.tsx","../../../../../../src/web-ui/hooks/useScrollRestore.ts","../../../../../../src/web-ui/components/layout/Shell.tsx","../../../../../../src/web-ui/routes/PlaceholderView.tsx","../../../../../../src/web-ui/components/primitives/RefreshIndicator.tsx","../../../../../../src/web-ui/components/primitives/Skeleton.tsx","../../../../../../src/web-ui/routes/fleet-dashboard/StatGrid.tsx","../../../../../../src/web-ui/routes/fleet-dashboard/RunsPanel.tsx","../../../../../../src/web-ui/routes/fleet-dashboard/SwarmsPanel.tsx","../../../../../../src/web-ui/routes/fleet-dashboard/DaemonPanel.tsx","../../../../../../src/web-ui/routes/fleet-dashboard/FleetDashboardView.tsx","../../../../../../src/web-ui/components/stream/useRunStream.ts","../../../../../../src/web-ui/components/stream/RunStreamPanel.tsx","../../../../../../src/web-ui/routes/journal/LiveNowStrip.tsx","../../../../../../src/web-ui/routes/journal/JournalFilters.tsx","../../../../../../src/web-ui/routes/journal/journal-model.ts","../../../../../../src/web-ui/routes/journal/JournalTimeline.tsx","../../../../../../src/web-ui/routes/journal/JournalEntryDetail.tsx","../../../../../../src/web-ui/routes/journal/JournalEntryRow.tsx","../../../../../../src/web-ui/routes/journal/JournalView.tsx","../../../../../../src/web-ui/components/charts/ChartContainer.tsx","../../../../../../src/web-ui/components/charts/Legend.tsx","../../../../../../src/web-ui/components/charts/colors.ts","../../../../../../src/web-ui/components/charts/LineChart.tsx","../../../../../../src/web-ui/components/charts/BarChart.tsx","../../../../../../src/web-ui/components/charts/Sparkline.tsx","../../../../../../src/web-ui/components/charts/format.ts","../../../../../../src/web-ui/components/charts/StatTile.tsx","../../../../../../src/web-ui/components/charts/TableView.tsx","../../../../../../src/web-ui/routes/intelligence/pulse/PulseView.tsx","../../../../../../src/web-ui/routes/intelligence/genome/GenomeView.tsx","../../../../../../src/web-ui/routes/intelligence/production/ProductionView.tsx","../../../../../../src/web-ui/routes/portfolio/PortfolioView.tsx","../../../../../../src/web-ui/routes/work/runs/RunsView.tsx","../../../../../../src/web-ui/routes/work/runs/RunDetailView.tsx","../../../../../../src/web-ui/routes/work/swarms/SwarmsView.tsx","../../../../../../src/web-ui/routes/work/swarms/SwarmDag.tsx","../../../../../../src/web-ui/routes/work/swarms/SwarmDetailView.tsx","../../../../../../src/web-ui/routes/control/daemon/DaemonView.tsx","../../../../../../src/web-ui/routes/control/fleet/FleetView.tsx","../../../../../../src/web-ui/routes/control/security/SecurityView.tsx","../../../../../../src/web-ui/routes/goals/GoalsView.tsx","../../../../../../src/web-ui/routes/inbox/ConfirmDialog.tsx","../../../../../../src/web-ui/routes/inbox/ProposalList.tsx","../../../../../../src/web-ui/routes/inbox/diff-parser.ts","../../../../../../src/web-ui/routes/inbox/highlight.ts","../../../../../../src/web-ui/routes/inbox/DiffViewer.tsx","../../../../../../src/web-ui/routes/inbox/ProposalDetail.tsx","../../../../../../src/web-ui/routes/inbox/InboxView.tsx","../../../../../../src/web-ui/app/routes.tsx","../../../../../../src/web-ui/app/SkipToContent.tsx","../../../../../../src/web-ui/components/auth/SessionGate.tsx","../../../../../../src/web-ui/app/App.tsx","../../../../../../src/web-ui/main.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","'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 * @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 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 ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\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 },\n 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.__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.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 = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\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};\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.2.8\";\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\");\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: null == key ? null : \"\" + 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.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 });\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 });\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.2.8\";\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 var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : 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}\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\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.tracing_marker\");\nvar REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\");\nSymbol.for(\"react.view_transition\");\nvar 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 }\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 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);\n context !== 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 fn.call(Fake.prototype);\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 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 & 261888;\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 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;\nfunction detachDeletedInstance(node) {\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) 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}\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}\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}\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) {\n return doc.body;\n }\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 ? setDefaultValue(element, type, getToStringValue(value))\n : null != defaultValue\n ? setDefaultValue(element, type, 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, type, value) {\n (\"number\" === type && getActiveElement(node.ownerDocument) === node) ||\n node.defaultValue === \"\" + value ||\n (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 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 } 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 [\"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 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 }),\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$286;\n if (canUseDOM) {\n var isSupported$jscomp$inline_427 = \"oninput\" in document;\n if (!isSupported$jscomp$inline_427) {\n var element$jscomp$inline_428 = document.createElement(\"div\");\n element$jscomp$inline_428.setAttribute(\"oninput\", \"return;\");\n isSupported$jscomp$inline_427 =\n \"function\" === typeof element$jscomp$inline_428.oninput;\n }\n JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427;\n } else JSCompiler_inline_result$jscomp$286 = !1;\n isInputEventSupported =\n JSCompiler_inline_result$jscomp$286 &&\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 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 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 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 & 65011712;\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 &= 65011714;\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 type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type)\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 (type) {\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 default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$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 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}\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}\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 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 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 throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\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.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, 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 |= 67108866), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 67108866;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 67108866);\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 updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\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 null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\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 null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\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 (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 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 (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(fiber);\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 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 (\"forwards\" === node.memoizedProps.revealOrder ||\n \"backwards\" === node.memoizedProps.revealOrder ||\n \"unstable_legacy-backwards\" === node.memoizedProps.revealOrder ||\n \"together\" === 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_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$60 = !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$60 = !0);\n else if ((renderLanes & revertLane) === revertLane) {\n update = update.next;\n revertLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !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$60 &&\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 if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n hook,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\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 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$66) {\n onActionError(actionQueue, node, error$66);\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 & 42) ||\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 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$69 = enqueueUpdate(provider, fiber, lane);\n null !== root$69 &&\n (scheduleUpdateOnFiber(root$69, provider, lane),\n entangleTransitions(root$69, 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};\nContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;\nvar 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 };\nHooksDispatcherOnUpdate.useEffectEvent = updateEvent;\nvar 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};\nHooksDispatcherOnRerender.useEffectEvent = updateEvent;\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$73 in Component)\n void 0 === newProps[propName$73] &&\n (newProps[propName$73] = Component[propName$73]);\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$74) {\n setTimeout(function () {\n throw e$74;\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$75) {\n setTimeout(function () {\n throw e$75;\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 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 if (\n ((returnFiber = sourceFiber.type),\n (wrapperError = sourceFiber.stateNode),\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 }\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(workInProgress),\n (workInProgress.memoizedState = null))\n : (null !== current && pushTransition(workInProgress, null),\n reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\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 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 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 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 |= 4096);\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(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 isSuspenseInstanceFallback(current)\n ? (workInProgress.lanes = 32)\n : (workInProgress.lanes = 536870912);\n return null;\n }\n var nextPrimaryChildren = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (showFallback = workInProgress.mode),\n (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"hidden\", children: nextPrimaryChildren },\n showFallback\n )),\n (nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.sibling = nextProps),\n (workInProgress.child = nextPrimaryChildren),\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, nextPrimaryChildren);\n }\n var prevState = current.memoizedState;\n if (\n null !== prevState &&\n ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)\n ) {\n if (didSuspend)\n workInProgress.flags & 256\n ? (pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n )))\n : null !== workInProgress.memoizedState\n ? (reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null))\n : (reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (nextProps = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: nextProps.children },\n showFallback\n )),\n (nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n ),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState =\n mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n (workInProgress = bailoutOffscreenComponent(null, nextProps)));\n else if (\n (pushPrimaryTreeSuspenseHandler(workInProgress),\n isSuspenseInstanceFallback(nextPrimaryChildren))\n ) {\n JSCompiler_temp =\n nextPrimaryChildren.nextSibling &&\n nextPrimaryChildren.nextSibling.dataset;\n if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;\n JSCompiler_temp = digest;\n nextProps = Error(formatProdErrorMessage(419));\n nextProps.stack = \"\";\n nextProps.digest = JSCompiler_temp;\n queueHydrationError({ value: nextProps, source: null, stack: null });\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || JSCompiler_temp)\n ) {\n JSCompiler_temp = workInProgressRoot;\n if (\n null !== JSCompiler_temp &&\n ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),\n 0 !== nextProps && nextProps !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),\n SelectiveHydrationException)\n );\n isSuspenseInstancePending(nextPrimaryChildren) ||\n renderDidSuspendDelayIfPossible();\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n isSuspenseInstancePending(nextPrimaryChildren)\n ? ((workInProgress.flags |= 192),\n (workInProgress.child = current.child),\n (workInProgress = null))\n : ((current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(\n nextPrimaryChildren.nextSibling\n )),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountSuspensePrimaryChildren(\n workInProgress,\n nextProps.children\n )),\n (workInProgress.flags |= 4096));\n return workInProgress;\n }\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (prevState = current.child),\n (digest = prevState.sibling),\n (nextProps = createWorkInProgress(prevState, {\n mode: \"hidden\",\n children: nextProps.children\n })),\n (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),\n null !== digest\n ? (nextPrimaryChildren = createWorkInProgress(\n digest,\n nextPrimaryChildren\n ))\n : ((nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2)),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n bailoutOffscreenComponent(null, nextProps),\n (nextProps = workInProgress.child),\n (nextPrimaryChildren = current.child.memoizedState),\n null === nextPrimaryChildren\n ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))\n : ((showFallback = nextPrimaryChildren.cachePool),\n null !== showFallback\n ? ((prevState = CacheContext._currentValue),\n (showFallback =\n showFallback.parent !== prevState\n ? { parent: prevState, pool: prevState }\n : showFallback))\n : (showFallback = getSuspendedCache()),\n (nextPrimaryChildren = {\n baseLanes: nextPrimaryChildren.baseLanes | renderLanes,\n cachePool: showFallback\n })),\n (nextProps.memoizedState = nextPrimaryChildren),\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 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 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 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 shouldForceFallback = 0 !== (suspenseContext & 2);\n shouldForceFallback\n ? ((suspenseContext = (suspenseContext & 1) | 2),\n (workInProgress.flags |= 128))\n : (suspenseContext &= 1);\n push(suspenseStackCursor, suspenseContext);\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 \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child), (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 break;\n case \"backwards\":\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 default:\n workInProgress.memoizedState = null;\n }\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$102 = workInProgress.memoizedState;\n if (null !== state$102) {\n if (null !== state$102.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\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 var didSuspendBefore = 0 !== (current.flags & 128);\n state$102 = 0 !== (renderLanes & workInProgress.childLanes);\n state$102 ||\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n (state$102 = 0 !== (renderLanes & workInProgress.childLanes)));\n if (didSuspendBefore) {\n if (state$102)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n didSuspendBefore = workInProgress.memoizedState;\n null !== didSuspendBefore &&\n ((didSuspendBefore.rendering = null),\n (didSuspendBefore.tail = null),\n (didSuspendBefore.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (state$102) 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 }\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) | 4096),\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 ((renderLanes = workInProgress.type),\n (current = workInProgress.pendingProps),\n (props = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n ).createElement(renderLanes)),\n (props[internalInstanceKey] = workInProgress),\n (props[internalPropsKey] = current),\n setInitialProperties(props, renderLanes, current),\n markNodeAsHoistable(props),\n (workInProgress.stateNode = props))\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 reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\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 (\n (props = workInProgress.pendingProps),\n pushProvider(workInProgress, workInProgress.type, props.value),\n reconcileChildren(current, workInProgress, props.children, renderLanes),\n workInProgress.child\n );\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 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 if ((type = 0 !== (workInProgress.mode & 32))) type = !1;\n if (type) {\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 \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$106 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$106 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$106\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$106.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$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags & 65011712),\n (subtreeFlags |= child$107.flags & 65011712),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n else\n for (child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags),\n (subtreeFlags |= child$107.flags),\n (child$107.return = completedWork),\n (child$107 = child$107.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 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 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 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 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 bubbleProperties(workInProgress),\n null\n );\n case 10:\n return (\n popProvider(workInProgress.type), bubbleProperties(workInProgress), null\n );\n case 19:\n pop(suspenseStackCursor);\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 push(\n suspenseStackCursor,\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 \"hidden\" === 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 return (\n (current = newProps.tail),\n (newProps.rendering = current),\n (newProps.tail = current.sibling),\n (newProps.renderingStartTime = now()),\n (current.sibling = null),\n (renderLanes = suspenseStackCursor.current),\n push(\n suspenseStackCursor,\n type ? (renderLanes & 1) | 2 : renderLanes & 1\n ),\n isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),\n 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 null;\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 pop(suspenseStackCursor), null;\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 pop(suspenseStackCursor);\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 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$140) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$140);\n }\n else ref.current = null;\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(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before\n ? (9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent\n ).insertBefore(node, before)\n : ((before =\n 9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent),\n before.appendChild(node),\n (parent = parent._reactRootContainer),\n (null !== parent && void 0 !== parent) ||\n null !== before.onclick ||\n (before.onclick = noop$1));\n else if (\n 4 !== tag &&\n (27 === tag &&\n isSingletonScope(node.type) &&\n ((parent = node.stateNode), (before = null)),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before ? parent.insertBefore(node, before) : parent.appendChild(node);\n else if (\n 4 !== tag &&\n (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNode(node, before, parent), node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNode(node, before, parent), (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 offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n needsFormReset = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction commitBeforeMutationEffects(root, firstChild) {\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$20) {\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 for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((firstChild = nextEffect),\n (root = firstChild.child),\n 0 !== (firstChild.subtreeFlags & 1028) && null !== root)\n )\n (root.return = firstChild), (nextEffect = root);\n else\n for (; null !== nextEffect; ) {\n firstChild = nextEffect;\n focusNode = firstChild.alternate;\n root = firstChild.flags;\n switch (firstChild.tag) {\n case 0:\n if (\n 0 !== (root & 4) &&\n ((root = firstChild.updateQueue),\n (root = null !== root ? root.events : null),\n null !== root)\n )\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < root.length;\n JSCompiler_temp++\n )\n (anchorOffset = root[JSCompiler_temp]),\n (anchorOffset.ref.impl = anchorOffset.nextImpl);\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (root & 1024) && null !== focusNode) {\n root = void 0;\n JSCompiler_temp = firstChild;\n anchorOffset = focusNode.memoizedProps;\n focusNode = focusNode.memoizedState;\n selection = JSCompiler_temp.stateNode;\n try {\n var resolvedPrevProps = resolveClassComponentProps(\n JSCompiler_temp.type,\n anchorOffset\n );\n root = selection.getSnapshotBeforeUpdate(\n resolvedPrevProps,\n focusNode\n );\n selection.__reactInternalSnapshotBeforeUpdate = root;\n } catch (error) {\n captureCommitPhaseError(\n JSCompiler_temp,\n JSCompiler_temp.return,\n error\n );\n }\n }\n break;\n case 3:\n if (0 !== (root & 1024))\n if (\n ((root = firstChild.stateNode.containerInfo),\n (JSCompiler_temp = root.nodeType),\n 9 === JSCompiler_temp)\n )\n clearContainerSparingly(root);\n else if (1 === JSCompiler_temp)\n switch (root.nodeName) {\n case \"HEAD\":\n case \"HTML\":\n case \"BODY\":\n clearContainerSparingly(root);\n break;\n default:\n root.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 default:\n if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));\n }\n root = firstChild.sibling;\n if (null !== root) {\n root.return = firstChild.return;\n nextEffect = root;\n break;\n }\n nextEffect = firstChild.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$139) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$139\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 current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n prevProps = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = flags;\n (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevProps;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n break;\n case 30:\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\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 ((deletedFiber = deletedFiber.stateNode),\n deletedFiber.parentNode.removeChild(deletedFiber));\n break;\n case 27:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\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(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\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 } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n else\n try {\n hostParent.removeChild(deletedFiber.stateNode);\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 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) {\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),\n (parentFiber = parentFiber.sibling);\n}\nvar currentHoistableRoot = null;\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\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 recursivelyTraverseMutationEffects(root, finishedWork);\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);\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 ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (flags & 4) {\n var currentResource = null !== current ? current.memoizedState : null;\n flags = finishedWork.memoizedState;\n if (null === current)\n if (null === flags)\n if (null === finishedWork.stateNode) {\n a: {\n flags = finishedWork.type;\n current = finishedWork.memoizedProps;\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n b: switch (flags) {\n case \"title\":\n currentResource =\n hoistableRoot.getElementsByTagName(\"title\")[0];\n if (\n !currentResource ||\n currentResource[internalHoistableMarker] ||\n currentResource[internalInstanceKey] ||\n \"http://www.w3.org/2000/svg\" ===\n currentResource.namespaceURI ||\n currentResource.hasAttribute(\"itemprop\")\n )\n (currentResource = hoistableRoot.createElement(flags)),\n hoistableRoot.head.insertBefore(\n currentResource,\n hoistableRoot.querySelector(\"head > title\")\n );\n setInitialProperties(currentResource, flags, current);\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n break a;\n case \"link\":\n var maybeNodes = getHydratableHoistableCache(\n \"link\",\n \"href\",\n hoistableRoot\n ).get(flags + (current.href || \"\"));\n if (maybeNodes)\n for (var i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"href\") ===\n (null == current.href || \"\" === current.href\n ? null\n : current.href) &&\n currentResource.getAttribute(\"rel\") ===\n (null == current.rel ? null : current.rel) &&\n currentResource.getAttribute(\"title\") ===\n (null == current.title ? null : current.title) &&\n currentResource.getAttribute(\"crossorigin\") ===\n (null == current.crossOrigin\n ? null\n : current.crossOrigin))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n case \"meta\":\n if (\n (maybeNodes = getHydratableHoistableCache(\n \"meta\",\n \"content\",\n hoistableRoot\n ).get(flags + (current.content || \"\")))\n )\n for (i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"content\") ===\n (null == current.content\n ? null\n : \"\" + current.content) &&\n currentResource.getAttribute(\"name\") ===\n (null == current.name ? null : current.name) &&\n currentResource.getAttribute(\"property\") ===\n (null == current.property\n ? null\n : current.property) &&\n currentResource.getAttribute(\"http-equiv\") ===\n (null == current.httpEquiv\n ? null\n : current.httpEquiv) &&\n currentResource.getAttribute(\"charset\") ===\n (null == current.charSet\n ? null\n : current.charSet))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n default:\n throw Error(formatProdErrorMessage(468, flags));\n }\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n }\n finishedWork.stateNode = flags;\n } else\n mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n );\n else\n finishedWork.stateNode = acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n );\n else\n currentResource !== flags\n ? (null === currentResource\n ? null !== current.stateNode &&\n ((current = current.stateNode),\n current.parentNode.removeChild(current))\n : currentResource.count--,\n null === flags\n ? mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n )\n : acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n ))\n : null === flags &&\n null !== finishedWork.stateNode &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n }\n break;\n case 27:\n recursivelyTraverseMutationEffects(root, finishedWork);\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 recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (finishedWork.flags & 32) {\n hoistableRoot = finishedWork.stateNode;\n try {\n setTextContent(hoistableRoot, \"\");\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n flags & 4 &&\n null != finishedWork.stateNode &&\n ((hoistableRoot = finishedWork.memoizedProps),\n commitHostUpdate(\n finishedWork,\n hoistableRoot,\n null !== current ? current.memoizedProps : hoistableRoot\n ));\n flags & 1024 && (needsFormReset = !0);\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n if (null === finishedWork.stateNode)\n throw Error(formatProdErrorMessage(162));\n flags = finishedWork.memoizedProps;\n current = finishedWork.stateNode;\n try {\n current.nodeValue = flags;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 3:\n tagCaches = null;\n hoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = hoistableRoot;\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 break;\n case 4:\n flags = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(\n finishedWork.stateNode.containerInfo\n );\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = flags;\n break;\n case 12:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 31:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\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 ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n hoistableRoot = null !== finishedWork.memoizedState;\n var wasHidden = null !== current && null !== current.memoizedState,\n prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n commitReconciliationEffects(finishedWork);\n if (flags & 8192)\n a: for (\n root = finishedWork.stateNode,\n root._visibility = hoistableRoot\n ? root._visibility & -2\n : root._visibility | 1,\n hoistableRoot &&\n (null === current ||\n wasHidden ||\n offscreenSubtreeIsHidden ||\n offscreenSubtreeWasHidden ||\n recursivelyTraverseDisappearLayoutEffects(finishedWork)),\n current = null,\n root = finishedWork;\n ;\n\n ) {\n if (5 === root.tag || 26 === root.tag) {\n if (null === current) {\n wasHidden = current = root;\n try {\n if (((currentResource = wasHidden.stateNode), hoistableRoot))\n (maybeNodes = currentResource.style),\n \"function\" === typeof maybeNodes.setProperty\n ? maybeNodes.setProperty(\"display\", \"none\", \"important\")\n : (maybeNodes.display = \"none\");\n else {\n i = wasHidden.stateNode;\n var styleProp = wasHidden.memoizedProps.style,\n display =\n void 0 !== styleProp &&\n null !== styleProp &&\n styleProp.hasOwnProperty(\"display\")\n ? styleProp.display\n : null;\n i.style.display =\n null == display || \"boolean\" === typeof display\n ? \"\"\n : (\"\" + display).trim();\n }\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (6 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n wasHidden.stateNode.nodeValue = hoistableRoot\n ? \"\"\n : wasHidden.memoizedProps;\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (18 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n var instance = wasHidden.stateNode;\n hoistableRoot\n ? hideOrUnhideDehydratedBoundary(instance, !0)\n : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (\n ((22 !== root.tag && 23 !== root.tag) ||\n null === root.memoizedState ||\n root === finishedWork) &&\n null !== root.child\n ) {\n root.child.return = root;\n root = root.child;\n continue;\n }\n if (root === finishedWork) break a;\n for (; null === root.sibling; ) {\n if (null === root.return || root.return === finishedWork) break a;\n current === root && (current = null);\n root = root.return;\n }\n current === root && (current = null);\n root.sibling.return = root.return;\n root = root.sibling;\n }\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 30:\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\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 if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));\n switch (hostParentFiber.tag) {\n case 27:\n var parent = hostParentFiber.stateNode,\n before = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n case 5:\n var parent$141 = hostParentFiber.stateNode;\n hostParentFiber.flags & 32 &&\n (setTextContent(parent$141, \"\"), (hostParentFiber.flags &= -33));\n var before$142 = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before$142, parent$141);\n break;\n case 3:\n case 4:\n var parent$143 = hostParentFiber.stateNode.containerInfo,\n before$144 = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(\n finishedWork,\n before$144,\n parent$143\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 && fiber.flags & 1024 && fiber.stateNode.reset();\n parentFiber = parentFiber.sibling;\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(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\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(finishedWork);\n break;\n case 27:\n releaseSingletonInstance(finishedWork.stateNode);\n case 26:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 30:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\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 switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(4, finishedWork);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\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 commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\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 includeWorkInProgressEffects\n );\n break;\n case 31:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\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 includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 30:\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\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 if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n) {\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 flags & 2048 &&\n ((finishedRoot = null),\n null !== finishedWork.alternate &&\n (finishedRoot = finishedWork.alternate.memoizedState.cache),\n (finishedWork = finishedWork.memoizedState.cache),\n finishedWork !== finishedRoot &&\n (finishedWork.refCount++,\n null != finishedRoot && releaseCache(finishedRoot)));\n break;\n case 12:\n if (flags & 2048) {\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n finishedRoot = 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 finishedRoot.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 ? _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : recursivelyTraverseAtomicPassiveEffects(finishedRoot, 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 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 break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\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 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 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 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 (2 !== JSCompiler_inline_result) {\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) 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 commitRootWhenReady.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 commitRootWhenReady(\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 commitRootWhenReady(\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 suspendedCommitReason = finishedWork.subtreeFlags;\n if (\n suspendedCommitReason & 8192 ||\n 16785408 === (suspendedCommitReason & 16785408)\n ) {\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 accumulateSuspenseyCommitOnFiber(\n finishedWork,\n lanes,\n suspendedCommitReason\n );\n var timeoutOffset =\n (lanes & 62914560) === lanes\n ? globalMostRecentFallbackTime - now()\n : (lanes & 4194048) === lanes\n ? globalMostRecentTransitionTime - now()\n : 0;\n timeoutOffset = waitForCommitToBeReady(\n suspendedCommitReason,\n timeoutOffset\n );\n if (null !== timeoutOffset) {\n pendingEffectsLanes = lanes;\n root.cancelPendingCommit = timeoutOffset(\n commitRoot.bind(\n null,\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n exitStatus,\n suspendedCommitReason,\n null,\n completedRenderStartTime,\n completedRenderEndTime\n )\n );\n markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);\n return;\n }\n }\n commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\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 &= ~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 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$4 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$4;\n lanes |= root[index$4];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = 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$165) {\n handleThrow(root, thrownValue$165);\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$167) {\n handleThrow(root, thrownValue$167);\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 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 commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\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 didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;\n didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;\n markRootFinished(\n root,\n lanes,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n pendingFinishedWork = finishedWork;\n pendingEffectsRoot = root;\n pendingEffectsLanes = lanes;\n pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;\n pendingPassiveTransitions = transitions;\n pendingRecoverableErrors = recoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\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 recoverableErrors = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {\n recoverableErrors = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n transitions = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n spawnedLane = executionContext;\n executionContext |= 4;\n try {\n commitBeforeMutationEffects(root, finishedWork, lanes);\n } finally {\n (executionContext = spawnedLane),\n (ReactDOMSharedInternals.p = transitions),\n (ReactSharedInternals.T = recoverableErrors);\n }\n }\n pendingEffectsStatus = 1;\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n }\n}\nfunction flushMutationEffects() {\n if (1 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\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 commitMutationEffectsOnFiber(finishedWork, root);\n var priorSelectionInformation = selectionInformation,\n curFocusedElem = getActiveElementDeep(root.containerInfo),\n priorFocusedElem = priorSelectionInformation.focusedElem,\n priorSelectionRange = priorSelectionInformation.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 requestPaint();\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n lanes = pendingEffectsLanes,\n recoverableErrors = pendingRecoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? (pendingEffectsStatus = 5)\n : ((pendingEffectsStatus = 0),\n (pendingFinishedWork = pendingEffectsRoot = null),\n releaseRootPooledCache(root, root.pendingLanes));\n var remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (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 remainingLanes = 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 = remainingLanes);\n }\n }\n 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n ensureRootIsScheduled(root);\n remainingLanes = root.pendingLanes;\n 0 !== (lanes & 261930) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\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 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) && prepareFreshStack(root, 0)\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$170 = firstScheduledRoot; null !== root$170; ) {\n if (!onlyLegacy)\n if (0 !== syncTransitionLanes) {\n var pendingLanes = root$170.pendingLanes;\n if (0 === pendingLanes) var JSCompiler_inline_result = 0;\n else {\n var suspendedLanes = root$170.suspendedLanes,\n pingedLanes = root$170.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$170, JSCompiler_inline_result));\n } else\n (JSCompiler_inline_result = workInProgressRootRenderLanes),\n (JSCompiler_inline_result = getNextLanes(\n root$170,\n root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,\n null !== root$170.cancelPendingCommit ||\n -1 !== root$170.timeoutHandle\n )),\n 0 === (JSCompiler_inline_result & 3) ||\n checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) ||\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n root$170 = root$170.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 createFormDataWithSubmitter(form, submitter) {\n var temp = submitter.ownerDocument.createElement(\"input\");\n temp.name = submitter.name;\n temp.value = submitter.value;\n form.id && temp.setAttribute(\"form\", form.id);\n submitter.parentNode.insertBefore(temp, submitter);\n form = new FormData(form);\n temp.parentNode.removeChild(temp);\n return form;\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 = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget);\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 = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget)),\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_1577 = 0;\n i$jscomp$inline_1577 < simpleEventPluginEvents.length;\n i$jscomp$inline_1577++\n) {\n var eventName$jscomp$inline_1578 =\n simpleEventPluginEvents[i$jscomp$inline_1577],\n domEventName$jscomp$inline_1579 =\n eventName$jscomp$inline_1578.toLowerCase(),\n capitalizedEvent$jscomp$inline_1580 =\n eventName$jscomp$inline_1578[0].toUpperCase() +\n eventName$jscomp$inline_1578.slice(1);\n registerSimpleEvent(\n domEventName$jscomp$inline_1579,\n \"on\" + capitalizedEvent$jscomp$inline_1580\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 \"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 reactName =\n \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n SyntheticEventCtor =\n \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n if (\n reactName &&\n nativeEvent !== currentReplayingEvent &&\n (reactEventType =\n nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n (getClosestInstanceFromNode(reactEventType) ||\n reactEventType[internalContainerInstanceKey])\n )\n break a;\n if (SyntheticEventCtor || reactName) {\n reactName =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget\n : (reactName = nativeEventTarget.ownerDocument)\n ? reactName.defaultView || reactName.parentWindow\n : window;\n if (SyntheticEventCtor) {\n if (\n ((reactEventType =\n nativeEvent.relatedTarget || nativeEvent.toElement),\n (SyntheticEventCtor = targetInst),\n (reactEventType = reactEventType\n ? getClosestInstanceFromNode(reactEventType)\n : null),\n null !== reactEventType &&\n ((accumulateTargetOnly =\n getNearestMountedFiber(reactEventType)),\n (inCapturePhase = reactEventType.tag),\n reactEventType !== accumulateTargetOnly ||\n (5 !== inCapturePhase &&\n 27 !== inCapturePhase &&\n 6 !== inCapturePhase)))\n )\n reactEventType = null;\n } else (SyntheticEventCtor = null), (reactEventType = targetInst);\n if (SyntheticEventCtor !== reactEventType) {\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 == SyntheticEventCtor\n ? reactName\n : getNodeFromInstance(SyntheticEventCtor);\n lastHostComponent =\n null == reactEventType\n ? reactName\n : getNodeFromInstance(reactEventType);\n reactName = new inCapturePhase(\n _instance,\n instance + \"leave\",\n SyntheticEventCtor,\n nativeEvent,\n nativeEventTarget\n );\n reactName.target = accumulateTargetOnly;\n reactName.relatedTarget = lastHostComponent;\n _instance = null;\n getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n ((inCapturePhase = new inCapturePhase(\n reactEventName,\n instance + \"enter\",\n reactEventType,\n nativeEvent,\n nativeEventTarget\n )),\n (inCapturePhase.target = lastHostComponent),\n (inCapturePhase.relatedTarget = accumulateTargetOnly),\n (_instance = inCapturePhase));\n accumulateTargetOnly = _instance;\n if (SyntheticEventCtor && reactEventType)\n b: {\n inCapturePhase = getParent;\n reactEventName = SyntheticEventCtor;\n instance = reactEventType;\n lastHostComponent = 0;\n for (\n _instance = reactEventName;\n _instance;\n _instance = inCapturePhase(_instance)\n )\n lastHostComponent++;\n _instance = 0;\n for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))\n _instance++;\n for (; 0 < lastHostComponent - _instance; )\n (reactEventName = inCapturePhase(reactEventName)),\n lastHostComponent--;\n for (; 0 < _instance - lastHostComponent; )\n (instance = inCapturePhase(instance)), _instance--;\n for (; lastHostComponent--; ) {\n if (\n reactEventName === instance ||\n (null !== instance && reactEventName === instance.alternate)\n ) {\n inCapturePhase = reactEventName;\n break b;\n }\n reactEventName = inCapturePhase(reactEventName);\n instance = inCapturePhase(instance);\n }\n inCapturePhase = null;\n }\n else inCapturePhase = null;\n null !== SyntheticEventCtor &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n reactName,\n SyntheticEventCtor,\n inCapturePhase,\n !1\n );\n null !== reactEventType &&\n null !== accumulateTargetOnly &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n accumulateTargetOnly,\n reactEventType,\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 \"focusout\" === domEventName &&\n targetInst &&\n \"number\" === reactName.type &&\n null != targetInst.memoizedProps.value &&\n setDefaultValue(reactName, \"number\", reactName.value);\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 \"string\" === typeof value\n ? \"body\" === tag ||\n (\"textarea\" === tag && \"\" === value) ||\n setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n \"body\" !== tag &&\n setTextContent(domElement, \"\" + value);\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 break;\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 break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\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 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 \"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 break;\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 }\n}\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\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 domElement.innerHTML = key;\n }\n }\n break;\n case \"children\":\n \"string\" === typeof value\n ? setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"innerText\":\n case \"textContent\":\n break;\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 (tag = key.slice(2, props ? key.length - 7 : void 0)),\n (prevValue = domElement[internalPropsKey] || null),\n (prevValue = null != prevValue ? prevValue[key] : null),\n \"function\" === typeof prevValue &&\n domElement.removeEventListener(tag, prevValue, props),\n \"function\" === typeof value)\n ) {\n \"function\" !== typeof prevValue &&\n null !== prevValue &&\n (key in domElement\n ? (domElement[key] = null)\n : domElement.hasAttribute(key) &&\n domElement.removeAttribute(key));\n domElement.addEventListener(tag, value, props);\n break a;\n }\n key in domElement\n ? (domElement[key] = value)\n : !0 === value\n ? domElement.setAttribute(key, \"\")\n : setValueForAttribute(domElement, key, value);\n }\n }\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$184 = props[hasSrc];\n if (null != propValue$184)\n switch (hasSrc) {\n case \"name\":\n hasSrcSet = propValue$184;\n break;\n case \"type\":\n propValue = propValue$184;\n break;\n case \"checked\":\n checked = propValue$184;\n break;\n case \"defaultChecked\":\n defaultChecked = propValue$184;\n break;\n case \"value\":\n propKey = propValue$184;\n break;\n case \"defaultValue\":\n defaultValue = propValue$184;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propValue$184)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(domElement, tag, hasSrc, propValue$184, 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$184 in props)\n props.hasOwnProperty(propValue$184) &&\n ((hasSrc = props[propValue$184]),\n void 0 !== hasSrc &&\n setPropOnCustomElement(\n domElement,\n tag,\n propValue$184,\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}\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$201 in nextProps) {\n var propKey = nextProps[propKey$201];\n lastProp = lastProps[propKey$201];\n if (\n nextProps.hasOwnProperty(propKey$201) &&\n (null != propKey || null != lastProp)\n )\n switch (propKey$201) {\n case \"type\":\n type = propKey;\n break;\n case \"name\":\n name = propKey;\n break;\n case \"checked\":\n checked = propKey;\n break;\n case \"defaultChecked\":\n defaultChecked = propKey;\n break;\n case \"value\":\n value = propKey;\n break;\n case \"defaultValue\":\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$201,\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$201 = 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 propKey$201 = type;\n break;\n case \"defaultValue\":\n defaultValue = type;\n break;\n case \"multiple\":\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$201\n ? updateOptions(domElement, !!lastProps, propKey$201, !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$201 = 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 propKey$201 = name;\n break;\n case \"defaultValue\":\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$201, propKey);\n return;\n case \"option\":\n for (var propKey$217 in lastProps)\n if (\n ((propKey$201 = lastProps[propKey$217]),\n lastProps.hasOwnProperty(propKey$217) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$217))\n )\n switch (propKey$217) {\n case \"selected\":\n domElement.selected = !1;\n break;\n default:\n setProp(\n domElement,\n tag,\n propKey$217,\n null,\n nextProps,\n propKey$201\n );\n }\n for (lastDefaultValue in nextProps)\n if (\n ((propKey$201 = nextProps[lastDefaultValue]),\n (propKey = lastProps[lastDefaultValue]),\n nextProps.hasOwnProperty(lastDefaultValue) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (lastDefaultValue) {\n case \"selected\":\n domElement.selected =\n propKey$201 &&\n \"function\" !== typeof propKey$201 &&\n \"symbol\" !== typeof propKey$201;\n break;\n default:\n setProp(\n domElement,\n tag,\n lastDefaultValue,\n propKey$201,\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$222 in lastProps)\n (propKey$201 = lastProps[propKey$222]),\n lastProps.hasOwnProperty(propKey$222) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$222) &&\n setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);\n for (checked in nextProps)\n if (\n ((propKey$201 = nextProps[checked]),\n (propKey = lastProps[checked]),\n nextProps.hasOwnProperty(checked) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (checked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey$201)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(\n domElement,\n tag,\n checked,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (var propKey$227 in lastProps)\n (propKey$201 = lastProps[propKey$227]),\n lastProps.hasOwnProperty(propKey$227) &&\n void 0 !== propKey$201 &&\n !nextProps.hasOwnProperty(propKey$227) &&\n setPropOnCustomElement(\n domElement,\n tag,\n propKey$227,\n void 0,\n nextProps,\n propKey$201\n );\n for (defaultChecked in nextProps)\n (propKey$201 = nextProps[defaultChecked]),\n (propKey = lastProps[defaultChecked]),\n !nextProps.hasOwnProperty(defaultChecked) ||\n propKey$201 === propKey ||\n (void 0 === propKey$201 && void 0 === propKey) ||\n setPropOnCustomElement(\n domElement,\n tag,\n defaultChecked,\n propKey$201,\n nextProps,\n propKey\n );\n return;\n }\n }\n for (var propKey$232 in lastProps)\n (propKey$201 = lastProps[propKey$232]),\n lastProps.hasOwnProperty(propKey$232) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$232) &&\n setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);\n for (lastProp in nextProps)\n (propKey$201 = nextProps[lastProp]),\n (propKey = lastProps[lastProp]),\n !nextProps.hasOwnProperty(lastProp) ||\n propKey$201 === propKey ||\n (null == propKey$201 && null == propKey) ||\n setProp(domElement, tag, lastProp, propKey$201, 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 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 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 releaseSingletonInstance(parentInstance.ownerDocument.documentElement);\n else if (\"head\" === node) {\n node = parentInstance.ownerDocument.head;\n releaseSingletonInstance(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 releaseSingletonInstance(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 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 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) {\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 return \"function\" === typeof container.getRootNode\n ? container.getRootNode()\n : 9 === container.nodeType\n ? container\n : 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 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 ((as = ownerDocument.createElement(\"link\")),\n setInitialProperties(as, \"link\", href),\n markNodeAsHoistable(as),\n ownerDocument.head.appendChild(as)));\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 ? ((currentProps = getStyleKey(pendingProps.href)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"style\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, 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$243 = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles,\n resource$244 = styles$243.get(type);\n resource$244 ||\n ((JSCompiler_inline_result =\n JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),\n (resource$244 = {\n type: \"stylesheet\",\n instance: null,\n count: 0,\n state: { loading: 0, preload: null }\n }),\n styles$243.set(type, resource$244),\n (styles$243 = JSCompiler_inline_result.querySelector(\n getStylesheetSelectorFromKey(type)\n )) &&\n !styles$243._p &&\n ((resource$244.instance = styles$243),\n (resource$244.state.loading = 5)),\n preloadPropsMap.has(type) ||\n ((pendingProps = {\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, pendingProps),\n styles$243 ||\n preloadStylesheet(\n JSCompiler_inline_result,\n type,\n pendingProps,\n resource$244.state\n )));\n if (currentProps && null === currentResource)\n throw Error(formatProdErrorMessage(528, \"\"));\n return resource$244;\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 ? ((currentProps = getScriptKey(pendingProps)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableScripts),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"script\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, 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 ownerDocument.querySelector('link[rel=\"preload\"][as=\"style\"][' + key + \"]\")\n ? (state.loading = 1)\n : ((key = ownerDocument.createElement(\"link\")),\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 setInitialProperties(key, \"link\", preloadProps),\n markNodeAsHoistable(key),\n ownerDocument.head.appendChild(key));\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$249 = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(styleProps)\n );\n if (instance$249)\n return (\n (resource.state.loading |= 4),\n (resource.instance = instance$249),\n markNodeAsHoistable(instance$249),\n instance$249\n );\n instance = stylesheetPropsFromRawProps(props);\n (styleProps = preloadPropsMap.get(styleProps)) &&\n adoptPreloadPropsForStylesheet(instance, styleProps);\n instance$249 = (\n hoistableRoot.ownerDocument || hoistableRoot\n ).createElement(\"link\");\n markNodeAsHoistable(instance$249);\n var linkInstance = instance$249;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance$249, \"link\", instance);\n resource.state.loading |= 4;\n insertStylesheet(instance$249, props.precedence, hoistableRoot);\n return (resource.instance = instance$249);\n case \"script\":\n instance$249 = getScriptKey(props.src);\n if (\n (styleProps = hoistableRoot.querySelector(\n getScriptSelectorFromKey(instance$249)\n ))\n )\n return (\n (resource.instance = styleProps),\n markNodeAsHoistable(styleProps),\n styleProps\n );\n instance = props;\n if ((styleProps = preloadPropsMap.get(instance$249)))\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 preloadResource(resource) {\n return \"stylesheet\" === resource.type && 0 === (resource.state.loading & 3)\n ? !1\n : !0;\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 onUnsuspend() {\n this.count--;\n if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))\n if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);\n else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\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.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 \"resize\":\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 \"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 \"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_1840 = React.version;\nif (\n \"19.2.8\" !==\n isomorphicReactPackageVersion$jscomp$inline_1840\n)\n throw Error(\n formatProdErrorMessage(\n 527,\n isomorphicReactPackageVersion$jscomp$inline_1840,\n \"19.2.8\"\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_2347 = {\n bundleType: 0,\n version: \"19.2.8\",\n rendererPackageName: \"react-dom\",\n currentDispatcherRef: ReactSharedInternals,\n reconcilerVersion: \"19.2.8\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_2348.isDisabled &&\n hook$jscomp$inline_2348.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_2348.inject(\n internals$jscomp$inline_2347\n )),\n (injectedHook = hook$jscomp$inline_2348);\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.2.8\";\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 * react-router v7.18.2\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 = matchedPathname.replace(/(.)\\/+$/, \"$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 = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\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(\"/\")) {\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(\"/\"));\nvar removeTrailingSlash = (path) => path.replace(/\\/+$/, \"\");\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/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 */) {\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: \"\",\n search: \"\",\n hash: \"\",\n ...partialPath\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 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 location = normalizeRedirectLocation(\n location,\n new URL(request.url),\n basename,\n init.history\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 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 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 _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 (!!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 } = 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 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 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 } = 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 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 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 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 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[r[0]] = r[1];\n });\n }\n set(object);\n continue;\n }\n }\n while (postRun.length > 0) {\n postRun.pop()();\n }\n return result;\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}\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}\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.2\";\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 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 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 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 * app/nav-config.ts — single source of truth for navigation hierarchy.\n * routes.tsx, components/layout/Sidebar.tsx, and the command palette all\n * read this one list rather than each maintaining their own — the audit\n * that kicked this rebuild off found 14 flat, ~70%-overlapping hash links\n * because the old app had no such shared structure. Add a route here once;\n * it shows up in the sidebar AND ⌘K automatically.\n *\n * Only `overview` has a real view wired up (FleetDashboardView — the\n * foundation's reference implementation). Every other leaf renders\n * <PlaceholderView/> until another agent builds it; see routes.tsx.\n */\n\nexport interface NavLeaf {\n path: string;\n label: string;\n description: string;\n /** Present once a real view exists; routes.tsx falls back to a placeholder otherwise. */\n implemented?: boolean;\n}\n\nexport interface NavGroup {\n id: string;\n label: string;\n leaves: NavLeaf[];\n}\n\nexport const NAV_GROUPS: NavGroup[] = [\n {\n id: 'overview',\n label: 'Overview',\n leaves: [\n {\n path: '/overview',\n label: 'Fleet Dashboard',\n description: 'Repos, activity, runs, swarms, MCP health, genome, and daemon status at a glance.',\n implemented: true,\n },\n ],\n },\n {\n id: 'journal',\n label: 'Journal',\n leaves: [\n {\n path: '/journal',\n label: 'Work Journal',\n description:\n 'Chronological, filterable, scrubable record of runs, merges, judge verdicts, and daemon ticks — with live streaming into any in-progress run.',\n implemented: true,\n },\n ],\n },\n {\n id: 'work',\n label: 'Work',\n leaves: [\n {\n path: '/work/runs',\n label: 'Runs',\n description: 'Dispatched goal runs and their token burn.',\n implemented: true,\n },\n {\n path: '/work/swarms',\n label: 'Swarms',\n description: 'Multi-task DAG runs with live burndown.',\n implemented: true,\n },\n ],\n },\n {\n id: 'inbox',\n label: 'Inbox',\n leaves: [\n {\n path: '/inbox',\n label: 'Proposals',\n description: 'Review, filter, and approve/reject proposals — including history (rejected/approved).',\n implemented: true,\n },\n ],\n },\n {\n id: 'control',\n label: 'Control',\n leaves: [\n {\n path: '/control/daemon',\n label: 'Daemon',\n description: 'Autonomous operator state, spend, and direction mode.',\n implemented: true,\n },\n {\n path: '/control/fleet',\n label: 'Fleet',\n description: 'Queue depth, lease health, and the kill switch.',\n implemented: true,\n },\n {\n path: '/control/security',\n label: 'Security',\n description: 'Supply-chain / binshield findings from the cached backlog.',\n implemented: true,\n },\n ],\n },\n {\n id: 'intelligence',\n label: 'Intelligence',\n leaves: [\n {\n path: '/intelligence/pulse',\n label: 'Pulse',\n description: 'Activity rollups over the dashboard window.',\n implemented: true,\n },\n {\n path: '/intelligence/genome',\n label: 'Genome',\n description: 'Cross-repo knowledge search and recall.',\n implemented: true,\n },\n {\n path: '/intelligence/production',\n label: 'Production',\n description: 'Ships-per-day, judge verdicts, auto-merges.',\n implemented: true,\n },\n ],\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n leaves: [\n {\n path: '/portfolio',\n label: 'Portfolio',\n description: 'Org-level roll-up across enrolled repos.',\n implemented: true,\n },\n ],\n },\n {\n id: 'goals',\n label: 'Goals',\n leaves: [\n { path: '/goals', label: 'Goals', description: 'Active goals and milestone progress.', implemented: true },\n ],\n },\n];\n\nexport const ALL_NAV_LEAVES: NavLeaf[] = NAV_GROUPS.flatMap((g) => g.leaves);\n","/**\n * components/layout/Sidebar.tsx — grouped, hierarchical nav (foundation\n * brief item 3), reading NAV_GROUPS from app/nav-config.ts so it can never\n * drift from what the command palette offers.\n */\nimport { NavLink } from 'react-router-dom';\nimport { NAV_GROUPS } from '../../app/nav-config.js';\nimport styles from './Sidebar.module.css';\n\nexport function Sidebar() {\n return (\n <nav className={styles.sidebar} aria-label=\"Primary\">\n <div className={styles.brand}>\n <span className={styles.brandMark} aria-hidden=\"true\">\n ▲\n </span>\n <span className={styles.brandName}>ashlr</span>\n </div>\n {NAV_GROUPS.map((group) => (\n <div key={group.id} className={styles.group}>\n <h2 className={styles.groupLabel}>{group.label}</h2>\n <ul className={styles.leaves}>\n {group.leaves.map((leaf) => (\n <li key={leaf.path}>\n <NavLink\n to={leaf.path}\n className={({ isActive }) => `${styles.link} ${isActive ? styles.active : ''}`}\n >\n {leaf.label}\n {!leaf.implemented ? <span className={styles.soon}>soon</span> : null}\n </NavLink>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </nav>\n );\n}\n","/**\n * data/cache.ts — the resource cache every view reads through. This is what\n * makes tab switches instant instead of blanking to \"Loading…\": a resource\n * fetched once stays in the cache and renders immediately (possibly stale)\n * on the next mount, with a background refresh kicked off silently behind\n * it. No framework dependency — a plain keyed store consumed via\n * useSyncExternalStore (see hooks.ts), matching the pattern already used\n * for auth-store.ts.\n *\n * Design choices, spelled out because a future agent will extend this:\n * - In-flight de-dupe: two components requesting the same key at once\n * share one fetch, not two.\n * - Never clears `data` on refetch. `status` distinguishes 'loading'\n * (no data yet — show a skeleton) from 'refreshing' (stale data still\n * shown — show a subtle indicator) from 'success'/'error'.\n * - `invalidate(key)` is how the SSE layer (sse.ts) tells the cache \"the\n * server just told us this changed\" without either module importing\n * React.\n * - useSyncExternalStore requires getSnapshot() to return a NEW object\n * reference whenever the observable state actually changes (it detects\n * updates via Object.is, not deep equality) — mutating one long-lived\n * entry object in place and handing back the same reference would fire\n * subscribers that never actually re-render. Every state transition\n * below therefore replaces `bookkeeping.snapshot` wholesale instead of\n * patching fields on it.\n */\n\nexport type QueryStatus = 'idle' | 'loading' | 'refreshing' | 'success' | 'error';\n\nexport interface QueryEntry<T> {\n data: T | undefined;\n error: Error | undefined;\n status: QueryStatus;\n updatedAt: number | null;\n}\n\ninterface Bookkeeping<T = unknown> {\n snapshot: QueryEntry<T>;\n inFlight: Promise<void> | null;\n fetcher: (() => Promise<T>) | null;\n subscribers: Set<() => void>;\n}\n\nconst IDLE_SNAPSHOT: QueryEntry<unknown> = { data: undefined, error: undefined, status: 'idle', updatedAt: null };\n\nconst store = new Map<string, Bookkeeping>();\n\nfunction entryFor<T>(key: string): Bookkeeping<T> {\n let e = store.get(key) as Bookkeeping<T> | undefined;\n if (!e) {\n e = {\n snapshot: IDLE_SNAPSHOT as QueryEntry<T>,\n inFlight: null,\n fetcher: null,\n subscribers: new Set(),\n };\n store.set(key, e);\n }\n return e;\n}\n\nfunction setSnapshot<T>(e: Bookkeeping<T>, patch: Partial<QueryEntry<T>>): void {\n e.snapshot = { ...e.snapshot, ...patch };\n}\n\nfunction notify(key: string): void {\n const e = store.get(key);\n if (!e) return;\n for (const s of e.subscribers) s();\n}\n\nexport function subscribeQuery(key: string, listener: () => void): () => void {\n const e = entryFor(key);\n e.subscribers.add(listener);\n return () => {\n e.subscribers.delete(listener);\n };\n}\n\nexport function getQuerySnapshot<T>(key: string): QueryEntry<T> {\n return entryFor<T>(key).snapshot;\n}\n\n/**\n * Kick off (or join) a fetch for `key`. Safe to call redundantly — repeated\n * calls with an in-flight fetch are no-ops. Registers `fetcher` on the\n * entry so invalidate() can re-run it later without the caller re-supplying\n * it (e.g. from the SSE layer, which doesn't have per-view fetch closures).\n */\nexport function runQuery<T>(key: string, fetcher: () => Promise<T>): Promise<void> {\n const e = entryFor<T>(key);\n e.fetcher = fetcher;\n if (e.inFlight) return e.inFlight;\n\n setSnapshot(e, { status: e.snapshot.data !== undefined ? 'refreshing' : 'loading' });\n notify(key);\n\n e.inFlight = fetcher()\n .then((data) => {\n setSnapshot(e, { data, error: undefined, status: 'success', updatedAt: Date.now() });\n })\n .catch((err: unknown) => {\n setSnapshot(e, { error: err instanceof Error ? err : new Error(String(err)), status: 'error' });\n })\n .finally(() => {\n e.inFlight = null;\n notify(key);\n });\n\n return e.inFlight;\n}\n\n/** Re-run the last fetcher registered for `key`, if any (used by sse.ts). */\nexport function invalidate(key: string): void {\n const e = store.get(key);\n if (!e || !e.fetcher) return;\n void runQuery(key, e.fetcher);\n}\n\n/** Re-run the fetcher for every cached key starting with `prefix`. For\n * parameterized resources (per-filter inbox list queries, per-id inbox\n * detail queries) the exact live key isn't known ahead of time — used by\n * sse.ts and data/mutations.ts so those views live-update too. */\nexport function invalidatePrefix(prefix: string): void {\n for (const key of store.keys()) {\n if (key.startsWith(prefix)) invalidate(key);\n }\n}\n\n/** Drop a key entirely (rare — e.g. on logout, so stale data never leaks\n * into the next session's first paint). */\nexport function evict(key: string): void {\n store.delete(key);\n}\n\nexport function evictAll(): void {\n store.clear();\n}\n","/**\n * data/auth-store.ts — the read-session + mutation-token authority for the\n * whole app. Mirrors the two-token model in src/core/web/server.ts exactly:\n *\n * READ authority — exchanged once via POST /api/session (raw readToken +\n * a per-tab client proof) for an HttpOnly cookie good\n * for 15 minutes. The raw read token is held in memory\n * only long enough to make that exchange and is then\n * discarded; the client proof is not a secret by\n * itself (it has no authority without the signed\n * cookie) and is kept in sessionStorage so a page\n * reload can keep using the still-valid cookie instead\n * of forcing re-entry.\n *\n * MUTATION authority — the raw x-ashlr-token header, required on every\n * mutating call, NEVER exchanged for a session and\n * NEVER persisted to any storage. Held in memory only,\n * for a bounded \"hold\" window, so approving a run of\n * proposals isn't one window.prompt() per click. The\n * hold is cleared on tab close, explicit lock, or\n * idle timeout.\n *\n * This module has no React dependency — it is a plain external store\n * consumed via useSyncExternalStore in hooks.ts, per the same pattern used\n * for the query cache.\n */\n\nconst READ_CLIENT_STORAGE_KEY = 'ashlr.readClientProof.v1';\nconst READ_CLIENT_RE = /^[a-f0-9]{64}$/;\nconst MUTATION_HOLD_MS = 20 * 60 * 1000; // 20 minutes of inactivity clears the hold.\n\nexport type AuthPhase = 'checking' | 'unauthenticated' | 'authenticated';\n\ninterface AuthState {\n phase: AuthPhase;\n /** True once a session check has actually completed (vs. still booting). */\n checked: boolean;\n mutationTokenHeldUntil: number | null;\n}\n\nfunction randomHex64(): string {\n const bytes = new Uint8Array(32);\n crypto.getRandomValues(bytes);\n return Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n}\n\nfunction loadOrCreateClientProof(): string {\n try {\n const existing = sessionStorage.getItem(READ_CLIENT_STORAGE_KEY);\n if (existing && READ_CLIENT_RE.test(existing)) return existing;\n } catch {\n // sessionStorage unavailable (privacy mode, etc.) — fall through to an\n // in-memory-only proof for this page life.\n }\n const proof = randomHex64();\n try {\n sessionStorage.setItem(READ_CLIENT_STORAGE_KEY, proof);\n } catch {\n /* best-effort persistence only */\n }\n return proof;\n}\n\nlet clientProof = loadOrCreateClientProof();\n\n/** In-memory only. Never touches storage. Cleared by clearMutationToken(). */\nlet mutationToken: string | null = null;\nlet mutationHoldTimer: ReturnType<typeof setTimeout> | null = null;\n\nlet state: AuthState = { phase: 'checking', checked: false, mutationTokenHeldUntil: null };\nconst listeners = new Set<() => void>();\n\nfunction emit(): void {\n for (const l of listeners) l();\n}\n\nfunction setState(patch: Partial<AuthState>): void {\n state = { ...state, ...patch };\n emit();\n}\n\nexport function subscribeAuth(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nexport function getAuthSnapshot(): AuthState {\n return state;\n}\n\nexport function getReadClientProof(): string {\n return clientProof;\n}\n\n/** Regenerate the client proof (e.g. after an explicit \"forget this device\"). */\nexport function resetReadClientProof(): string {\n clientProof = randomHex64();\n try {\n sessionStorage.setItem(READ_CLIENT_STORAGE_KEY, clientProof);\n } catch {\n /* best-effort */\n }\n return clientProof;\n}\n\n/**\n * Exchange a raw read token for a session cookie. Throws on failure with a\n * message safe to show the operator. The raw token never leaves this call.\n */\nexport async function establishReadSession(rawReadToken: string): Promise<void> {\n const trimmed = rawReadToken.trim();\n if (!/^[a-f0-9]{64}$/.test(trimmed)) {\n throw new Error('That does not look like a read token — expected 64 hex characters.');\n }\n const res = await fetch('/api/session', {\n method: 'POST',\n credentials: 'same-origin',\n headers: {\n 'x-ashlr-token': trimmed,\n 'x-ashlr-read-client': clientProof,\n },\n });\n if (res.status === 204) {\n setState({ phase: 'authenticated', checked: true });\n return;\n }\n if (res.status === 401) {\n throw new Error('Server rejected that token. Double-check the value ashlr serve printed.');\n }\n throw new Error(`Unexpected response establishing session (HTTP ${res.status}).`);\n}\n\nexport async function clearReadSession(): Promise<void> {\n try {\n await fetch('/api/session', { method: 'DELETE', credentials: 'same-origin' });\n } catch {\n /* best-effort */\n }\n setState({ phase: 'unauthenticated' });\n}\n\n/** Called by data/client.ts whenever any authenticated GET comes back 401. */\nexport function reportSessionExpired(): void {\n if (state.phase !== 'authenticated') return;\n setState({ phase: 'unauthenticated' });\n}\n\nexport function markCheckComplete(authenticated: boolean): void {\n setState({ phase: authenticated ? 'authenticated' : 'unauthenticated', checked: true });\n}\n\n// ---------------------------------------------------------------------------\n// Mutation token — session-scoped hold, memory-only.\n// ---------------------------------------------------------------------------\n\nexport function getMutationToken(): string | null {\n return mutationToken;\n}\n\nexport function hasMutationHold(): boolean {\n return mutationToken !== null;\n}\n\nfunction armIdleClear(): void {\n if (mutationHoldTimer) clearTimeout(mutationHoldTimer);\n mutationHoldTimer = setTimeout(() => clearMutationToken(), MUTATION_HOLD_MS);\n}\n\n/** Set the mutation token for this tab's session hold. Never persisted. */\nexport function setMutationToken(token: string): void {\n mutationToken = token;\n const heldUntil = Date.now() + MUTATION_HOLD_MS;\n setState({ mutationTokenHeldUntil: heldUntil });\n armIdleClear();\n}\n\n/** Extend the hold window on real use (called after every mutating call). */\nexport function touchMutationHold(): void {\n if (mutationToken === null) return;\n const heldUntil = Date.now() + MUTATION_HOLD_MS;\n setState({ mutationTokenHeldUntil: heldUntil });\n armIdleClear();\n}\n\nexport function clearMutationToken(): void {\n mutationToken = null;\n if (mutationHoldTimer) {\n clearTimeout(mutationHoldTimer);\n mutationHoldTimer = null;\n }\n setState({ mutationTokenHeldUntil: null });\n}\n","/**\n * data/sse.ts — the live channel. One EventSource against /api/events for\n * the whole app, fanning out NAMED events (see api.ts handleSseEvents:\n * 'runs' | 'swarms' | 'inbox' | 'daemon' | 'daemon-observation' |\n * 'fleet-activity-ping' | 'fleet-activity-observation' | 'snapshot') to\n * subscribers, and invalidating the matching cache key so any mounted\n * useQuery(key) re-fetches in the background.\n *\n * The server polls disk at a fixed interval (api.ts SSE_POLL_MS, ~1.5s at\n * time of writing) — that is the real latency floor for \"live\". This layer\n * does not, and should not, try to beat that; it just makes sure the UI\n * never polls MORE often than the server already pushes.\n */\nimport { getReadClientProof, getAuthSnapshot, subscribeAuth } from './auth-store.js';\nimport { invalidate, invalidatePrefix } from './cache.js';\n\nexport const SSE_EVENT_NAMES = [\n 'runs',\n 'swarms',\n 'inbox',\n 'daemon',\n 'daemon-observation',\n 'fleet-activity-ping',\n 'fleet-activity-observation',\n 'snapshot',\n] as const;\nexport type SseEventName = (typeof SSE_EVENT_NAMES)[number];\n\n/** Cache keys (see data/queries.ts) invalidated when a given SSE event fires. */\nconst EVENT_TO_CACHE_KEYS: Record<SseEventName, string[]> = {\n runs: ['runs'],\n swarms: ['swarms'],\n inbox: ['inbox'],\n // 'daemon' was previously mapped but nothing subscribed to a 'daemon'-keyed\n // query (control/daemon didn't exist yet) — now daemonObservationQuery\n // (data/queries.ts) does. Also refreshing 'control-snapshot' here so\n // /control/daemon and /control/security (both read off controlSnapshotQuery)\n // stay live on the same daemon-tick cadence instead of only on page load.\n daemon: ['daemon', 'control-snapshot'],\n 'daemon-observation': ['daemon', 'control-snapshot'],\n // fleet-activity pings are the closest live signal fleet state changed;\n // 'fleet' (fleetStatusQuery, /control/fleet's queue depth + lease health)\n // has no dedicated SSE event of its own, so it rides these instead of only\n // refreshing on mount.\n 'fleet-activity-ping': ['fleet-activity', 'fleet'],\n 'fleet-activity-observation': ['fleet-activity', 'fleet'],\n snapshot: ['dashboard-snapshot'],\n};\n\ntype RawListener = (payload: unknown) => void;\nconst rawListeners = new Map<SseEventName, Set<RawListener>>();\n\nlet source: EventSource | null = null;\nlet reconnectTimer: ReturnType<typeof setTimeout> | null = null;\nlet reconnectAttempt = 0;\n\nfunction backoffMs(): number {\n // 1s, 2s, 4s, 8s, capped at 15s — the server's own poll floor is ~1.5s so\n // there is no benefit reconnecting faster than that even on attempt 0.\n return Math.min(1000 * 2 ** reconnectAttempt, 15_000);\n}\n\nfunction teardown(): void {\n if (source) {\n source.close();\n source = null;\n }\n if (reconnectTimer) {\n clearTimeout(reconnectTimer);\n reconnectTimer = null;\n }\n}\n\nfunction scheduleReconnect(): void {\n if (reconnectTimer) return;\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null;\n reconnectAttempt += 1;\n connect();\n }, backoffMs());\n}\n\nfunction connect(): void {\n if (getAuthSnapshot().phase !== 'authenticated') return;\n teardown();\n\n const url = `/api/events?client=${encodeURIComponent(getReadClientProof())}`;\n const es = new EventSource(url, { withCredentials: true });\n source = es;\n\n es.onopen = () => {\n reconnectAttempt = 0;\n };\n\n for (const name of SSE_EVENT_NAMES) {\n es.addEventListener(name, (evt) => {\n const messageEvent = evt as MessageEvent<string>;\n let payload: unknown = undefined;\n try {\n payload = JSON.parse(messageEvent.data);\n } catch {\n payload = undefined;\n }\n for (const key of EVENT_TO_CACHE_KEYS[name]) invalidate(key);\n if (name === 'inbox') {\n // Parameterized inbox queries (one cache key per filter combo / per\n // proposal id) aren't in EVENT_TO_CACHE_KEYS's static map — sweep\n // both prefixes so the list (any filter) and any open detail view\n // (proposalDetailQuery, data/queries.ts) live-update on the same\n // 'inbox' event as the unfiltered badge.\n invalidatePrefix('inbox-list:');\n invalidatePrefix('proposal-detail-');\n }\n const listeners = rawListeners.get(name);\n if (listeners) for (const l of listeners) l(payload);\n });\n }\n\n es.onerror = () => {\n // EventSource auto-retries on its own, but its built-in retry delay is\n // opaque and can hammer a server that just lost its read session. Close\n // it and drive reconnection ourselves so we stop entirely once\n // auth-store reports the session as expired (see the subscribeAuth\n // wiring at the bottom of this file).\n es.close();\n if (source === es) source = null;\n if (getAuthSnapshot().phase === 'authenticated') scheduleReconnect();\n };\n}\n\n/** Subscribe to one named SSE event's raw payload (rarely needed directly —\n * most views should prefer useQuery + the cache-key mapping above). */\nexport function onSseEvent(name: SseEventName, listener: RawListener): () => void {\n let set = rawListeners.get(name);\n if (!set) {\n set = new Set();\n rawListeners.set(name, set);\n }\n set.add(listener);\n return () => set!.delete(listener);\n}\n\n// Connect once authenticated; disconnect the instant the session drops so a\n// stale connection never masks a 401 the rest of the app needs to react to.\nsubscribeAuth(() => {\n const phase = getAuthSnapshot().phase;\n if (phase === 'authenticated') {\n reconnectAttempt = 0;\n connect();\n } else {\n teardown();\n }\n});\n","/**\n * data/hooks.ts — React bindings over the framework-free stores in\n * cache.ts / auth-store.ts / sse.ts. This is the only file in the data\n * layer that imports React; every module underneath it stays plain\n * TypeScript so it's trivially unit-testable without a DOM.\n */\nimport { useCallback, useEffect, useSyncExternalStore } from 'react';\nimport { getQuerySnapshot, runQuery, subscribeQuery, type QueryEntry } from './cache.js';\nimport type { QueryDef } from './queries.js';\nimport {\n getAuthSnapshot,\n subscribeAuth,\n type AuthPhase,\n hasMutationHold,\n getMutationToken,\n setMutationToken as storeSetMutationToken,\n touchMutationHold,\n clearMutationToken,\n} from './auth-store.js';\nimport { onSseEvent, type SseEventName } from './sse.js';\n\n/**\n * Subscribe to a resource. Fetches on mount (and on `key` change), stays\n * subscribed to background refreshes triggered by sse.ts, and NEVER clears\n * `data` while refetching — `status === 'refreshing'` is the signal to show\n * a subtle indicator instead of a skeleton, `status === 'loading'` (no data\n * yet at all) is the only state that should render a skeleton.\n */\nexport function useQuery<T>(def: QueryDef<T>): QueryEntry<T> {\n const snapshot = useSyncExternalStore(\n useCallback((listener) => subscribeQuery(def.key, listener), [def.key]),\n () => getQuerySnapshot<T>(def.key),\n () => getQuerySnapshot<T>(def.key),\n );\n\n useEffect(() => {\n const controller = new AbortController();\n void runQuery(def.key, () => def.fetch(controller.signal));\n return () => controller.abort();\n // Re-fetch only when the resource identity changes, not on every render.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- def.fetch is re-created per render on purpose; only def.key identifies the resource.\n }, [def.key]);\n\n return snapshot;\n}\n\n/** Manually trigger a re-fetch without waiting for SSE (e.g. a \"Retry\" button). */\nexport function useRefetch<T>(def: QueryDef<T>): () => void {\n return useCallback(() => {\n void runQuery(def.key, () => def.fetch());\n }, [def]);\n}\n\nexport function useAuthPhase(): AuthPhase {\n return useSyncExternalStore(subscribeAuth, () => getAuthSnapshot().phase, () => getAuthSnapshot().phase);\n}\n\nexport interface MutationHold {\n hasHold: boolean;\n token: string | null;\n heldUntil: number | null;\n setToken: (token: string) => void;\n touch: () => void;\n clear: () => void;\n}\n\nexport function useMutationHold(): MutationHold {\n const heldUntil = useSyncExternalStore(\n subscribeAuth,\n () => getAuthSnapshot().mutationTokenHeldUntil,\n () => getAuthSnapshot().mutationTokenHeldUntil,\n );\n return {\n hasHold: hasMutationHold(),\n token: getMutationToken(),\n heldUntil,\n setToken: storeSetMutationToken,\n touch: touchMutationHold,\n clear: clearMutationToken,\n };\n}\n\n/** Subscribe to a raw named SSE event for the lifetime of the component. */\nexport function useSseEvent(name: SseEventName, onEvent: (payload: unknown) => void): void {\n useEffect(() => onSseEvent(name, onEvent), [name, onEvent]);\n}\n","/**\n * components/notifications/deriveNotifications.ts — pure, framework-free\n * transform from the backend snapshots the app already fetches into the\n * attention queue the notification centre shows. No React, no fetch, no\n * timers here — trivially unit-testable, matching the split cache.ts /\n * auth-store.ts already use for framework-free stores.\n *\n * Every rule below is grounded in a field the fleet already computes,\n * per the build brief: `fleet.nextActions` / `fleet.autonomousShipReadiness`\n * are the exact data the legacy dashboard's \"Needs you\" deck reads\n * (buildOperatorBriefingModel, public/app.js:7438-7494); `control.security`\n * and `control.limits` are existing Mission Control sections; run failures\n * and the pending-proposal backlog come from resources every other view\n * already fetches (`runsQuery`, `inboxQuery`). Nothing here invents new\n * backend computation — it only re-prioritizes what already exists into one\n * queue instead of requiring the operator to notice it across five tabs.\n */\nimport type { ControlSnapshot, FleetStatus, RunState } from '../../data/api-types.js';\nimport type { InboxProposal } from '../../data/queries.js';\nimport type { AppNotification, NotificationSeverity } from './types.js';\n\nexport interface DeriveInputs {\n control?: ControlSnapshot;\n fleet?: FleetStatus;\n runs?: RunState[];\n inbox?: { pending: number; proposals: InboxProposal[] };\n}\n\n/** A running run with no observed update for this long is worth flagging\n * even if nobody has the live stream open watching it — this is what makes\n * \"what happened overnight\" catch a wedged 3am run instead of requiring the\n * operator to have been staring at a stream panel when it stalled. */\nconst RUN_STALL_NOTIFY_MS = 3 * 60 * 1000;\n/** A pending proposal sitting this long escalates from medium to high. */\nconst PROPOSAL_BACKLOG_ESCALATE_MS = 2 * 60 * 60 * 1000;\n/** A failed/aborted run older than this is history, not something that\n * still \"needs you\" right now — see the run-failure rule below. */\nconst RUN_FAILURE_NOTIFY_WINDOW_MS = 24 * 60 * 60 * 1000;\n\nfunction fleetActionHref(id: string): string {\n const lower = id.toLowerCase();\n if (lower.includes('proposal') || lower.includes('inbox')) return '/inbox';\n if (lower.includes('security') || lower.includes('audit')) return '/control/security';\n if (lower.includes('evidence') || lower.includes('fleet') || lower.includes('queue')) return '/control/fleet';\n return '/control/daemon';\n}\n\nexport function deriveNotifications(input: DeriveInputs): AppNotification[] {\n const out: AppNotification[] = [];\n const now = Date.now();\n\n // ── 1. fleet.nextActions — the fleet's own priority-ranked to-do list. ──\n for (const action of input.fleet?.nextActions ?? []) {\n out.push({\n id: `next-action-${action.id}`,\n category: 'action-required',\n severity: action.priority,\n title: action.label,\n detail: action.detail,\n ts: new Date(now).toISOString(),\n actionHref: fleetActionHref(action.id),\n actionLabel: 'Inspect',\n });\n }\n\n // ── 2. Autonomous ship readiness — blocked/unknown verdicts. ──\n const readiness = input.fleet?.autonomousShipReadiness;\n if (readiness) {\n if (readiness.verdict === 'blocked' && readiness.topBlocker) {\n out.push({\n id: `readiness-blocked-${readiness.topBlocker.id}`,\n category: 'readiness',\n severity: readiness.topBlocker.severity,\n title: 'Autonomous readiness is blocked',\n detail: readiness.topBlocker.detail,\n ts: readiness.freshness.generatedAt,\n actionHref: '/control/fleet',\n actionLabel: 'Inspect fleet',\n });\n } else if (readiness.verdict === 'unknown') {\n out.push({\n id: 'readiness-unknown',\n category: 'readiness',\n severity: 'medium',\n title: 'Autonomous readiness is unknown',\n detail: 'Fresh, authoritative state is required before autonomous operation can be treated as clear.',\n ts: readiness.freshness.generatedAt,\n actionHref: '/control/fleet',\n actionLabel: 'Inspect fleet',\n });\n }\n }\n\n // ── 3. Security findings. ──\n const security = input.control?.security;\n if (security?.available) {\n if (security.counts.critical > 0) {\n const top = security.findings.find((f) => f.severity === 'critical');\n out.push({\n id: 'security-critical',\n category: 'security',\n severity: 'critical',\n title: `${security.counts.critical} critical security finding${security.counts.critical === 1 ? '' : 's'}`,\n detail: top ? `${top.repo}: ${top.title}` : 'See the security backlog for details.',\n ts: new Date(now).toISOString(),\n actionHref: '/control/security',\n actionLabel: 'Review findings',\n });\n } else if (security.counts.high > 0) {\n const top = security.findings.find((f) => f.severity === 'high');\n out.push({\n id: 'security-high',\n category: 'security',\n severity: 'high',\n title: `${security.counts.high} high-severity security finding${security.counts.high === 1 ? '' : 's'}`,\n detail: top ? `${top.repo}: ${top.title}` : 'See the security backlog for details.',\n ts: new Date(now).toISOString(),\n actionHref: '/control/security',\n actionLabel: 'Review findings',\n });\n }\n }\n\n // ── 4. Budget / rate limits. ──\n for (const limit of input.control?.limits ?? []) {\n if (limit.standing === 'over') {\n out.push({\n id: `budget-over-${limit.backend}-${limit.window}`,\n category: 'budget',\n severity: 'high',\n title: `${limit.backend} is over its ${limit.window} limit`,\n detail: `${limit.used.toLocaleString()} / ${limit.max.toLocaleString()} used.`,\n ts: new Date(now).toISOString(),\n actionHref: '/control/daemon',\n actionLabel: 'Review usage',\n });\n } else if (limit.standing === 'warn') {\n out.push({\n id: `budget-warn-${limit.backend}-${limit.window}`,\n category: 'budget',\n severity: 'medium',\n title: `${limit.backend} is approaching its ${limit.window} limit`,\n detail: `${limit.used.toLocaleString()} / ${limit.max.toLocaleString()} used.`,\n ts: new Date(now).toISOString(),\n actionHref: '/control/daemon',\n actionLabel: 'Review usage',\n });\n }\n }\n\n // ── 5. Daemon health — the source itself being degraded is actionable. ──\n const daemon = input.control?.daemon;\n if (daemon && (daemon.sourceQuality.sourceState !== 'healthy' || daemon.sourceQuality.complete === false)) {\n const reason = daemon.sourceQuality.reason;\n out.push({\n id: 'daemon-health-degraded',\n category: 'daemon-health',\n severity: reason === 'missing' || reason === 'unavailable' ? 'high' : 'medium',\n title: 'Daemon state cannot be confirmed',\n detail: reason ? `Source: ${reason}.` : 'The daemon state source is degraded or incomplete.',\n ts: new Date(now).toISOString(),\n actionHref: '/control/daemon',\n actionLabel: 'Inspect daemon',\n sourceQuality: daemon.sourceQuality,\n });\n }\n\n // ── 6. Pending-proposal backlog. ──\n if (input.inbox && input.inbox.pending > 0) {\n const oldest = input.inbox.proposals.reduce<number | null>((min, p) => {\n const t = new Date(p.createdAt).getTime();\n return min === null || t < min ? t : min;\n }, null);\n const ageMs = oldest !== null ? now - oldest : 0;\n const severity: NotificationSeverity = ageMs > PROPOSAL_BACKLOG_ESCALATE_MS ? 'high' : 'medium';\n out.push({\n id: 'proposal-backlog',\n category: 'proposal',\n severity,\n title: `${input.inbox.pending} proposal${input.inbox.pending === 1 ? '' : 's'} awaiting review`,\n detail:\n ageMs > PROPOSAL_BACKLOG_ESCALATE_MS\n ? `Oldest has been waiting ${Math.round(ageMs / (60 * 60 * 1000))}h.`\n : 'Approve, reject, or leave for autonomous handling per policy.',\n ts: oldest !== null ? new Date(oldest).toISOString() : new Date(now).toISOString(),\n actionHref: '/inbox',\n actionLabel: 'Open inbox',\n });\n }\n\n // ── 7. Run failures (recent window only) and silent stalls. ──\n // `runs` is a plain last-200 list with no recency filter server-side — on\n // a real fleet that easily spans weeks (verified live against an\n // operator's actual `ashlr serve`: /api/runs returned runs from three\n // weeks earlier). Without a window, every historical failure would sit in\n // the attention queue forever, which is exactly the \"nag\" the\n // non-negotiables rule out. Old failures are still fully visible in the\n // Work Journal (its whole point is unbounded-by-recency history) — the\n // notification centre only surfaces ones recent enough to plausibly still\n // need a human's attention.\n for (const run of input.runs ?? []) {\n if (run.status === 'failed' || run.status === 'aborted') {\n if (now - new Date(run.updatedAt).getTime() > RUN_FAILURE_NOTIFY_WINDOW_MS) continue;\n out.push({\n id: `run-failed-${run.id}`,\n category: 'run',\n severity: run.status === 'failed' ? 'high' : 'medium',\n title: `Run ${run.status}: ${run.goal}`,\n detail: run.result ?? run.terminationReason ?? `Run ${run.id} ${run.status}.`,\n ts: run.updatedAt,\n actionHref: `/work/runs/${run.id}`,\n actionLabel: 'Open run',\n });\n continue;\n }\n if (run.status === 'running') {\n const age = now - new Date(run.updatedAt).getTime();\n if (age > RUN_STALL_NOTIFY_MS) {\n out.push({\n id: `run-stalled-${run.id}`,\n category: 'run',\n severity: 'medium',\n title: `No update from a running run in ${Math.round(age / 60_000)}m`,\n detail: run.goal,\n ts: run.updatedAt,\n actionHref: `/work/runs/${run.id}`,\n actionLabel: 'Watch live',\n });\n }\n }\n }\n\n return out;\n}\n\n/** Sort worst-first, then most-recent-first within a severity band —\n * matches SEVERITY_ORDER so the list reads top-to-bottom as \"most urgent\n * first\" the same way everywhere it's rendered. */\nexport function sortNotifications(items: AppNotification[]): AppNotification[] {\n const rank: Record<NotificationSeverity, number> = { critical: 0, high: 1, medium: 2, low: 3, info: 4 };\n return [...items].sort((a, b) => {\n const s = rank[a.severity] - rank[b.severity];\n if (s !== 0) return s;\n return new Date(b.ts).getTime() - new Date(a.ts).getTime();\n });\n}\n","/**\n * components/notifications/notification-store.ts — the framework-free store\n * behind the notification centre, following the same\n * plain-module-plus-useSyncExternalStore split as data/cache.ts and\n * data/auth-store.ts (no React import here; only the hook file bridges it).\n *\n * Responsibilities beyond just holding a list:\n * - Dedupe: `reconcile()` is keyed by `AppNotification.id`. Re-deriving\n * the same active issue updates it in place; an id that stops appearing\n * means the underlying issue resolved, and it's dropped silently — no\n * \"resolved!\" spam.\n * - Mute: per-category, persisted to localStorage (a UI preference, not a\n * secret — same class of persistence as the theme toggle).\n * - Throttle for the OS Notification API: a real desktop notification only\n * fires for an id the store has never seen before, at critical/high\n * severity, in an unmuted category, while permission is granted — never\n * once per poll for a still-active issue.\n */\nimport type { AppNotification, NotificationCategory } from './types.js';\nimport { sortNotifications } from './deriveNotifications.js';\n\nconst MUTE_STORAGE_KEY = 'ashlr.notifications.mutedCategories.v1';\nconst DESKTOP_PREF_STORAGE_KEY = 'ashlr.notifications.desktopEnabled.v1';\n\nexport type DesktopPermission = 'unsupported' | 'default' | 'granted' | 'denied';\n\ninterface NotificationStoreState {\n items: AppNotification[];\n panelOpen: boolean;\n mutedCategories: NotificationCategory[];\n desktopEnabled: boolean;\n desktopPermission: DesktopPermission;\n}\n\nfunction loadMuted(): Set<NotificationCategory> {\n try {\n const raw = localStorage.getItem(MUTE_STORAGE_KEY);\n if (!raw) return new Set();\n const parsed = JSON.parse(raw) as unknown;\n if (Array.isArray(parsed)) return new Set(parsed as NotificationCategory[]);\n } catch {\n /* best-effort */\n }\n return new Set();\n}\n\nfunction saveMuted(muted: Set<NotificationCategory>): void {\n try {\n localStorage.setItem(MUTE_STORAGE_KEY, JSON.stringify([...muted]));\n } catch {\n /* best-effort */\n }\n}\n\nfunction loadDesktopPref(): boolean {\n try {\n return localStorage.getItem(DESKTOP_PREF_STORAGE_KEY) === '1';\n } catch {\n return false;\n }\n}\n\nfunction currentDesktopPermission(): DesktopPermission {\n if (typeof Notification === 'undefined') return 'unsupported';\n return Notification.permission as DesktopPermission;\n}\n\nconst mutedCategories = loadMuted();\nlet allItems: AppNotification[] = [];\nlet panelOpen = false;\nlet desktopEnabled = loadDesktopPref();\nconst everSeenIds = new Set<string>();\n\nlet state: NotificationStoreState = {\n items: [],\n panelOpen: false,\n mutedCategories: [...mutedCategories],\n desktopEnabled,\n desktopPermission: currentDesktopPermission(),\n};\n\nconst listeners = new Set<() => void>();\nfunction emit(): void {\n for (const l of listeners) l();\n}\n\nfunction recompute(): void {\n const visible = sortNotifications(allItems.filter((n) => !mutedCategories.has(n.category)));\n state = {\n items: visible,\n panelOpen,\n mutedCategories: [...mutedCategories],\n desktopEnabled,\n desktopPermission: currentDesktopPermission(),\n };\n emit();\n}\n\nexport function subscribeNotifications(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nexport function getNotificationSnapshot(): NotificationStoreState {\n return state;\n}\n\n/**\n * Replace the full derived set for this poll cycle. Fires a throttled\n * desktop notification for any id that is BOTH new (never seen before in\n * this tab) and unmuted critical/high — never for an id already active.\n */\nexport function reconcileNotifications(derived: AppNotification[]): void {\n const previousIds = new Set(allItems.map((n) => n.id));\n allItems = derived;\n\n if (desktopEnabled && currentDesktopPermission() === 'granted') {\n for (const n of derived) {\n if (mutedCategories.has(n.category)) continue;\n if (n.severity !== 'critical' && n.severity !== 'high') continue;\n if (previousIds.has(n.id) || everSeenIds.has(n.id)) continue;\n everSeenIds.add(n.id);\n try {\n void new Notification(n.title, { body: n.detail, tag: n.id });\n } catch {\n /* best-effort — some browsers throw outside a user gesture context */\n }\n }\n }\n for (const n of derived) everSeenIds.add(n.id);\n\n recompute();\n}\n\nexport function openPanel(): void {\n panelOpen = true;\n recompute();\n}\n\nexport function closePanel(): void {\n panelOpen = false;\n recompute();\n}\n\nexport function togglePanel(): void {\n panelOpen = !panelOpen;\n recompute();\n}\n\nexport function isMuted(category: NotificationCategory): boolean {\n return mutedCategories.has(category);\n}\n\nexport function setMuted(category: NotificationCategory, muted: boolean): void {\n if (muted) mutedCategories.add(category);\n else mutedCategories.delete(category);\n saveMuted(mutedCategories);\n recompute();\n}\n\nexport async function enableDesktopNotifications(): Promise<DesktopPermission> {\n if (typeof Notification === 'undefined') return 'unsupported';\n let permission = Notification.permission as DesktopPermission;\n if (permission === 'default') {\n permission = (await Notification.requestPermission()) as DesktopPermission;\n }\n desktopEnabled = permission === 'granted';\n try {\n localStorage.setItem(DESKTOP_PREF_STORAGE_KEY, desktopEnabled ? '1' : '0');\n } catch {\n /* best-effort */\n }\n recompute();\n return permission;\n}\n\nexport function disableDesktopNotifications(): void {\n desktopEnabled = false;\n try {\n localStorage.setItem(DESKTOP_PREF_STORAGE_KEY, '0');\n } catch {\n /* best-effort */\n }\n recompute();\n}\n\n/** Test-only: reset all module-level state between test files. */\nexport function __resetNotificationStoreForTests(): void {\n allItems = [];\n panelOpen = false;\n desktopEnabled = false;\n mutedCategories.clear();\n everSeenIds.clear();\n recompute();\n}\n","/**\n * components/notifications/useNotifications.ts — the only file in this\n * subtree that imports React, bridging notification-store.ts's plain\n * external store the same way data/hooks.ts bridges cache.ts/auth-store.ts.\n */\nimport { useSyncExternalStore } from 'react';\nimport { getNotificationSnapshot, subscribeNotifications } from './notification-store.js';\n\nexport function useNotifications() {\n return useSyncExternalStore(subscribeNotifications, getNotificationSnapshot, getNotificationSnapshot);\n}\n","/**\n * components/notifications/NotificationBell.tsx — the persistent, global\n * entry point into the attention queue (mounted in Topbar so it's reachable\n * from every view, not just one page — \"interject at any moment\" per the\n * build brief). Purely presentational + store-toggling; the actual engine\n * runs inside <NotificationCenter/> regardless of open state.\n */\nimport { useNotifications } from './useNotifications.js';\nimport { togglePanel } from './notification-store.js';\nimport styles from './NotificationBell.module.css';\n\nexport function NotificationBell() {\n const { items } = useNotifications();\n const urgent = items.filter((n) => n.severity === 'critical' || n.severity === 'high').length;\n const total = items.length;\n\n return (\n <button\n type=\"button\"\n className={styles.bell}\n onClick={togglePanel}\n aria-haspopup=\"dialog\"\n aria-label={total === 0 ? 'Notifications, none open' : `Notifications, ${total} open, ${urgent} urgent`}\n >\n <span aria-hidden=\"true\">🔔</span>\n {total > 0 ? (\n <span className={`${styles.badge} ${urgent > 0 ? styles.badgeUrgent : ''}`} aria-hidden=\"true\">\n {total > 99 ? '99+' : total}\n </span>\n ) : null}\n </button>\n );\n}\n","/**\n * components/primitives/Dialog.tsx — focus-managed modal base. Used by\n * MutationTokenDialog and CommandPalette so both get the same accessible\n * behavior instead of each hand-rolling it:\n *\n * - focus moves to the dialog (or `initialFocusRef`) on open\n * - focus is trapped inside while open (Tab/Shift+Tab wrap)\n * - focus returns to the trigger element on close\n * - Escape closes\n * - a click on the backdrop closes\n * - background content is aria-hidden via inert-equivalent (portal + the\n * dialog being the only focusable subtree)\n */\nimport { useEffect, useRef, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport styles from './Dialog.module.css';\n\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nexport interface DialogProps {\n open: boolean;\n onClose: () => void;\n titleId: string;\n title: ReactNode;\n children: ReactNode;\n initialFocusRef?: React.RefObject<HTMLElement | null>;\n widthClassName?: string;\n}\n\nexport function Dialog({ open, onClose, titleId, title, children, initialFocusRef, widthClassName }: DialogProps) {\n const dialogRef = useRef<HTMLDivElement>(null);\n const previouslyFocused = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!open) return;\n previouslyFocused.current = document.activeElement as HTMLElement | null;\n const target = initialFocusRef?.current ?? dialogRef.current;\n target?.focus({ preventScroll: true });\n\n return () => {\n previouslyFocused.current?.focus?.({ preventScroll: true });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- initialFocusRef is a ref (stable identity is not the point); only `open` should re-run this.\n }, [open]);\n\n useEffect(() => {\n if (!open) return;\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n e.stopPropagation();\n onClose();\n return;\n }\n if (e.key !== 'Tab') return;\n const node = dialogRef.current;\n if (!node) return;\n const focusable = Array.from(node.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(\n (el) => el.offsetParent !== null,\n );\n if (focusable.length === 0) return;\n const first = focusable[0]!;\n const last = focusable[focusable.length - 1]!;\n if (e.shiftKey && document.activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n document.addEventListener('keydown', onKeyDown, true);\n return () => document.removeEventListener('keydown', onKeyDown, true);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return createPortal(\n <div className={styles.backdrop} onMouseDown={(e) => e.target === e.currentTarget && onClose()}>\n <div\n ref={dialogRef}\n className={`${styles.dialog} ${widthClassName ?? ''}`}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n tabIndex={-1}\n >\n <h2 id={titleId} className={styles.title}>\n {title}\n </h2>\n {children}\n </div>\n </div>,\n document.body,\n );\n}\n","/**\n * components/primitives/Epistemic.tsx — the one thing the old UI got right,\n * promoted to a first-class primitive (foundation brief, item 7).\n *\n * When a piece of data's `sourceQuality.sourceState` is 'degraded' or\n * 'unknown'/'missing', this component displays \"unknown\" (never a stale or\n * guessed value dressed up as current) AND withholds any control built on\n * top of it (`renderControl` simply never runs). Every future view should\n * wrap sourceQuality-bearing fields in this rather than reinventing the\n * check — that is the whole point of making it a primitive instead of a\n * convention someone has to remember.\n *\n * Reference (old, correct behavior this replaces): app.js:311-314, :336-347.\n */\nimport type { ReactNode } from 'react';\nimport type { SourceQuality } from '../../data/api-types.js';\nimport styles from './Epistemic.module.css';\n\nexport function isKnown(quality: SourceQuality | undefined): boolean {\n if (!quality) return true; // absent quality metadata => field predates the pattern; trust it.\n return quality.sourceState === 'healthy' && quality.complete !== false;\n}\n\nexport interface EpistemicProps {\n quality: SourceQuality | undefined;\n /** Rendered when the value is known-good. */\n children: ReactNode;\n /**\n * A control (button, toggle, link) whose action depends on this data\n * being trustworthy — e.g. \"restart daemon\" next to daemon.running.\n * Omitted entirely (not disabled — omitted) when the source is degraded,\n * so an operator never sees an actionable-looking control wired to a\n * guess.\n */\n renderControl?: () => ReactNode;\n /** Optional label used in the \"unknown\" state, e.g. \"daemon status\". */\n label?: string;\n}\n\nexport function Epistemic({ quality, children, renderControl, label }: EpistemicProps): ReactNode {\n if (isKnown(quality)) {\n return (\n <>\n {children}\n {renderControl?.()}\n </>\n );\n }\n\n const reason = quality?.reason;\n return (\n <span className={styles.unknown} title={reason ? `Unavailable: ${reason}` : 'Source data unavailable'}>\n <span className={styles.dot} aria-hidden=\"true\" />\n unknown\n {label ? <span className=\"visually-hidden\"> ({label})</span> : null}\n </span>\n );\n}\n\n/** Small inline badge form, for table cells / dense rows. */\nexport function EpistemicBadge({ quality, label }: { quality: SourceQuality | undefined; label?: string }): ReactNode {\n if (isKnown(quality)) return null;\n return (\n <span className={styles.badge} title={quality?.reason ?? 'Source data unavailable'}>\n {label ? `${label}: ` : ''}unknown\n </span>\n );\n}\n","/**\n * components/primitives/StatusBadge.tsx — the ONE status-color mapping for\n * the whole app. See DESIGN.md \"Status-color semantics\" for the reasoning;\n * the short version: `running` is amber (motion, unresolved — matches\n * Vercel/GitHub Actions \"in progress\"), `done` is green (resolved,\n * successful). Neither reuses the accent color, so \"this is clickable\"\n * (accent) never visually collides with \"this succeeded\" (green).\n *\n * Every view should route run/swarm/proposal/daemon status strings through\n * `statusToTone()` rather than switching on raw strings itself, so adding a\n * new backend status value only ever needs one edit, here.\n */\nimport type { ReactNode } from 'react';\nimport styles from './StatusBadge.module.css';\n\nexport type Tone = 'neutral' | 'info' | 'running' | 'success' | 'warning' | 'danger' | 'unknown';\n\nconst STATUS_TONE: Record<string, Tone> = {\n // Run / swarm / proposal lifecycle.\n pending: 'neutral',\n queued: 'neutral',\n waiting: 'neutral',\n running: 'running',\n active: 'running',\n in_progress: 'running',\n building: 'running',\n applying: 'running',\n done: 'success',\n success: 'success',\n succeeded: 'success',\n applied: 'success',\n merged: 'success',\n ready: 'success',\n approved: 'success',\n ship: 'success',\n review: 'warning',\n degraded: 'warning',\n paused: 'warning',\n noise: 'neutral',\n failed: 'danger',\n error: 'danger',\n errored: 'danger',\n rejected: 'danger',\n harmful: 'danger',\n cancelled: 'neutral',\n canceled: 'neutral',\n unknown: 'unknown',\n};\n\nexport function statusToTone(status: string | undefined | null): Tone {\n if (!status) return 'unknown';\n return STATUS_TONE[status.toLowerCase()] ?? 'neutral';\n}\n\nexport interface StatusBadgeProps {\n status: string;\n /** Override the derived tone (rare — prefer letting statusToTone decide). */\n tone?: Tone;\n children?: ReactNode;\n}\n\nexport function StatusBadge({ status, tone, children }: StatusBadgeProps): ReactNode {\n const resolved = tone ?? statusToTone(status);\n return (\n <span className={`${styles.badge} ${styles[resolved]}`}>\n <span className={styles.dot} aria-hidden=\"true\" />\n {children ?? status}\n </span>\n );\n}\n\n/** A named DAG/milestone phase — categorical color, unrelated to health. */\nexport function PhaseDot({ index }: { index: number }): ReactNode {\n const n = ((index % 6) + 6) % 6; // wrap safely for any index, including negatives\n return <span className={styles.phaseDot} style={{ background: `var(--phase-${n + 1})` }} aria-hidden=\"true\" />;\n}\n","/**\n * components/notifications/types.ts — the notification centre's own vocab.\n *\n * Severity deliberately reuses `FleetNextAction.priority`'s four-level scale\n * (`critical | high | medium | low`, src/core/fleet/status.ts:455-462) plus\n * one addition, `info`, for passive/no-action items — this is the SAME\n * scale the legacy dashboard's \"Needs you\" deck already computes\n * (buildOperatorBriefingModel in public/app.js), reused per the build brief\n * rather than inventing a parallel one. `severityToTone` below maps it onto\n * the app-wide `StatusBadge` tone vocabulary so a notification's color never\n * disagrees with what the same severity means anywhere else in the UI.\n */\nimport type { Tone } from '../primitives/StatusBadge.js';\nimport type { SourceQuality } from '../../data/api-types.js';\n\nexport type NotificationSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';\n\nexport const SEVERITY_ORDER: NotificationSeverity[] = ['critical', 'high', 'medium', 'low', 'info'];\n\nexport function severityToTone(severity: NotificationSeverity): Tone {\n switch (severity) {\n case 'critical':\n return 'danger';\n case 'high':\n return 'warning';\n case 'medium':\n return 'running';\n case 'low':\n return 'neutral';\n case 'info':\n return 'info';\n }\n}\n\nexport type NotificationCategory =\n | 'action-required'\n | 'readiness'\n | 'security'\n | 'budget'\n | 'daemon-health'\n | 'proposal'\n | 'run'\n | 'log-source';\n\nexport const NOTIFICATION_CATEGORY_LABEL: Record<NotificationCategory, string> = {\n 'action-required': 'Action required',\n readiness: 'Autonomous readiness',\n security: 'Security',\n budget: 'Budget & limits',\n 'daemon-health': 'Daemon health',\n proposal: 'Proposals',\n run: 'Runs',\n 'log-source': 'Log source',\n};\n\nexport interface AppNotification {\n /** Stable per-underlying-issue id (e.g. `run-failed-r_123`) — re-deriving\n * with the same id updates the existing entry in place instead of\n * duplicating it; the id disappearing from a fresh derive means the\n * underlying issue resolved, and the store retires it automatically. */\n id: string;\n category: NotificationCategory;\n severity: NotificationSeverity;\n title: string;\n detail: string;\n /** ISO timestamp of the underlying event, when known; falls back to first-seen. */\n ts: string;\n /** Hash-router path to jump straight to the relevant view. */\n actionHref?: string;\n actionLabel?: string;\n /** Present when the notification is itself ABOUT degraded/unknown source\n * data (e.g. \"daemon state unknown\") — distinct from Epistemic's per-field\n * withholding, this is the notification centre surfacing the gap as an\n * actionable \"go check\" item rather than staying silent about it. */\n sourceQuality?: SourceQuality;\n}\n","/**\n * components/notifications/NotificationItem.tsx — one row in the attention\n * queue: severity, what it's about, why, and a direct action — plus a\n * mute-this-category control so an operator drowning in one noisy category\n * can quiet it without losing the rest (non-negotiable: never nag).\n */\nimport { Epistemic } from '../primitives/Epistemic.js';\nimport { StatusBadge } from '../primitives/StatusBadge.js';\nimport { severityToTone, NOTIFICATION_CATEGORY_LABEL, type AppNotification } from './types.js';\nimport { isMuted, setMuted } from './notification-store.js';\nimport styles from './NotificationItem.module.css';\n\nfunction formatRelative(iso: string): string {\n const seconds = Math.max(0, Math.round((Date.now() - new Date(iso).getTime()) / 1000));\n if (seconds < 5) return 'just now';\n if (seconds < 60) return `${seconds}s ago`;\n const minutes = Math.round(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.round(minutes / 60);\n if (hours < 48) return `${hours}h ago`;\n return `${Math.round(hours / 24)}d ago`;\n}\n\nexport function NotificationItem({ item }: { item: AppNotification }) {\n const muted = isMuted(item.category);\n return (\n <article className={styles.item} data-focus-key={`notification-${item.id}`}>\n <div className={styles.top}>\n <StatusBadge status={item.severity} tone={severityToTone(item.severity)}>\n {item.severity.toUpperCase()}\n </StatusBadge>\n <span className={styles.category}>{NOTIFICATION_CATEGORY_LABEL[item.category]}</span>\n <span className={styles.time} title={new Date(item.ts).toLocaleString()}>\n {formatRelative(item.ts)}\n </span>\n </div>\n <h3 className={styles.title}>{item.title}</h3>\n <p className={styles.detail}>\n {item.sourceQuality ? (\n <Epistemic quality={item.sourceQuality} label={item.title}>\n {item.detail}\n </Epistemic>\n ) : (\n item.detail\n )}\n </p>\n <div className={styles.actions}>\n {item.actionHref ? (\n <a className={styles.actionLink} href={`#${item.actionHref}`} data-focus-key={`notification-${item.id}-action`}>\n {item.actionLabel ?? 'Open'}\n </a>\n ) : null}\n <button\n type=\"button\"\n className={styles.muteBtn}\n onClick={() => setMuted(item.category, !muted)}\n aria-pressed={muted}\n >\n {muted ? `Unmute ${NOTIFICATION_CATEGORY_LABEL[item.category]}` : `Mute ${NOTIFICATION_CATEGORY_LABEL[item.category]}`}\n </button>\n </div>\n </article>\n );\n}\n","/**\n * data/client.ts — thin typed HTTP client for the existing /api/* surface.\n * No redefinition of response shapes here — callers type each call with the\n * interfaces re-exported from ./api-types.ts.\n */\nimport { getReadClientProof, reportSessionExpired } from './auth-store.js';\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public readonly status: number,\n public readonly path: string,\n ) {\n super(message);\n this.name = 'ApiError';\n }\n}\n\n/** Raised specifically for 404s on mutation routes: --allow-dispatch is off. */\nexport class DispatchDisabledError extends ApiError {\n constructor(path: string) {\n super('This server was started without --allow-dispatch, so mutations are disabled.', 404, path);\n this.name = 'DispatchDisabledError';\n }\n}\n\n/** GET an authenticated read route. 401 reports session-expired and throws. */\nexport async function apiGet<T>(path: string, signal?: AbortSignal): Promise<T> {\n const res = await fetch(path, {\n method: 'GET',\n credentials: 'same-origin',\n headers: { 'x-ashlr-read-client': getReadClientProof() },\n signal,\n });\n if (res.status === 401) {\n reportSessionExpired();\n throw new ApiError('Read session expired.', 401, path);\n }\n if (!res.ok) {\n throw new ApiError(`GET ${path} failed (HTTP ${res.status}).`, res.status, path);\n }\n return (await res.json()) as T;\n}\n\n/**\n * POST a mutating route with the raw mutation token. `mutationToken` must\n * come from the caller (data/mutations.ts pulls it from auth-store) — this\n * function does not read auth-store itself so it stays trivially testable.\n */\nexport async function apiPost<T>(\n path: string,\n body: unknown,\n mutationToken: string,\n): Promise<T> {\n const res = await fetch(path, {\n method: 'POST',\n credentials: 'same-origin',\n headers: {\n 'Content-Type': 'application/json',\n 'x-ashlr-token': mutationToken,\n },\n body: JSON.stringify(body ?? {}),\n });\n if (res.status === 404) {\n throw new DispatchDisabledError(path);\n }\n if (res.status === 401) {\n throw new ApiError('Mutation token was rejected.', 401, path);\n }\n if (!res.ok) {\n let detail = '';\n try {\n const j = (await res.json()) as { error?: string };\n detail = j.error ? `: ${j.error}` : '';\n } catch {\n /* body wasn't JSON */\n }\n throw new ApiError(`POST ${path} failed (HTTP ${res.status})${detail}.`, res.status, path);\n }\n if (res.status === 204) return undefined as T;\n return (await res.json()) as T;\n}\n\n/** Build the SSE URL, carrying the client proof as the query-string proof\n * EventSource can't attach as a header (see server.ts readSessionClientProof). */\nexport function eventsUrl(): string {\n return `/api/events?client=${encodeURIComponent(getReadClientProof())}`;\n}\n","/**\n * data/queries.ts — one typed accessor per backend resource. Each pairs a\n * stable cache key (also the SSE invalidation target — see sse.ts's\n * EVENT_TO_CACHE_KEYS) with the exact GET call and response type. Views\n * never call apiGet directly; they call these through useQuery (hooks.ts)\n * so caching, de-dupe, and SSE-driven refresh are automatic.\n */\nimport { apiGet } from './client.js';\nimport type {\n ControlLogEntry,\n ControlSnapshot,\n DashboardSnapshot,\n DecisionEntry,\n FleetActivitySnapshot,\n FleetStatus,\n Proposal,\n ProposalStatus,\n PublicDaemonObservation,\n RunState,\n SwarmRun,\n ActivityRollup,\n GenomeEntry,\n RecallHit,\n PortfolioSummary,\n ModelStatsReadResult,\n} from './api-types.js';\nimport type { SourceQuality } from './api-types.js';\n\nexport interface QueryDef<T> {\n key: string;\n fetch: (signal?: AbortSignal) => Promise<T>;\n}\n\nexport const dashboardSnapshotQuery: QueryDef<DashboardSnapshot> = {\n key: 'dashboard-snapshot',\n fetch: (signal) => apiGet<DashboardSnapshot>('/api/snapshot', signal),\n};\n\nexport const controlSnapshotQuery: QueryDef<ControlSnapshot> = {\n key: 'control-snapshot',\n fetch: (signal) => apiGet<ControlSnapshot>('/api/control', signal),\n};\n\n// NOTE: there is no standalone GET /api/visibility route — VisibilitySnapshot\n// is an optional field on DashboardSnapshot (`.visibility`), populated by\n// buildSnapshot() server-side. Read it off dashboardSnapshotQuery's data\n// rather than issuing a second request for it.\n\n/**\n * GET /api/runs returns the bare array (see src/core/web/api.ts:1121-1125,\n * `listRuns({limit:200})` -> `RunState[]`) — NOT `{runs: [...]}`. The prior\n * `RunSummary`/`runsQuery` pair here was speculative and didn't match the\n * real response shape; it was unused (FleetDashboardView reads its compact\n * run summaries off `DashboardSnapshot['runs']` instead, a different,\n * deliberately-thin shape). Replaced with the real, fully-typed contract.\n */\nexport const runsQuery: QueryDef<RunState[]> = {\n key: 'runs',\n fetch: (signal) => apiGet<RunState[]>('/api/runs', signal),\n};\n\nexport function runDetailQuery(id: string): QueryDef<RunState> {\n return {\n key: `run-detail-${id}`,\n fetch: (signal) => apiGet<RunState>(`/api/run/${encodeURIComponent(id)}`, signal),\n };\n}\n\nexport const swarmsQuery: QueryDef<SwarmRun[]> = {\n key: 'swarms',\n fetch: (signal) => apiGet<SwarmRun[]>('/api/swarms', signal),\n};\n\nexport function swarmDetailQuery(id: string): QueryDef<SwarmRun> {\n return {\n key: `swarm-detail-${id}`,\n fetch: (signal) => apiGet<SwarmRun>(`/api/swarm/${encodeURIComponent(id)}`, signal),\n };\n}\n\n/**\n * Same PublicDaemonObservation the backend embeds at ControlSnapshot.daemonObservation\n * — fetched standalone here because /control/daemon renders a fuller detail page\n * than DaemonPanel's dashboard-compact view and wants the raw observation\n * (including `ticks`) independent of whether the rest of /api/control succeeds.\n * Cache key 'daemon' deliberately matches sse.ts's existing (previously orphaned)\n * `daemon` / `daemon-observation` -> ['daemon'] mapping so this now actually\n * live-updates.\n */\nexport const daemonObservationQuery: QueryDef<PublicDaemonObservation> = {\n key: 'daemon',\n fetch: (signal) => apiGet<PublicDaemonObservation>('/api/daemon-observation', signal),\n};\n\nexport const fleetStatusQuery: QueryDef<FleetStatus> = {\n key: 'fleet',\n fetch: (signal) => apiGet<FleetStatus>('/api/fleet', signal),\n};\n\nexport const fleetActivityQuery: QueryDef<FleetActivitySnapshot> = {\n key: 'fleet-activity',\n fetch: (signal) => apiGet<FleetActivitySnapshot>('/api/fleet-activity', signal),\n};\n\n/**\n * GET /api/goals returns a bare array of ad-hoc per-goal projections built\n * inline in src/core/web/api.ts (`path === '/api/goals'`, ~line 1654) — there\n * is no exported backend type for this shape (unlike every other resource\n * here), so this interface is hand-written to match that handler exactly\n * rather than re-exported. Keep it in sync with api.ts if that handler's\n * shape changes.\n */\nexport interface GoalMilestoneSummary {\n title: string;\n status: string;\n order: number;\n}\n\nexport interface GoalSummary {\n id: string;\n objective: string;\n status: string;\n milestones: GoalMilestoneSummary[];\n progress: {\n fractionDone: number;\n counts: Record<string, number>;\n nextActionableId: string | null;\n };\n}\n\nexport const goalsQuery: QueryDef<GoalSummary[]> = {\n key: 'goals',\n fetch: (signal) => apiGet<GoalSummary[]>('/api/goals', signal),\n};\n\n/**\n * GET /api/vision/mission — buildVisionMissionSnapshot() in src/core/web/api.ts\n * is itself typed `Promise<Record<string, unknown>>` on the backend (no\n * exported interface to import), so this is a narrow hand-written contract\n * covering only the fields the Goals view actually reads: top-level `state`\n * (mirrors the SourceQuality.sourceState vocabulary) and the per-source\n * epistemic breakdown under `sources`. `briefing`/`preview`/`shadow` are\n * deliberately left as `unknown` — the view does not render briefing prose.\n */\nexport interface VisionMissionSourceStatus {\n sourceState: 'healthy' | 'degraded' | 'missing' | 'unknown';\n sourcePresent?: boolean;\n complete: boolean;\n reason?: string;\n}\n\nexport interface VisionMissionSnapshot {\n schemaVersion: number;\n state: string;\n authority: string;\n briefing: unknown;\n sources: {\n briefing: VisionMissionSourceStatus | null;\n goals: VisionMissionSourceStatus | null;\n enrollment: VisionMissionSourceStatus | null;\n proposals: VisionMissionSourceStatus | null;\n };\n}\n\nexport const visionMissionQuery: QueryDef<VisionMissionSnapshot> = {\n key: 'vision-mission',\n fetch: (signal) => apiGet<VisionMissionSnapshot>('/api/vision/mission', signal),\n};\n\nexport interface InboxProposal {\n id: string;\n title: string;\n kind: string;\n repo: string;\n origin: string;\n createdAt: string;\n}\n\nexport const inboxQuery: QueryDef<{ pending: number; proposals: InboxProposal[] }> = {\n key: 'inbox',\n fetch: (signal) => apiGet('/api/inbox', signal),\n};\n\n/**\n * `?status=&since=&limit=` view over GET /api/inbox (src/core/web/api.ts\n * INBOX_STATUS_QUERY_VALUES) — the history surface `inboxQuery` above never\n * had: it's hardcoded pending-only. `status: undefined` = server default\n * (pending); `'all'` = every status. Keyed per filter combo so switching\n * status/since/limit doesn't fight over one cache entry, and so sse.ts can\n * sweep every live combo (`invalidatePrefix('inbox-list:')`) on the 'inbox'\n * SSE event without knowing which combos are mounted.\n */\nexport type InboxHistoryStatus = ProposalStatus | 'all';\n\nexport interface InboxListFilters {\n status?: InboxHistoryStatus;\n /** ISO timestamp or YYYY-MM-DD, passed straight through to the server. */\n since?: string;\n limit?: number;\n}\n\nexport interface InboxListResponse {\n pending: number;\n total: number;\n /**\n * Full `Proposal[]`, not the narrow `InboxProposal` shape above — the\n * server has always sent full sanitized Proposal records here\n * (`listProposals()`); `InboxProposal` just under-typed it for the\n * original pending-badge use case. The history view needs `status` and\n * `decisionReason` per row (triage: \"why was this rejected\") without an\n * N+1 decisions-ledger read per row, and both live directly on Proposal.\n */\n proposals: Proposal[];\n /** True when more rows matched than were returned (hit the server cap). */\n truncated: boolean;\n filters: { status: InboxHistoryStatus; since: string | null; limit: number | null };\n}\n\nexport function inboxListQuery(filters: InboxListFilters = {}): QueryDef<InboxListResponse> {\n const params = new URLSearchParams();\n if (filters.status !== undefined) params.set('status', filters.status);\n if (filters.since !== undefined) params.set('since', filters.since);\n if (filters.limit !== undefined) params.set('limit', String(filters.limit));\n const qs = params.toString();\n return {\n key: `inbox-list:${filters.status ?? 'pending'}:${filters.since ?? ''}:${filters.limit ?? ''}`,\n fetch: (signal) => apiGet<InboxListResponse>(`/api/inbox${qs ? `?${qs}` : ''}`, signal),\n };\n}\n\n/**\n * Evidence behind a judge's verdict for one proposal — joined server-side\n * (src/core/web/api.ts GET /api/inbox/:id) from the decisions ledger, which\n * is the ONLY place `judgeReasonCode` lives (Proposal itself never carries\n * it). `judge-parse-failure`/`judge-network-failure` are infra failures,\n * never a considered `judge-review` — render them distinctly, never folded\n * together. When the ledger read is degraded or no row matches this\n * proposal, `sourceQuality` says so; render \"unknown\" via <Epistemic/>\n * rather than treating an empty `decisions` array as \"never judged\".\n */\nexport interface InboxDecisionEvidence {\n sourceQuality: SourceQuality;\n decisions: DecisionEntry[];\n}\n\n/**\n * GET /api/inbox/:id — full proposal detail including diff/taste/verdict\n * (src/core/web/api.ts:1240-1255, `loadProposal(id)`) plus `decisionEvidence`\n * (readDecisionsDetailed({proposalId}), added alongside the inbox history\n * view). Used by the work journal's \"why did it do that\" drill-in (M416) —\n * `/api/inbox` only ever returns pending proposals, but a decided\n * proposal's id (surfaced via fleet-activity's recentMerges/recentActions,\n * or via inboxListQuery's history view) still resolves here as long as its\n * on-disk record hasn't been pruned.\n */\nexport function proposalDetailQuery(id: string): QueryDef<Proposal & { decisionEvidence: InboxDecisionEvidence }> {\n return {\n key: `proposal-detail-${id}`,\n fetch: (signal) =>\n apiGet<Proposal & { decisionEvidence: InboxDecisionEvidence }>(`/api/inbox/${encodeURIComponent(id)}`, signal),\n };\n}\n\n/**\n * GET /api/logs-observation?tail=200 — the provenance-bearing sibling of\n * GET /api/logs (src/core/web/api.ts:~1543-1560): same daemon tick/merge\n * log, plus `sourceQuality` so a degraded/incomplete log can be rendered\n * honestly via <Epistemic/> instead of silently showing a truncated or\n * stale list as complete. `entries` is `null` when the source itself is not\n * healthy+complete (server-side contract, not a client guess). Used by the\n * work journal (M416) as one of several merged history sources — NOT a\n * substitute for full on-disk history: this is capped at 200 entries\n * server-side and only carries daemon tick/merge/info/dispatch events, not\n * raw run stdout or the ~672 historical proposals living only on disk.\n */\nexport interface ControlLogsObservation {\n entries: ControlLogEntry[] | null;\n sourceQuality: SourceQuality;\n}\n\nexport const controlLogsObservationQuery: QueryDef<ControlLogsObservation> = {\n key: 'control-logs-observation',\n fetch: (signal) => apiGet<ControlLogsObservation>('/api/logs-observation?tail=200', signal),\n};\n\n// ---------------------------------------------------------------------------\n// Intelligence + Portfolio (charts/dataviz work)\n// ---------------------------------------------------------------------------\n\nexport type PulseWindow = '1d' | '7d' | '30d';\n\n/** GET /api/pulse?window= — buildRollup() (src/core/observability/rollup.ts).\n * Parameterized like runDetailQuery/swarmDetailQuery above: a distinct cache\n * key per window so switching windows doesn't fight over one cache entry. */\nexport function pulseQuery(window: PulseWindow): QueryDef<ActivityRollup> {\n return {\n key: `pulse-${window}`,\n fetch: (signal) => apiGet<ActivityRollup>(`/api/pulse?window=${window}`, signal),\n };\n}\n\n/**\n * GET /api/genome[?q=] — src/core/web/api.ts:1189-1201. Two response shapes\n * depending on `q`: empty/absent `q` returns `GenomeEntry[]` (list mode,\n * `loadGenome()`); a non-empty `q` returns `RecallHit[]` (query mode,\n * `recall()`, `{entry, score, method}`). Use `isRecallHit` to discriminate —\n * the view can't know which shape it got from the type alone since both are\n * arrays. Keyed per query string so a debounced search doesn't stomp the\n * browse-mode cache entry.\n */\nexport type GenomeResult = GenomeEntry[] | RecallHit[];\n\nexport function isRecallHit(item: GenomeEntry | RecallHit): item is RecallHit {\n return typeof item === 'object' && item !== null && 'entry' in item && 'score' in item;\n}\n\nexport function genomeQuery(q: string): QueryDef<GenomeResult> {\n const trimmed = q.trim();\n return {\n key: trimmed ? `genome-search-${trimmed}` : 'genome-list',\n fetch: (signal) =>\n apiGet<GenomeResult>(trimmed ? `/api/genome?q=${encodeURIComponent(trimmed)}` : '/api/genome', signal),\n };\n}\n\nexport type ModelStatsWindow = '7d' | '30d' | 'all';\n\n/** GET /api/models?window= — computeModelStatsDetailed() joined per-model\n * economics (src/core/fleet/model-stats.ts). NOTE: a second, dead\n * `/api/models` handler later in api.ts's if-chain (local-model provider\n * probe off ControlSnapshot.models) is unreachable — this one always wins\n * since route matching is first-match. */\nexport function modelsQuery(window: ModelStatsWindow): QueryDef<ModelStatsReadResult & { window: ModelStatsWindow }> {\n return {\n key: `models-${window}`,\n fetch: (signal) => apiGet(`/api/models?window=${window}`, signal),\n };\n}\n\n/**\n * GET /api/portfolio — src/core/web/api.ts:1105-1109. Returns\n * `DashboardSnapshot.portfolio ?? null`: `null` on an older producer or\n * empty enrollment, not an error — render that as an honest \"not available\"\n * state, never as a zeroed chart.\n */\nexport const portfolioQuery: QueryDef<PortfolioSummary | null> = {\n key: 'portfolio',\n fetch: (signal) => apiGet<PortfolioSummary | null>('/api/portfolio', signal),\n};\n","/**\n * components/notifications/useNotificationEngine.ts — the one place that\n * turns backend queries into the notification store's active list. Mount\n * this exactly once (NotificationCenter does, unconditionally, regardless\n * of whether its panel is open) — it has no UI of its own.\n *\n * `runsQuery` and `inboxQuery` are already SSE-live (their cache keys\n * 'runs'/'inbox' are in data/sse.ts's EVENT_TO_CACHE_KEYS), so subscribing\n * via useQuery is enough to stay current for those two. `controlSnapshotQuery`\n * and `fleetStatusQuery` are NOT currently wired into any SSE event (their\n * keys 'control-snapshot' / 'fleet' don't appear in that map) — rather than\n * touch data/sse.ts (a file several concurrent view-agents are already\n * editing) this engine polls those two itself on an interval, so\n * notifications grounded in fleet.nextActions / security / limits / daemon\n * health still update continuously instead of only once per page load.\n */\nimport { useEffect } from 'react';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { controlSnapshotQuery, fleetStatusQuery, runsQuery, inboxQuery } from '../../data/queries.js';\nimport { deriveNotifications } from './deriveNotifications.js';\nimport { reconcileNotifications } from './notification-store.js';\n\n/** control-snapshot / fleet-status aren't SSE-invalidated (see header\n * comment) — this is this engine's own refresh cadence for those two. */\nexport const NOTIFICATION_SUMMARY_POLL_MS = 8000;\n\nexport function useNotificationEngine(): void {\n const control = useQuery(controlSnapshotQuery);\n const fleet = useQuery(fleetStatusQuery);\n const runs = useQuery(runsQuery);\n const inbox = useQuery(inboxQuery);\n\n const refetchControl = useRefetch(controlSnapshotQuery);\n const refetchFleet = useRefetch(fleetStatusQuery);\n\n useEffect(() => {\n const id = setInterval(() => {\n refetchControl();\n refetchFleet();\n }, NOTIFICATION_SUMMARY_POLL_MS);\n return () => clearInterval(id);\n }, [refetchControl, refetchFleet]);\n\n const controlData = control.data;\n const fleetData = fleet.data;\n const runsData = runs.data;\n const inboxData = inbox.data;\n\n useEffect(() => {\n reconcileNotifications(\n deriveNotifications({\n control: controlData,\n fleet: fleetData,\n runs: runsData,\n inbox: inboxData,\n }),\n );\n }, [controlData, fleetData, runsData, inboxData]);\n}\n","/**\n * components/notifications/NotificationCenter.tsx — the attention queue\n * itself. Mount exactly once, anywhere always-rendered (Topbar, alongside\n * <NotificationBell/>) — it runs useNotificationEngine() unconditionally\n * (so the bell's badge count and any desktop alert can fire even while the\n * panel is closed) and only gates the visible panel on `panelOpen`.\n *\n * Built on the shared <Dialog/> primitive per DESIGN.md's component\n * convention (\"if you need a new modal, extend Dialog, don't hand-roll\n * one\") — `widthClassName` docks it to the right as a drawer instead of the\n * centered card Dialog uses by default, but focus trap / Escape / backdrop\n * click / return-focus all come for free.\n */\nimport { useRef } from 'react';\nimport { Dialog } from '../primitives/Dialog.js';\nimport { NotificationItem } from './NotificationItem.js';\nimport { useNotifications } from './useNotifications.js';\nimport { useNotificationEngine } from './useNotificationEngine.js';\nimport { closePanel, enableDesktopNotifications, disableDesktopNotifications } from './notification-store.js';\nimport styles from './NotificationCenter.module.css';\n\nexport function NotificationCenter() {\n // Always runs, regardless of panelOpen — see header comment.\n useNotificationEngine();\n const { items, panelOpen, desktopEnabled, desktopPermission } = useNotifications();\n const closeBtnRef = useRef<HTMLButtonElement>(null);\n\n async function toggleDesktop() {\n if (desktopEnabled) {\n disableDesktopNotifications();\n } else {\n const result = await enableDesktopNotifications();\n if (result === 'denied') {\n // Browser-level denial — nothing more we can do from here; the\n // toggle will simply reflect \"off\" next render.\n }\n }\n }\n\n return (\n <Dialog\n open={panelOpen}\n onClose={closePanel}\n titleId=\"notification-center-title\"\n title={\n <span className={styles.titleRow}>\n <span>Notifications</span>\n <button type=\"button\" ref={closeBtnRef} className={styles.closeBtn} onClick={closePanel} aria-label=\"Close notifications\">\n ×\n </button>\n </span>\n }\n widthClassName={styles.drawer}\n initialFocusRef={closeBtnRef}\n >\n <div className={styles.header}>\n <button type=\"button\" className={styles.desktopToggle} onClick={() => void toggleDesktop()} disabled={desktopPermission === 'unsupported' || desktopPermission === 'denied'}>\n {desktopPermission === 'unsupported'\n ? 'Desktop alerts not supported in this browser'\n : desktopPermission === 'denied'\n ? 'Desktop alerts blocked in browser settings'\n : desktopEnabled\n ? '🔔 Desktop alerts on'\n : '🔕 Desktop alerts off — enable'}\n </button>\n </div>\n\n {items.length === 0 ? (\n <div className={styles.clear}>\n <strong>Nothing needs you right now.</strong>\n <span>The fleet is operating within its observed authority.</span>\n </div>\n ) : (\n <ul className={styles.list}>\n {items.map((item) => (\n <li key={item.id}>\n <NotificationItem item={item} />\n </li>\n ))}\n </ul>\n )}\n\n <a href=\"#/journal\" className={styles.journalLink} onClick={closePanel}>\n See full history in the Work Journal →\n </a>\n </Dialog>\n );\n}\n","/**\n * components/layout/Topbar.tsx — ⌘K trigger, theme toggle, and the\n * mutation-hold indicator (shows whether actions are unlocked right now,\n * and lets the operator lock early rather than waiting for idle timeout).\n */\nimport { useEffect, useState } from 'react';\nimport { useMutationHold } from '../../data/hooks.js';\nimport { NotificationBell } from '../notifications/NotificationBell.js';\nimport { NotificationCenter } from '../notifications/NotificationCenter.js';\nimport styles from './Topbar.module.css';\n\ntype ThemePreference = 'system' | 'light' | 'dark';\nconst THEME_STORAGE_KEY = 'ashlr.theme.v1';\n\nfunction applyTheme(pref: ThemePreference) {\n const root = document.documentElement;\n if (pref === 'system') root.removeAttribute('data-theme');\n else root.setAttribute('data-theme', pref);\n}\n\nfunction loadTheme(): ThemePreference {\n try {\n const v = localStorage.getItem(THEME_STORAGE_KEY);\n if (v === 'light' || v === 'dark' || v === 'system') return v;\n } catch {\n /* ignore */\n }\n return 'system';\n}\n\nexport function Topbar({ onOpenPalette }: { onOpenPalette: () => void }) {\n const [theme, setTheme] = useState<ThemePreference>(loadTheme);\n const mutation = useMutationHold();\n\n useEffect(() => {\n applyTheme(theme);\n try {\n localStorage.setItem(THEME_STORAGE_KEY, theme);\n } catch {\n /* best-effort */\n }\n }, [theme]);\n\n function cycleTheme() {\n setTheme((t) => (t === 'system' ? 'light' : t === 'light' ? 'dark' : 'system'));\n }\n\n return (\n <header className={styles.topbar}>\n <button type=\"button\" className={styles.paletteTrigger} onClick={onOpenPalette}>\n <span>Search or run a command</span>\n <kbd className={styles.kbd}>⌘K</kbd>\n </button>\n <div className={styles.actions}>\n <NotificationBell />\n {mutation.hasHold ? (\n <button type=\"button\" className={styles.lockBtn} onClick={mutation.clear} title=\"Lock actions now\">\n 🔓 Unlocked\n </button>\n ) : (\n <span className={styles.lockedIndicator} title=\"Actions require the dispatch token\">\n 🔒 Locked\n </span>\n )}\n <button type=\"button\" className={styles.themeBtn} onClick={cycleTheme} aria-label={`Theme: ${theme}`}>\n {theme === 'system' ? '🖥️' : theme === 'light' ? '☀️' : '🌙'}\n </button>\n </div>\n <NotificationCenter />\n </header>\n );\n}\n","/**\n * data/mutations.ts — every mutating call the foundation ships with, each\n * wrapped so it (a) pulls the held mutation token from auth-store instead\n * of asking every call site to thread it through, (b) touches the hold on\n * success so a burst of approvals doesn't idle-expire mid-session, and\n * (c) invalidates whatever cache keys the mutation obviously affects so\n * views update without waiting for the next SSE tick.\n *\n * Routes mirror the mutating surface documented at the top of\n * src/core/web/api.ts. Every one of these 404s (not 401/403) when the\n * server was started without --allow-dispatch — apiPost already maps that\n * to DispatchDisabledError.\n */\nimport { apiPost } from './client.js';\nimport { getMutationToken, touchMutationHold } from './auth-store.js';\nimport { invalidate, invalidatePrefix } from './cache.js';\n\nclass MissingMutationTokenError extends Error {\n constructor() {\n super('No mutation token held for this session yet.');\n this.name = 'MissingMutationTokenError';\n }\n}\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new MissingMutationTokenError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\nexport async function pauseFleet(): Promise<void> {\n await post('/api/fleet/pause', {});\n invalidate('dashboard-snapshot');\n invalidate('control-snapshot');\n invalidate('fleet');\n invalidate('fleet-activity');\n}\n\nexport async function resumeFleet(): Promise<void> {\n await post('/api/fleet/resume', {});\n invalidate('dashboard-snapshot');\n invalidate('control-snapshot');\n invalidate('fleet');\n invalidate('fleet-activity');\n}\n\nexport async function approveProposal(id: string): Promise<void> {\n await post(`/api/inbox/${encodeURIComponent(id)}/approve`, {});\n invalidate('inbox');\n invalidate('dashboard-snapshot');\n invalidate(`proposal-detail-${id}`);\n invalidatePrefix('inbox-list:');\n}\n\nexport async function rejectProposal(id: string): Promise<void> {\n await post(`/api/inbox/${encodeURIComponent(id)}/reject`, {});\n invalidate('inbox');\n invalidate('dashboard-snapshot');\n invalidate(`proposal-detail-${id}`);\n invalidatePrefix('inbox-list:');\n}\n\nexport interface OpenTargetRequest {\n path: string;\n target: 'editor' | 'finder';\n}\n\nexport async function openTarget(req: OpenTargetRequest): Promise<void> {\n await post('/api/open', req);\n}\n","/**\n * components/command-palette/commands.ts — the command registry. Static\n * navigation commands are derived from app/nav-config.ts (single source of\n * truth, shared with the sidebar); action commands are declared here.\n * Extend this array — do not hand-roll a second command list somewhere\n * else.\n */\nimport { ALL_NAV_LEAVES } from '../../app/nav-config.js';\nimport { pauseFleet, resumeFleet } from '../../data/mutations.js';\nimport { openPanel as openNotificationPanel } from '../notifications/notification-store.js';\n\nexport interface Command {\n id: string;\n title: string;\n subtitle?: string;\n group: 'Navigate' | 'Actions';\n keywords?: string[];\n /** Requires the mutation-token hold; the palette prompts for it if absent. */\n requiresMutationToken?: boolean;\n run: (nav: (path: string) => void) => void | Promise<void>;\n}\n\nconst navCommands: Command[] = ALL_NAV_LEAVES.map((leaf) => ({\n id: `nav:${leaf.path}`,\n title: leaf.label,\n subtitle: leaf.description,\n group: 'Navigate',\n run: (nav) => nav(leaf.path),\n}));\n\nconst actionCommands: Command[] = [\n {\n id: 'action:pause-fleet',\n title: 'Pause fleet',\n subtitle: 'Engage the fleet kill switch',\n group: 'Actions',\n keywords: ['stop', 'kill', 'halt'],\n requiresMutationToken: true,\n run: async () => {\n await pauseFleet();\n },\n },\n {\n id: 'action:resume-fleet',\n title: 'Resume fleet',\n subtitle: 'Clear the fleet kill switch',\n group: 'Actions',\n keywords: ['start', 'unpause'],\n requiresMutationToken: true,\n run: async () => {\n await resumeFleet();\n },\n },\n {\n id: 'action:open-notifications',\n title: 'Open notification centre',\n subtitle: 'What needs you right now, ranked by severity',\n group: 'Actions',\n keywords: ['alerts', 'attention', 'bell', 'needs you'],\n run: () => {\n openNotificationPanel();\n },\n },\n];\n\nexport const COMMANDS: Command[] = [...navCommands, ...actionCommands];\n\nexport function filterCommands(query: string): Command[] {\n const q = query.trim().toLowerCase();\n if (!q) return COMMANDS;\n return COMMANDS.filter((c) => {\n const haystack = [c.title, c.subtitle ?? '', ...(c.keywords ?? [])].join(' ').toLowerCase();\n return q.split(/\\s+/).every((term) => haystack.includes(term));\n });\n}\n","/**\n * components/auth/MutationTokenDialog.tsx — replaces window.prompt() for\n * the mutation token (foundation brief item 5, the \"biggest reason\n * operators abandon the UI for the CLI\" finding). A focus-managed dialog\n * instead of a blocking native prompt, and a session-scoped hold (see\n * auth-store.ts) so approving 12 proposals is one paste, not twelve.\n *\n * The token is NEVER written to localStorage/sessionStorage/cookies — only\n * held in an in-memory module variable in auth-store.ts, cleared on tab\n * close, idle timeout, or the explicit \"Lock\" action here.\n */\nimport { useId, useRef, useState, type FormEvent } from 'react';\nimport { Dialog } from '../primitives/Dialog.js';\nimport { useMutationHold } from '../../data/hooks.js';\nimport styles from './MutationTokenDialog.module.css';\n\nconst TOKEN_RE = /^[a-f0-9]{64}$/;\n\nexport interface MutationTokenDialogProps {\n open: boolean;\n onClose: () => void;\n /** Human context for why the token is being requested right now. */\n reason?: string;\n}\n\nexport function MutationTokenDialog({ open, onClose, reason }: MutationTokenDialogProps) {\n const { setToken } = useMutationHold();\n const [value, setValue] = useState('');\n const [reveal, setReveal] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const titleId = useId();\n const inputId = useId();\n\n function submit(e: FormEvent) {\n e.preventDefault();\n const trimmed = value.trim();\n if (!TOKEN_RE.test(trimmed)) {\n setError('Expected 64 hex characters — the mutation token ashlr serve printed.');\n return;\n }\n setToken(trimmed);\n setValue('');\n setError(null);\n onClose();\n }\n\n return (\n <Dialog open={open} onClose={onClose} titleId={titleId} title=\"Unlock actions\" initialFocusRef={inputRef}>\n <p className={styles.body}>\n {reason ?? 'This action mutates the fleet and requires the dispatch token.'} It is held in\n memory only, for this browser tab, and is cleared automatically after 20 minutes idle.\n </p>\n <form onSubmit={submit} className={styles.form} noValidate>\n <label htmlFor={inputId} className={styles.label}>\n Mutation token\n </label>\n <div className={styles.inputRow}>\n <input\n ref={inputRef}\n id={inputId}\n type={reveal ? 'text' : 'password'}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n className={styles.input}\n value={value}\n onChange={(e) => setValue(e.target.value)}\n aria-invalid={error ? true : undefined}\n placeholder=\"64 hex characters\"\n />\n <button\n type=\"button\"\n className={styles.reveal}\n onClick={() => setReveal((r) => !r)}\n aria-pressed={reveal}\n >\n {reveal ? 'Hide' : 'Show'}\n </button>\n </div>\n {error ? (\n <p className={styles.error} role=\"alert\">\n {error}\n </p>\n ) : null}\n <div className={styles.actions}>\n <button type=\"button\" className={styles.cancel} onClick={onClose}>\n Cancel\n </button>\n <button type=\"submit\" className={styles.submit} disabled={value.trim().length === 0}>\n Unlock\n </button>\n </div>\n </form>\n </Dialog>\n );\n}\n","/**\n * components/primitives/Toast.tsx — app-wide notifications. A single\n * aria-live region so screen readers announce toasts once, not per-toast\n * duplicate regions.\n */\nimport { createContext, useCallback, useContext, useMemo, useRef, useState, type ReactNode } from 'react';\nimport styles from './Toast.module.css';\n\nexport type ToastTone = 'neutral' | 'success' | 'danger';\n\ninterface ToastItem {\n id: number;\n message: string;\n tone: ToastTone;\n}\n\ninterface ToastContextValue {\n show: (message: string, tone?: ToastTone) => void;\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nexport function useToast(): ToastContextValue {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error('useToast() called outside <ToastProvider>');\n return ctx;\n}\n\nconst AUTO_DISMISS_MS = 5000;\n\nexport function ToastProvider({ children }: { children: ReactNode }) {\n const [toasts, setToasts] = useState<ToastItem[]>([]);\n const nextId = useRef(0);\n\n const dismiss = useCallback((id: number) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const show = useCallback(\n (message: string, tone: ToastTone = 'neutral') => {\n const id = nextId.current++;\n setToasts((prev) => [...prev, { id, message, tone }]);\n setTimeout(() => dismiss(id), AUTO_DISMISS_MS);\n },\n [dismiss],\n );\n\n const value = useMemo(() => ({ show }), [show]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div className={styles.region} role=\"status\" aria-live=\"polite\">\n {toasts.map((t) => (\n <div key={t.id} className={`${styles.toast} ${styles[t.tone]}`}>\n <span>{t.message}</span>\n <button type=\"button\" className={styles.dismiss} onClick={() => dismiss(t.id)} aria-label=\"Dismiss\">\n ×\n </button>\n </div>\n ))}\n </div>\n </ToastContext.Provider>\n );\n}\n","/**\n * components/command-palette/CommandPalette.tsx — ⌘K. Navigate anywhere,\n * run any action, all from the keyboard (foundation brief item 6: \"treat\n * it as core, not a nice-to-have\").\n *\n * Global open/close is owned here via a document-level keydown listener\n * (mounted once from App.tsx) rather than requiring every view to know the\n * palette exists.\n */\nimport { useEffect, useId, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useNavigate } from 'react-router-dom';\nimport { filterCommands, type Command } from './commands.js';\nimport { hasMutationHold } from '../../data/auth-store.js';\nimport { MutationTokenDialog } from '../auth/MutationTokenDialog.js';\nimport { useToast } from '../primitives/Toast.js';\nimport styles from './CommandPalette.module.css';\n\nexport function useCommandPaletteShortcut(setOpen: (open: boolean) => void) {\n useEffect(() => {\n function onKeyDown(e: KeyboardEvent) {\n const isModK = (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k';\n if (isModK) {\n e.preventDefault();\n setOpen(true);\n }\n }\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [setOpen]);\n}\n\nexport function CommandPalette({ open, onClose }: { open: boolean; onClose: () => void }) {\n const [query, setQuery] = useState('');\n const [activeIndex, setActiveIndex] = useState(0);\n const [pendingCommand, setPendingCommand] = useState<Command | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const listId = useId();\n const navigate = useNavigate();\n const toast = useToast();\n\n const results = useMemo(() => filterCommands(query), [query]);\n\n useEffect(() => {\n if (open) {\n setQuery('');\n setActiveIndex(0);\n // Portal content mounts after this effect; defer focus a tick.\n requestAnimationFrame(() => inputRef.current?.focus());\n }\n }, [open]);\n\n useEffect(() => {\n setActiveIndex(0);\n }, [query]);\n\n async function execute(cmd: Command) {\n if (cmd.requiresMutationToken && !hasMutationHold()) {\n setPendingCommand(cmd);\n onClose();\n return;\n }\n onClose();\n try {\n await cmd.run((path) => navigate(path));\n } catch (err) {\n toast.show(err instanceof Error ? err.message : 'Command failed.', 'danger');\n }\n }\n\n function onKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Escape') {\n onClose();\n return;\n }\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setActiveIndex((i) => Math.min(i + 1, results.length - 1));\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n setActiveIndex((i) => Math.max(i - 1, 0));\n } else if (e.key === 'Enter') {\n e.preventDefault();\n const cmd = results[activeIndex];\n if (cmd) void execute(cmd);\n }\n }\n\n if (!open) {\n return pendingCommand ? (\n <MutationTokenDialog\n open\n reason={`\"${pendingCommand.title}\" requires the dispatch token.`}\n onClose={() => setPendingCommand(null)}\n />\n ) : null;\n }\n\n return createPortal(\n <div className={styles.backdrop} onMouseDown={(e) => e.target === e.currentTarget && onClose()}>\n <div className={styles.panel} role=\"dialog\" aria-modal=\"true\" aria-label=\"Command palette\">\n <input\n ref={inputRef}\n className={styles.input}\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Navigate or run a command…\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-controls={listId}\n aria-activedescendant={results[activeIndex] ? `cmd-${results[activeIndex].id}` : undefined}\n autoComplete=\"off\"\n />\n <ul id={listId} role=\"listbox\" className={styles.list}>\n {results.length === 0 ? (\n <li className={styles.empty}>No matching commands.</li>\n ) : (\n results.map((cmd, i) => (\n <li\n key={cmd.id}\n id={`cmd-${cmd.id}`}\n role=\"option\"\n aria-selected={i === activeIndex}\n className={`${styles.item} ${i === activeIndex ? styles.active : ''}`}\n onMouseEnter={() => setActiveIndex(i)}\n onMouseDown={(e) => {\n e.preventDefault();\n void execute(cmd);\n }}\n >\n <span className={styles.itemTitle}>{cmd.title}</span>\n {cmd.subtitle ? <span className={styles.itemSubtitle}>{cmd.subtitle}</span> : null}\n <span className={styles.itemGroup}>{cmd.group}</span>\n </li>\n ))\n )}\n </ul>\n </div>\n </div>,\n document.body,\n );\n}\n","/**\n * components/primitives/RouteErrorBoundary.tsx — the last line of defense\n * against a view crashing on real-world data that doesn't match its\n * expected shape (see SwarmsView.tsx's `plan?.tasks` guard for a concrete\n * example: 2 of 80 real swarm records on this machine predate the `plan`\n * field entirely).\n *\n * React error boundaries can only be class components — there is no hook\n * equivalent. Wraps `<Outlet/>` in Shell.tsx, not the whole app: if one\n * routed view throws during render, the sidebar/topbar/command palette\n * survive and the operator can navigate to a working view instead of being\n * stuck on a permanently blank screen (DESIGN.md §11 point 4 — \"never a\n * full-page error, the shell stays usable\" — extended here to cover\n * uncaught render exceptions, not just query-status `'error'`).\n */\nimport { Component, type ErrorInfo, type ReactNode } from 'react';\nimport styles from './RouteErrorBoundary.module.css';\n\ninterface Props {\n children: ReactNode;\n /** Identity that, when changed, resets the boundary — pass the route pathname. */\n resetKey: string;\n}\n\ninterface State {\n error: Error | null;\n}\n\nexport class RouteErrorBoundary extends Component<Props, State> {\n override state: State = { error: null };\n\n static getDerivedStateFromError(error: Error): State {\n return { error };\n }\n\n override componentDidCatch(error: Error, info: ErrorInfo) {\n console.error('[ashlr] view crashed while rendering', error, info.componentStack);\n }\n\n override componentDidUpdate(prevProps: Props) {\n if (this.state.error && prevProps.resetKey !== this.props.resetKey) {\n this.setState({ error: null });\n }\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div className={styles.wrap} role=\"alert\">\n <p className={styles.title}>This view hit an error and couldn't render.</p>\n <p className={styles.detail}>\n {this.state.error.message || 'Unknown error.'} — the rest of ashlr is still working; pick another view\n from the sidebar, or retry this one.\n </p>\n <button type=\"button\" className={styles.retry} onClick={() => this.setState({ error: null })}>\n Retry this view\n </button>\n </div>\n );\n }\n return this.props.children;\n }\n}\n","/**\n * hooks/useScrollRestore.ts — React port of the one thing app.js got right\n * for view state (captureMainViewState / restoreMainViewState at\n * app.js:692-718), adapted to survive both route changes AND the\n * background-refresh re-renders the data layer now does constantly.\n *\n * The old bug this fixes: app.js captured `window.scrollY`, but the actual\n * scroll container was `.main` (styles.css sets `body.live-shell {overflow:\n * hidden}`), so scroll position always read 0 and reset on every ~8-15s\n * poll. Here the caller passes the REAL scrolling element's ref directly —\n * there is no ambiguity about which element scrolls.\n *\n * State survives:\n * - scrollTop of the container\n * - which element (if any) had focus, keyed by a stable `data-focus-key`\n * attribute the view puts on focusable rows/controls\n * - open/closed state of any `<details data-state-key>` in the subtree\n *\n * Keyed by `routeKey` (typically the route pathname) so switching views and\n * coming back restores each view's own scroll position independently.\n */\nimport { useEffect, useLayoutEffect, useRef, type RefObject } from 'react';\n\ninterface ViewState {\n scrollTop: number;\n focusKey: string | null;\n details: Map<string, boolean>;\n}\n\nconst stateByKey = new Map<string, ViewState>();\n\nfunction capture(container: HTMLElement): ViewState {\n const active = document.activeElement;\n const focusKey =\n active instanceof HTMLElement && container.contains(active)\n ? active.getAttribute('data-focus-key')\n : null;\n const details = new Map<string, boolean>();\n container.querySelectorAll('details[data-state-key]').forEach((node) => {\n const key = node.getAttribute('data-state-key');\n if (key) details.set(key, (node as HTMLDetailsElement).open);\n });\n return { scrollTop: container.scrollTop, focusKey, details };\n}\n\nfunction restore(container: HTMLElement, saved: ViewState): void {\n container.querySelectorAll('details[data-state-key]').forEach((node) => {\n const key = node.getAttribute('data-state-key');\n if (key && saved.details.has(key)) (node as HTMLDetailsElement).open = saved.details.get(key)!;\n });\n container.scrollTop = saved.scrollTop;\n if (!saved.focusKey) return;\n const target = container.querySelector<HTMLElement>(`[data-focus-key=\"${CSS.escape(saved.focusKey)}\"]`);\n if (!target) return;\n try {\n target.focus({ preventScroll: true });\n } catch {\n target.focus();\n }\n container.scrollTop = saved.scrollTop;\n}\n\n/**\n * Attach to the scrolling container. Call `saveNow()` before any render\n * that's about to replace the subtree wholesale (rare in React, but\n * available for parity with the old imperative call sites); normally you\n * don't need to call anything — mount/unmount and periodic capture on\n * scroll/blur handle it.\n */\nexport function useScrollRestore(routeKey: string, containerRef: RefObject<HTMLElement | null>) {\n const routeKeyRef = useRef(routeKey);\n routeKeyRef.current = routeKey;\n\n // Restore synchronously before paint so there's no visible jump.\n useLayoutEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n const saved = stateByKey.get(routeKey);\n if (saved) restore(el, saved);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- deliberately re-runs only on routeKey; the ref itself is stable for the shell's lifetime.\n }, [routeKey]);\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n let raf = 0;\n function onScroll() {\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => {\n if (el) stateByKey.set(routeKeyRef.current, capture(el));\n });\n }\n el.addEventListener('scroll', onScroll, { passive: true });\n document.addEventListener('focusout', onScroll);\n document.addEventListener('toggle', onScroll, true);\n\n return () => {\n cancelAnimationFrame(raf);\n el.removeEventListener('scroll', onScroll);\n document.removeEventListener('focusout', onScroll);\n document.removeEventListener('toggle', onScroll, true);\n // Final capture on unmount so a same-tick route swap doesn't lose the\n // last scroll position (scroll events can be throttled by the\n // browser right before teardown). Uses the `el` captured when this\n // effect was set up, not containerRef.current — the ref may already\n // point elsewhere (or be null) by the time cleanup runs.\n stateByKey.set(routeKeyRef.current, capture(el));\n };\n }, [containerRef]);\n}\n","/**\n * components/layout/Shell.tsx — the app frame: sidebar + topbar + a single\n * real scroll container (`<main>`) that useScrollRestore attaches to. Every\n * routed view renders inside this <main>; none of them own their own\n * scroll container, so scroll/focus/details state survives navigation\n * consistently everywhere instead of each view reimplementing it.\n */\nimport { useRef, useState } from 'react';\nimport { Outlet, useLocation } from 'react-router-dom';\nimport { Sidebar } from './Sidebar.js';\nimport { Topbar } from './Topbar.js';\nimport { CommandPalette, useCommandPaletteShortcut } from '../command-palette/CommandPalette.js';\nimport { RouteErrorBoundary } from '../primitives/RouteErrorBoundary.js';\nimport { useScrollRestore } from '../../hooks/useScrollRestore.js';\nimport styles from './Shell.module.css';\n\nexport function Shell() {\n const mainRef = useRef<HTMLElement>(null);\n const location = useLocation();\n const [paletteOpen, setPaletteOpen] = useState(false);\n\n useScrollRestore(location.pathname, mainRef);\n useCommandPaletteShortcut(setPaletteOpen);\n\n return (\n <div className={styles.shell}>\n <Sidebar />\n <div className={styles.body}>\n <Topbar onOpenPalette={() => setPaletteOpen(true)} />\n <main ref={mainRef} className={styles.main} id=\"main-content\" tabIndex={-1}>\n <RouteErrorBoundary resetKey={location.pathname}>\n <Outlet />\n </RouteErrorBoundary>\n </main>\n </div>\n <CommandPalette open={paletteOpen} onClose={() => setPaletteOpen(false)} />\n </div>\n );\n}\n","/**\n * routes/PlaceholderView.tsx — every nav leaf in app/nav-config.ts without\n * `implemented: true` renders this instead of a real view. It exists so\n * the routing/nav/palette foundation is provably complete end-to-end\n * (every path resolves to *something* real, deep-links work, back/forward\n * works) without pretending unbuilt views are built. View agents replace\n * this by adding `implemented: true` to the leaf and pointing its route at\n * a real component — see routes.tsx and DESIGN.md \"Adding a view\".\n */\nimport styles from './PlaceholderView.module.css';\n\nexport function PlaceholderView({ title, description }: { title: string; description: string }) {\n return (\n <div className={styles.wrap}>\n <h1 className={styles.title}>{title}</h1>\n <p className={styles.description}>{description}</p>\n <p className={styles.note}>Not built yet — this route, its nav entry, and its ⌘K command all already work.</p>\n </div>\n );\n}\n","/**\n * components/primitives/RefreshIndicator.tsx — the \"stale data, quietly\n * refreshing\" signal (foundation brief item 4: never blank the screen on\n * refresh). Pair with a QueryEntry's `status`:\n *\n * loading -> render a Skeleton instead of the view\n * refreshing -> render the view with data, plus <RefreshIndicator />\n * success -> render the view with data, no indicator\n * error -> render the view's error state\n */\nimport styles from './RefreshIndicator.module.css';\n\nexport function RefreshIndicator({ label = 'Refreshing' }: { label?: string }) {\n return (\n <span className={styles.root} role=\"status\" aria-live=\"polite\">\n <span className={styles.spinner} aria-hidden=\"true\" />\n <span className=\"visually-hidden\">{label}</span>\n </span>\n );\n}\n","/**\n * components/primitives/Skeleton.tsx — loading placeholders. Used ONLY for\n * `status === 'loading'` (no data at all yet). A resource that already has\n * data and is merely refreshing should show <RefreshIndicator/> instead —\n * never re-blank a populated view (see DESIGN.md \"no blank screens\").\n */\nimport styles from './Skeleton.module.css';\n\nexport function SkeletonLine({ width = '100%' }: { width?: string }) {\n return <div className={`skeleton ${styles.line}`} style={{ width }} />;\n}\n\nexport function SkeletonCard() {\n return (\n <div className={styles.card}>\n <div className={`skeleton ${styles.title}`} />\n <div className={`skeleton ${styles.stat}`} />\n <div className={`skeleton ${styles.caption}`} />\n </div>\n );\n}\n\nexport function SkeletonRow() {\n return (\n <div className={styles.row}>\n <div className={`skeleton ${styles.cell}`} style={{ width: '18%' }} />\n <div className={`skeleton ${styles.cell}`} style={{ width: '38%' }} />\n <div className={`skeleton ${styles.cell}`} style={{ width: '14%' }} />\n <div className={`skeleton ${styles.cell}`} style={{ width: '10%' }} />\n </div>\n );\n}\n\nexport function SkeletonCardGrid({ count = 4 }: { count?: number }) {\n return (\n <div className={styles.grid}>\n {Array.from({ length: count }, (_, i) => (\n <SkeletonCard key={i} />\n ))}\n </div>\n );\n}\n","/**\n * routes/fleet-dashboard/StatGrid.tsx — the glanceable header row: repos,\n * tools, activity, MCP health, genome, inbox. Pure presentation — the\n * parent view decides loading/refreshing/error.\n */\nimport type { DashboardSnapshot } from '../../data/api-types.js';\nimport { SkeletonCardGrid } from '../../components/primitives/Skeleton.js';\nimport styles from './StatGrid.module.css';\n\nexport function StatGridSkeleton() {\n return <SkeletonCardGrid count={6} />;\n}\n\nfunction Stat({ label, value, caption }: { label: string; value: string; caption?: string }) {\n return (\n <div className={styles.stat}>\n <span className={styles.statLabel}>{label}</span>\n <span className={styles.statValue}>{value}</span>\n {caption ? <span className={styles.statCaption}>{caption}</span> : null}\n </div>\n );\n}\n\nexport function StatGrid({ snapshot }: { snapshot: DashboardSnapshot }) {\n const mcpUp = snapshot.mcp.filter((m) => m.ok).length;\n return (\n <div className={styles.grid}>\n <Stat\n label=\"Repos\"\n value={String(snapshot.repos.total)}\n caption={`${snapshot.repos.dirty} dirty · ${snapshot.repos.stale} stale`}\n />\n <Stat label=\"Tools\" value={`${snapshot.tools.installed}/${snapshot.tools.total}`} caption=\"installed\" />\n <Stat\n label=\"Activity\"\n value={String(snapshot.activity.sessions)}\n caption={`${snapshot.activity.tokens.toLocaleString()} tok · $${snapshot.activity.estCostUsd.toFixed(2)}`}\n />\n <Stat label=\"MCP\" value={`${mcpUp}/${snapshot.mcp.length}`} caption=\"reachable\" />\n <Stat\n label=\"Genome\"\n value={String(snapshot.genome.entries)}\n caption={`${snapshot.genome.projects} projects`}\n />\n <Stat label=\"Inbox\" value={String(snapshot.inbox.pending)} caption=\"pending\" />\n </div>\n );\n}\n","/**\n * routes/fleet-dashboard/RunsPanel.tsx — recent runs. Wrapped in a\n * <details data-state-key> so useScrollRestore's collapse-state capture\n * has a real thing to exercise on this reference view; rows carry\n * data-focus-key so keyboard focus survives a background refresh even\n * though the whole list re-renders with fresh objects every SSE tick.\n */\nimport type { DashboardSnapshot } from '../../data/api-types.js';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { SkeletonRow } from '../../components/primitives/Skeleton.js';\nimport panel from './Panel.module.css';\nimport styles from './RunsPanel.module.css';\n\nexport function RunsPanelSkeleton() {\n return (\n <details className={panel.panel} open data-state-key=\"fleet-dashboard-runs\">\n <summary className={panel.panelHeader}>\n <span className={panel.panelTitle}>Recent runs</span>\n </summary>\n <div className={panel.panelBody}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n </details>\n );\n}\n\nexport function RunsPanel({ runs }: { runs: DashboardSnapshot['runs'] }) {\n return (\n <details className={panel.panel} open data-state-key=\"fleet-dashboard-runs\">\n <summary className={panel.panelHeader}>\n <span className={panel.panelTitle}>Recent runs</span>\n <span className=\"text-tertiary text-xs\">{runs.length}</span>\n </summary>\n <div className={panel.panelBody}>\n {runs.length === 0 ? (\n <p className={panel.emptyState}>No runs yet.</p>\n ) : (\n <table className={styles.table}>\n <thead>\n <tr>\n <th scope=\"col\">Goal</th>\n <th scope=\"col\" className={styles.statusCol}>\n Status\n </th>\n <th scope=\"col\" className={styles.tokensCol}>\n Tokens\n </th>\n </tr>\n </thead>\n <tbody>\n {runs.map((run) => (\n <tr key={run.id}>\n <td>\n <a\n href={`#/work/runs/${run.id}`}\n data-focus-key={`run-${run.id}`}\n className={styles.goalLink}\n title={run.goal}\n >\n {run.goal}\n </a>\n </td>\n <td>\n <StatusBadge status={run.status} />\n </td>\n <td className={styles.tokens}>{run.tokens.toLocaleString()}</td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n </div>\n </details>\n );\n}\n","/**\n * routes/fleet-dashboard/SwarmsPanel.tsx — active/recent swarms with a live\n * task burndown bar and a PhaseDot for the current DAG phase, when known.\n */\nimport type { DashboardSnapshot } from '../../data/api-types.js';\nimport { StatusBadge, PhaseDot } from '../../components/primitives/StatusBadge.js';\nimport panel from './Panel.module.css';\nimport styles from './SwarmsPanel.module.css';\n\nexport function SwarmsPanel({ swarms }: { swarms: DashboardSnapshot['swarms'] }) {\n return (\n <details className={panel.panel} open data-state-key=\"fleet-dashboard-swarms\">\n <summary className={panel.panelHeader}>\n <span className={panel.panelTitle}>Swarms</span>\n <span className=\"text-tertiary text-xs\">{swarms.length}</span>\n </summary>\n <div className={panel.panelBody}>\n {swarms.length === 0 ? (\n <p className={panel.emptyState}>No active swarms.</p>\n ) : (\n <ul className={styles.list}>\n {swarms.map((swarm, i) => {\n const pct = swarm.tasksTotal > 0 ? Math.round((swarm.tasksDone / swarm.tasksTotal) * 100) : 0;\n return (\n <li key={swarm.id} className={styles.item}>\n <a\n href={`#/work/swarms/${swarm.id}`}\n data-focus-key={`swarm-${swarm.id}`}\n className={styles.itemHeader}\n title={swarm.goal}\n >\n {swarm.phase ? <PhaseDot index={i} /> : null}\n <span className={styles.goal}>{swarm.goal}</span>\n <StatusBadge status={swarm.status} />\n </a>\n <div className={styles.burndown}>\n <div className={styles.burndownTrack}>\n <div className={styles.burndownFill} style={{ width: `${pct}%` }} />\n </div>\n <span className={styles.burndownLabel}>\n {swarm.tasksDone}/{swarm.tasksTotal}\n {swarm.phase ? ` · ${swarm.phase}` : ''}\n </span>\n </div>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </details>\n );\n}\n","/**\n * routes/fleet-dashboard/DaemonPanel.tsx — the reference use of the\n * epistemic-honesty primitive (foundation brief item 7). ControlSnapshot's\n * `daemon.sourceQuality` is a real `{sourceState, complete, reason}` on the\n * backend (src/core/web/control.ts buildDaemon/fallbackDaemon) — when it's\n * degraded, this panel shows \"unknown\" for state/pid/spend and WITHHOLDS\n * the pause/resume affordance entirely, rather than rendering a button\n * wired to a guess.\n */\nimport type { ControlSnapshot } from '../../data/api-types.js';\nimport { Epistemic } from '../../components/primitives/Epistemic.js';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { SkeletonLine } from '../../components/primitives/Skeleton.js';\nimport panel from './Panel.module.css';\nimport styles from './DaemonPanel.module.css';\n\nexport function DaemonPanelSkeleton() {\n return (\n <details className={panel.panel} open data-state-key=\"fleet-dashboard-daemon\">\n <summary className={panel.panelHeader}>\n <span className={panel.panelTitle}>Daemon</span>\n </summary>\n <div className={panel.panelBody}>\n <SkeletonLine width=\"40%\" />\n </div>\n </details>\n );\n}\n\nexport function DaemonPanel({ daemon }: { daemon: ControlSnapshot['daemon'] }) {\n return (\n <details className={panel.panel} open data-state-key=\"fleet-dashboard-daemon\">\n <summary className={panel.panelHeader}>\n <span className={panel.panelTitle}>Daemon</span>\n <Epistemic quality={daemon.sourceQuality} label=\"daemon state\">\n <StatusBadge status={daemon.running ? 'running' : 'pending'}>\n {daemon.running ? 'running' : 'stopped'}\n </StatusBadge>\n </Epistemic>\n </summary>\n <div className={panel.panelBody}>\n <dl className={styles.grid}>\n <div>\n <dt>Runtime state</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"runtime state\">\n {daemon.runtimeState}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>PID</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"pid\">\n {daemon.pid ?? '—'}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Today's spend</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"spend\">\n ${daemon.todaySpentUsd.toFixed(2)}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Direction mode</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"direction mode\">\n {daemon.activeDirectionMode ?? 'none'}\n </Epistemic>\n </dd>\n </div>\n </dl>\n </div>\n </details>\n );\n}\n","/**\n * routes/fleet-dashboard/FleetDashboardView.tsx — the foundation's ONE\n * fully-implemented view (foundation brief deliverable). Read this file\n * plus its sub-panels as the pattern every other view should copy:\n *\n * 1. Pull each resource through useQuery(<queryDef>) from data/hooks.ts\n * — never call apiGet directly from a view.\n * 2. Branch on `status`: 'loading' -> skeleton, 'error' -> inline error\n * (never a full-page error, the rest of the shell stays usable),\n * otherwise render real content — 'refreshing' additionally shows\n * <RefreshIndicator/> next to the section it's stale for.\n * 3. Never blank the page. Even on 'refreshing' the last-good `data` is\n * still there and still rendered.\n * 4. Wrap anything sourced from a `sourceQuality`-bearing field in\n * <Epistemic/> (see DaemonPanel.tsx) instead of trusting it blindly.\n */\nimport { dashboardSnapshotQuery, controlSnapshotQuery } from '../../data/queries.js';\nimport { useQuery } from '../../data/hooks.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { StatGrid, StatGridSkeleton } from './StatGrid.js';\nimport { RunsPanel, RunsPanelSkeleton } from './RunsPanel.js';\nimport { SwarmsPanel } from './SwarmsPanel.js';\nimport { DaemonPanel, DaemonPanelSkeleton } from './DaemonPanel.js';\nimport styles from './FleetDashboardView.module.css';\n\nexport function FleetDashboardView() {\n const snapshotQuery = useQuery(dashboardSnapshotQuery);\n const controlQuery = useQuery(controlSnapshotQuery);\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Fleet Dashboard</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {snapshotQuery.status === 'refreshing' ? <RefreshIndicator /> : null}\n {snapshotQuery.updatedAt ? (\n <span className={styles.freshnessLabel}>Updated {formatRelative(snapshotQuery.updatedAt)}</span>\n ) : null}\n </div>\n </header>\n\n {snapshotQuery.status === 'loading' ? (\n <StatGridSkeleton />\n ) : snapshotQuery.status === 'error' ? (\n <ErrorBanner message={snapshotQuery.error?.message ?? 'Failed to load snapshot.'} />\n ) : snapshotQuery.data ? (\n <StatGrid snapshot={snapshotQuery.data} />\n ) : null}\n\n <div className={styles.panels}>\n {snapshotQuery.status === 'loading' ? (\n <RunsPanelSkeleton />\n ) : snapshotQuery.data ? (\n <RunsPanel runs={snapshotQuery.data.runs} />\n ) : null}\n\n {snapshotQuery.data ? <SwarmsPanel swarms={snapshotQuery.data.swarms} /> : null}\n\n {controlQuery.status === 'loading' ? (\n <DaemonPanelSkeleton />\n ) : controlQuery.status === 'error' ? (\n <ErrorBanner message={controlQuery.error?.message ?? 'Failed to load control snapshot.'} />\n ) : controlQuery.data ? (\n <DaemonPanel daemon={controlQuery.data.daemon} />\n ) : null}\n </div>\n </div>\n );\n}\n\nfunction ErrorBanner({ message }: { message: string }) {\n return (\n <div className={styles.error} role=\"alert\">\n {message}\n </div>\n );\n}\n\nfunction formatRelative(ts: number): string {\n const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));\n if (seconds < 5) return 'just now';\n if (seconds < 60) return `${seconds}s ago`;\n const minutes = Math.round(seconds / 60);\n return `${minutes}m ago`;\n}\n","/**\n * components/stream/useRunStream.ts — the polling engine behind live run\n * streaming (M416: \"watch an agent work in real time\"). There is no\n * per-run SSE channel or raw-stdout endpoint on the backend (confirmed by\n * reading src/core/web/api.ts's full route table — GET /api/run/:id is the\n * only per-run read, and it returns the same structured RunState the run\n * writes to disk on every step, not a raw log tail). This hook is the\n * \"best available approximation\" the brief asked for when true streaming\n * isn't backed by the API: fast incremental polling of GET /api/run/:id,\n * diffing `steps`/`status` to detect real change, and being explicit about\n * both the polling cadence and the server's own floor.\n *\n * Honesty contract (non-negotiable per the build brief): this hook never\n * reports 'live' when nothing has actually changed for a while. Once a\n * running run goes STALL_AFTER_MS without an observed change to its step\n * count, status, or updatedAt, phase flips to 'stalled' — the UI must show\n * that, not keep rendering the last steps as if they were still fresh.\n */\nimport { useEffect, useMemo, useState } from 'react';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { runDetailQuery } from '../../data/queries.js';\nimport { ApiError } from '../../data/client.js';\nimport type { RunState } from '../../data/api-types.js';\n\n/** Client poll cadence. The server's own disk-poll floor (SSE_POLL_MS,\n * src/core/web/api.ts:138) is ~1.5s — polling faster than that cannot\n * surface data any sooner, so this intentionally sits just above it rather\n * than implying a latency this API can't deliver. */\nexport const RUN_STREAM_POLL_MS = 2000;\n\n/** No observed change for 4 poll cycles (~8s) while status is 'running' —\n * long enough to absorb an ordinary quiet beat between steps, short enough\n * that a genuinely wedged run doesn't masquerade as live for minutes. */\nconst STALL_AFTER_MS = RUN_STREAM_POLL_MS * 4;\n\nexport type RunStreamPhase = 'connecting' | 'live' | 'stalled' | 'done' | 'not-found' | 'error';\n\nexport interface RunStreamState {\n phase: RunStreamPhase;\n run: RunState | undefined;\n error: Error | undefined;\n /** When the run's own data last actually changed (step count / status / updatedAt). */\n lastChangedAt: number | null;\n /** When this hook last attempted a poll, regardless of whether anything changed. */\n lastPolledAt: number | null;\n /** Manually force an immediate poll (e.g. a \"check now\" affordance). */\n pollNow: () => void;\n}\n\nfunction fingerprintOf(run: RunState | undefined): string | null {\n if (!run) return null;\n return `${run.status}:${run.steps.length}:${run.updatedAt}`;\n}\n\nexport function useRunStream(runId: string): RunStreamState {\n const def = useMemo(() => runDetailQuery(runId), [runId]);\n const query = useQuery(def);\n const refetch = useRefetch(def);\n\n const [lastChangedAt, setLastChangedAt] = useState<number | null>(null);\n const [lastPolledAt, setLastPolledAt] = useState<number | null>(null);\n const [, forceTick] = useState(0);\n\n const fingerprint = fingerprintOf(query.data);\n\n // Fires only when `fingerprint` actually changes identity (React's\n // dependency comparison, not a manual ref check) — i.e. only when the run\n // genuinely produced a new step, changed status, or bumped updatedAt.\n useEffect(() => {\n if (fingerprint !== null) setLastChangedAt(Date.now());\n }, [fingerprint]);\n\n const isTerminal = query.data ? query.data.status !== 'running' : false;\n const is404 = query.error instanceof ApiError && query.error.status === 404;\n\n useEffect(() => {\n if (isTerminal || is404) return;\n const interval = setInterval(() => {\n refetch();\n setLastPolledAt(Date.now());\n forceTick((n) => n + 1); // re-render so stalled-detection re-evaluates \"now\" even with no data change\n }, RUN_STREAM_POLL_MS);\n return () => clearInterval(interval);\n }, [refetch, isTerminal, is404]);\n\n let phase: RunStreamPhase;\n if (is404) {\n phase = 'not-found';\n } else if (query.status === 'error' && query.data === undefined) {\n phase = 'error';\n } else if (query.status === 'loading') {\n phase = 'connecting';\n } else if (!query.data) {\n phase = 'connecting';\n } else if (query.data.status !== 'running') {\n phase = 'done';\n } else if (lastChangedAt !== null && Date.now() - lastChangedAt > STALL_AFTER_MS) {\n phase = 'stalled';\n } else {\n phase = 'live';\n }\n\n return {\n phase,\n run: query.data,\n error: query.error,\n lastChangedAt,\n lastPolledAt,\n pollNow: () => {\n refetch();\n setLastPolledAt(Date.now());\n },\n };\n}\n","/**\n * components/stream/RunStreamPanel.tsx — live view of one in-progress run:\n * current status, elapsed time/usage, and the step transcript as it builds\n * (M416 \"live run streaming\"). Backed by useRunStream's polling, not a\n * push channel — see that hook's header comment for why, and\n * RUN_STREAM_POLL_MS / the 'stalled' phase for how staleness is surfaced\n * rather than hidden.\n *\n * Reusable: any owner (journal's \"watch live\" action today; a future\n * /work/runs/:id detail view tomorrow) can mount `<RunStreamPanel runId=.../>`\n * directly — it owns its own data fetching, so the caller only needs an id.\n */\nimport { useEffect, useRef } from 'react';\nimport { useRunStream, RUN_STREAM_POLL_MS, type RunStreamPhase } from './useRunStream.js';\nimport { StatusBadge } from '../primitives/StatusBadge.js';\nimport { SkeletonLine } from '../primitives/Skeleton.js';\nimport type { RunStep } from '../../data/api-types.js';\nimport styles from './RunStreamPanel.module.css';\n\nconst STEP_KIND_LABEL: Record<RunStep['kind'], string> = {\n plan: 'Plan',\n model: 'Model',\n tool: 'Tool',\n synthesize: 'Synthesize',\n};\n\nfunction formatElapsed(startIso: string, endIso?: string): string {\n const start = new Date(startIso).getTime();\n const end = endIso ? new Date(endIso).getTime() : Date.now();\n const seconds = Math.max(0, Math.round((end - start) / 1000));\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const rem = seconds % 60;\n return `${minutes}m ${rem}s`;\n}\n\nfunction formatClock(iso: string): string {\n try {\n return new Date(iso).toLocaleTimeString(undefined, { hour12: false });\n } catch {\n return iso;\n }\n}\n\nfunction PhaseBanner({ phase, lastChangedAt, error }: { phase: RunStreamPhase; lastChangedAt: number | null; error: Error | undefined }) {\n if (phase === 'connecting') {\n return (\n <div className={styles.banner} role=\"status\">\n <span className={styles.bannerDot} data-tone=\"connecting\" aria-hidden=\"true\" />\n Connecting to run…\n </div>\n );\n }\n if (phase === 'not-found') {\n return (\n <div className={`${styles.banner} ${styles.bannerDanger}`} role=\"alert\">\n <span className={styles.bannerDot} data-tone=\"danger\" aria-hidden=\"true\" />\n Run not found. It may have been pruned from disk since this link was opened.\n </div>\n );\n }\n if (phase === 'error') {\n return (\n <div className={`${styles.banner} ${styles.bannerDanger}`} role=\"alert\">\n <span className={styles.bannerDot} data-tone=\"danger\" aria-hidden=\"true\" />\n Stream disconnected{error ? `: ${error.message}` : ''}. Retrying every {RUN_STREAM_POLL_MS / 1000}s…\n </div>\n );\n }\n if (phase === 'stalled') {\n const secs = lastChangedAt ? Math.round((Date.now() - lastChangedAt) / 1000) : null;\n return (\n <div className={`${styles.banner} ${styles.bannerWarning}`} role=\"status\" aria-live=\"polite\">\n <span className={styles.bannerDot} data-tone=\"warning\" aria-hidden=\"true\" />\n No change observed{secs !== null ? ` in ${secs}s` : ''} — this run may be stalled, or is simply quiet between\n steps. Still polling.\n </div>\n );\n }\n if (phase === 'live') {\n return (\n <div className={styles.banner} role=\"status\">\n <span className={styles.bannerDot} data-tone=\"live\" aria-hidden=\"true\" />\n Live · polling every {RUN_STREAM_POLL_MS / 1000}s (server refresh floor ~1.5s — this cannot be faster than\n that)\n </div>\n );\n }\n return (\n <div className={styles.banner} role=\"status\">\n <span className={styles.bannerDot} data-tone=\"done\" aria-hidden=\"true\" />\n Run finished — no longer polling.\n </div>\n );\n}\n\nexport function RunStreamPanelSkeleton() {\n return (\n <div className={styles.panel}>\n <SkeletonLine width=\"40%\" />\n <SkeletonLine width=\"90%\" />\n <SkeletonLine width=\"70%\" />\n </div>\n );\n}\n\nexport function RunStreamPanel({ runId }: { runId: string }) {\n const stream = useRunStream(runId);\n const { phase, run, error, lastChangedAt } = stream;\n const scrollRef = useRef<HTMLDivElement>(null);\n const stickToBottomRef = useRef(true);\n\n useEffect(() => {\n const el = scrollRef.current;\n if (!el || !stickToBottomRef.current) return;\n el.scrollTop = el.scrollHeight;\n }, [run?.steps.length]);\n\n function onScroll() {\n const el = scrollRef.current;\n if (!el) return;\n const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;\n stickToBottomRef.current = distanceFromBottom < 48;\n }\n\n if (!run && phase === 'connecting') return <RunStreamPanelSkeleton />;\n\n return (\n <div className={styles.panel}>\n <header className={styles.header}>\n <div className={styles.headerTop}>\n <h3 className={styles.title}>{run?.goal ?? `Run ${runId}`}</h3>\n {run ? <StatusBadge status={run.status} /> : null}\n </div>\n {run ? (\n <dl className={styles.statRow}>\n <div>\n <dt>Elapsed</dt>\n <dd>{formatElapsed(run.createdAt, run.status === 'running' ? undefined : run.updatedAt)}</dd>\n </div>\n <div>\n <dt>Tokens</dt>\n <dd>\n {run.usage.tokensIn.toLocaleString()} in / {run.usage.tokensOut.toLocaleString()} out\n </dd>\n </div>\n <div>\n <dt>Cost</dt>\n <dd>${run.usage.estCostUsd.toFixed(3)}</dd>\n </div>\n <div>\n <dt>Steps</dt>\n <dd>{run.steps.length}</dd>\n </div>\n <div>\n <dt>Tasks</dt>\n <dd>\n {run.tasks.filter((t) => t.status === 'done').length}/{run.tasks.length}\n </dd>\n </div>\n </dl>\n ) : null}\n </header>\n\n <PhaseBanner phase={phase} lastChangedAt={lastChangedAt} error={error} />\n\n <div\n ref={scrollRef}\n className={styles.transcript}\n onScroll={onScroll}\n tabIndex={0}\n role=\"log\"\n aria-label=\"Run step transcript\"\n >\n {!run || run.steps.length === 0 ? (\n <p className={styles.empty}>No steps recorded yet.</p>\n ) : (\n run.steps.map((step, i) => (\n <div key={`${step.ts}-${i}`} className={styles.step} data-focus-key={`run-stream-step-${i}`}>\n <span className={styles.stepKind} data-kind={step.kind}>\n {STEP_KIND_LABEL[step.kind] ?? step.kind}\n </span>\n <span className={styles.stepTime} title={step.ts}>\n {formatClock(step.ts)}\n </span>\n <span className={styles.stepTask}>{step.taskId}</span>\n <span className={styles.stepSummary}>{step.summary}</span>\n {step.usage ? (\n <span className={styles.stepUsage}>\n {(step.usage.tokensIn + step.usage.tokensOut).toLocaleString()} tok\n </span>\n ) : null}\n </div>\n ))\n )}\n </div>\n </div>\n );\n}\n","/**\n * routes/journal/LiveNowStrip.tsx — \"watch an agent work in real time\"\n * surfaced right at the top of the journal: any run currently `running`\n * gets a one-click \"Watch live\" that opens <RunStreamPanel/> in a drawer.\n * Reuses components/stream's live-streaming primitive rather than\n * reimplementing it — this is the journal's own integration point for that\n * feature (routes/work/** is owned by another agent and not touched here).\n */\nimport { useState } from 'react';\nimport { useQuery } from '../../data/hooks.js';\nimport { dashboardSnapshotQuery } from '../../data/queries.js';\nimport { Dialog } from '../../components/primitives/Dialog.js';\nimport { RunStreamPanel } from '../../components/stream/index.js';\nimport styles from './LiveNowStrip.module.css';\n\nexport function LiveNowStrip() {\n const snapshotQuery = useQuery(dashboardSnapshotQuery);\n const [watchingRunId, setWatchingRunId] = useState<string | null>(null);\n const runningRuns = (snapshotQuery.data?.runs ?? []).filter((r) => r.status === 'running');\n\n if (runningRuns.length === 0) return null;\n\n return (\n <div className={styles.strip}>\n <span className={styles.label}>Live now</span>\n <ul className={styles.list}>\n {runningRuns.map((run) => (\n <li key={run.id}>\n <button type=\"button\" className={styles.watchBtn} onClick={() => setWatchingRunId(run.id)}>\n <span className={styles.pulse} aria-hidden=\"true\" />\n {run.goal}\n </button>\n </li>\n ))}\n </ul>\n <Dialog\n open={watchingRunId !== null}\n onClose={() => setWatchingRunId(null)}\n titleId=\"live-now-title\"\n title=\"Watching live\"\n widthClassName={styles.dialogWidth}\n >\n {watchingRunId ? <RunStreamPanel runId={watchingRunId} /> : null}\n </Dialog>\n </div>\n );\n}\n","/**\n * routes/journal/JournalFilters.tsx — fully controlled filter bar: source\n * toggles, free-text search, and a time-window quick-pick. Kept dumb on\n * purpose (all state lives in JournalView) so it stays trivially testable\n * and swappable.\n */\nimport type { JournalSource } from './journal-model.js';\nimport styles from './JournalFilters.module.css';\n\nconst SOURCE_OPTIONS: { value: JournalSource; label: string }[] = [\n { value: 'run', label: 'Runs' },\n { value: 'merge', label: 'Merges' },\n { value: 'proposal', label: 'Proposals' },\n { value: 'agent-action', label: 'Agent actions' },\n { value: 'daemon-tick', label: 'Daemon ticks' },\n];\n\nconst WINDOW_OPTIONS: { value: string; label: string; ms: number | null }[] = [\n { value: '1h', label: 'Last hour', ms: 60 * 60 * 1000 },\n { value: '24h', label: 'Last 24h', ms: 24 * 60 * 60 * 1000 },\n { value: '7d', label: 'Last 7 days', ms: 7 * 24 * 60 * 60 * 1000 },\n { value: 'all', label: 'All available', ms: null },\n];\n\nexport interface JournalFiltersProps {\n sources: Set<JournalSource>;\n onSourcesChange: (next: Set<JournalSource>) => void;\n query: string;\n onQueryChange: (next: string) => void;\n windowValue: string;\n onWindowChange: (value: string, ms: number | null) => void;\n}\n\nexport function JournalFilters({ sources, onSourcesChange, query, onQueryChange, windowValue, onWindowChange }: JournalFiltersProps) {\n function toggleSource(source: JournalSource) {\n const next = new Set(sources);\n if (next.has(source)) next.delete(source);\n else next.add(source);\n onSourcesChange(next);\n }\n\n return (\n <div className={styles.bar}>\n <input\n type=\"search\"\n className={styles.search}\n placeholder=\"Search title, detail, repo…\"\n value={query}\n onChange={(e) => onQueryChange(e.target.value)}\n aria-label=\"Search the work journal\"\n />\n <div className={styles.sources} role=\"group\" aria-label=\"Filter by source\">\n {SOURCE_OPTIONS.map((opt) => (\n <label key={opt.value} className={styles.sourceOption}>\n <input type=\"checkbox\" checked={sources.has(opt.value)} onChange={() => toggleSource(opt.value)} />\n {opt.label}\n </label>\n ))}\n </div>\n <select\n className={styles.windowSelect}\n value={windowValue}\n onChange={(e) => {\n const opt = WINDOW_OPTIONS.find((o) => o.value === e.target.value);\n onWindowChange(e.target.value, opt?.ms ?? null);\n }}\n aria-label=\"Time window\"\n >\n {WINDOW_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n );\n}\n\nexport const ALL_JOURNAL_SOURCES = new Set<JournalSource>(SOURCE_OPTIONS.map((o) => o.value));\n","/**\n * routes/journal/journal-model.ts — pure merge/sort of every history source\n * the read API actually exposes into one chronological feed. No React, no\n * fetch — trivially unit-testable, same split as data/cache.ts.\n *\n * HONESTY, spelled out because it matters for this specific view: the\n * operator's real machine has ~672 historical proposals and weeks of\n * daemon-activity JSONL on disk, per the build brief. None of that is\n * reachable through the current read-only web API — there is no bulk\n * historical-proposal endpoint (only `/api/inbox`, pending-only) and no\n * endpoint for the JSONL files. This model merges what IS exposed:\n * - up to 200 daemon tick/merge/info/dispatch log lines (/api/logs-observation)\n * - up to 20 recent merges / 20 recent ticks / 20 recent agent actions\n * (/api/fleet-activity — each independently capped server-side)\n * - up to 200 recent runs (/api/runs)\n * - all currently-pending proposals (/api/inbox)\n * JournalView surfaces that window explicitly rather than implying this is\n * the full history — see its \"windowNote\" caption.\n */\nimport type {\n ControlLogEntry,\n FleetActivitySnapshot,\n RunState,\n SourceQuality,\n} from '../../data/api-types.js';\nimport type { ControlLogsObservation, InboxProposal } from '../../data/queries.js';\n\nexport type JournalSource = 'daemon-tick' | 'merge' | 'agent-action' | 'run' | 'proposal';\n\nexport interface JournalDrillIn {\n proposalId?: string;\n runId?: string;\n}\n\nexport interface JournalEntry {\n id: string;\n ts: string;\n source: JournalSource;\n title: string;\n detail: string;\n repo?: string;\n /** Fed straight to <StatusBadge status=.../> — statusToTone() decides the color. */\n statusLabel: string;\n sourceQuality?: SourceQuality;\n drillIn?: JournalDrillIn;\n}\n\nexport interface JournalBuildInputs {\n logs?: ControlLogsObservation;\n fleetActivity?: FleetActivitySnapshot;\n runs?: RunState[];\n inbox?: { pending: number; proposals: InboxProposal[] };\n}\n\nfunction logKindToStatus(kind: ControlLogEntry['kind']): string {\n switch (kind) {\n case 'merge':\n return 'merged';\n case 'dispatch':\n return 'running';\n case 'tick':\n return 'info';\n case 'info':\n default:\n return 'pending';\n }\n}\n\nexport function buildJournalEntries(input: JournalBuildInputs): JournalEntry[] {\n const out: JournalEntry[] = [];\n\n for (const [i, entry] of (input.logs?.entries ?? []).entries()) {\n out.push({\n id: `log-${entry.ts}-${i}`,\n ts: entry.ts,\n source: 'daemon-tick',\n title: entry.kind === 'merge' ? 'Daemon merge' : entry.kind === 'dispatch' ? 'Daemon dispatch' : 'Daemon tick',\n detail: entry.msg + (entry.dryRun ? ' (dry run)' : ''),\n statusLabel: logKindToStatus(entry.kind),\n sourceQuality: input.logs?.sourceQuality,\n });\n }\n\n for (const [i, tick] of (input.fleetActivity?.recentTicks ?? []).entries()) {\n out.push({\n id: `fleet-tick-${tick.ts}-${i}`,\n ts: tick.ts,\n source: 'daemon-tick',\n title: 'Fleet tick',\n detail:\n [tick.reason, tick.directionReason].filter(Boolean).join(' — ') ||\n `${tick.merged} merged, $${tick.spentUsd.toFixed(2)} spent`,\n statusLabel: tick.dryRun ? 'pending' : 'info',\n sourceQuality: input.fleetActivity?.recentTicksSourceQuality,\n });\n }\n\n for (const [i, merge] of (input.fleetActivity?.recentMerges ?? []).entries()) {\n out.push({\n id: `merge-${merge.ts}-${i}`,\n ts: merge.ts,\n source: 'merge',\n title: `Merged in ${merge.repo ?? 'unknown repo'}`,\n detail: `${merge.engine ?? 'unknown engine'}${merge.proposalId ? ` · proposal ${merge.proposalId}` : ''}`,\n repo: merge.repo ?? undefined,\n statusLabel: 'merged',\n sourceQuality: input.fleetActivity?.recentMergesSourceQuality,\n drillIn: merge.proposalId ? { proposalId: merge.proposalId } : undefined,\n });\n }\n\n for (const [i, action] of (input.fleetActivity?.recentActions ?? []).entries()) {\n out.push({\n id: `action-${action.ts}-${i}`,\n ts: action.ts,\n source: 'agent-action',\n title: action.proseDigest ?? action.summary ?? action.action,\n detail: action.summary,\n repo: action.repo,\n statusLabel: action.outcome,\n drillIn: action.proposalId ? { proposalId: action.proposalId } : action.runId ? { runId: action.runId } : undefined,\n });\n }\n\n for (const run of input.runs ?? []) {\n out.push({\n id: `run-${run.id}`,\n ts: run.updatedAt,\n source: 'run',\n title: run.goal,\n detail: run.result ?? run.terminationReason ?? `${run.steps.length} step(s), ${run.tasks.length} task(s)`,\n statusLabel: run.status,\n drillIn: { runId: run.id },\n });\n }\n\n for (const proposal of input.inbox?.proposals ?? []) {\n out.push({\n id: `proposal-pending-${proposal.id}`,\n ts: proposal.createdAt,\n source: 'proposal',\n title: proposal.title,\n detail: `${proposal.kind} · ${proposal.origin}`,\n repo: proposal.repo,\n statusLabel: 'pending',\n drillIn: { proposalId: proposal.id },\n });\n }\n\n out.sort((a, b) => new Date(b.ts).getTime() - new Date(a.ts).getTime());\n return out;\n}\n\nexport interface JournalFilterState {\n sources: Set<JournalSource>;\n query: string;\n windowMs: number | null; // null = all available\n}\n\nexport function filterJournalEntries(entries: JournalEntry[], filter: JournalFilterState): JournalEntry[] {\n const now = Date.now();\n const q = filter.query.trim().toLowerCase();\n return entries.filter((e) => {\n if (!filter.sources.has(e.source)) return false;\n if (filter.windowMs !== null && now - new Date(e.ts).getTime() > filter.windowMs) return false;\n if (q) {\n const haystack = `${e.title} ${e.detail} ${e.repo ?? ''} ${e.statusLabel}`.toLowerCase();\n if (!haystack.includes(q)) return false;\n }\n return true;\n });\n}\n\n/** Hourly density buckets for the scrub timeline, oldest-first. */\nexport function bucketByHour(entries: JournalEntry[], hours: number): { bucketStartMs: number; count: number }[] {\n const now = Date.now();\n const hourMs = 60 * 60 * 1000;\n const buckets: { bucketStartMs: number; count: number }[] = [];\n for (let i = hours - 1; i >= 0; i--) {\n buckets.push({ bucketStartMs: now - i * hourMs, count: 0 });\n }\n for (const e of entries) {\n const t = new Date(e.ts).getTime();\n const age = now - t;\n if (age < 0 || age > hours * hourMs) continue;\n const idx = hours - 1 - Math.floor(age / hourMs);\n if (idx >= 0 && idx < buckets.length) buckets[idx]!.count += 1;\n }\n return buckets;\n}\n","/**\n * routes/journal/JournalTimeline.tsx — the \"scrubable\" part of the brief: a\n * density strip over the visible window, one bar per hour. Clicking or\n * keyboard-activating a bar jumps the list to the newest entry in that\n * hour. Pure CSS bars, not a canvas/SVG dependency — density is all the\n * signal this needs to carry.\n */\nimport { bucketByHour, type JournalEntry } from './journal-model.js';\nimport styles from './JournalTimeline.module.css';\n\nexport interface JournalTimelineProps {\n entries: JournalEntry[];\n hours: number;\n onScrubTo: (bucketStartMs: number) => void;\n}\n\nexport function JournalTimeline({ entries, hours, onScrubTo }: JournalTimelineProps) {\n const buckets = bucketByHour(entries, hours);\n const max = Math.max(1, ...buckets.map((b) => b.count));\n\n return (\n <div className={styles.strip} role=\"group\" aria-label={`Activity density over the last ${hours} hours`}>\n {buckets.map((b) => {\n const pct = Math.round((b.count / max) * 100);\n const label = new Date(b.bucketStartMs).toLocaleTimeString(undefined, { hour: 'numeric' });\n return (\n <button\n key={b.bucketStartMs}\n type=\"button\"\n className={styles.bar}\n onClick={() => onScrubTo(b.bucketStartMs)}\n disabled={b.count === 0}\n title={`${label}: ${b.count} entr${b.count === 1 ? 'y' : 'ies'}`}\n aria-label={`${label}: ${b.count} entries`}\n >\n <span className={styles.fill} style={{ height: `${Math.max(pct, b.count > 0 ? 8 : 0)}%` }} />\n </button>\n );\n })}\n </div>\n );\n}\n","/**\n * routes/journal/JournalEntryDetail.tsx — the \"why did it do that, in one\n * click\" drill-in (build brief, journal section). Only mounts when its\n * parent <details> is opened, so the extra fetch it performs (proposal\n * diff/taste/verdict, or a live run stream) never happens for rows nobody\n * expands.\n */\nimport { useQuery } from '../../data/hooks.js';\nimport { proposalDetailQuery } from '../../data/queries.js';\nimport { RunStreamPanel } from '../../components/stream/index.js';\nimport { SkeletonLine } from '../../components/primitives/Skeleton.js';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport type { JournalDrillIn } from './journal-model.js';\nimport styles from './JournalEntryDetail.module.css';\n\nfunction ProposalDetail({ proposalId }: { proposalId: string }) {\n const query = useQuery(proposalDetailQuery(proposalId));\n\n if (query.status === 'loading') return <SkeletonLine width=\"80%\" />;\n if (query.status === 'error') {\n return (\n <p className={styles.error}>\n Could not load proposal {proposalId}: {query.error?.message ?? 'not found on disk (it may have been pruned).'}\n </p>\n );\n }\n const p = query.data;\n if (!p) return null;\n\n return (\n <div className={styles.detailBody}>\n <dl className={styles.grid}>\n <div>\n <dt>Status</dt>\n <dd>\n <StatusBadge status={p.status} />\n </dd>\n </div>\n {p.riskClass ? (\n <div>\n <dt>Risk</dt>\n <dd>{p.riskClass}</dd>\n </div>\n ) : null}\n {p.taste ? (\n <div>\n <dt>Judge verdict</dt>\n <dd>\n {p.taste.verdict} · alignment {p.taste.alignment}/10 · ambition {p.taste.ambition}/10 · design{' '}\n {p.taste.design}/10\n </dd>\n </div>\n ) : null}\n {p.decisionReason ? (\n <div>\n <dt>Decision</dt>\n <dd>{p.decisionReason}</dd>\n </div>\n ) : null}\n {p.learningSource ? (\n <div>\n <dt>Learning source</dt>\n <dd>{p.learningSource}</dd>\n </div>\n ) : null}\n </dl>\n {p.taste?.rationale ? <p className={styles.rationale}>{p.taste.rationale}</p> : null}\n {p.diff ? (\n <details className={styles.diffDetails}>\n <summary>Diff ({p.diff.split('\\n').length} lines)</summary>\n <pre className={styles.diff}>{p.diff}</pre>\n </details>\n ) : (\n <p className={styles.error}>No diff recorded for this proposal.</p>\n )}\n </div>\n );\n}\n\nexport function JournalEntryDetail({ drillIn }: { drillIn: JournalDrillIn }) {\n if (drillIn.runId) {\n return <RunStreamPanel runId={drillIn.runId} />;\n }\n if (drillIn.proposalId) {\n return <ProposalDetail proposalId={drillIn.proposalId} />;\n }\n return null;\n}\n","/**\n * routes/journal/JournalEntryRow.tsx — one line of the work journal.\n * `<details data-state-key>` per DESIGN.md's scroll/expanded-state-survival\n * pattern (useScrollRestore) so expanding a row to drill in survives a\n * background refresh; `data-focus-key` on the summary so keyboard focus\n * survives the same. The detail body (JournalEntryDetail) only mounts once\n * expanded — see that file's header comment for why.\n */\nimport { useState } from 'react';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { EpistemicBadge } from '../../components/primitives/Epistemic.js';\nimport { JournalEntryDetail } from './JournalEntryDetail.js';\nimport type { JournalEntry } from './journal-model.js';\nimport styles from './JournalEntryRow.module.css';\n\nconst SOURCE_LABEL: Record<JournalEntry['source'], string> = {\n 'daemon-tick': 'Daemon',\n merge: 'Merge',\n 'agent-action': 'Agent',\n run: 'Run',\n proposal: 'Proposal',\n};\n\nfunction formatWhen(iso: string): string {\n const d = new Date(iso);\n return `${d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' })} ${d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' })}`;\n}\n\nexport function JournalEntryRow({ entry }: { entry: JournalEntry }) {\n const hasDrillIn = Boolean(entry.drillIn);\n // <details> stays UNCONTROLLED on purpose — useScrollRestore\n // (hooks/useScrollRestore.ts) restores expanded/collapsed state by setting\n // the DOM `.open` property directly on `[data-state-key]` elements, which\n // a React-controlled `open` prop would fight on the next render. `expanded`\n // here only gates whether the (expensive: fetches a proposal or polls a\n // run) <JournalEntryDetail/> actually mounts — it does not drive the\n // <details> element itself. The native `toggle` event fires for both user\n // clicks and scroll-restore's programmatic `.open = true`, so this stays\n // in sync either way.\n const [expanded, setExpanded] = useState(false);\n\n return (\n <details\n className={styles.row}\n data-state-key={`journal-${entry.id}`}\n onToggle={(e) => setExpanded(e.currentTarget.open)}\n >\n <summary className={styles.summary} data-focus-key={`journal-${entry.id}`}>\n <span className={styles.sourceTag} data-source={entry.source}>\n {SOURCE_LABEL[entry.source]}\n </span>\n <span className={styles.when} title={entry.ts}>\n {formatWhen(entry.ts)}\n </span>\n <StatusBadge status={entry.statusLabel} />\n {entry.repo ? <span className={styles.repo}>{entry.repo}</span> : null}\n <span className={styles.title}>{entry.title}</span>\n <EpistemicBadge quality={entry.sourceQuality} />\n {hasDrillIn ? (\n <span className={styles.expandHint} aria-hidden=\"true\">\n why? ▾\n </span>\n ) : null}\n </summary>\n <div className={styles.body}>\n <p className={styles.detailText}>{entry.detail}</p>\n {expanded && entry.drillIn ? <JournalEntryDetail drillIn={entry.drillIn} /> : null}\n </div>\n </details>\n );\n}\n","/**\n * routes/journal/JournalView.tsx — \"what did the fleet do overnight,\n * answerable in one glance; why, in one click\" (build brief). Merges every\n * history source the read API exposes (see journal-model.ts's header\n * comment for the exact, honestly-stated window), makes it filterable and\n * scrubable, and surfaces a live-now strip for anything currently running.\n *\n * Follows DESIGN.md's view checklist: useQuery per resource (never apiGet\n * directly), 'loading' -> skeleton, 'error' -> inline banner (never blanks\n * the shell), 'refreshing' -> real content + <RefreshIndicator/>, every\n * sourceQuality-bearing field wrapped in <Epistemic/> (done inside\n * JournalEntryRow via <EpistemicBadge/>).\n */\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { controlLogsObservationQuery, fleetActivityQuery, runsQuery, inboxQuery } from '../../data/queries.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonRow } from '../../components/primitives/Skeleton.js';\nimport { LiveNowStrip } from './LiveNowStrip.js';\nimport { JournalFilters, ALL_JOURNAL_SOURCES } from './JournalFilters.js';\nimport { JournalTimeline } from './JournalTimeline.js';\nimport { JournalEntryRow } from './JournalEntryRow.js';\nimport { buildJournalEntries, filterJournalEntries, type JournalSource } from './journal-model.js';\nimport styles from './JournalView.module.css';\n\n/** control-logs-observation isn't SSE-invalidated (its key isn't in\n * data/sse.ts's EVENT_TO_CACHE_KEYS) — poll it ourselves, same rationale as\n * the notification engine's summary poll. */\nconst LOGS_POLL_MS = 8000;\n\nfunction formatRelative(ts: number): string {\n const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));\n if (seconds < 5) return 'just now';\n if (seconds < 60) return `${seconds}s ago`;\n const minutes = Math.round(seconds / 60);\n return `${minutes}m ago`;\n}\n\nexport function JournalView() {\n const logsQuery = useQuery(controlLogsObservationQuery);\n const activityQuery = useQuery(fleetActivityQuery);\n const runsListQuery = useQuery(runsQuery);\n const inboxListQuery = useQuery(inboxQuery);\n const refetchLogs = useRefetch(controlLogsObservationQuery);\n\n useEffect(() => {\n const id = setInterval(refetchLogs, LOGS_POLL_MS);\n return () => clearInterval(id);\n }, [refetchLogs]);\n\n const [sources, setSources] = useState<Set<JournalSource>>(new Set(ALL_JOURNAL_SOURCES));\n const [query, setQuery] = useState('');\n const [windowValue, setWindowValue] = useState('24h');\n const [windowMs, setWindowMs] = useState<number | null>(24 * 60 * 60 * 1000);\n\n const entries = useMemo(\n () =>\n buildJournalEntries({\n logs: logsQuery.data,\n fleetActivity: activityQuery.data,\n runs: runsListQuery.data,\n inbox: inboxListQuery.data,\n }),\n [logsQuery.data, activityQuery.data, runsListQuery.data, inboxListQuery.data],\n );\n\n const filtered = useMemo(\n () => filterJournalEntries(entries, { sources, query, windowMs }),\n [entries, sources, query, windowMs],\n );\n\n const rowRefs = useRef(new Map<string, HTMLLIElement>());\n function scrubTo(bucketStartMs: number) {\n const hourMs = 60 * 60 * 1000;\n const target = filtered.find((e) => new Date(e.ts).getTime() <= bucketStartMs + hourMs);\n if (!target) return;\n rowRefs.current.get(target.id)?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n\n const anyLoading =\n logsQuery.status === 'loading' &&\n activityQuery.status === 'loading' &&\n runsListQuery.status === 'loading' &&\n inboxListQuery.status === 'loading';\n const anyRefreshing = [logsQuery, activityQuery, runsListQuery, inboxListQuery].some((q) => q.status === 'refreshing');\n const latestUpdatedAt = Math.max(\n logsQuery.updatedAt ?? 0,\n activityQuery.updatedAt ?? 0,\n runsListQuery.updatedAt ?? 0,\n inboxListQuery.updatedAt ?? 0,\n );\n\n const errors = [\n logsQuery.status === 'error' ? `daemon log: ${logsQuery.error?.message}` : null,\n activityQuery.status === 'error' ? `fleet activity: ${activityQuery.error?.message}` : null,\n runsListQuery.status === 'error' ? `runs: ${runsListQuery.error?.message}` : null,\n inboxListQuery.status === 'error' ? `inbox: ${inboxListQuery.error?.message}` : null,\n ].filter((e): e is string => e !== null);\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <div>\n <h1 className={styles.title}>Work Journal</h1>\n <p className={styles.windowNote}>\n Merges the daemon log (last 200 lines), fleet activity (last ~20 merges/ticks/agent actions), recent runs\n (last 200), and the pending-proposal inbox. The read API does not expose the full on-disk history beyond\n this window.\n </p>\n </div>\n <div className={styles.freshness} aria-live=\"polite\">\n {anyRefreshing ? <RefreshIndicator /> : null}\n {latestUpdatedAt > 0 ? <span className={styles.freshnessLabel}>Updated {formatRelative(latestUpdatedAt)}</span> : null}\n </div>\n </header>\n\n {errors.length > 0 ? (\n <div className={styles.errorBanner} role=\"alert\">\n Some sources failed to load: {errors.join('; ')}\n </div>\n ) : null}\n\n <LiveNowStrip />\n\n {anyLoading ? (\n <div className={styles.panel}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : (\n <>\n <JournalTimeline entries={entries} hours={24} onScrubTo={scrubTo} />\n <JournalFilters\n sources={sources}\n onSourcesChange={setSources}\n query={query}\n onQueryChange={setQuery}\n windowValue={windowValue}\n onWindowChange={(value, ms) => {\n setWindowValue(value);\n setWindowMs(ms);\n }}\n />\n <div className={styles.panel}>\n {filtered.length === 0 ? (\n <p className={styles.empty}>Nothing matches the current filters in this window.</p>\n ) : (\n <ul className={styles.list}>\n {filtered.map((entry) => (\n <li\n key={entry.id}\n ref={(el) => {\n if (el) rowRefs.current.set(entry.id, el);\n else rowRefs.current.delete(entry.id);\n }}\n >\n <JournalEntryRow entry={entry} />\n </li>\n ))}\n </ul>\n )}\n </div>\n </>\n )}\n </div>\n );\n}\n","/**\n * components/charts/ChartContainer.tsx — the figure every chart mounts\n * inside: title/description, the plot itself, an optional caveat banner\n * (epistemic-honesty-adjacent: for a chart built on data with a known,\n * disclosed limitation — see ProductionView's judge-verdict caveat), an\n * optional table-view twin (the WCAG-clean accessibility equivalent every\n * chart should ship per the dataviz skill), and an empty state that never\n * lies about missing data.\n */\nimport type { ReactNode } from 'react';\nimport './chart-tokens.css';\nimport styles from './ChartContainer.module.css';\n\nexport interface ChartContainerProps {\n title: string;\n description?: string;\n /** A short, honest note about a known limitation of the data behind this\n * chart (e.g. \"counts may include X, not yet separable\"). Never omit a\n * caveat to make a chart look cleaner than the data actually is. */\n caveat?: string;\n /** The chart itself (SVG + legend). */\n children: ReactNode;\n /** The accessibility twin — same data as a real HTML table. Omit only\n * when the chart already IS a table. */\n table?: ReactNode;\n /** When true, renders the empty state instead of `children`. */\n empty?: boolean;\n emptyMessage?: string;\n}\n\nexport function ChartContainer({\n title,\n description,\n caveat,\n children,\n table,\n empty,\n emptyMessage = 'No data for this window.',\n}: ChartContainerProps) {\n return (\n <figure className={styles.figure}>\n <figcaption className={styles.caption}>\n <span className={styles.title}>{title}</span>\n {description ? <span className={styles.description}>{description}</span> : null}\n </figcaption>\n {caveat ? (\n <p className={styles.caveat} role=\"note\">\n {caveat}\n </p>\n ) : null}\n {empty ? (\n <p className={styles.empty}>{emptyMessage}</p>\n ) : (\n <div className={styles.plot}>{children}</div>\n )}\n {table ? (\n <details className={styles.tableDisclosure}>\n <summary>View as table</summary>\n <div className={styles.tableBody}>{table}</div>\n </details>\n ) : null}\n </figure>\n );\n}\n","/**\n * components/charts/Legend.tsx — the dependable identity channel. A legend\n * is always present for two or more series (never rely on color-matching\n * alone); a single series needs no legend box because the chart's own title\n * already names it (see marks-and-anatomy.md \"Labels & legend\").\n */\nimport styles from './Legend.module.css';\n\nexport interface LegendItem {\n label: string;\n color: string;\n /** 'line' for line charts (a short stroke key), 'swatch' for bar/area. */\n kind?: 'line' | 'swatch';\n}\n\nexport function Legend({ items }: { items: LegendItem[] }) {\n if (items.length < 2) return null;\n return (\n <ul className={styles.legend}>\n {items.map((it) => (\n <li key={it.label} className={styles.item}>\n <span\n className={it.kind === 'line' ? styles.swatchLine : styles.swatch}\n style={{ background: it.color }}\n aria-hidden=\"true\"\n />\n {it.label}\n </li>\n ))}\n </ul>\n );\n}\n","/**\n * components/charts/colors.ts — the one place a chart asks for a color.\n * Every function returns a `var(--chart-*)` reference into chart-tokens.css\n * (never a literal hex) so theming is automatic and colors can never drift\n * out of sync between light and dark. See chart-tokens.css's header comment\n * for the palette-selection rationale — an exhaustive permutation search\n * clears the CVD adjacent floor (worst ΔE 13.8 light / 14.5 dark, target\n * 8.0) without changing which hues are used, only their series order.\n */\n\nconst SERIES_SLOTS = 7;\n\n/** Fixed-order categorical color for series index `slot` (0-based). Color\n * follows the entity, never its row number — callers must assign a series\n * its slot once (e.g. by stable sort order) and keep it even if other\n * series are filtered out; never reassign slots to \"fill the gap\" left by\n * a removed series (see dataviz anti-patterns: \"recolor-on-filter\"). */\nexport function seriesColor(slot: number): string {\n const n = ((slot % SERIES_SLOTS) + SERIES_SLOTS) % SERIES_SLOTS;\n return `var(--chart-series-${n + 1})`;\n}\n\n/** The \"Other\"/overflow bucket color — never part of the identity rotation. */\nexport const CHART_NEUTRAL = 'var(--chart-neutral)';\n\n/** Default single hue for magnitude (sequential) and for a single nominal\n * series (one series needs no legend box — every bar takes the same hue). */\nexport const CHART_SEQUENTIAL = 'var(--chart-sequential)';\nexport const CHART_SEQUENTIAL_SOFT = 'var(--chart-sequential-soft)';\n\nexport const CHART_DIVERGING_POS = 'var(--chart-diverging-pos)';\nexport const CHART_DIVERGING_NEG = 'var(--chart-diverging-neg)';\nexport const CHART_DIVERGING_MID = 'var(--chart-diverging-mid)';\n\nexport const CHART_GRID = 'var(--chart-grid)';\nexport const CHART_AXIS = 'var(--chart-axis)';\n","/**\n * components/charts/LineChart.tsx — trend over time. A gap (`null` y) is\n * split into a separate path segment so it renders as a visible break in\n * the line, never as a straight line through a missing value and never as\n * a silent zero. Single series gets an optional soft area fill; two-plus\n * series always render a legend (never color-matching alone).\n */\nimport { useRef, useState } from 'react';\nimport type { Series } from './types.js';\nimport { seriesColor, CHART_GRID, CHART_AXIS } from './colors.js';\nimport { Legend } from './Legend.js';\nimport './chart-tokens.css';\nimport styles from './LineChart.module.css';\n\nconst VBOX_W = 640;\nconst PAD_L = 44;\nconst PAD_R = 12;\nconst PAD_T = 12;\nconst PAD_B = 24;\nconst TICKS_Y = 4;\n\ninterface Run {\n x: number;\n y: number;\n}\n\nfunction splitRuns(points: Series['points']): Run[][] {\n const runs: Run[][] = [];\n let current: Run[] = [];\n for (const p of points) {\n if (p.y === null) {\n if (current.length) runs.push(current);\n current = [];\n continue;\n }\n current.push({ x: p.x, y: p.y });\n }\n if (current.length) runs.push(current);\n return runs;\n}\n\nfunction niceTicks(min: number, max: number, count: number): number[] {\n if (max <= min) return [min];\n const step = (max - min) / count;\n return Array.from({ length: count + 1 }, (_, i) => min + step * i);\n}\n\nexport function LineChart({\n series,\n height = 200,\n area = false,\n formatX = (x: number) => String(x),\n formatY = (y: number) => String(y),\n ariaLabel,\n}: {\n series: Series[];\n height?: number;\n area?: boolean;\n formatX?: (x: number) => string;\n formatY?: (y: number) => string;\n ariaLabel: string;\n}) {\n const svgRef = useRef<SVGSVGElement>(null);\n const [hoverX, setHoverX] = useState<number | null>(null);\n const [tooltipPos, setTooltipPos] = useState<{ left: number; top: number } | null>(null);\n\n const allX = series.flatMap((s) => s.points.map((p) => p.x));\n const knownY = series.flatMap((s) => s.points.map((p) => p.y)).filter((y): y is number => y !== null);\n if (allX.length === 0) {\n return <p>No data.</p>;\n }\n const xMin = Math.min(...allX);\n const xMax = Math.max(...allX);\n const yMin = Math.min(0, ...knownY);\n const yMax = Math.max(0.0001, ...knownY);\n const xRange = xMax - xMin || 1;\n const yRange = yMax - yMin || 1;\n\n const plotW = VBOX_W - PAD_L - PAD_R;\n const plotH = height - PAD_T - PAD_B;\n const xScale = (x: number) => PAD_L + ((x - xMin) / xRange) * plotW;\n const yScale = (y: number) => PAD_T + plotH - ((y - yMin) / yRange) * plotH;\n\n const yTicks = niceTicks(yMin, yMax, TICKS_Y);\n\n // Nearest-x lookup across a reference axis (the union of all distinct x\n // values, since series may not share every point).\n const xAxis = Array.from(new Set(allX)).sort((a, b) => a - b);\n\n function nearestX(clientX: number): number | null {\n const svg = svgRef.current;\n if (!svg) return null;\n const rect = svg.getBoundingClientRect();\n const svgX = ((clientX - rect.left) / rect.width) * VBOX_W;\n const dataX = xMin + ((svgX - PAD_L) / plotW) * xRange;\n let nearest = xAxis[0];\n let best = Infinity;\n for (const x of xAxis) {\n const d = Math.abs(x - dataX);\n if (d < best) {\n best = d;\n nearest = x;\n }\n }\n return nearest;\n }\n\n function handleMove(e: React.PointerEvent<SVGSVGElement>) {\n const x = nearestX(e.clientX);\n if (x === null) return;\n setHoverX(x);\n const svg = svgRef.current;\n if (svg) {\n const rect = svg.getBoundingClientRect();\n const px = (xScale(x) / VBOX_W) * rect.width;\n setTooltipPos({ left: px, top: 0 });\n }\n }\n\n const showLegend = series.length >= 2;\n const showEndLabels = series.length >= 1 && series.length <= 4;\n\n const hoverPoints =\n hoverX !== null\n ? series.map((s) => ({\n series: s,\n point: s.points.find((p) => p.x === hoverX) ?? null,\n }))\n : null;\n\n return (\n <div className={styles.wrap}>\n <svg\n ref={svgRef}\n className={styles.svg}\n viewBox={`0 0 ${VBOX_W} ${height}`}\n role=\"img\"\n aria-label={ariaLabel}\n onPointerMove={handleMove}\n onPointerLeave={() => setHoverX(null)}\n >\n {yTicks.map((t, i) => (\n <g key={i}>\n <line\n x1={PAD_L}\n x2={VBOX_W - PAD_R}\n y1={yScale(t)}\n y2={yScale(t)}\n className={styles.gridline}\n stroke={CHART_GRID}\n />\n <text x={PAD_L - 6} y={yScale(t)} dy=\"0.32em\" textAnchor=\"end\" className={styles.axisLabel}>\n {formatY(t)}\n </text>\n </g>\n ))}\n <line\n x1={PAD_L}\n x2={VBOX_W - PAD_R}\n y1={height - PAD_B}\n y2={height - PAD_B}\n className={styles.axis}\n stroke={CHART_AXIS}\n />\n {xAxis.length > 1\n ? [xAxis[0], xAxis[xAxis.length - 1]].map((x, i) => (\n <text\n key={i}\n x={xScale(x)}\n y={height - 6}\n textAnchor={i === 0 ? 'start' : 'end'}\n className={styles.axisLabel}\n >\n {formatX(x)}\n </text>\n ))\n : null}\n\n {series.map((s, si) => {\n const color = seriesColor(si);\n const runs = splitRuns(s.points);\n return (\n <g key={s.id}>\n {area && series.length === 1\n ? runs.map((run, ri) => {\n const d =\n run.map((p, j) => `${j === 0 ? 'M' : 'L'}${xScale(p.x)},${yScale(p.y)}`).join(' ') +\n ` L${xScale(run[run.length - 1].x)},${yScale(yMin)} L${xScale(run[0].x)},${yScale(yMin)} Z`;\n return <path key={ri} d={d} fill={color} className={styles.area} />;\n })\n : null}\n {runs.map((run, ri) => (\n <path\n key={ri}\n d={run.map((p, j) => `${j === 0 ? 'M' : 'L'}${xScale(p.x)},${yScale(p.y)}`).join(' ')}\n stroke={color}\n className={styles.line}\n />\n ))}\n {showEndLabels && runs.length ? (\n (() => {\n const lastRun = runs[runs.length - 1];\n const last = lastRun[lastRun.length - 1];\n return (\n <text\n x={xScale(last.x) + 4}\n y={yScale(last.y)}\n dy=\"0.32em\"\n className={styles.endLabel}\n fill={color}\n >\n {s.label}\n </text>\n );\n })()\n ) : null}\n </g>\n );\n })}\n\n {hoverX !== null ? (\n <line\n x1={xScale(hoverX)}\n x2={xScale(hoverX)}\n y1={PAD_T}\n y2={height - PAD_B}\n className={styles.crosshairLine}\n />\n ) : null}\n {hoverX !== null\n ? series.map((s, si) => {\n const p = s.points.find((pt) => pt.x === hoverX);\n if (!p || p.y === null) return null;\n return (\n <circle\n key={s.id}\n cx={xScale(p.x)}\n cy={yScale(p.y)}\n r={4}\n fill={seriesColor(si)}\n className={styles.marker}\n />\n );\n })\n : null}\n\n <rect\n x={PAD_L}\n y={PAD_T}\n width={plotW}\n height={plotH}\n className={styles.overlay}\n onFocus={() => setHoverX(xAxis[xAxis.length - 1] ?? null)}\n />\n </svg>\n {hoverPoints && tooltipPos ? (\n <div className={styles.tooltip} style={{ left: tooltipPos.left, top: tooltipPos.top }}>\n <div className={styles.tooltipDate}>{formatX(hoverX as number)}</div>\n {hoverPoints.map(({ series: s, point }, i) => (\n <div className={styles.tooltipRow} key={s.id}>\n <span className={styles.tooltipKey} style={{ background: seriesColor(i) }} aria-hidden=\"true\" />\n {point && point.y !== null ? (\n <>\n <span className={styles.tooltipValue}>{formatY(point.y)}</span>\n {showLegend ? <span>{s.label}</span> : null}\n </>\n ) : (\n <span className={styles.tooltipGap}>no data{showLegend ? ` — ${s.label}` : ''}</span>\n )}\n </div>\n ))}\n </div>\n ) : null}\n {showLegend ? (\n <Legend items={series.map((s, i) => ({ label: s.label, color: seriesColor(i), kind: 'line' }))} />\n ) : null}\n </div>\n );\n}\n","/**\n * components/charts/BarChart.tsx — categorical magnitude comparison.\n * Single hue by default (nominal categories never get a value-ramp — see\n * dataviz anti-patterns \"a value-ramp on nominal categories\"). Vertical for\n * a handful of short-named categories, horizontal for many or long-named\n * ones (dataviz choosing-a-form.md). Null values render as an explicit\n * \"no data\" dash, never a silent zero-height bar indistinguishable from a\n * real zero.\n */\nimport { useId, useState } from 'react';\nimport type { CategoricalDatum } from './types.js';\nimport { CHART_SEQUENTIAL, CHART_AXIS, CHART_GRID } from './colors.js';\nimport './chart-tokens.css';\nimport styles from './BarChart.module.css';\n\nconst BAR_MAX = 24;\nconst GAP = 10;\n\nexport function BarChart({\n data,\n height = 160,\n orientation = 'vertical',\n color = CHART_SEQUENTIAL,\n formatValue = (v: number) => String(v),\n ariaLabel,\n}: {\n data: CategoricalDatum[];\n height?: number;\n orientation?: 'vertical' | 'horizontal';\n color?: string;\n formatValue?: (v: number) => string;\n ariaLabel: string;\n}) {\n const uid = useId();\n const [hover, setHover] = useState<number | null>(null);\n\n const known = data.map((d) => d.value).filter((v): v is number => v !== null);\n const maxVal = Math.max(0, ...known, 0.0001);\n const minVal = Math.min(0, ...known);\n const range = maxVal - minVal || 1;\n\n if (orientation === 'horizontal') {\n const LABEL_W = 120;\n const PAD_R = 48;\n const rowH = Math.min(BAR_MAX, Math.max(14, Math.floor((height - GAP) / data.length) - GAP));\n const plotW = 420;\n const svgH = data.length * (rowH + GAP) + GAP;\n const svgW = LABEL_W + plotW + PAD_R;\n\n return (\n <div className={styles.wrap}>\n <svg\n className={styles.svg}\n width={svgW}\n height={svgH}\n viewBox={`0 0 ${svgW} ${svgH}`}\n role=\"img\"\n aria-label={ariaLabel}\n >\n <line x1={LABEL_W} y1={0} x2={LABEL_W} y2={svgH} className={styles.baseline} stroke={CHART_AXIS} />\n {data.map((d, i) => {\n const y = GAP + i * (rowH + GAP);\n const barW = d.value !== null ? ((d.value - minVal) / range) * plotW : 0;\n return (\n <g key={d.label + i}>\n <text\n x={LABEL_W - 8}\n y={y + rowH / 2}\n dy=\"0.32em\"\n textAnchor=\"end\"\n className={styles.categoryLabel}\n >\n {d.label.length > 22 ? `${d.label.slice(0, 21)}…` : d.label}\n </text>\n {d.value === null ? (\n <line\n x1={LABEL_W + 4}\n y1={y + rowH / 2}\n x2={LABEL_W + 14}\n y2={y + rowH / 2}\n stroke={CHART_GRID}\n strokeWidth={2}\n strokeDasharray=\"2 2\"\n />\n ) : (\n <>\n <rect\n x={LABEL_W}\n y={y}\n width={Math.max(2, barW)}\n height={rowH}\n rx={4}\n fill={color}\n className={styles.bar}\n />\n <text\n x={LABEL_W + Math.max(2, barW) + 6}\n y={y + rowH / 2}\n dy=\"0.32em\"\n className={styles.valueLabel}\n >\n {formatValue(d.value)}\n </text>\n </>\n )}\n <rect\n className={styles.hitArea}\n x={0}\n y={y - GAP / 2}\n width={svgW}\n height={rowH + GAP}\n tabIndex={0}\n role=\"img\"\n aria-label={`${d.label}: ${d.value === null ? 'no data' : formatValue(d.value)}`}\n onPointerEnter={() => setHover(i)}\n onPointerLeave={() => setHover((h) => (h === i ? null : h))}\n onFocus={() => setHover(i)}\n onBlur={() => setHover((h) => (h === i ? null : h))}\n />\n </g>\n );\n })}\n </svg>\n {hover !== null ? (\n <div\n className={styles.tooltip}\n style={{ left: LABEL_W + 8, top: GAP + hover * (rowH + GAP) - 4 }}\n >\n <span className={styles.tooltipValue}>\n {data[hover].value === null ? 'no data' : formatValue(data[hover].value as number)}\n </span>\n <span className={styles.tooltipLabel}>{data[hover].label}</span>\n </div>\n ) : null}\n </div>\n );\n }\n\n // Vertical orientation.\n const barSlot = data.length ? Math.max(BAR_MAX, 0) : BAR_MAX;\n const barW = Math.min(BAR_MAX, barSlot);\n const PAD_T = 20;\n const PAD_B = 30;\n const plotH = height;\n const svgH = plotH + PAD_T + PAD_B;\n const svgW = data.length * (barW + GAP) + GAP;\n const zeroY = PAD_T + plotH - ((0 - minVal) / range) * plotH;\n\n return (\n <div className={styles.wrap}>\n <svg\n className={styles.svg}\n width={svgW}\n height={svgH}\n viewBox={`0 0 ${svgW} ${svgH}`}\n role=\"img\"\n aria-label={ariaLabel}\n >\n <line x1={0} y1={zeroY} x2={svgW} y2={zeroY} className={styles.baseline} stroke={CHART_AXIS} />\n {data.map((d, i) => {\n const x = GAP + i * (barW + GAP);\n const barH = d.value !== null ? (Math.abs(d.value - minVal) / range) * plotH : 0;\n const top = d.value !== null && d.value >= 0 ? zeroY - barH : zeroY;\n return (\n <g key={d.label + i}>\n {d.value === null ? (\n <line\n x1={x + barW / 2 - 5}\n y1={zeroY}\n x2={x + barW / 2 + 5}\n y2={zeroY}\n stroke={CHART_GRID}\n strokeWidth={2}\n strokeDasharray=\"2 2\"\n />\n ) : (\n <>\n <rect\n x={x}\n y={top}\n width={barW}\n height={Math.max(2, barH)}\n rx={4}\n fill={color}\n className={styles.bar}\n />\n <text x={x + barW / 2} y={top - 4} textAnchor=\"middle\" className={styles.valueLabel}>\n {formatValue(d.value)}\n </text>\n </>\n )}\n <text\n x={x + barW / 2}\n y={svgH - 8}\n textAnchor=\"middle\"\n className={styles.axisLabel}\n >\n {d.label.length > 10 ? `${d.label.slice(0, 9)}…` : d.label}\n </text>\n <rect\n className={styles.hitArea}\n x={x - GAP / 2}\n y={0}\n width={barW + GAP}\n height={svgH}\n tabIndex={0}\n role=\"img\"\n aria-label={`${d.label}: ${d.value === null ? 'no data' : formatValue(d.value)}`}\n onPointerEnter={() => setHover(i)}\n onPointerLeave={() => setHover((h) => (h === i ? null : h))}\n onFocus={() => setHover(i)}\n onBlur={() => setHover((h) => (h === i ? null : h))}\n />\n </g>\n );\n })}\n </svg>\n {hover !== null ? (\n <div\n className={styles.tooltip}\n style={{ left: GAP + hover * (barW + GAP), top: 0 }}\n id={`${uid}-tooltip`}\n >\n <span className={styles.tooltipValue}>\n {data[hover].value === null ? 'no data' : formatValue(data[hover].value as number)}\n </span>\n <span className={styles.tooltipLabel}>{data[hover].label}</span>\n </div>\n ) : null}\n </div>\n );\n}\n","/**\n * components/charts/Sparkline.tsx — the 12-ish-point inline trend for a\n * stat tile (marks-and-anatomy.md \"Figures\" stat-tile contract). No axes,\n * no legend, no tooltip — it is a glance, not a chart; the real numbers\n * live in the stat tile's value and in the full chart elsewhere on the\n * view. Gaps (`null`) break the line rather than reading as a dip to zero.\n */\nimport './chart-tokens.css';\nimport styles from './Sparkline.module.css';\n\nexport function Sparkline({\n points,\n width = 72,\n height = 24,\n ariaLabel,\n}: {\n points: (number | null)[];\n width?: number;\n height?: number;\n ariaLabel: string;\n}) {\n const known = points.filter((p): p is number => p !== null);\n if (known.length < 2) {\n return (\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} role=\"img\" aria-label={ariaLabel} />\n );\n }\n const min = Math.min(...known, 0);\n const max = Math.max(...known, 0);\n const range = max - min || 1;\n const stepX = width / Math.max(1, points.length - 1);\n const yOf = (v: number) => height - ((v - min) / range) * (height - 2) - 1;\n\n // Split into contiguous runs so a null renders as a real gap, not a dip.\n const runs: { x: number; y: number }[][] = [];\n let current: { x: number; y: number }[] = [];\n points.forEach((v, i) => {\n if (v === null) {\n if (current.length) runs.push(current);\n current = [];\n return;\n }\n current.push({ x: i * stepX, y: yOf(v) });\n });\n if (current.length) runs.push(current);\n\n const lastKnownIndex = points.map((v) => v !== null).lastIndexOf(true);\n const lastPoint =\n lastKnownIndex >= 0 ? { x: lastKnownIndex * stepX, y: yOf(points[lastKnownIndex] as number) } : null;\n\n return (\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} role=\"img\" aria-label={ariaLabel}>\n {runs.map((run, i) => (\n <path\n key={i}\n className={styles.line}\n d={run.map((p, j) => `${j === 0 ? 'M' : 'L'}${p.x.toFixed(1)},${p.y.toFixed(1)}`).join(' ')}\n />\n ))}\n {lastPoint ? <circle className={styles.dot} cx={lastPoint.x} cy={lastPoint.y} r={2} /> : null}\n </svg>\n );\n}\n","/**\n * components/charts/format.ts — number formatting shared by every chart and\n * stat tile. Proportional figures everywhere EXCEPT columns that must align\n * vertically (table cells, axis ticks) — see marks-and-anatomy.md \"Proportional\n * figures for big numbers; tabular only in columns.\" Callers apply\n * `font-variant-numeric: tabular-nums` via CSS where that applies; these\n * functions only produce the string.\n */\n\n/** Auto-compact a count: 1,284 / 12.9K / 4.2M. */\nexport function formatCompact(n: number): string {\n if (!Number.isFinite(n)) return '—';\n const abs = Math.abs(n);\n if (abs >= 1_000_000) return `${(n / 1_000_000).toFixed(abs >= 10_000_000 ? 0 : 1)}M`;\n if (abs >= 10_000) return `${Math.round(n / 1000)}K`;\n if (abs >= 1_000) return n.toLocaleString('en-US');\n return Number.isInteger(n) ? String(n) : n.toFixed(1);\n}\n\n/** Auto-compact USD: $4.20 / $1.2K / $4.2M. */\nexport function formatUsd(n: number): string {\n if (!Number.isFinite(n)) return '—';\n const abs = Math.abs(n);\n const sign = n < 0 ? '-' : '';\n if (abs >= 1_000_000) return `${sign}$${(abs / 1_000_000).toFixed(1)}M`;\n if (abs >= 1_000) return `${sign}$${(abs / 1_000).toFixed(1)}K`;\n return `${sign}$${abs.toFixed(2)}`;\n}\n\n/** Fraction (0..1) as a percentage. */\nexport function formatPercent(fraction: number, digits = 0): string {\n if (!Number.isFinite(fraction)) return '—';\n return `${(fraction * 100).toFixed(digits)}%`;\n}\n\n/** Signed delta for a stat tile: \"+12\" / \"-3\" / \"0\". */\nexport function formatSignedCompact(n: number): string {\n if (!Number.isFinite(n)) return '—';\n const s = formatCompact(Math.abs(n));\n if (n > 0) return `+${s}`;\n if (n < 0) return `-${s}`;\n return s;\n}\n\n/** YYYY-MM-DD -> short label, e.g. \"Aug 14\". Local-independent (UTC parse). */\nexport function formatDayLabel(day: string): string {\n const d = new Date(`${day}T00:00:00Z`);\n if (Number.isNaN(d.getTime())) return day;\n return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' });\n}\n\n/** Epoch ms -> short label for axis ticks. */\nexport function formatTimeLabel(ms: number): string {\n const d = new Date(ms);\n if (Number.isNaN(d.getTime())) return '';\n return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });\n}\n","/**\n * components/charts/StatTile.tsx — value + delta + optional sparkline, the\n * figure contract from marks-and-anatomy.md. Use for a single current value\n * (a one-bar bar chart is never the answer — this is). `value` takes a\n * ReactNode (not just a string) so callers can wrap a sourceQuality-bearing\n * field in <Epistemic/> and pass that straight through.\n */\nimport type { ReactNode } from 'react';\nimport { formatSignedCompact } from './format.js';\nimport { Sparkline } from './Sparkline.js';\nimport styles from './StatTile.module.css';\n\nexport interface StatTileDelta {\n /** Signed raw value, e.g. +12 or -3. */\n value: number;\n /** Whether a positive delta reads as good (green) or bad (red). Omit for\n * a neutral, non-judgmental delta (e.g. \"goals in flight\" — more isn't\n * inherently good or bad). */\n goodWhenPositive?: boolean;\n /** vs which period, e.g. \"vs yesterday\". */\n versus?: string;\n}\n\nexport function StatTile({\n label,\n value,\n caption,\n delta,\n trend,\n trendLabel,\n}: {\n label: string;\n value: ReactNode;\n caption?: ReactNode;\n delta?: StatTileDelta | null;\n trend?: (number | null)[];\n trendLabel?: string;\n}) {\n const deltaTone =\n delta == null || delta.goodWhenPositive === undefined\n ? styles.deltaNeutral\n : delta.value === 0\n ? styles.deltaNeutral\n : (delta.value > 0) === delta.goodWhenPositive\n ? styles.deltaGood\n : styles.deltaBad;\n\n return (\n <div className={styles.tile}>\n <span className={styles.label}>{label}</span>\n <div className={styles.row}>\n <span className={styles.value}>{value}</span>\n </div>\n <div className={styles.trendRow}>\n {caption ? <span className={styles.caption}>{caption}</span> : <span />}\n {trend ? <Sparkline points={trend} ariaLabel={trendLabel ?? `${label} trend`} /> : null}\n </div>\n {delta ? (\n <span className={`${styles.delta} ${deltaTone}`}>\n {formatSignedCompact(delta.value)}\n {delta.versus ? ` ${delta.versus}` : ''}\n </span>\n ) : null}\n </div>\n );\n}\n","/**\n * components/charts/TableView.tsx — the WCAG-clean accessibility twin every\n * chart should ship (dataviz skill: \"no table view / color-only encoding on\n * a continuous scale\" is an anti-pattern). Every value a chart's tooltip or\n * direct label shows must also be reachable here without hovering anything.\n */\nimport type { ReactNode } from 'react';\nimport styles from './TableView.module.css';\n\nexport interface TableColumn<T> {\n key: string;\n label: string;\n numeric?: boolean;\n render: (row: T) => ReactNode;\n}\n\nexport function TableView<T>({\n caption,\n columns,\n rows,\n rowKey,\n}: {\n caption: string;\n columns: TableColumn<T>[];\n rows: T[];\n rowKey: (row: T, index: number) => string;\n}) {\n return (\n <table className={styles.table}>\n <caption className=\"visually-hidden\">{caption}</caption>\n <thead>\n <tr>\n {columns.map((c) => (\n <th key={c.key} scope=\"col\" className={c.numeric ? styles.numeric : undefined}>\n {c.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, i) => (\n <tr key={rowKey(row, i)}>\n {columns.map((c) => (\n <td key={c.key} className={c.numeric ? styles.numeric : undefined}>\n {c.render(row)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n","/**\n * routes/intelligence/pulse/PulseView.tsx — cost/token rollups over\n * 1d/7d/30d windows (GET /api/pulse?window=). Reference pattern followed:\n * routes/fleet-dashboard/FleetDashboardView.tsx (useQuery, status branching,\n * never blank on refresh) + DESIGN.md \"Adding a new view\" checklist.\n */\nimport { useState } from 'react';\nimport { pulseQuery, type PulseWindow } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { StatusBadge, type Tone } from '../../../components/primitives/StatusBadge.js';\nimport { SkeletonCardGrid } from '../../../components/primitives/Skeleton.js';\nimport {\n ChartContainer,\n LineChart,\n BarChart,\n StatTile,\n TableView,\n chartFormat,\n type Series,\n type CategoricalDatum,\n type TableColumn,\n} from '../../../components/charts/index.js';\nimport type { ActivityRollup, ProjectActivity, ModelUsage } from '../../../data/api-types.js';\nimport styles from './PulseView.module.css';\n\nconst WINDOWS: PulseWindow[] = ['1d', '7d', '30d'];\n\nconst BUDGET_TONE: Record<string, Tone> = { ok: 'success', warn: 'warning', over: 'danger' };\n\nfunction projectLabel(path: string): string {\n const parts = path.replace(/\\/+$/, '').split('/');\n return parts[parts.length - 1] || path;\n}\n\nexport function PulseView() {\n const [window, setWindow] = useState<PulseWindow>('7d');\n const query = useQuery(pulseQuery(window));\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Pulse</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n {query.updatedAt ? (\n <span className={styles.freshnessLabel}>Updated {formatRelative(query.updatedAt)}</span>\n ) : null}\n </div>\n </header>\n\n <div className={styles.filterRow} role=\"group\" aria-label=\"Time window\">\n <div className={styles.windowGroup}>\n {WINDOWS.map((w) => (\n <button\n key={w}\n type=\"button\"\n className={`${styles.windowButton} ${w === window ? styles.windowButtonActive : ''}`}\n aria-pressed={w === window}\n onClick={() => setWindow(w)}\n >\n {w}\n </button>\n ))}\n </div>\n {query.data ? <StatusBadge status={query.data.budget.level} tone={BUDGET_TONE[query.data.budget.level]}>\n {query.data.budget.message}\n </StatusBadge> : null}\n </div>\n\n {query.status === 'loading' ? (\n <SkeletonCardGrid count={4} />\n ) : query.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Failed to load pulse data.'}\n </div>\n ) : query.data ? (\n <PulseBody rollup={query.data} />\n ) : null}\n </div>\n );\n}\n\nfunction PulseBody({ rollup }: { rollup: ActivityRollup }) {\n const costSeries: Series[] = [\n {\n id: 'cost',\n label: 'Est. cost (USD)',\n points: rollup.byDay.map((d) => ({ x: Date.parse(`${d.day}T00:00:00Z`), y: d.estCostUsd })),\n },\n ];\n\n const topProjects = [...rollup.byProject]\n .sort((a, b) => b.estCostUsd - a.estCostUsd)\n .slice(0, 8);\n const projectBars: CategoricalDatum[] = topProjects.map((p) => ({\n label: projectLabel(p.project),\n value: p.estCostUsd,\n }));\n\n const topModels = [...rollup.byModel].sort((a, b) => b.estCostUsd - a.estCostUsd).slice(0, 8);\n const modelBars: CategoricalDatum[] = topModels.map((m) => ({ label: m.model, value: m.estCostUsd }));\n\n const projectColumns: TableColumn<ProjectActivity>[] = [\n { key: 'project', label: 'Project', render: (r) => projectLabel(r.project) },\n { key: 'sessions', label: 'Sessions', numeric: true, render: (r) => String(r.sessions) },\n { key: 'commits', label: 'Commits', numeric: true, render: (r) => String(r.commits) },\n { key: 'cost', label: 'Cost', numeric: true, render: (r) => chartFormat.formatUsd(r.estCostUsd) },\n ];\n\n const modelColumns: TableColumn<ModelUsage>[] = [\n { key: 'model', label: 'Model', render: (r) => r.model },\n { key: 'calls', label: 'Calls', numeric: true, render: (r) => String(r.calls) },\n {\n key: 'tokens',\n label: 'Tokens',\n numeric: true,\n render: (r) => chartFormat.formatCompact(r.tokensIn + r.tokensOut),\n },\n { key: 'cost', label: 'Cost', numeric: true, render: (r) => chartFormat.formatUsd(r.estCostUsd) },\n ];\n\n return (\n <>\n <div className={styles.kpiGrid}>\n <StatTile label=\"Est. cost\" value={chartFormat.formatUsd(rollup.totals.estCostUsd)} caption={rollup.window} />\n <StatTile\n label=\"Tokens\"\n value={chartFormat.formatCompact(rollup.totals.tokensIn + rollup.totals.tokensOut)}\n caption={`${chartFormat.formatCompact(rollup.totals.tokensIn)} in / ${chartFormat.formatCompact(rollup.totals.tokensOut)} out`}\n />\n <StatTile label=\"Sessions\" value={String(rollup.totals.sessions)} />\n <StatTile label=\"Commits\" value={String(rollup.totals.commits)} />\n </div>\n\n <div className={styles.chartsGrid}>\n <ChartContainer\n title=\"Cost over time\"\n description={`since ${new Date(rollup.since).toLocaleDateString()}`}\n empty={rollup.byDay.length === 0}\n emptyMessage=\"No activity recorded in this window.\"\n table={\n <TableView\n caption=\"Daily cost\"\n rowKey={(r) => r.day}\n rows={rollup.byDay}\n columns={[\n { key: 'day', label: 'Day', render: (r) => r.day },\n { key: 'cost', label: 'Cost', numeric: true, render: (r) => chartFormat.formatUsd(r.estCostUsd) },\n { key: 'sessions', label: 'Sessions', numeric: true, render: (r) => String(r.sessions) },\n ]}\n />\n }\n >\n <LineChart\n series={costSeries}\n area\n ariaLabel=\"Estimated cost over time\"\n formatX={(x) => new Date(x).toLocaleDateString(undefined, { month: 'short', day: 'numeric' })}\n formatY={(y) => chartFormat.formatUsd(y)}\n />\n </ChartContainer>\n\n <ChartContainer\n title=\"Top projects by cost\"\n empty={projectBars.length === 0}\n emptyMessage=\"No project activity in this window.\"\n table={\n <TableView caption=\"Cost by project\" rowKey={(r) => r.project} rows={topProjects} columns={projectColumns} />\n }\n >\n <BarChart\n data={projectBars}\n orientation=\"horizontal\"\n ariaLabel=\"Top projects by estimated cost\"\n formatValue={(v) => chartFormat.formatUsd(v)}\n />\n </ChartContainer>\n\n <ChartContainer\n title=\"Cost by model\"\n empty={modelBars.length === 0}\n emptyMessage=\"No model activity in this window.\"\n table={\n <TableView caption=\"Cost by model\" rowKey={(r) => r.model} rows={topModels} columns={modelColumns} />\n }\n >\n <BarChart\n data={modelBars}\n ariaLabel=\"Cost by model\"\n formatValue={(v) => chartFormat.formatUsd(v)}\n />\n </ChartContainer>\n </div>\n </>\n );\n}\n\nfunction formatRelative(ts: number): string {\n const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));\n if (seconds < 5) return 'just now';\n if (seconds < 60) return `${seconds}s ago`;\n const minutes = Math.round(seconds / 60);\n return `${minutes}m ago`;\n}\n","/**\n * routes/intelligence/genome/GenomeView.tsx — cross-repo knowledge search\n * (GET /api/genome[?q=]). ~2,014 entries across ~564 projects on the\n * operator's machine (per the brief), so: debounce the query, cap how many\n * rows render in browse mode (no query — the full unfiltered list), and\n * never eagerly render thousands of DOM rows.\n */\nimport { useEffect, useMemo, useState } from 'react';\nimport { genomeQuery, isRecallHit } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonRow } from '../../../components/primitives/Skeleton.js';\nimport { ChartContainer, BarChart, chartFormat, type CategoricalDatum } from '../../../components/charts/index.js';\nimport type { GenomeEntry, RecallHit } from '../../../data/api-types.js';\nimport styles from './GenomeView.module.css';\n\nconst BROWSE_LIMIT = 50;\nconst DEBOUNCE_MS = 300;\n\nfunction useDebounced<T>(value: T, ms: number): T {\n const [debounced, setDebounced] = useState(value);\n useEffect(() => {\n const t = setTimeout(() => setDebounced(value), ms);\n return () => clearTimeout(t);\n }, [value, ms]);\n return debounced;\n}\n\nfunction snippetOf(text: string, max = 220): string {\n const t = text.trim();\n return t.length > max ? `${t.slice(0, max - 1)}…` : t;\n}\n\nfunction relativeTs(iso: string): string {\n const ms = Date.parse(iso);\n if (Number.isNaN(ms)) return iso;\n const days = Math.floor((Date.now() - ms) / 86_400_000);\n if (days <= 0) return 'today';\n if (days === 1) return 'yesterday';\n if (days < 30) return `${days}d ago`;\n const months = Math.floor(days / 30);\n return `${months}mo ago`;\n}\n\nexport function GenomeView() {\n const [query, setQuery] = useState('');\n const debouncedQuery = useDebounced(query, DEBOUNCE_MS);\n const resourceQuery = useQuery(genomeQuery(debouncedQuery));\n const isSearching = debouncedQuery.trim().length > 0;\n\n const data = resourceQuery.data;\n\n const { rows, totalCount } = useMemo(() => {\n if (!data) return { rows: [] as (GenomeEntry | RecallHit)[], totalCount: 0 };\n if (isSearching) return { rows: data, totalCount: data.length };\n const entries = data as GenomeEntry[];\n const sorted = [...entries].sort((a, b) => Date.parse(b.ts) - Date.parse(a.ts));\n return { rows: sorted.slice(0, BROWSE_LIMIT), totalCount: entries.length };\n }, [data, isSearching]);\n\n const projectBars: CategoricalDatum[] = useMemo(() => {\n if (!data || isSearching) return [];\n const entries = data as GenomeEntry[];\n const counts = new Map<string, number>();\n for (const e of entries) {\n const key = e.project ?? '(unscoped)';\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n return [...counts.entries()]\n .sort((a, b) => b[1] - a[1])\n .slice(0, 8)\n .map(([label, value]) => ({ label, value }));\n }, [data, isSearching]);\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Genome</h1>\n <div aria-live=\"polite\">{resourceQuery.status === 'refreshing' ? <RefreshIndicator /> : null}</div>\n </header>\n\n <div className={styles.searchRow}>\n <input\n type=\"search\"\n className={styles.searchInput}\n placeholder=\"Search the genome (title, tags, body text)…\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n aria-label=\"Search cross-repo knowledge\"\n />\n {data ? (\n <span className={styles.resultCount}>\n {isSearching\n ? `${totalCount} match${totalCount === 1 ? '' : 'es'}`\n : `showing ${rows.length} of ${totalCount}`}\n </span>\n ) : null}\n </div>\n\n {!isSearching && projectBars.length > 0 ? (\n <ChartContainer title=\"Top projects by genome entries\" description=\"browse mode — all loaded entries\">\n <BarChart\n data={projectBars}\n orientation=\"horizontal\"\n ariaLabel=\"Top projects by genome entry count\"\n formatValue={(v) => chartFormat.formatCompact(v)}\n />\n </ChartContainer>\n ) : null}\n\n {resourceQuery.status === 'loading' ? (\n <div className={styles.skeletons} aria-hidden=\"true\">\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : resourceQuery.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {resourceQuery.error?.message ?? 'Failed to load genome data.'}\n </div>\n ) : rows.length === 0 ? (\n <p className={styles.empty}>\n {isSearching ? `No genome entries match \"${debouncedQuery}\".` : 'No genome entries recorded yet.'}\n </p>\n ) : (\n <ul className={styles.results}>\n {rows.map((item) => {\n const hit = isRecallHit(item) ? item : null;\n const entry = hit ? hit.entry : (item as GenomeEntry);\n return (\n <li key={entry.id} className={styles.row}>\n <div className={styles.rowHeader}>\n <span className={styles.rowTitle}>{entry.title}</span>\n <span className={styles.rowMeta}>\n {hit ? <span className={styles.badge}>{hit.method} · {hit.score.toFixed(2)}</span> : null}\n <span>{relativeTs(entry.ts)}</span>\n </span>\n </div>\n <div className={styles.rowMeta}>\n <span className={styles.badge}>{entry.project ?? 'unscoped'}</span>\n <span className={styles.badge}>{entry.source}</span>\n </div>\n <p className={styles.snippet}>{snippetOf(entry.text)}</p>\n {entry.tags.length > 0 ? (\n <div className={styles.tags}>\n {entry.tags.map((t) => (\n <span key={t} className={styles.tag}>\n {t}\n </span>\n ))}\n </div>\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n","/**\n * routes/intelligence/production/ProductionView.tsx — ships-per-day, judge\n * verdict breakdown, auto-merges (DashboardSnapshot.production via\n * GET /api/snapshot) + per-model ship rate / cost-per-merge / best-of-N wins\n * (GET /api/models?window=).\n *\n * Known, disclosed data gap (see the judge-verdict chart's caveat prop):\n * ProductionSummary.judgeVerdicts24h is built from JudgeTrace, whose\n * `verdict` field is strictly 'ship'|'review'|'noise'|'harmful' — a\n * judge-parse-failure/judge-network-failure (manager.ts's judgeProposal()\n * fallback, ~line 611-626) sets `verdict: 'review'` because that's the\n * fail-closed choice for the AUTO-REJECT gate, and nothing downstream of\n * that field currently re-splits it. The recent fix (commit 5db524aa) tags\n * the distinction correctly in the decisions ledger's `judgeReasonCode`\n * ('judge-parse-failure' / 'judge-network-failure', see\n * judge-decision-metadata.ts) for LEARNING purposes, but that tag isn't\n * propagated into JudgeTrace or ProductionSummary, the only judge-verdict\n * aggregate exposed via any GET route today. Per this build's scope\n * (src/core/dashboard.ts and src/core/web/api.ts are off-limits), this view\n * cannot re-derive the split client-side — so it discloses the gap instead\n * of pretending the 'review' bucket is clean. Flagged separately for a\n * backend follow-up (add parse/network counts to ProductionSummary).\n */\nimport { useState } from 'react';\nimport { dashboardSnapshotQuery, modelsQuery, type ModelStatsWindow } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { Epistemic } from '../../../components/primitives/Epistemic.js';\nimport { SkeletonCardGrid } from '../../../components/primitives/Skeleton.js';\nimport {\n ChartContainer,\n BarChart,\n StatTile,\n TableView,\n chartFormat,\n type CategoricalDatum,\n type TableColumn,\n} from '../../../components/charts/index.js';\nimport type { ModelStats, ProductionSummary } from '../../../data/api-types.js';\nimport styles from './ProductionView.module.css';\n\nconst WINDOWS: ModelStatsWindow[] = ['7d', '30d', 'all'];\n\nfunction engineModelLabel(m: ModelStats): string {\n return `${m.engine}:${m.model}`;\n}\n\nexport function ProductionView() {\n const [window, setWindow] = useState<ModelStatsWindow>('30d');\n const snapshotQuery = useQuery(dashboardSnapshotQuery);\n const modelsResult = useQuery(modelsQuery(window));\n\n const production = snapshotQuery.data?.production;\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Production</h1>\n <div aria-live=\"polite\">\n {snapshotQuery.status === 'refreshing' || modelsResult.status === 'refreshing' ? (\n <RefreshIndicator />\n ) : null}\n </div>\n </header>\n\n {snapshotQuery.status === 'loading' ? (\n <SkeletonCardGrid count={4} />\n ) : snapshotQuery.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {snapshotQuery.error?.message ?? 'Failed to load production summary.'}\n </div>\n ) : !production ? (\n <p className={styles.notAvailable}>\n Production summary not available on this server (older producer, or not yet populated).\n </p>\n ) : (\n <ProductionSection production={production} />\n )}\n\n <div className={styles.filterRow} role=\"group\" aria-label=\"Model stats window\">\n <div className={styles.windowGroup}>\n {WINDOWS.map((w) => (\n <button\n key={w}\n type=\"button\"\n className={`${styles.windowButton} ${w === window ? styles.windowButtonActive : ''}`}\n aria-pressed={w === window}\n onClick={() => setWindow(w)}\n >\n {w}\n </button>\n ))}\n </div>\n </div>\n\n {modelsResult.status === 'loading' ? (\n <SkeletonCardGrid count={3} />\n ) : modelsResult.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {modelsResult.error?.message ?? 'Failed to load per-model stats.'}\n </div>\n ) : modelsResult.data ? (\n <ModelStatsSection result={modelsResult.data} />\n ) : null}\n </div>\n );\n}\n\nfunction ProductionSection({ production }: { production: ProductionSummary }) {\n const jv = production.judgeVerdicts24h;\n const verdictBars: CategoricalDatum[] = [\n { label: 'ship', value: jv.ship },\n { label: 'review', value: jv.review },\n { label: 'noise', value: jv.noise },\n { label: 'harmful', value: jv.harmful },\n ];\n const shipTrend: CategoricalDatum[] = production.shipsPerDayTrend.map((d) => ({\n label: chartFormat.formatDayLabel(d.date),\n value: d.count,\n }));\n const totalShipped = production.shipsPerDayTrend.reduce((sum, d) => sum + d.count, 0);\n\n return (\n <>\n <div className={styles.kpiGrid}>\n <StatTile\n label=\"Proposals (24h)\"\n value={String(production.proposals24h.total)}\n caption={`${production.proposals24h.pending} pending`}\n />\n <StatTile label=\"Auto-merges today\" value={String(production.autoMergesToday.count)} />\n <StatTile label=\"Judged (24h)\" value={String(jv.total)} />\n <StatTile label=\"Active goals\" value={String(production.activeGoals.length)} />\n </div>\n\n <div className={styles.chartsGrid}>\n <ChartContainer\n title=\"Ships per day\"\n description=\"last 7 days\"\n empty={shipTrend.length === 0}\n emptyMessage=\"No ship history recorded yet.\"\n table={\n <TableView\n caption=\"Ships per day\"\n rowKey={(r) => r.label}\n rows={shipTrend}\n columns={[\n { key: 'day', label: 'Day', render: (r) => r.label },\n { key: 'count', label: 'Ships', numeric: true, render: (r) => String(r.value ?? 0) },\n ]}\n />\n }\n >\n {totalShipped === 0 ? (\n <p className={styles.notAvailable}>\n 0 ships in the last 7 days — this is the real number, not a loading state.\n </p>\n ) : null}\n <BarChart data={shipTrend} ariaLabel=\"Ships per day, last 7 days\" formatValue={(v) => String(v)} />\n </ChartContainer>\n\n <ChartContainer\n title=\"Judge verdict breakdown\"\n description=\"last 24h\"\n caveat=\"Backend gap (flagged separately): judge-parse-failure and judge-network-failure fallbacks currently record verdict='review' upstream (manager.ts's fail-closed default) and are not yet split out here — the 'review' count above may include infrastructure failures, not only genuine human-review holds. See this view's header comment.\"\n empty={jv.total === 0}\n emptyMessage=\"No judge verdicts recorded in the last 24h.\"\n >\n <BarChart data={verdictBars} ariaLabel=\"Judge verdict breakdown, last 24h\" formatValue={(v) => String(v)} />\n </ChartContainer>\n </div>\n\n {production.activeGoals.length > 0 ? (\n <div className={styles.section}>\n <h2 className={styles.sectionTitle}>Active goals</h2>\n <ul className={styles.goalsList}>\n {production.activeGoals.map((g) => {\n const fraction = g.totalMilestones > 0 ? g.doneMilestones / g.totalMilestones : 0;\n return (\n <li key={g.goalId} className={styles.goalRow}>\n <span className={styles.goalObjective}>{g.objective}</span>\n <div className={styles.meterTrack}>\n <div className={styles.meterFill} style={{ width: `${Math.round(fraction * 100)}%` }} />\n </div>\n <span className={styles.goalMeta}>\n {g.doneMilestones} / {g.totalMilestones} milestones\n </span>\n </li>\n );\n })}\n </ul>\n </div>\n ) : null}\n </>\n );\n}\n\nfunction ModelStatsSection({ result }: { result: { models: ModelStats[]; bestOfNSource: unknown } }) {\n const models = [...result.models].sort((a, b) => b.dispatches - a.dispatches).slice(0, 12);\n const shipRateBars: CategoricalDatum[] = models.map((m) => ({\n label: engineModelLabel(m),\n value: m.judged > 0 ? m.shipRate : null,\n }));\n\n const columns: TableColumn<ModelStats>[] = [\n { key: 'model', label: 'Model', render: (r) => engineModelLabel(r) },\n { key: 'dispatches', label: 'Dispatches', numeric: true, render: (r) => String(r.dispatches) },\n {\n key: 'shipRate',\n label: 'Ship rate',\n numeric: true,\n render: (r) => (r.judged > 0 ? chartFormat.formatPercent(r.shipRate) : '—'),\n },\n { key: 'merged', label: 'Merged', numeric: true, render: (r) => String(r.merged) },\n {\n key: 'costPerMerged',\n label: 'Cost / merge',\n numeric: true,\n render: (r) => (r.costPerMergedUsd !== null ? chartFormat.formatUsd(r.costPerMergedUsd) : '—'),\n },\n {\n key: 'bestOfN',\n label: 'Best-of-N win rate',\n numeric: true,\n render: (r) =>\n r.bestOfNAvailable ? (\n <Epistemic quality={result.bestOfNSource as never} label=\"best-of-N win rate\">\n {chartFormat.formatPercent(r.bestOfN.winRate)}\n </Epistemic>\n ) : (\n '—'\n ),\n },\n ];\n\n return (\n <div className={styles.chartsGrid}>\n <ChartContainer\n title=\"Ship rate by model\"\n description=\"judged proposals only; 672 proposals / 0 merged historically means this can legitimately read 0%\"\n empty={models.length === 0}\n emptyMessage=\"No dispatch history for this window.\"\n table={<TableView caption=\"Per-model economics\" rowKey={engineModelLabel} rows={models} columns={columns} />}\n >\n <BarChart\n data={shipRateBars}\n ariaLabel=\"Ship rate by model\"\n formatValue={(v) => chartFormat.formatPercent(v)}\n />\n </ChartContainer>\n </div>\n );\n}\n","/**\n * routes/portfolio/PortfolioView.tsx — org-level roll-up across enrolled\n * repos (GET /api/portfolio -> DashboardSnapshot.portfolio ?? null). `null`\n * is a legitimate, non-error response (older producer or empty enrollment)\n * and is rendered as an honest \"not available\" state, never as a zeroed\n * chart pretending to be real data.\n */\nimport { dashboardSnapshotQuery, portfolioQuery } from '../../data/queries.js';\nimport { useQuery } from '../../data/hooks.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonCardGrid } from '../../components/primitives/Skeleton.js';\nimport {\n ChartContainer,\n BarChart,\n StatTile,\n TableView,\n chartFormat,\n type CategoricalDatum,\n type TableColumn,\n} from '../../components/charts/index.js';\nimport type {\n PortfolioBacklogItem,\n PortfolioGoalInFlight,\n PortfolioSummary,\n} from '../../data/api-types.js';\nimport styles from './PortfolioView.module.css';\n\nexport function PortfolioView() {\n const query = useQuery(portfolioQuery);\n // Today-deltas are computed against a prior digest and live on the same\n // portfolio payload, but the digest itself is built server-side once a\n // day; the snapshot query keeps this view's freshness indicator honest\n // relative to the rest of the app even though portfolioQuery has no SSE\n // channel of its own.\n const snapshotQuery = useQuery(dashboardSnapshotQuery);\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Portfolio</h1>\n <div aria-live=\"polite\">\n {query.status === 'refreshing' || snapshotQuery.status === 'refreshing' ? <RefreshIndicator /> : null}\n </div>\n </header>\n\n {query.status === 'loading' ? (\n <SkeletonCardGrid count={6} />\n ) : query.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Failed to load portfolio.'}\n </div>\n ) : query.data === null ? (\n <p className={styles.notAvailable}>\n No portfolio roll-up available — either this server has no enrolled repos, or it predates the portfolio\n feature.\n </p>\n ) : query.data ? (\n <PortfolioBody portfolio={query.data} />\n ) : null}\n </div>\n );\n}\n\nfunction PortfolioBody({ portfolio }: { portfolio: PortfolioSummary }) {\n const { health, goalsInFlight, backlogTop, cost, effectiveness, today } = portfolio;\n\n const worstRepoBars: CategoricalDatum[] = health.worstRepos.map((r) => ({\n label: r.repo.split('/').filter(Boolean).pop() ?? r.repo,\n value: r.score,\n }));\n\n const backlogColumns: TableColumn<PortfolioBacklogItem>[] = [\n { key: 'title', label: 'Item', render: (r) => r.title },\n { key: 'repo', label: 'Repo', render: (r) => r.repo ?? '—' },\n { key: 'score', label: 'Score', numeric: true, render: (r) => r.score.toFixed(1) },\n ];\n\n return (\n <>\n <div className={styles.kpiGrid}>\n <StatTile\n label=\"Portfolio health\"\n value={`${health.averageScore.toFixed(0)} (${health.averageGrade})`}\n caption={`${health.reposScored} repos scored`}\n delta={\n today.healthScoreDelta !== null ? { value: today.healthScoreDelta, goodWhenPositive: true } : null\n }\n />\n <StatTile label=\"Goals in flight\" value={String(goalsInFlight.length)} />\n <StatTile\n label=\"Backlog top items\"\n value={String(backlogTop.length)}\n delta={\n today.pendingProposalsDelta !== null\n ? { value: today.pendingProposalsDelta, versus: 'pending proposals' }\n : null\n }\n />\n <StatTile\n label=\"Spend\"\n value={chartFormat.formatUsd(cost.spentUsd)}\n caption={`${cost.window} window`}\n delta={today.spendUsdDelta !== null ? { value: today.spendUsdDelta, goodWhenPositive: false } : null}\n />\n <StatTile label=\"Local savings\" value={chartFormat.formatUsd(cost.localSavingsUsd)} />\n <StatTile label=\"Projected monthly\" value={chartFormat.formatUsd(cost.projectedMonthlyUsd)} />\n </div>\n\n {effectiveness ? (\n <div className={styles.effectiveness}>\n <p className={styles.effectivenessHeadline}>{effectiveness.headline}</p>\n <span className={styles.rowMeta}>\n Success rate {chartFormat.formatPercent(effectiveness.successRate)}\n {effectiveness.effectivenessDeltaPct !== null\n ? ` (${effectiveness.effectivenessDeltaPct >= 0 ? '+' : ''}${effectiveness.effectivenessDeltaPct.toFixed(1)}pp)`\n : ''}\n </span>\n </div>\n ) : null}\n\n <div className={styles.chartsGrid}>\n <ChartContainer\n title=\"Worst-scoring repos\"\n empty={worstRepoBars.length === 0}\n emptyMessage=\"No enrolled repos scored yet.\"\n table={\n <TableView\n caption=\"Worst-scoring repos\"\n rowKey={(r) => r.repo}\n rows={health.worstRepos}\n columns={[\n { key: 'repo', label: 'Repo', render: (r) => r.repo },\n { key: 'score', label: 'Score', numeric: true, render: (r) => r.score.toFixed(0) },\n { key: 'grade', label: 'Grade', render: (r) => r.grade },\n ]}\n />\n }\n >\n <BarChart\n data={worstRepoBars}\n orientation=\"horizontal\"\n ariaLabel=\"Worst-scoring repos by health score\"\n formatValue={(v) => v.toFixed(0)}\n />\n </ChartContainer>\n\n <div className={styles.section}>\n <h2 className={styles.sectionTitle}>In-flight goals</h2>\n {goalsInFlight.length === 0 ? (\n <p className={styles.notAvailable}>No goals currently in flight.</p>\n ) : (\n <ul className={styles.list}>\n {goalsInFlight.map((g: PortfolioGoalInFlight) => (\n <li key={g.goalId} className={styles.row}>\n <span className={styles.rowTitle}>\n {g.objective}\n <span className={styles.rowMeta}>{Math.round(g.fractionDone * 100)}%</span>\n </span>\n <div className={styles.meterTrack}>\n <div className={styles.meterFill} style={{ width: `${Math.round(g.fractionDone * 100)}%` }} />\n </div>\n <span className={styles.rowMeta}>\n {g.nextActionable ? `Next: ${g.nextActionable}` : 'Nothing actionable queued'}\n </span>\n </li>\n ))}\n </ul>\n )}\n </div>\n </div>\n\n <div className={styles.section}>\n <h2 className={styles.sectionTitle}>Top backlog</h2>\n {backlogTop.length === 0 ? (\n <p className={styles.notAvailable}>Backlog is empty.</p>\n ) : (\n <TableView caption=\"Top backlog items\" rowKey={(r) => r.title} rows={backlogTop} columns={backlogColumns} />\n )}\n </div>\n </>\n );\n}\n","/**\n * routes/work/runs/RunsView.tsx — dispatched goal runs (GET /api/runs).\n *\n * The audit finding this replaces: the old UI rendered all ~200 runs\n * unsorted and unfiltered with no pagination, so \"show me failed runs in\n * repo X since Tuesday\" was impossible without reading the whole table by\n * eye. This view adds real search, status/engine/provider filters, a date\n * floor, and sortable columns instead.\n *\n * Note on \"repo X\": RunState (src/core/types.ts:1968) has no structured\n * `repo` field — runs are keyed by goal text, not by repository. The search\n * box matches against `goal` (which in practice names the target\n * repo/project) rather than a fabricated repo dropdown backed by nothing.\n *\n * /api/runs is server-capped at 200 (`listRuns({limit:200})`,\n * src/core/web/api.ts:1122) — there is no cursor/offset param to page\n * beyond that, so this view filters/sorts client-side over that window and\n * says so rather than implying it can reach further back.\n */\nimport { useMemo, useRef, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { runsQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonRow } from '../../../components/primitives/Skeleton.js';\nimport type { RunState } from '../../../data/api-types.js';\nimport styles from './RunsView.module.css';\n\ntype SortKey = 'createdAt' | 'updatedAt' | 'tokens' | 'estCostUsd' | 'steps' | 'status';\ntype SortDir = 'asc' | 'desc';\n\nfunction runTokens(run: RunState): number {\n return run.usage.tokensIn + run.usage.tokensOut;\n}\n\nfunction matchesSearch(run: RunState, query: string): boolean {\n if (!query) return true;\n const q = query.toLowerCase();\n return run.id.toLowerCase().includes(q) || run.goal.toLowerCase().includes(q);\n}\n\nfunction formatDate(iso: string): string {\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });\n}\n\nexport function RunsView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/work/runs', containerRef);\n\n const runsResult = useQuery(runsQuery);\n\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<string>('all');\n const [engineFilter, setEngineFilter] = useState<string>('all');\n const [providerFilter, setProviderFilter] = useState<string>('all');\n const [since, setSince] = useState<string>('');\n const [sortKey, setSortKey] = useState<SortKey>('createdAt');\n const [sortDir, setSortDir] = useState<SortDir>('desc');\n\n const runs = useMemo(() => runsResult.data ?? [], [runsResult.data]);\n\n const { statuses, engines, providers } = useMemo(() => {\n const statuses = new Set<string>();\n const engines = new Set<string>();\n const providers = new Set<string>();\n for (const r of runs) {\n statuses.add(r.status);\n engines.add(r.engine);\n providers.add(r.provider);\n }\n return {\n statuses: Array.from(statuses).sort(),\n engines: Array.from(engines).sort(),\n providers: Array.from(providers).sort(),\n };\n }, [runs]);\n\n const sinceMs = since ? new Date(since).getTime() : null;\n\n const filtered = useMemo(() => {\n let rows = runs.filter((r) => {\n if (statusFilter !== 'all' && r.status !== statusFilter) return false;\n if (engineFilter !== 'all' && r.engine !== engineFilter) return false;\n if (providerFilter !== 'all' && r.provider !== providerFilter) return false;\n if (sinceMs !== null) {\n const createdMs = new Date(r.createdAt).getTime();\n if (Number.isNaN(createdMs) || createdMs < sinceMs) return false;\n }\n if (!matchesSearch(r, search.trim())) return false;\n return true;\n });\n\n rows = [...rows].sort((a, b) => {\n let cmp = 0;\n switch (sortKey) {\n case 'createdAt':\n cmp = a.createdAt.localeCompare(b.createdAt);\n break;\n case 'updatedAt':\n cmp = a.updatedAt.localeCompare(b.updatedAt);\n break;\n case 'tokens':\n cmp = runTokens(a) - runTokens(b);\n break;\n case 'estCostUsd':\n cmp = a.usage.estCostUsd - b.usage.estCostUsd;\n break;\n case 'steps':\n cmp = a.steps.length - b.steps.length;\n break;\n case 'status':\n cmp = a.status.localeCompare(b.status);\n break;\n }\n return sortDir === 'asc' ? cmp : -cmp;\n });\n\n return rows;\n }, [runs, statusFilter, engineFilter, providerFilter, sinceMs, search, sortKey, sortDir]);\n\n function toggleSort(key: SortKey) {\n if (key === sortKey) {\n setSortDir((d) => (d === 'asc' ? 'desc' : 'asc'));\n } else {\n setSortKey(key);\n setSortDir('desc');\n }\n }\n\n function sortIndicator(key: SortKey): string {\n if (key !== sortKey) return '';\n return sortDir === 'asc' ? ' ↑' : ' ↓';\n }\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Runs</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {runsResult.status === 'refreshing' ? <RefreshIndicator /> : null}\n <span className={styles.count}>\n {filtered.length} of {runs.length} runs (server caps at 200 most recent)\n </span>\n </div>\n </header>\n\n <form className={styles.filters} role=\"search\" aria-label=\"Filter runs\" onSubmit={(e) => e.preventDefault()}>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Search</span>\n <input\n type=\"text\"\n className={styles.input}\n placeholder=\"goal or run id (e.g. repo/project name)\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Status</span>\n <select className={styles.select} value={statusFilter} onChange={(e) => setStatusFilter(e.target.value)}>\n <option value=\"all\">All</option>\n {statuses.map((s) => (\n <option key={s} value={s}>\n {s}\n </option>\n ))}\n </select>\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Engine</span>\n <select className={styles.select} value={engineFilter} onChange={(e) => setEngineFilter(e.target.value)}>\n <option value=\"all\">All</option>\n {engines.map((e) => (\n <option key={e} value={e}>\n {e}\n </option>\n ))}\n </select>\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Provider</span>\n <select className={styles.select} value={providerFilter} onChange={(e) => setProviderFilter(e.target.value)}>\n <option value=\"all\">All</option>\n {providers.map((p) => (\n <option key={p} value={p}>\n {p}\n </option>\n ))}\n </select>\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Since</span>\n <input type=\"date\" className={styles.input} value={since} onChange={(e) => setSince(e.target.value)} />\n </label>\n {(statusFilter !== 'all' || engineFilter !== 'all' || providerFilter !== 'all' || since || search) && (\n <button\n type=\"button\"\n className={styles.clear}\n onClick={() => {\n setSearch('');\n setStatusFilter('all');\n setEngineFilter('all');\n setProviderFilter('all');\n setSince('');\n }}\n >\n Clear filters\n </button>\n )}\n </form>\n\n {runsResult.status === 'loading' ? (\n <div className={styles.tableWrap}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : runsResult.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {runsResult.error?.message ?? 'Failed to load runs.'}\n </div>\n ) : filtered.length === 0 ? (\n <p className={styles.empty}>No runs match the current filters.</p>\n ) : (\n <div className={styles.tableWrap}>\n <table className={styles.table}>\n <thead>\n <tr>\n <th scope=\"col\">Goal</th>\n <th scope=\"col\" className={styles.statusCol}>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('status')}>\n Status{sortIndicator('status')}\n </button>\n </th>\n <th scope=\"col\" className={styles.engineCol}>\n Engine\n </th>\n <th scope=\"col\" className={styles.providerCol}>\n Provider\n </th>\n <th scope=\"col\" className={styles.tokensCol}>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('tokens')}>\n Tokens in/out{sortIndicator('tokens')}\n </button>\n </th>\n <th scope=\"col\" className={styles.costCol}>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('estCostUsd')}>\n Est cost{sortIndicator('estCostUsd')}\n </button>\n </th>\n <th scope=\"col\" className={styles.stepsCol}>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('steps')}>\n Steps{sortIndicator('steps')}\n </button>\n </th>\n <th scope=\"col\" className={styles.createdCol}>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('createdAt')}>\n Created{sortIndicator('createdAt')}\n </button>\n </th>\n </tr>\n </thead>\n <tbody>\n {filtered.map((run) => (\n <tr key={run.id}>\n <td>\n <Link\n to={`/work/runs/${run.id}`}\n data-focus-key={`run-${run.id}`}\n className={styles.goalLink}\n title={run.goal}\n >\n {run.goal}\n </Link>\n </td>\n <td>\n <StatusBadge status={run.status} />\n </td>\n <td>{run.engine}</td>\n <td>{run.provider}</td>\n <td className={styles.numeric}>\n {run.usage.tokensIn.toLocaleString()} / {run.usage.tokensOut.toLocaleString()}\n </td>\n <td className={styles.numeric}>${run.usage.estCostUsd.toFixed(4)}</td>\n <td className={styles.numeric}>{run.steps.length}</td>\n <td className={styles.date}>{formatDate(run.createdAt)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n );\n}\n","/**\n * routes/work/runs/RunDetailView.tsx — GET /api/run/:id. Full RunState:\n * budget/usage, the append-only step log, and the task DAG (id, goal, deps,\n * status, result/error) — deps rendered as jump links to the dependency's\n * own task row so \"why did this fail\" is traceable without a diagram.\n */\nimport { useRef } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { runDetailQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport type { RunState, RunTask } from '../../../data/api-types.js';\nimport styles from './RunDetailView.module.css';\n\nfunction formatDate(iso: string | undefined): string {\n if (!iso) return '—';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString();\n}\n\nfunction taskAnchorId(taskId: string): string {\n return `task-${encodeURIComponent(taskId)}`;\n}\n\nexport function RunDetailView() {\n const { id } = useParams<{ id: string }>();\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore(`/work/runs/${id ?? ''}`, containerRef);\n\n const query = useQuery(runDetailQuery(id ?? ''));\n\n if (!id) {\n return (\n <div className={styles.view}>\n <p className={styles.error} role=\"alert\">\n No run id in URL.\n </p>\n </div>\n );\n }\n\n if (query.status === 'loading') {\n return (\n <div ref={containerRef} className={styles.view}>\n <SkeletonLine width=\"60%\" />\n <SkeletonLine width=\"30%\" />\n <SkeletonLine width=\"80%\" />\n </div>\n );\n }\n\n if (query.status === 'error' || !query.data) {\n return (\n <div ref={containerRef} className={styles.view}>\n <p className={styles.error} role=\"alert\">\n {query.error?.message ?? `Run ${id} not found.`}\n </p>\n </div>\n );\n }\n\n const run: RunState = query.data;\n const tasksById = new Map(run.tasks.map((t) => [t.id, t]));\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <div>\n <p className={styles.eyebrow}>Run {run.id}</p>\n <h1 className={styles.title}>{run.goal}</h1>\n </div>\n <div className={styles.freshness} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n <StatusBadge status={run.status} />\n </div>\n </header>\n\n <dl className={styles.metaGrid}>\n <div>\n <dt>Engine</dt>\n <dd>{run.engine}</dd>\n </div>\n <div>\n <dt>Provider</dt>\n <dd>{run.provider}</dd>\n </div>\n {run.engineModel ? (\n <div>\n <dt>Model</dt>\n <dd>{run.engineModel}</dd>\n </div>\n ) : null}\n <div>\n <dt>Tokens in / out</dt>\n <dd className={styles.numeric}>\n {run.usage.tokensIn.toLocaleString()} / {run.usage.tokensOut.toLocaleString()}\n </dd>\n </div>\n <div>\n <dt>Est cost</dt>\n <dd className={styles.numeric}>${run.usage.estCostUsd.toFixed(4)}</dd>\n </div>\n <div>\n <dt>Steps</dt>\n <dd className={styles.numeric}>{run.usage.steps}</dd>\n </div>\n <div>\n <dt>Budget (tokens / steps)</dt>\n <dd className={styles.numeric}>\n {run.budget.maxTokens.toLocaleString()} / {run.budget.maxSteps}\n </dd>\n </div>\n <div>\n <dt>Created</dt>\n <dd>{formatDate(run.createdAt)}</dd>\n </div>\n <div>\n <dt>Updated</dt>\n <dd>{formatDate(run.updatedAt)}</dd>\n </div>\n {run.terminationReason ? (\n <div>\n <dt>Termination reason</dt>\n <dd>{run.terminationReason}</dd>\n </div>\n ) : null}\n </dl>\n\n {run.result ? (\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Result</h2>\n <p className={styles.resultText}>{run.result}</p>\n </section>\n ) : null}\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Tasks ({run.tasks.length})</h2>\n {run.tasks.length === 0 ? (\n <p className={styles.empty}>No tasks recorded.</p>\n ) : (\n <ul className={styles.taskList}>\n {run.tasks.map((task: RunTask) => (\n <li key={task.id} id={taskAnchorId(task.id)} className={styles.taskItem} tabIndex={-1}>\n <div className={styles.taskHeader}>\n <span className={styles.taskId}>{task.id}</span>\n <StatusBadge status={task.status} />\n </div>\n <p className={styles.taskGoal}>{task.goal}</p>\n {task.deps.length > 0 ? (\n <p className={styles.taskDeps}>\n depends on:{' '}\n {task.deps.map((depId, i) => (\n <span key={depId}>\n {i > 0 ? ', ' : ''}\n {tasksById.has(depId) ? (\n <a href={`#${taskAnchorId(depId)}`} className={styles.depLink}>\n {depId}\n </a>\n ) : (\n <span className={styles.depMissing}>{depId} (unresolved)</span>\n )}\n </span>\n ))}\n </p>\n ) : null}\n {task.error ? (\n <p className={styles.taskError} role=\"alert\">\n {task.error}\n </p>\n ) : null}\n {task.usage ? (\n <p className={styles.taskUsage}>\n {task.usage.tokensIn.toLocaleString()} / {task.usage.tokensOut.toLocaleString()} tokens · $\n {task.usage.estCostUsd.toFixed(4)}\n </p>\n ) : null}\n </li>\n ))}\n </ul>\n )}\n </section>\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Step log ({run.steps.length})</h2>\n {run.steps.length === 0 ? (\n <p className={styles.empty}>No steps recorded.</p>\n ) : (\n <ol className={styles.stepList}>\n {run.steps.map((step, i) => (\n <li key={`${step.ts}-${i}`} className={styles.stepItem}>\n <span className={styles.stepTs}>{formatDate(step.ts)}</span>\n <span className={styles.stepKind}>{step.kind}</span>\n <span className={styles.stepTask}>\n {step.taskId ? (\n <a href={`#${taskAnchorId(step.taskId)}`} className={styles.depLink}>\n {step.taskId}\n </a>\n ) : null}\n </span>\n <span className={styles.stepSummary}>{step.summary}</span>\n </li>\n ))}\n </ol>\n )}\n </section>\n </div>\n );\n}\n","/**\n * routes/work/swarms/SwarmsView.tsx — multi-task DAG runs (GET /api/swarms).\n * List view with the same search/filter/sort treatment as RunsView, plus a\n * compact per-row burndown bar (ported convention from\n * routes/fleet-dashboard/SwarmsPanel.tsx). The full DAG lives on the detail\n * view (SwarmDetailView.tsx) — a list of up to 200 rows isn't the place for\n * one SVG diagram per row.\n */\nimport { useMemo, useRef, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { swarmsQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonRow } from '../../../components/primitives/Skeleton.js';\nimport type { SwarmRun } from '../../../data/api-types.js';\nimport styles from './SwarmsView.module.css';\n\ntype SortKey = 'createdAt' | 'updatedAt' | 'progress' | 'tokens' | 'estCostUsd';\ntype SortDir = 'asc' | 'desc';\n\nfunction swarmTasksDone(sw: SwarmRun): number {\n return sw.tasks.filter((t) => t.status === 'done').length;\n}\nfunction swarmTasksTotal(sw: SwarmRun): number {\n // Some historical swarm records (e.g. very early smoke-test runs) predate\n // the `plan` field and have no plan at all — guard against that rather\n // than crashing the whole list (2 of 80 real records on this machine hit\n // this path).\n return Math.max(sw.plan?.tasks.length ?? 0, sw.tasks.length);\n}\n// Same historical records that predate `plan` (see swarmTasksTotal above)\n// also predate `usage` — default to zeroed usage rather than crashing.\nfunction swarmUsage(sw: SwarmRun): { tokensIn: number; tokensOut: number; estCostUsd: number } {\n return sw.usage ?? { tokensIn: 0, tokensOut: 0, estCostUsd: 0 };\n}\nfunction swarmTokens(sw: SwarmRun): number {\n const u = swarmUsage(sw);\n return u.tokensIn + u.tokensOut;\n}\n\nfunction formatDate(iso: string): string {\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });\n}\n\nexport function SwarmsView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/work/swarms', containerRef);\n\n const swarmsResult = useQuery(swarmsQuery);\n const swarms = useMemo(() => swarmsResult.data ?? [], [swarmsResult.data]);\n\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState('all');\n const [sortKey, setSortKey] = useState<SortKey>('createdAt');\n const [sortDir, setSortDir] = useState<SortDir>('desc');\n\n const statuses = useMemo(() => Array.from(new Set(swarms.map((s) => s.status))).sort(), [swarms]);\n\n const filtered = useMemo(() => {\n let rows = swarms.filter((s) => {\n if (statusFilter !== 'all' && s.status !== statusFilter) return false;\n if (!search.trim()) return true;\n const q = search.trim().toLowerCase();\n return s.id.toLowerCase().includes(q) || s.goal.toLowerCase().includes(q);\n });\n\n rows = [...rows].sort((a, b) => {\n let cmp = 0;\n switch (sortKey) {\n case 'createdAt':\n cmp = a.createdAt.localeCompare(b.createdAt);\n break;\n case 'updatedAt':\n cmp = a.updatedAt.localeCompare(b.updatedAt);\n break;\n case 'progress': {\n const pa = swarmTasksTotal(a) > 0 ? swarmTasksDone(a) / swarmTasksTotal(a) : 0;\n const pb = swarmTasksTotal(b) > 0 ? swarmTasksDone(b) / swarmTasksTotal(b) : 0;\n cmp = pa - pb;\n break;\n }\n case 'tokens':\n cmp = swarmTokens(a) - swarmTokens(b);\n break;\n case 'estCostUsd':\n cmp = swarmUsage(a).estCostUsd - swarmUsage(b).estCostUsd;\n break;\n }\n return sortDir === 'asc' ? cmp : -cmp;\n });\n\n return rows;\n }, [swarms, statusFilter, search, sortKey, sortDir]);\n\n function toggleSort(key: SortKey) {\n if (key === sortKey) setSortDir((d) => (d === 'asc' ? 'desc' : 'asc'));\n else {\n setSortKey(key);\n setSortDir('desc');\n }\n }\n function sortIndicator(key: SortKey): string {\n if (key !== sortKey) return '';\n return sortDir === 'asc' ? ' ↑' : ' ↓';\n }\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Swarms</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {swarmsResult.status === 'refreshing' ? <RefreshIndicator /> : null}\n <span className={styles.count}>\n {filtered.length} of {swarms.length} swarms\n </span>\n </div>\n </header>\n\n <form className={styles.filters} role=\"search\" aria-label=\"Filter swarms\" onSubmit={(e) => e.preventDefault()}>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Search</span>\n <input\n type=\"text\"\n className={styles.input}\n placeholder=\"goal or swarm id\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Status</span>\n <select className={styles.select} value={statusFilter} onChange={(e) => setStatusFilter(e.target.value)}>\n <option value=\"all\">All</option>\n {statuses.map((s) => (\n <option key={s} value={s}>\n {s}\n </option>\n ))}\n </select>\n </label>\n </form>\n\n {swarmsResult.status === 'loading' ? (\n <div className={styles.listWrap}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : swarmsResult.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {swarmsResult.error?.message ?? 'Failed to load swarms.'}\n </div>\n ) : filtered.length === 0 ? (\n <p className={styles.empty}>No swarms match the current filters.</p>\n ) : (\n <div className={styles.listWrap}>\n <div className={styles.listHeader}>\n <span>Goal</span>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('progress')}>\n Progress{sortIndicator('progress')}\n </button>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('tokens')}>\n Tokens{sortIndicator('tokens')}\n </button>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('estCostUsd')}>\n Cost{sortIndicator('estCostUsd')}\n </button>\n <button type=\"button\" className={styles.sortHeader} onClick={() => toggleSort('createdAt')}>\n Created{sortIndicator('createdAt')}\n </button>\n </div>\n <ul className={styles.list}>\n {filtered.map((sw) => {\n const done = swarmTasksDone(sw);\n const total = swarmTasksTotal(sw);\n const pct = total > 0 ? Math.round((done / total) * 100) : 0;\n const usage = swarmUsage(sw);\n return (\n <li key={sw.id} className={styles.item}>\n <Link\n to={`/work/swarms/${sw.id}`}\n data-focus-key={`swarm-${sw.id}`}\n className={styles.goalLink}\n title={sw.goal}\n >\n <span className={styles.goalText}>{sw.goal}</span>\n <StatusBadge status={sw.status} />\n </Link>\n <div className={styles.burndown}>\n <div className={styles.burndownTrack}>\n <div className={styles.burndownFill} style={{ width: `${pct}%` }} />\n </div>\n <span className={styles.burndownLabel}>\n {done}/{total}\n </span>\n </div>\n <span className={styles.numeric}>\n {usage.tokensIn.toLocaleString()}/{usage.tokensOut.toLocaleString()}\n </span>\n <span className={styles.numeric}>${usage.estCostUsd.toFixed(4)}</span>\n <span className={styles.date}>{formatDate(sw.createdAt)}</span>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n );\n}\n","/**\n * routes/work/swarms/SwarmDag.tsx — ported from the hand-rolled SVG DAG at\n * src/core/web/public/app.js:1334-1493 (`buildSwarmDag`). The layout\n * algorithm (phase-column layout, tasks stacked within a column, cubic-\n * bezier dependency edges with an arrowhead marker) is unchanged — it was\n * self-contained and worth keeping rather than reinventing. Two deliberate\n * departures from the original:\n *\n * 1. Color: the legacy version hardcoded its own STATUS_COLOR map\n * (app.js:40-49), which is exactly the \"two files disagree about what a\n * status color means\" bug DESIGN.md's status-color section documents.\n * This version routes every node through `statusToTone()` instead, so a\n * DAG node and a <StatusBadge/> for the same status always render the\n * same color from the one place that owns the mapping.\n * 2. Interactivity: the legacy DAG had none (no click/hover/focus). Each\n * node here is a real SVG <a> to `#{taskAnchorPrefix}-{taskId}`, making\n * every node keyboard-reachable (Tab + Enter) and jumping to that task's\n * row in the plain-text task list rendered alongside the DAG — so the\n * graph is a navigation aid, not the only way to reach a task's detail.\n */\nimport type { ReactNode } from 'react';\nimport { statusToTone } from '../../../components/primitives/StatusBadge.js';\nimport type { SwarmPlan, SwarmTaskRun } from '../../../data/api-types.js';\nimport styles from './SwarmDag.module.css';\n\nconst PHASE_ORDER: Record<string, number> = { scaffold: 0, build: 1, integrate: 2, verify: 3, review: 4 };\n\nexport interface DagTaskNode {\n id: string;\n phase: string;\n goal: string;\n deps: string[];\n status: string;\n}\n\n/**\n * Merge plan tasks (spec: goal/deps/phase) with runtime tasks (status) —\n * same precedence as the legacy merge (app.js:1339-1346): spec first, then\n * runtime fields overlay it by id.\n */\nexport function mergeSwarmTasks(plan: SwarmPlan | undefined, taskRuns: SwarmTaskRun[]): DagTaskNode[] {\n const map = new Map<string, DagTaskNode>();\n for (const s of plan?.tasks ?? []) {\n map.set(s.id, { id: s.id, phase: s.phase, goal: s.goal, deps: s.deps, status: 'pending' });\n }\n for (const r of taskRuns) {\n const existing = map.get(r.id);\n map.set(r.id, {\n id: r.id,\n phase: r.phase || existing?.phase || 'build',\n goal: existing?.goal ?? '',\n deps: existing?.deps ?? [],\n status: r.status,\n });\n }\n return Array.from(map.values());\n}\n\nfunction truncate(s: string, n: number): string {\n return s.length > n ? `${s.slice(0, n - 1)}…` : s;\n}\n\nconst NODE_W = 140;\nconst NODE_H = 48;\nconst H_GAP = 60;\nconst V_GAP = 20;\nconst PAD = 20;\n\ninterface NodePos {\n x: number;\n y: number;\n cx: number;\n cy: number;\n}\n\nexport function SwarmDag({\n tasks,\n taskAnchorPrefix = 'dag-task',\n}: {\n tasks: DagTaskNode[];\n taskAnchorPrefix?: string;\n}): ReactNode {\n if (tasks.length === 0) {\n return <p className={styles.empty}>No tasks in this swarm.</p>;\n }\n\n const phaseGroups = new Map<string, DagTaskNode[]>();\n for (const t of tasks) {\n const ph = t.phase || 'build';\n const list = phaseGroups.get(ph) ?? [];\n list.push(t);\n phaseGroups.set(ph, list);\n }\n const phases = Array.from(phaseGroups.keys()).sort((a, b) => (PHASE_ORDER[a] ?? 99) - (PHASE_ORDER[b] ?? 99));\n\n const colX = new Map<string, number>();\n let x = PAD;\n for (const ph of phases) {\n colX.set(ph, x);\n x += NODE_W + H_GAP;\n }\n const totalW = x + PAD;\n\n const nodePos = new Map<string, NodePos>();\n for (const ph of phases) {\n let y = PAD;\n for (const t of phaseGroups.get(ph)!) {\n const px = colX.get(ph)!;\n nodePos.set(t.id, { x: px, y, cx: px + NODE_W / 2, cy: y + NODE_H / 2 });\n y += NODE_H + V_GAP;\n }\n }\n const totalH = Math.max(...Array.from(nodePos.values()).map((p) => p.y + NODE_H)) + PAD * 2;\n\n const edges: { key: string; d: string }[] = [];\n for (const t of tasks) {\n const to = nodePos.get(t.id);\n if (!to) continue;\n for (const depId of t.deps) {\n const from = nodePos.get(depId);\n if (!from) continue;\n const x1 = from.x + NODE_W;\n const y1 = from.cy;\n const x2 = to.x;\n const y2 = to.cy;\n const mx = (x1 + x2) / 2;\n edges.push({ key: `${depId}->${t.id}`, d: `M ${x1} ${y1} C ${mx} ${y1}, ${mx} ${y2}, ${x2} ${y2}` });\n }\n }\n\n return (\n <svg\n width={totalW}\n height={totalH}\n viewBox={`0 0 ${totalW} ${totalH}`}\n className={styles.svg}\n role=\"img\"\n aria-label=\"Swarm task dependency graph\"\n >\n <defs>\n <marker id=\"dag-arrow\" markerWidth=\"8\" markerHeight=\"8\" refX=\"6\" refY=\"3\" orient=\"auto\">\n <path d=\"M0,0 L0,6 L8,3 z\" className={styles.arrowHead} />\n </marker>\n </defs>\n\n {phases.map((ph) => (\n <text key={ph} x={colX.get(ph)! + NODE_W / 2} y={PAD - 6} textAnchor=\"middle\" className={styles.phaseLabel}>\n {ph}\n </text>\n ))}\n\n {edges.map((e) => (\n <path key={e.key} d={e.d} className={styles.edge} fill=\"none\" markerEnd=\"url(#dag-arrow)\" />\n ))}\n\n {tasks.map((t) => {\n const pos = nodePos.get(t.id);\n if (!pos) return null;\n const tone = statusToTone(t.status);\n return (\n <g key={t.id} transform={`translate(${pos.x},${pos.y})`}>\n <a href={`#${taskAnchorPrefix}-${encodeURIComponent(t.id)}`} className={styles.nodeLink}>\n <title>{`${t.id} — ${t.goal} (${t.status})`}</title>\n <rect width={NODE_W} height={NODE_H} rx={6} ry={6} className={`${styles.nodeRect} ${styles[tone]}`} />\n <circle cx={10} cy={NODE_H / 2} r={4} className={`${styles.statusDot} ${styles[tone]}`} />\n <text x={20} y={17} className={styles.nodeId}>\n {truncate(t.id, 18)}\n </text>\n <text x={20} y={33} className={styles.nodeGoal}>\n {truncate(t.goal, 20)}\n </text>\n </a>\n </g>\n );\n })}\n </svg>\n );\n}\n","/**\n * routes/work/swarms/SwarmDetailView.tsx — GET /api/swarm/:id. Renders the\n * ported DAG (SwarmDag.tsx) above a plain-text, keyboard-navigable task list\n * — the DAG is a navigation aid, not the only way to reach a task's status/\n * error/result, matching the \"run detail was unreachable by keyboard\"\n * lesson from the audit (this view has no click-only-reachable content).\n */\nimport { useRef } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { swarmDetailQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport { SwarmDag, mergeSwarmTasks } from './SwarmDag.js';\nimport styles from './SwarmDetailView.module.css';\n\nconst TASK_ANCHOR_PREFIX = 'dag-task';\n\nfunction formatDate(iso: string | undefined): string {\n if (!iso) return '—';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString();\n}\n\nexport function SwarmDetailView() {\n const { id } = useParams<{ id: string }>();\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore(`/work/swarms/${id ?? ''}`, containerRef);\n\n const query = useQuery(swarmDetailQuery(id ?? ''));\n\n if (!id) {\n return (\n <div className={styles.view}>\n <p className={styles.error} role=\"alert\">\n No swarm id in URL.\n </p>\n </div>\n );\n }\n\n if (query.status === 'loading') {\n return (\n <div ref={containerRef} className={styles.view}>\n <SkeletonLine width=\"60%\" />\n <SkeletonLine width=\"30%\" />\n <SkeletonLine width=\"80%\" />\n </div>\n );\n }\n\n if (query.status === 'error' || !query.data) {\n return (\n <div ref={containerRef} className={styles.view}>\n <p className={styles.error} role=\"alert\">\n {query.error?.message ?? `Swarm ${id} not found.`}\n </p>\n </div>\n );\n }\n\n const swarm = query.data;\n const done = swarm.tasks.filter((t) => t.status === 'done').length;\n // Guard against historical swarm records with no `plan` at all (see the\n // matching comment in SwarmsView.tsx) — mergeSwarmTasks below already\n // handles `plan` being undefined via `plan?.tasks ?? []`.\n const total = Math.max(swarm.plan?.tasks.length ?? 0, swarm.tasks.length);\n const pct = total > 0 ? Math.round((done / total) * 100) : 0;\n const dagNodes = mergeSwarmTasks(swarm.plan, swarm.tasks);\n // Same historical records that predate `plan` also predate `usage`.\n const usage = swarm.usage ?? { tokensIn: 0, tokensOut: 0, estCostUsd: 0 };\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <div>\n <p className={styles.eyebrow}>Swarm {swarm.id}</p>\n <h1 className={styles.title}>{swarm.goal}</h1>\n </div>\n <div className={styles.freshness} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n <StatusBadge status={swarm.status} />\n </div>\n </header>\n\n <div className={styles.burndownRow}>\n <div className={styles.burndownTrack}>\n <div className={styles.burndownFill} style={{ width: `${pct}%` }} />\n </div>\n <span className={styles.burndownLabel}>\n {done}/{total} tasks done ({pct}%)\n </span>\n </div>\n\n <dl className={styles.metaGrid}>\n <div>\n <dt>Tokens in / out</dt>\n <dd className={styles.numeric}>\n {usage.tokensIn.toLocaleString()} / {usage.tokensOut.toLocaleString()}\n </dd>\n </div>\n <div>\n <dt>Est cost</dt>\n <dd className={styles.numeric}>${usage.estCostUsd.toFixed(4)}</dd>\n </div>\n <div>\n <dt>Parallelism</dt>\n <dd className={styles.numeric}>{swarm.parallel}</dd>\n </div>\n <div>\n <dt>Created</dt>\n <dd>{formatDate(swarm.createdAt)}</dd>\n </div>\n <div>\n <dt>Updated</dt>\n <dd>{formatDate(swarm.updatedAt)}</dd>\n </div>\n {swarm.project ? (\n <div>\n <dt>Project</dt>\n <dd className={styles.mono}>{swarm.project}</dd>\n </div>\n ) : null}\n </dl>\n\n {swarm.escalations && swarm.escalations.length > 0 ? (\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Escalations ({swarm.escalations.length})</h2>\n <ul className={styles.escalationList}>\n {swarm.escalations.map((esc, i) => (\n <li key={i} className={styles.escalationItem}>\n <pre className={styles.escalationJson}>{JSON.stringify(esc, null, 2)}</pre>\n </li>\n ))}\n </ul>\n </section>\n ) : null}\n\n {swarm.result ? (\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Result</h2>\n <p className={styles.resultText}>{swarm.result}</p>\n </section>\n ) : null}\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Task graph</h2>\n <div className={styles.dagWrap}>\n <SwarmDag tasks={dagNodes} taskAnchorPrefix={TASK_ANCHOR_PREFIX} />\n </div>\n </section>\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Tasks ({dagNodes.length})</h2>\n <ul className={styles.taskList}>\n {dagNodes.map((task) => (\n <li\n key={task.id}\n id={`${TASK_ANCHOR_PREFIX}-${task.id}`}\n data-focus-key={`swarm-task-${task.id}`}\n className={styles.taskItem}\n tabIndex={-1}\n >\n <div className={styles.taskHeader}>\n <span className={styles.taskId}>{task.id}</span>\n <span className={styles.taskPhase}>{task.phase}</span>\n <StatusBadge status={task.status} />\n </div>\n <p className={styles.taskGoal}>{task.goal}</p>\n {task.deps.length > 0 ? (\n <p className={styles.taskDeps}>depends on: {task.deps.join(', ')}</p>\n ) : null}\n </li>\n ))}\n </ul>\n </section>\n </div>\n );\n}\n","/**\n * routes/control/daemon/DaemonView.tsx — autonomous operator state, spend,\n * and direction mode (GET /api/control's `.daemon`/`.daemonObservation`).\n *\n * Every field here traces back to `daemon.sourceQuality` (a real\n * `{sourceState, complete, reason}` — src/core/web/control.ts `ControlDaemon`)\n * and is wrapped in <Epistemic/>: when the source is degraded this renders\n * \"unknown\", not a guess.\n *\n * The recovery callout below is the one thing this view adds beyond\n * DaemonPanel's dashboard-compact version: when sourceQuality.reason is\n * 'unreadable', src/core/daemon/state.ts's loadDaemonStateStrict() shows\n * that reason both for a plain read failure AND for the specific case where\n * a daemon-state-recovery marker file is present (\"daemon state recovery is\n * in progress\", state.ts:437-450) — the API does not currently disambiguate\n * the two, so this view surfaces the real CLI remedy for BOTH as a single\n * conditional next step (verbatim from `ashlr daemon recover-state --help` /\n * `resolve-state --help`, src/cli/daemon.ts:82-86) rather than asserting a\n * diagnosis the response can't actually confirm. This was previously\n * undiscoverable — the old UI had no daemon page at all, only a compact\n * dashboard panel with no failure-mode guidance.\n */\nimport { useRef } from 'react';\nimport { controlSnapshotQuery, daemonObservationQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { Epistemic, isKnown } from '../../../components/primitives/Epistemic.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport type { DaemonSourceQuality } from '../../../data/api-types.js';\nimport styles from './DaemonView.module.css';\n\nconst REASON_COPY: Record<string, string> = {\n missing: 'No daemon state file has been written yet — the daemon may never have run on this machine.',\n malformed: 'The daemon state file exists but failed to parse.',\n unreadable:\n 'The daemon state file could not be read. This is also the exact signal produced when a state-recovery ' +\n 'marker is present (a prior repair left a quarantine in progress) — the API does not distinguish the two ' +\n 'cases, so treat this as \"inspect before trusting displayed daemon state.\"',\n inconsistent: 'The daemon state file and the live lock/activity check disagree — the daemon may be mid-restart.',\n unavailable: 'The daemon state read path itself failed (I/O error or similar).',\n};\n\nfunction formatDate(iso: string | null | undefined): string {\n if (!iso) return '—';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString();\n}\n\nfunction RecoveryCallout({ quality }: { quality: DaemonSourceQuality }) {\n const reason = quality.reason;\n const copy = REASON_COPY[reason] ?? 'Daemon state could not be verified.';\n return (\n <section className={styles.callout} role=\"alert\">\n <p className={styles.calloutTitle}>Daemon state is unknown ({reason})</p>\n <p className={styles.calloutBody}>{copy}</p>\n <p className={styles.calloutBody}>\n Real remedy — preview or execute a state recovery from a terminal on this machine:\n </p>\n <pre className={styles.calloutCommand}>\n {'ashlr daemon recover-state --dry-run --expected-sha256 <sha256> [--json]\\n' +\n 'ashlr daemon recover-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> [--json]'}\n </pre>\n <p className={styles.calloutBody}>If a quarantine already exists and needs resolving instead:</p>\n <pre className={styles.calloutCommand}>\n {'ashlr daemon resolve-state --dry-run --quarantine-plan-id <uuid> --quarantine-receipt-sha256 <sha256> [--json]\\n' +\n 'ashlr daemon resolve-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> --confirm <plan-sha256> [--json]'}\n </pre>\n </section>\n );\n}\n\nexport function DaemonView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/control/daemon', containerRef);\n\n const controlQuery = useQuery(controlSnapshotQuery);\n const observationQuery = useQuery(daemonObservationQuery);\n\n const daemon = controlQuery.data?.daemon;\n const observation = observationQuery.data;\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Daemon</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {controlQuery.status === 'refreshing' || observationQuery.status === 'refreshing' ? (\n <RefreshIndicator />\n ) : null}\n {daemon ? (\n <Epistemic quality={daemon.sourceQuality} label=\"daemon state\">\n <StatusBadge status={daemon.running ? 'running' : 'pending'}>\n {daemon.running ? 'running' : 'stopped'}\n </StatusBadge>\n </Epistemic>\n ) : null}\n </div>\n </header>\n\n {controlQuery.status === 'loading' ? (\n <SkeletonLine width=\"60%\" />\n ) : controlQuery.status === 'error' || !daemon ? (\n <p className={styles.error} role=\"alert\">\n {controlQuery.error?.message ?? 'Failed to load control snapshot.'}\n </p>\n ) : (\n <>\n {!isKnown(daemon.sourceQuality) ? <RecoveryCallout quality={daemon.sourceQuality} /> : null}\n\n <dl className={styles.metaGrid}>\n <div>\n <dt>Runtime state</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"runtime state\">\n {daemon.runtimeState}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>PID</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"pid\">\n {daemon.pid ?? '—'}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Last tick</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"last tick\">\n {formatDate(daemon.lastTickAt)}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Today's spend</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"spend\">\n ${daemon.todaySpentUsd.toFixed(2)}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Direction mode</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"direction mode\">\n {daemon.activeDirectionMode ?? 'none'}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Direction reason</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"direction reason\">\n {daemon.activeDirectionReason ?? '—'}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Autonomy control loop</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"autonomy control loop\">\n {daemon.autonomyControlLoop ? 'enabled' : 'disabled'}\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Autonomy control mode</dt>\n <dd>\n <Epistemic quality={daemon.sourceQuality} label=\"autonomy control mode\">\n {daemon.autonomyControlMode}\n </Epistemic>\n </dd>\n </div>\n </dl>\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>OS service</h2>\n <dl className={styles.metaGrid}>\n <div>\n <dt>Registration state</dt>\n <dd>{daemon.service.registrationState}</dd>\n </div>\n <div>\n <dt>Installed</dt>\n <dd>{daemon.service.installed ? 'yes' : 'no'}</dd>\n </div>\n <div>\n <dt>Running</dt>\n <dd>{daemon.service.running ? 'yes' : 'no'}</dd>\n </div>\n <div>\n <dt>Runtime state</dt>\n <dd>{daemon.service.runtimeState ?? 'unknown'}</dd>\n </div>\n <div>\n <dt>Platform</dt>\n <dd>{daemon.service.platformSpec}</dd>\n </div>\n </dl>\n {daemon.service.errorLog ? (\n <p className={styles.serviceError} role=\"alert\">\n {daemon.service.errorLog}\n </p>\n ) : null}\n </section>\n </>\n )}\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Recent ticks</h2>\n {observationQuery.status === 'loading' ? (\n <SkeletonLine width=\"80%\" />\n ) : !observation || !observation.ticks || observation.ticks.length === 0 ? (\n <p className={styles.empty}>No tick history available.</p>\n ) : (\n <div className={styles.tickTableWrap}>\n <table className={styles.tickTable}>\n <thead>\n <tr>\n <th scope=\"col\">Time</th>\n <th scope=\"col\">Reason</th>\n <th scope=\"col\">Items</th>\n <th scope=\"col\">Proposals</th>\n <th scope=\"col\">Spend</th>\n </tr>\n </thead>\n <tbody>\n {[...observation.ticks]\n .reverse()\n .slice(0, 20)\n .map((tick, i) => (\n <tr key={`${tick.ts}-${i}`}>\n <td className={styles.date}>{formatDate(tick.ts)}</td>\n <td>\n {tick.reason}\n {tick.dryRun ? <span className={styles.dryRun}> (dry-run)</span> : null}\n </td>\n <td className={styles.numeric}>{tick.itemsConsidered}</td>\n <td className={styles.numeric}>{tick.proposalsCreated}</td>\n <td className={styles.numeric}>${tick.spentUsd.toFixed(4)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n </div>\n );\n}\n","/**\n * routes/control/fleet/FleetView.tsx — queue depth, lease health, and the\n * kill switch (GET /api/fleet, GET /api/fleet-activity; POST\n * /api/fleet/pause|resume).\n *\n * The audit finding this fixes: the old UI's kill switch engaged on a\n * single click with no confirmation. This one requires an explicit confirm\n * step (Dialog) before it will even offer the token prompt, and the token\n * prompt itself only appears if no mutation hold is already active — so the\n * full path to actually pausing the fleet is: click \"Pause fleet\" -> confirm\n * dialog -> (token dialog, only if not already unlocked) -> mutation fires.\n *\n * Kill-switch state is read from `FleetStatus.killSwitch`\n * (`{state, sourceState, reason}` — src/core/fleet/status.ts:1690-1696),\n * which is a *different* shape from the `{sourceState, complete, reason?}`\n * SourceQuality the rest of the app keys Epistemic off of, so it's adapted\n * into that shape here (`sourceState: killSwitch.sourceState`,\n * `complete: killSwitch.sourceState === 'healthy'`) before being handed to\n * <Epistemic/> — same withhold-the-control behavior, correct source shape.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { fleetStatusQuery, fleetActivityQuery } from '../../../data/queries.js';\nimport { useQuery, useMutationHold } from '../../../data/hooks.js';\nimport { pauseFleet, resumeFleet } from '../../../data/mutations.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { Epistemic } from '../../../components/primitives/Epistemic.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport { Dialog } from '../../../components/primitives/Dialog.js';\nimport { MutationTokenDialog } from '../../../components/auth/MutationTokenDialog.js';\nimport styles from './FleetView.module.css';\n\ntype PendingAction = 'pause' | 'resume' | null;\n\nfunction formatDate(iso: string | null | undefined): string {\n if (!iso) return '—';\n const d = new Date(iso);\n if (Number.isNaN(d.getTime())) return iso;\n return d.toLocaleString();\n}\n\nexport function FleetView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/control/fleet', containerRef);\n\n const fleetQuery = useQuery(fleetStatusQuery);\n const activityQuery = useQuery(fleetActivityQuery);\n const mutationHold = useMutationHold();\n\n const [pendingAction, setPendingAction] = useState<PendingAction>(null);\n const [confirmOpen, setConfirmOpen] = useState(false);\n const [tokenOpen, setTokenOpen] = useState(false);\n const [mutating, setMutating] = useState(false);\n const [mutationError, setMutationError] = useState<string | null>(null);\n\n async function executeAction(action: NonNullable<PendingAction>) {\n setMutating(true);\n setMutationError(null);\n try {\n if (action === 'pause') await pauseFleet();\n else await resumeFleet();\n } catch (e) {\n setMutationError(e instanceof Error ? e.message : String(e));\n } finally {\n setMutating(false);\n setPendingAction(null);\n }\n }\n\n function requestAction(action: NonNullable<PendingAction>) {\n setMutationError(null);\n setPendingAction(action);\n setConfirmOpen(true);\n }\n\n function confirmIntent() {\n setConfirmOpen(false);\n if (mutationHold.hasHold) {\n if (pendingAction) void executeAction(pendingAction);\n } else {\n setTokenOpen(true);\n }\n }\n\n // After the token dialog closes: if a hold now exists, the pending action\n // was confirmed AND unlocked, so run it. If not, the dialog was cancelled\n // — drop the pending action rather than leaving a stale confirm hanging.\n useEffect(() => {\n if (tokenOpen) return;\n if (!pendingAction) return;\n if (mutationHold.hasHold) void executeAction(pendingAction);\n else setPendingAction(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- deliberately fires only on tokenOpen transitioning closed.\n }, [tokenOpen]);\n\n const fleet = fleetQuery.data;\n const killSwitch = fleet?.killSwitch;\n const killQuality = killSwitch\n ? { sourceState: killSwitch.sourceState, complete: killSwitch.sourceState === 'healthy', reason: killSwitch.reason }\n : undefined;\n const isPaused = fleet?.killed === true;\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Fleet</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {fleetQuery.status === 'refreshing' || activityQuery.status === 'refreshing' ? <RefreshIndicator /> : null}\n </div>\n </header>\n\n {fleetQuery.status === 'loading' ? (\n <SkeletonLine width=\"60%\" />\n ) : fleetQuery.status === 'error' || !fleet ? (\n <p className={styles.error} role=\"alert\">\n {fleetQuery.error?.message ?? 'Failed to load fleet status.'}\n </p>\n ) : (\n <>\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Kill switch</h2>\n <div className={styles.killSwitchRow}>\n <Epistemic\n quality={killQuality}\n label=\"kill switch\"\n renderControl={() => (\n <button\n type=\"button\"\n className={isPaused ? styles.resumeButton : styles.pauseButton}\n onClick={() => requestAction(isPaused ? 'resume' : 'pause')}\n disabled={mutating}\n >\n {mutating ? 'Working…' : isPaused ? 'Resume fleet' : 'Pause fleet'}\n </button>\n )}\n >\n <StatusBadge status={isPaused ? 'paused' : 'running'}>\n {isPaused ? 'engaged — fleet paused' : 'clear — fleet active'}\n </StatusBadge>\n </Epistemic>\n </div>\n {mutationError ? (\n <p className={styles.mutationError} role=\"alert\">\n {mutationError}\n </p>\n ) : null}\n </section>\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Queue depth</h2>\n <dl className={styles.metaGrid}>\n <div>\n <dt>Backlog items</dt>\n <dd className={styles.numeric}>{fleet.queue.backlogItems}</dd>\n </div>\n {fleet.queue.eligibleBacklogItems !== undefined ? (\n <div>\n <dt>Eligible</dt>\n <dd className={styles.numeric}>{fleet.queue.eligibleBacklogItems}</dd>\n </div>\n ) : null}\n {fleet.queue.cooldownItems !== undefined ? (\n <div>\n <dt>Cooldown</dt>\n <dd className={styles.numeric}>{fleet.queue.cooldownItems}</dd>\n </div>\n ) : null}\n {fleet.queue.pendingItems !== undefined ? (\n <div>\n <dt>Pending</dt>\n <dd className={styles.numeric}>{fleet.queue.pendingItems}</dd>\n </div>\n ) : null}\n {fleet.queue.nextEligibleAt !== undefined ? (\n <div>\n <dt>Next eligible</dt>\n <dd>{formatDate(fleet.queue.nextEligibleAt)}</dd>\n </div>\n ) : null}\n </dl>\n </section>\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Lease health</h2>\n {!fleet.queue.shared ? (\n <p className={styles.empty}>Shared fleet queue is not in use on this deployment.</p>\n ) : (\n <>\n <dl className={styles.metaGrid}>\n <div>\n <dt>Active claims</dt>\n <dd className={styles.numeric}>{fleet.queue.shared.activeClaims}</dd>\n </div>\n <div>\n <dt>Owned by this machine</dt>\n <dd className={styles.numeric}>{fleet.queue.shared.ownedClaims}</dd>\n </div>\n <div>\n <dt>Reclaimable (expired)</dt>\n <dd className={styles.numeric}>{fleet.queue.shared.reclaimableClaims}</dd>\n </div>\n {fleet.queue.shared.executingClaims !== undefined ? (\n <div>\n <dt>Executing</dt>\n <dd className={styles.numeric}>{fleet.queue.shared.executingClaims}</dd>\n </div>\n ) : null}\n {fleet.queue.shared.ambiguousClaims !== undefined ? (\n <div>\n <dt>Ambiguous (needs reconciliation)</dt>\n <dd className={styles.numeric}>{fleet.queue.shared.ambiguousClaims}</dd>\n </div>\n ) : null}\n <div>\n <dt>Next lease expiry</dt>\n <dd>{formatDate(fleet.queue.shared.nextLeaseExpiryAt)}</dd>\n </div>\n <div>\n <dt>Advisory lock</dt>\n <dd>\n {fleet.queue.shared.lock.present\n ? fleet.queue.shared.lock.stale\n ? 'present, stale'\n : 'present, healthy'\n : 'absent'}\n {fleet.queue.shared.lock.recoveryRequired ? (\n <span className={styles.lockWarning}> — recovery required</span>\n ) : null}\n </dd>\n </div>\n </dl>\n {fleet.queue.shared.claimsByMachine.length > 0 ? (\n <div className={styles.tableWrap}>\n <table className={styles.table}>\n <thead>\n <tr>\n <th scope=\"col\">Machine</th>\n <th scope=\"col\">Active</th>\n <th scope=\"col\">Expired</th>\n <th scope=\"col\">Executing</th>\n </tr>\n </thead>\n <tbody>\n {fleet.queue.shared.claimsByMachine.map((m) => (\n <tr key={m.machineId}>\n <td className={styles.mono}>{m.machineId}</td>\n <td className={styles.numeric}>{m.active}</td>\n <td className={styles.numeric}>{m.expired}</td>\n <td className={styles.numeric}>{m.executing ?? '—'}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n ) : null}\n </>\n )}\n </section>\n </>\n )}\n\n <section className={styles.section}>\n <h2 className={styles.sectionTitle}>Recent activity</h2>\n {activityQuery.status === 'loading' ? (\n <SkeletonLine width=\"70%\" />\n ) : activityQuery.status === 'error' || !activityQuery.data ? (\n <p className={styles.error} role=\"alert\">\n {activityQuery.error?.message ?? 'Failed to load fleet activity.'}\n </p>\n ) : (\n <dl className={styles.metaGrid}>\n <div>\n <dt>Cooldown items</dt>\n <dd className={styles.numeric}>{activityQuery.data.cooldownCount}</dd>\n </div>\n <div>\n <dt>Engines ready</dt>\n <dd className={styles.numeric}>\n {activityQuery.data.engineReadiness.filter((e) => e.installed && e.authed === true).length} /{' '}\n {activityQuery.data.engineReadiness.length}\n </dd>\n </div>\n <div>\n <dt>Recent auto-merges</dt>\n <dd className={styles.numeric}>{fleet?.merges.recent ?? '—'}</dd>\n </div>\n </dl>\n )}\n </section>\n\n <Dialog\n open={confirmOpen}\n onClose={() => {\n setConfirmOpen(false);\n setPendingAction(null);\n }}\n titleId=\"fleet-kill-switch-confirm\"\n title={pendingAction === 'resume' ? 'Resume the fleet?' : 'Pause the fleet?'}\n >\n <p className={styles.confirmBody}>\n {pendingAction === 'resume'\n ? 'This clears the global kill switch. Autonomous dispatch will resume across the fleet.'\n : 'This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed.'}\n </p>\n <div className={styles.confirmActions}>\n <button\n type=\"button\"\n className={styles.cancelButton}\n onClick={() => {\n setConfirmOpen(false);\n setPendingAction(null);\n }}\n >\n Cancel\n </button>\n <button type=\"button\" className={styles.confirmButton} onClick={confirmIntent}>\n {pendingAction === 'resume' ? 'Yes, resume' : 'Yes, pause'}\n </button>\n </div>\n </Dialog>\n\n <MutationTokenDialog\n open={tokenOpen}\n onClose={() => setTokenOpen(false)}\n reason={\n pendingAction === 'resume'\n ? 'Resuming the fleet requires the dispatch token.'\n : 'Pausing the fleet requires the dispatch token.'\n }\n />\n </div>\n );\n}\n","/**\n * routes/control/security/SecurityView.tsx — supply-chain / binshield\n * findings by severity (GET /api/control's `.security`, built by\n * `buildSecurity()` in src/core/web/control.ts:528-569, reading the cached\n * backlog only — never a live re-scan).\n *\n * `ControlSecurity.available` is NOT a sourceQuality field (no\n * `{sourceState, complete, reason}` shape) but the same epistemic instinct\n * applies: `available: false` means \"no cached security data was found\" —\n * absent backlog, empty backlog, or no security-source items — and must\n * render distinctly from \"available: true, 0 findings\" (an actually clean\n * scan). Collapsing those two into one \"0 findings\" state would be exactly\n * the kind of guess-dressed-as-fact Epistemic exists to prevent elsewhere.\n *\n * Severity ('critical'|'high'|'medium'|'low') isn't in StatusBadge's\n * STATUS_TONE map (it's a priority scale, not a lifecycle status) — mapped\n * to a tone locally and passed via StatusBadge's existing `tone` override\n * rather than editing the shared statusToTone() mapping other views depend\n * on.\n */\nimport { useMemo, useRef, useState } from 'react';\nimport { controlSnapshotQuery } from '../../../data/queries.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { useScrollRestore } from '../../../hooks/useScrollRestore.js';\nimport { StatusBadge, type Tone } from '../../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport styles from './SecurityView.module.css';\n\nconst SEVERITY_TONE: Record<string, Tone> = {\n critical: 'danger',\n high: 'danger',\n medium: 'warning',\n low: 'neutral',\n};\n\nconst SEVERITY_ORDER: Record<string, number> = { critical: 0, high: 1, medium: 2, low: 3 };\n\nexport function SecurityView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/control/security', containerRef);\n\n const query = useQuery(controlSnapshotQuery);\n const security = query.data?.security;\n\n const [search, setSearch] = useState('');\n const [severityFilter, setSeverityFilter] = useState('all');\n const [repoFilter, setRepoFilter] = useState('all');\n\n const repos = useMemo(\n () => Array.from(new Set((security?.findings ?? []).map((f) => f.repo))).sort(),\n [security],\n );\n\n const filtered = useMemo(() => {\n const findings = security?.findings ?? [];\n return findings\n .filter((f) => (severityFilter === 'all' ? true : f.severity === severityFilter))\n .filter((f) => (repoFilter === 'all' ? true : f.repo === repoFilter))\n .filter((f) => {\n if (!search.trim()) return true;\n const q = search.trim().toLowerCase();\n return f.title.toLowerCase().includes(q) || f.repo.toLowerCase().includes(q);\n })\n .sort((a, b) => (SEVERITY_ORDER[a.severity] ?? 9) - (SEVERITY_ORDER[b.severity] ?? 9));\n }, [security, severityFilter, repoFilter, search]);\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Security</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n </div>\n </header>\n\n {query.status === 'loading' ? (\n <SkeletonLine width=\"60%\" />\n ) : query.status === 'error' || !security ? (\n <p className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Failed to load control snapshot.'}\n </p>\n ) : !security.available ? (\n <p className={styles.unavailable}>\n No cached security data available — the backlog is absent, empty, or has no security-source findings.\n This is not the same as \"clean\": it means binshield hasn't produced cached findings for this fleet yet.\n </p>\n ) : (\n <>\n <div className={styles.counts}>\n <div className={`${styles.countTile} ${styles.critical}`}>\n <span className={styles.countValue}>{security.counts.critical}</span>\n <span className={styles.countLabel}>Critical</span>\n </div>\n <div className={`${styles.countTile} ${styles.high}`}>\n <span className={styles.countValue}>{security.counts.high}</span>\n <span className={styles.countLabel}>High</span>\n </div>\n <div className={`${styles.countTile} ${styles.medium}`}>\n <span className={styles.countValue}>{security.counts.medium}</span>\n <span className={styles.countLabel}>Medium</span>\n </div>\n <div className={`${styles.countTile} ${styles.low}`}>\n <span className={styles.countValue}>{security.counts.low}</span>\n <span className={styles.countLabel}>Low</span>\n </div>\n </div>\n\n <form\n className={styles.filters}\n role=\"search\"\n aria-label=\"Filter findings\"\n onSubmit={(e) => e.preventDefault()}\n >\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Search</span>\n <input\n type=\"text\"\n className={styles.input}\n placeholder=\"title or repo\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Severity</span>\n <select className={styles.select} value={severityFilter} onChange={(e) => setSeverityFilter(e.target.value)}>\n <option value=\"all\">All</option>\n <option value=\"critical\">Critical</option>\n <option value=\"high\">High</option>\n <option value=\"medium\">Medium</option>\n <option value=\"low\">Low</option>\n </select>\n </label>\n <label className={styles.field}>\n <span className={styles.fieldLabel}>Repo</span>\n <select className={styles.select} value={repoFilter} onChange={(e) => setRepoFilter(e.target.value)}>\n <option value=\"all\">All</option>\n {repos.map((r) => (\n <option key={r} value={r}>\n {r}\n </option>\n ))}\n </select>\n </label>\n </form>\n\n {filtered.length === 0 ? (\n <p className={styles.empty}>No findings match the current filters.</p>\n ) : (\n <div className={styles.tableWrap}>\n <table className={styles.table}>\n <thead>\n <tr>\n <th scope=\"col\">Severity</th>\n <th scope=\"col\">Repo</th>\n <th scope=\"col\">Finding</th>\n </tr>\n </thead>\n <tbody>\n {filtered.map((f, i) => (\n <tr key={`${f.repo}-${f.title}-${i}`}>\n <td>\n <StatusBadge status={f.severity} tone={SEVERITY_TONE[f.severity] ?? 'neutral'} />\n </td>\n <td className={styles.mono}>{f.repo}</td>\n <td>{f.title}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n","/**\n * routes/goals/GoalsView.tsx — active goals and milestone progress\n * (GET /api/goals, GET /api/vision/mission).\n *\n * /api/goals (src/core/web/api.ts:1654-1686) is fully read-only and already\n * degrades to `[]` on any failure — no sourceQuality to wrap there. The\n * Mission Outcome Room summary (/api/vision/mission) DOES carry a real\n * epistemic breakdown per source (`sources.briefing/goals/enrollment/\n * proposals`, each `{sourceState, complete, reason?}` — structurally the\n * same shape as SourceQuality even though it's defined locally in\n * queries.ts because the backend handler itself is untyped\n * `Record<string, unknown>`), so that section is wrapped in <Epistemic/>\n * per-source rather than shown as one blended status.\n */\nimport { useRef } from 'react';\nimport { goalsQuery, visionMissionQuery } from '../../data/queries.js';\nimport { useQuery } from '../../data/hooks.js';\nimport { useScrollRestore } from '../../hooks/useScrollRestore.js';\nimport { Epistemic } from '../../components/primitives/Epistemic.js';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../components/primitives/Skeleton.js';\nimport styles from './GoalsView.module.css';\n\nexport function GoalsView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/goals', containerRef);\n\n const goalsResult = useQuery(goalsQuery);\n const missionResult = useQuery(visionMissionQuery);\n\n const goals = goalsResult.data ?? [];\n const mission = missionResult.data;\n\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Goals</h1>\n <div className={styles.freshness} aria-live=\"polite\">\n {goalsResult.status === 'refreshing' || missionResult.status === 'refreshing' ? <RefreshIndicator /> : null}\n <span className={styles.count}>{goals.length} goals</span>\n </div>\n </header>\n\n {missionResult.status === 'loading' ? (\n <SkeletonLine width=\"50%\" />\n ) : missionResult.status === 'success' && mission ? (\n <section className={styles.missionCard}>\n <h2 className={styles.sectionTitle}>Mission state</h2>\n <p className={styles.missionState}>{mission.state}</p>\n <dl className={styles.sourceGrid}>\n <div>\n <dt>Briefing</dt>\n <dd>\n <Epistemic quality={mission.sources.briefing ?? undefined} label=\"briefing source\">\n available\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Goals source</dt>\n <dd>\n <Epistemic quality={mission.sources.goals ?? undefined} label=\"goals source\">\n available\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Enrollment</dt>\n <dd>\n <Epistemic quality={mission.sources.enrollment ?? undefined} label=\"enrollment source\">\n available\n </Epistemic>\n </dd>\n </div>\n <div>\n <dt>Proposals</dt>\n <dd>\n <Epistemic quality={mission.sources.proposals ?? undefined} label=\"proposals source\">\n available\n </Epistemic>\n </dd>\n </div>\n </dl>\n </section>\n ) : null}\n\n {goalsResult.status === 'loading' ? (\n <div className={styles.list}>\n <SkeletonLine width=\"90%\" />\n <SkeletonLine width=\"70%\" />\n </div>\n ) : goalsResult.status === 'error' ? (\n <p className={styles.error} role=\"alert\">\n {goalsResult.error?.message ?? 'Failed to load goals.'}\n </p>\n ) : goals.length === 0 ? (\n <p className={styles.empty}>No active goals.</p>\n ) : (\n <ul className={styles.list}>\n {goals.map((goal) => {\n const pct = Math.round((goal.progress.fractionDone ?? 0) * 100);\n return (\n <li key={goal.id} className={styles.goalCard} data-focus-key={`goal-${goal.id}`} tabIndex={0}>\n <div className={styles.goalHeader}>\n <h3 className={styles.goalObjective}>{goal.objective}</h3>\n <StatusBadge status={goal.status} />\n </div>\n\n <div className={styles.progressRow}>\n <div className={styles.progressTrack}>\n <div className={styles.progressFill} style={{ width: `${pct}%` }} />\n </div>\n <span className={styles.progressLabel}>{pct}%</span>\n </div>\n\n {/*\n progress.nextActionableId is an internal milestone *id*\n (goals/advance.ts nextActionableMilestone(goal)?.id) — the\n /api/goals handler only returns {title,status,order} per\n milestone, with no id, so there is no reliable key to match\n this against a specific list item below. Shown as its own\n line instead of silently (and possibly wrongly) highlighting\n a milestone by title collision.\n */}\n {goal.progress.nextActionableId ? (\n <p className={styles.nextActionable}>\n Next actionable milestone id: <span className={styles.mono}>{goal.progress.nextActionableId}</span>\n </p>\n ) : null}\n\n {goal.milestones.length > 0 ? (\n <ol className={styles.milestoneList}>\n {[...goal.milestones]\n .sort((a, b) => a.order - b.order)\n .map((m) => (\n <li key={m.title} className={styles.milestoneItem}>\n <StatusBadge status={m.status} />\n <span className={styles.milestoneTitle}>{m.title}</span>\n </li>\n ))}\n </ol>\n ) : (\n <p className={styles.noMilestones}>No milestones yet.</p>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n","/**\n * routes/inbox/ConfirmDialog.tsx — explicit confirmation for approve/reject\n * (single or batch). Approve is the single most irreversible action in the\n * product (operator-console brief non-negotiable): it must require explicit\n * confirmation and clearly state what will happen, never fire on a single\n * click. Built on the shared Dialog primitive so it gets the same focus\n * trap / Escape / backdrop-close behavior as MutationTokenDialog and the\n * command palette for free.\n */\nimport { useId, useRef, type ReactNode } from 'react';\nimport { Dialog } from '../../components/primitives/Dialog.js';\nimport styles from './ConfirmDialog.module.css';\n\nexport interface ConfirmDialogProps {\n open: boolean;\n onClose: () => void;\n title: string;\n body: ReactNode;\n confirmLabel: string;\n /** Approve reads as the primary (non-destructive-styled) action even\n * though it's irreversible; reject reads as destructive. */\n destructive?: boolean;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n}\n\nexport function ConfirmDialog({ open, onClose, title, body, confirmLabel, destructive, onConfirm, busy, error }: ConfirmDialogProps) {\n const titleId = useId();\n const confirmRef = useRef<HTMLButtonElement>(null);\n\n return (\n <Dialog open={open} onClose={onClose} titleId={titleId} title={title} initialFocusRef={confirmRef}>\n <div className={styles.body}>{body}</div>\n {error ? (\n <p className={styles.error} role=\"alert\">\n {error}\n </p>\n ) : null}\n <div className={styles.actions}>\n <button type=\"button\" className={styles.cancel} onClick={onClose} disabled={busy}>\n Cancel\n </button>\n <button\n ref={confirmRef}\n type=\"button\"\n className={destructive ? styles.destructive : styles.confirm}\n onClick={onConfirm}\n disabled={busy}\n >\n {busy ? 'Working…' : confirmLabel}\n </button>\n </div>\n </Dialog>\n );\n}\n","/**\n * routes/inbox/ProposalList.tsx — proposal triage list (operator-console\n * brief item 1). Pending by default; real server-side status/since\n * filtering (src/core/web/api.ts's new `?status=&since=&limit=`) makes the\n * 672 rejected/approved/etc. actually browsable for the first time, plus\n * client-side repo/text search over whatever page is loaded. Full keyboard\n * list traversal + open + batch-select (the old UI had 3 key handlers in\n * 7,901 lines; run detail was entirely unreachable by keyboard).\n */\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { Link, useNavigate } from 'react-router-dom';\nimport type { Proposal, ProposalStatus } from '../../data/api-types.js';\nimport { inboxListQuery, type InboxHistoryStatus } from '../../data/queries.js';\nimport { useQuery } from '../../data/hooks.js';\nimport { hasMutationHold } from '../../data/auth-store.js';\nimport { approveProposal, rejectProposal } from '../../data/mutations.js';\nimport { DispatchDisabledError } from '../../data/client.js';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonRow } from '../../components/primitives/Skeleton.js';\nimport { MutationTokenDialog } from '../../components/auth/MutationTokenDialog.js';\nimport { ConfirmDialog } from './ConfirmDialog.js';\nimport styles from './ProposalList.module.css';\n\nconst STATUS_OPTIONS: { value: InboxHistoryStatus; label: string }[] = [\n { value: 'pending', label: 'Pending' },\n { value: 'rejected', label: 'Rejected' },\n { value: 'approved', label: 'Approved' },\n { value: 'applied', label: 'Applied' },\n { value: 'failed', label: 'Failed' },\n { value: 'awaiting-host-merge', label: 'Awaiting host merge' },\n { value: 'all', label: 'All statuses' },\n];\n\nfunction formatAge(iso: string): string {\n const ms = Date.parse(iso);\n if (Number.isNaN(ms)) return '—';\n const seconds = Math.max(0, Math.round((Date.now() - ms) / 1000));\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.round(seconds / 60);\n if (minutes < 60) return `${minutes}m`;\n const hours = Math.round(minutes / 60);\n if (hours < 24) return `${hours}h`;\n return `${Math.round(hours / 24)}d`;\n}\n\ntype BatchAction = 'approve' | 'reject' | null;\n\nexport function ProposalList({ selectedId, onDispatchDisabled }: { selectedId: string | null; onDispatchDisabled: () => void }) {\n const [status, setStatus] = useState<InboxHistoryStatus>('pending');\n const [since, setSince] = useState('');\n const [search, setSearch] = useState('');\n const [repoFilter, setRepoFilter] = useState('');\n const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());\n const [focusedIndex, setFocusedIndex] = useState(0);\n\n const [batchAction, setBatchAction] = useState<BatchAction>(null);\n const [tokenDialogOpen, setTokenDialogOpen] = useState(false);\n const [batchConfirmOpen, setBatchConfirmOpen] = useState(false);\n const [batchBusy, setBatchBusy] = useState(false);\n const [batchError, setBatchError] = useState<string | null>(null);\n\n const searchInputRef = useRef<HTMLInputElement>(null);\n const rowRefs = useRef<Map<string, HTMLTableRowElement>>(new Map());\n const navigate = useNavigate();\n\n const query = useQuery(inboxListQuery({ status, since: since || undefined, limit: 500 }));\n\n const rows: Proposal[] = useMemo(() => {\n const all = query.data?.proposals ?? [];\n const s = search.trim().toLowerCase();\n const r = repoFilter.trim().toLowerCase();\n return all.filter((p) => {\n if (s && !p.title.toLowerCase().includes(s) && !(p.summary ?? '').toLowerCase().includes(s)) return false;\n if (r && !(p.repo ?? '').toLowerCase().includes(r)) return false;\n return true;\n });\n }, [query.data, search, repoFilter]);\n\n useEffect(() => {\n setFocusedIndex((i) => Math.min(i, Math.max(rows.length - 1, 0)));\n }, [rows.length]);\n\n function toggleSelected(id: string, proposalStatus: ProposalStatus) {\n if (proposalStatus !== 'pending') return; // only pending proposals can be approved/rejected\n setSelectedIds((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n }\n\n function onListKeyDown(e: React.KeyboardEvent) {\n if (rows.length === 0) return;\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n const next = Math.min(focusedIndex + 1, rows.length - 1);\n setFocusedIndex(next);\n rowRefs.current.get(rows[next]!.id)?.focus();\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n const next = Math.max(focusedIndex - 1, 0);\n setFocusedIndex(next);\n rowRefs.current.get(rows[next]!.id)?.focus();\n } else if (e.key === 'Enter') {\n const row = rows[focusedIndex];\n if (row) navigate(`/inbox/${encodeURIComponent(row.id)}`);\n } else if (e.key === ' ') {\n const row = rows[focusedIndex];\n if (row) {\n e.preventDefault();\n toggleSelected(row.id, row.status);\n }\n } else if (e.key === '/') {\n e.preventDefault();\n searchInputRef.current?.focus();\n }\n }\n\n function requestBatchAction(action: 'approve' | 'reject') {\n if (selectedIds.size === 0) return;\n setBatchError(null);\n setBatchAction(action);\n if (hasMutationHold()) setBatchConfirmOpen(true);\n else setTokenDialogOpen(true);\n }\n\n function onTokenDialogClose() {\n setTokenDialogOpen(false);\n if (hasMutationHold()) setBatchConfirmOpen(true);\n else setBatchAction(null);\n }\n\n async function confirmBatchAction() {\n if (!batchAction) return;\n setBatchBusy(true);\n setBatchError(null);\n const ids = Array.from(selectedIds);\n const failures: string[] = [];\n for (const id of ids) {\n try {\n if (batchAction === 'approve') await approveProposal(id);\n else await rejectProposal(id);\n } catch (err) {\n if (err instanceof DispatchDisabledError) {\n setBatchBusy(false);\n setBatchConfirmOpen(false);\n setBatchAction(null);\n onDispatchDisabled();\n return;\n }\n failures.push(id);\n }\n }\n setBatchBusy(false);\n if (failures.length > 0) {\n setBatchError(`${failures.length} of ${ids.length} failed (already decided, or a transient error). Selection kept for retry.`);\n setSelectedIds(new Set(failures));\n } else {\n setBatchConfirmOpen(false);\n setBatchAction(null);\n setSelectedIds(new Set());\n }\n }\n\n const selectedPendingCount = selectedIds.size;\n\n return (\n <div className={styles.list}>\n <div className={styles.filters}>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Status</span>\n <select value={status} onChange={(e) => setStatus(e.target.value as InboxHistoryStatus)}>\n {STATUS_OPTIONS.map((o) => (\n <option key={o.value} value={o.value}>\n {o.label}\n </option>\n ))}\n </select>\n </label>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Since</span>\n <input type=\"date\" value={since} onChange={(e) => setSince(e.target.value)} />\n </label>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Repo</span>\n <input type=\"text\" placeholder=\"filter by repo\" value={repoFilter} onChange={(e) => setRepoFilter(e.target.value)} />\n </label>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Search</span>\n <input\n ref={searchInputRef}\n type=\"search\"\n placeholder=\"title or summary — press / to focus\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </label>\n </div>\n\n <div className={styles.summary} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n {query.data ? (\n <span>\n {rows.length} shown of {query.data.total} total\n {query.data.truncated ? ' · narrow filters to see more' : ''}\n </span>\n ) : null}\n </div>\n\n {selectedPendingCount > 0 ? (\n <div className={styles.batchBar}>\n <span>{selectedPendingCount} selected</span>\n <button type=\"button\" onClick={() => setSelectedIds(new Set())}>\n Clear\n </button>\n <button type=\"button\" className={styles.batchReject} onClick={() => requestBatchAction('reject')}>\n Reject {selectedPendingCount}\n </button>\n <button type=\"button\" className={styles.batchApprove} onClick={() => requestBatchAction('approve')}>\n Approve {selectedPendingCount}\n </button>\n </div>\n ) : null}\n\n {query.status === 'loading' ? (\n <div className={styles.skeletons}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : query.status === 'error' ? (\n <div className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Failed to load proposals.'}\n </div>\n ) : rows.length === 0 ? (\n <p className={styles.empty}>\n No {status === 'all' ? '' : status + ' '}proposals match{search || repoFilter ? ' this filter' : ''}.\n </p>\n ) : (\n <table className={styles.table} role=\"grid\" aria-label=\"Proposals\" onKeyDown={onListKeyDown}>\n <thead>\n <tr>\n <th scope=\"col\" className={styles.checkboxCol} />\n <th scope=\"col\">Title</th>\n <th scope=\"col\" className={styles.repoCol}>\n Repo\n </th>\n <th scope=\"col\" className={styles.kindCol}>\n Kind\n </th>\n <th scope=\"col\" className={styles.ageCol}>\n Age\n </th>\n <th scope=\"col\" className={styles.statusCol}>\n Status\n </th>\n <th scope=\"col\" className={styles.whyCol}>\n Why\n </th>\n </tr>\n </thead>\n <tbody>\n {rows.map((p, i) => (\n <tr\n key={p.id}\n ref={(el) => {\n if (el) rowRefs.current.set(p.id, el);\n else rowRefs.current.delete(p.id);\n }}\n data-focus-key={`proposal-${p.id}`}\n tabIndex={i === focusedIndex ? 0 : -1}\n className={`${styles.row} ${p.id === selectedId ? styles.rowActive : ''}`}\n onFocus={() => setFocusedIndex(i)}\n aria-selected={p.id === selectedId}\n >\n <td className={styles.checkboxCol}>\n <input\n type=\"checkbox\"\n checked={selectedIds.has(p.id)}\n disabled={p.status !== 'pending'}\n title={p.status !== 'pending' ? 'Only pending proposals can be approved/rejected' : undefined}\n onChange={() => toggleSelected(p.id, p.status)}\n onClick={(e) => e.stopPropagation()}\n />\n </td>\n <td>\n <Link to={`/inbox/${encodeURIComponent(p.id)}`} className={styles.titleLink} title={p.title}>\n {p.title}\n </Link>\n </td>\n <td className={styles.repoCell} title={p.repo ?? undefined}>\n {p.repo ? p.repo.split('/').pop() : '—'}\n </td>\n <td>{p.kind}</td>\n <td className={styles.age}>{formatAge(p.createdAt)}</td>\n <td>\n <StatusBadge status={p.status} />\n </td>\n <td className={styles.why} title={p.decisionReason ?? undefined}>\n {p.decisionReason ?? '—'}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n\n <MutationTokenDialog\n open={tokenDialogOpen}\n onClose={onTokenDialogClose}\n reason={`${batchAction === 'approve' ? 'Approving' : 'Rejecting'} ${selectedPendingCount} proposals requires the dispatch token.`}\n />\n\n <ConfirmDialog\n open={batchConfirmOpen}\n onClose={() => {\n setBatchConfirmOpen(false);\n setBatchAction(null);\n setBatchError(null);\n }}\n title={batchAction === 'approve' ? `Approve ${selectedPendingCount} proposals?` : `Reject ${selectedPendingCount} proposals?`}\n body={\n batchAction === 'approve' ? (\n <>\n This applies all {selectedPendingCount} selected proposals to their repos now, one at a time. This\n cannot be undone from this dialog.\n </>\n ) : (\n <>This rejects all {selectedPendingCount} selected proposals. They stay visible in history as rejected.</>\n )\n }\n confirmLabel={batchAction === 'approve' ? `Approve ${selectedPendingCount}` : `Reject ${selectedPendingCount}`}\n destructive={batchAction === 'reject'}\n busy={batchBusy}\n error={batchError}\n onConfirm={() => void confirmBatchAction()}\n />\n </div>\n );\n}\n","/**\n * routes/inbox/diff-parser.ts — pure parsing of a unified diff string\n * (Proposal.diff, src/core/types.ts) into a per-file, per-hunk structure the\n * DiffViewer can render with a file tree and syntax highlighting, instead of\n * dumping the raw string into an escaped <pre> block (the old UI's\n * approach — \"not acceptable for a tool meant to be elite\" per the\n * operator-console brief). No dependency: hand-rolled parser over the\n * unified diff format, which is regular enough (`--- `/`+++ `/`@@ `/leading\n * `-`/`+`/` `) that a small line-scan state machine covers it completely.\n *\n * Pure functions only — no React, no DOM — so this is trivially unit\n * testable (see diff-parser.test.ts) independent of rendering.\n */\n\nexport type DiffLineKind = 'context' | 'add' | 'del';\n\nexport interface DiffLine {\n kind: DiffLineKind;\n text: string;\n oldLineNo: number | null;\n newLineNo: number | null;\n}\n\nexport interface DiffHunk {\n header: string;\n oldStart: number;\n oldLines: number;\n newStart: number;\n newLines: number;\n lines: DiffLine[];\n}\n\nexport type FileChangeStatus = 'added' | 'deleted' | 'renamed' | 'modified';\n\nexport interface DiffFile {\n /** Stable key for React lists / file-tree selection. */\n id: string;\n oldPath: string | null;\n newPath: string | null;\n /** The path to show — newPath, falling back to oldPath for deletes. */\n displayPath: string;\n status: FileChangeStatus;\n hunks: DiffHunk[];\n additions: number;\n deletions: number;\n /** Raw text that didn't parse as hunks (e.g. a \"Binary files differ\"\n * notice) — preserved verbatim so nothing is silently dropped. */\n unparsedNotice: string | null;\n}\n\nexport interface ParsedDiff {\n files: DiffFile[];\n /** True when the input didn't look like a unified diff at all (no\n * `--- `/`+++ ` pairs found) — the raw string is returned as one\n * unparsed \"file\" so the viewer can still show *something*. */\n malformed: boolean;\n}\n\nconst FILE_HEADER_RE = /^diff --git a\\/(.+) b\\/(.+)$/;\nconst OLD_PATH_RE = /^--- (?:a\\/(.+)|(\\/dev\\/null))\\s*$/;\nconst NEW_PATH_RE = /^\\+\\+\\+ (?:b\\/(.+)|(\\/dev\\/null))\\s*$/;\nconst HUNK_HEADER_RE = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@(.*)$/;\n\nfunction stripPathPrefix(p: string): string {\n return p.replace(/^[ab]\\//, '');\n}\n\n/** Split raw text into per-file chunks: before each `diff --git` line if\n * any are present, otherwise before each `--- ` line. */\nfunction splitFileChunks(text: string): string[] {\n const lines = text.split('\\n');\n const hasGitHeaders = lines.some((l) => FILE_HEADER_RE.test(l));\n const starts: number[] = [];\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]!;\n if (hasGitHeaders ? FILE_HEADER_RE.test(line) : OLD_PATH_RE.test(line)) starts.push(i);\n }\n if (starts.length === 0) return [];\n const chunks: string[] = [];\n for (let i = 0; i < starts.length; i++) {\n const from = starts[i]!;\n const to = i + 1 < starts.length ? starts[i + 1]! : lines.length;\n chunks.push(lines.slice(from, to).join('\\n'));\n }\n return chunks;\n}\n\nfunction parseFileChunk(chunk: string, index: number): DiffFile {\n const lines = chunk.split('\\n');\n // A trailing '\\n' in the source text produces one trailing empty array\n // element that is never real diff content — every genuine line (context/\n // add/del) carries at least its 1-char marker (' '/'+'/'-'), so an empty\n // string here can only be that artifact. Drop it before parsing so it\n // isn't mistaken for a blank context line inside the last hunk.\n if (lines.length > 0 && lines[lines.length - 1] === '') lines.pop();\n let oldPath: string | null = null;\n let newPath: string | null = null;\n let bodyStart = -1;\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]!;\n const oldMatch = OLD_PATH_RE.exec(line);\n if (oldMatch) {\n oldPath = oldMatch[2] ? null : stripPathPrefix(oldMatch[1]!);\n continue;\n }\n const newMatch = NEW_PATH_RE.exec(line);\n if (newMatch) {\n newPath = newMatch[2] ? null : stripPathPrefix(newMatch[1]!);\n bodyStart = i + 1;\n break;\n }\n const gitHeader = FILE_HEADER_RE.exec(line);\n if (gitHeader && oldPath === null && newPath === null) {\n // Fallback path source used only if the chunk never reaches a proper\n // `+++` line (e.g. a binary-file notice with no hunks at all).\n oldPath = gitHeader[1] ?? null;\n newPath = gitHeader[2] ?? null;\n }\n }\n\n let status: FileChangeStatus = 'modified';\n if (oldPath === null && newPath !== null) status = 'added';\n else if (oldPath !== null && newPath === null) status = 'deleted';\n else if (oldPath !== null && newPath !== null && oldPath !== newPath) status = 'renamed';\n\n const displayPath = newPath ?? oldPath ?? `(unknown file ${index + 1})`;\n\n const hunks: DiffHunk[] = [];\n let additions = 0;\n let deletions = 0;\n let unparsedNotice: string | null = null;\n\n if (bodyStart === -1) {\n // Never found a `+++` line at all — likely a binary-file notice or a\n // chunk this parser doesn't understand. Preserve it verbatim.\n const trimmed = lines.join('\\n').trim();\n return {\n id: `${index}:${displayPath}`,\n oldPath,\n newPath,\n displayPath,\n status,\n hunks: [],\n additions: 0,\n deletions: 0,\n unparsedNotice: trimmed || null,\n };\n }\n\n let i = bodyStart;\n while (i < lines.length) {\n const header = HUNK_HEADER_RE.exec(lines[i]!);\n if (!header) {\n // Stray text between the file header and the first hunk (rare) —\n // fold into the notice rather than lose it.\n if (lines[i]!.trim()) {\n unparsedNotice = ((unparsedNotice ? unparsedNotice + '\\n' : '') + lines[i]).trim();\n }\n i++;\n continue;\n }\n const oldStart = Number(header[1]);\n const oldLines = header[2] !== undefined ? Number(header[2]) : 1;\n const newStart = Number(header[3]);\n const newLines = header[4] !== undefined ? Number(header[4]) : 1;\n const hunk: DiffHunk = { header: lines[i]!, oldStart, oldLines, newStart, newLines, lines: [] };\n i++;\n let oldNo = oldStart;\n let newNo = newStart;\n while (i < lines.length && !HUNK_HEADER_RE.test(lines[i]!)) {\n const raw = lines[i]!;\n if (raw.startsWith('\\\\')) {\n i++;\n continue; // \"\\"\n }\n const marker = raw[0];\n const text = raw.slice(1);\n if (marker === '+') {\n hunk.lines.push({ kind: 'add', text, oldLineNo: null, newLineNo: newNo });\n newNo++;\n additions++;\n } else if (marker === '-') {\n hunk.lines.push({ kind: 'del', text, oldLineNo: oldNo, newLineNo: null });\n oldNo++;\n deletions++;\n } else {\n // Context line (leading space), or an empty line inside a hunk.\n hunk.lines.push({ kind: 'context', text: marker === ' ' ? text : raw, oldLineNo: oldNo, newLineNo: newNo });\n oldNo++;\n newNo++;\n }\n i++;\n }\n hunks.push(hunk);\n }\n\n return { id: `${index}:${displayPath}`, oldPath, newPath, displayPath, status, hunks, additions, deletions, unparsedNotice };\n}\n\nexport function parseUnifiedDiff(raw: string | undefined | null): ParsedDiff {\n const text = raw ?? '';\n if (!text.trim()) return { files: [], malformed: false };\n const chunks = splitFileChunks(text);\n if (chunks.length === 0) {\n return {\n malformed: true,\n files: [\n {\n id: 'raw',\n oldPath: null,\n newPath: null,\n displayPath: '(unparsed diff)',\n status: 'modified',\n hunks: [],\n additions: 0,\n deletions: 0,\n unparsedNotice: text,\n },\n ],\n };\n }\n return { files: chunks.map((c, idx) => parseFileChunk(c, idx)), malformed: false };\n}\n\nexport interface SplitRow {\n left: DiffLine | null;\n right: DiffLine | null;\n}\n\n/** Zip a hunk's lines into side-by-side rows for the split view: a run of\n * consecutive deletions is paired with the following run of consecutive\n * additions (the usual shape of a changed block), padding the shorter side\n * with a blank cell. Pure context lines occupy both sides identically. */\nexport function toSplitRows(lines: DiffLine[]): SplitRow[] {\n const rows: SplitRow[] = [];\n let i = 0;\n while (i < lines.length) {\n const line = lines[i]!;\n if (line.kind === 'context') {\n rows.push({ left: line, right: line });\n i++;\n continue;\n }\n const dels: DiffLine[] = [];\n while (i < lines.length && lines[i]!.kind === 'del') {\n dels.push(lines[i]!);\n i++;\n }\n const adds: DiffLine[] = [];\n while (i < lines.length && lines[i]!.kind === 'add') {\n adds.push(lines[i]!);\n i++;\n }\n const n = Math.max(dels.length, adds.length);\n for (let j = 0; j < n; j++) rows.push({ left: dels[j] ?? null, right: adds[j] ?? null });\n }\n return rows;\n}\n","/**\n * routes/inbox/highlight.ts — minimal, dependency-free syntax highlighting\n * for the diff viewer. Per the operator-console brief: \"do NOT pull in a\n * heavy dependency without checking what's already available — hand-rolled\n * highlighting for common languages is acceptable and preferable to a large\n * runtime dep.\" This is a single-pass tokenizer per *line* (the diff viewer\n * already renders line-by-line) — cross-line state like multi-line block\n * comments is intentionally not tracked, so an occasional line inside a\n * block comment may be mis-colored. That's a fine trade for zero\n * dependencies and O(n) rendering with no dependency on the file's context\n * outside the visible hunk.\n */\n\nexport type TokenKind = 'plain' | 'comment' | 'string' | 'number' | 'keyword';\n\nexport interface Token {\n kind: TokenKind;\n text: string;\n}\n\nexport type LangFamily = 'c-like' | 'python' | 'shell' | 'css' | 'json' | 'yaml' | 'plain';\n\nconst EXT_TO_FAMILY: Record<string, LangFamily> = {\n ts: 'c-like', tsx: 'c-like', js: 'c-like', jsx: 'c-like', mjs: 'c-like', cjs: 'c-like', mts: 'c-like', cts: 'c-like',\n java: 'c-like', go: 'c-like', rs: 'c-like', c: 'c-like', h: 'c-like', cpp: 'c-like', hpp: 'c-like', cc: 'c-like',\n swift: 'c-like', kt: 'c-like', kts: 'c-like',\n py: 'python', pyi: 'python',\n sh: 'shell', bash: 'shell', zsh: 'shell',\n css: 'css', scss: 'css', less: 'css',\n json: 'json', jsonc: 'json',\n yml: 'yaml', yaml: 'yaml',\n};\n\nexport function languageForPath(path: string | null | undefined): LangFamily {\n if (!path) return 'plain';\n const ext = path.split('.').pop()?.toLowerCase() ?? '';\n return EXT_TO_FAMILY[ext] ?? 'plain';\n}\n\nconst KEYWORDS: Record<LangFamily, Set<string>> = {\n 'c-like': new Set([\n 'const', 'let', 'var', 'function', 'return', 'if', 'else', 'for', 'while', 'do', 'switch', 'case',\n 'break', 'continue', 'class', 'extends', 'implements', 'interface', 'type', 'enum', 'export', 'import',\n 'from', 'default', 'new', 'this', 'super', 'try', 'catch', 'finally', 'throw', 'async', 'await',\n 'yield', 'static', 'public', 'private', 'protected', 'readonly', 'abstract', 'null', 'undefined',\n 'true', 'false', 'void', 'typeof', 'instanceof', 'in', 'of', 'as', 'is', 'never', 'unknown', 'any',\n 'package', 'struct', 'fn', 'impl', 'mod', 'pub', 'use', 'trait', 'match', 'func', 'defer', 'chan',\n ]),\n python: new Set([\n 'def', 'class', 'return', 'if', 'elif', 'else', 'for', 'while', 'break', 'continue', 'import', 'from',\n 'as', 'with', 'try', 'except', 'finally', 'raise', 'pass', 'lambda', 'yield', 'async', 'await', 'None',\n 'True', 'False', 'and', 'or', 'not', 'in', 'is', 'global', 'nonlocal', 'self',\n ]),\n shell: new Set([\n 'if', 'then', 'else', 'elif', 'fi', 'for', 'while', 'do', 'done', 'case', 'esac', 'function', 'return',\n 'export', 'local', 'echo', 'set', 'in', 'break', 'continue',\n ]),\n css: new Set(),\n json: new Set(),\n yaml: new Set(),\n plain: new Set(),\n};\n\n// One combined rule regex per family, using named groups so a single\n// generic scan loop works for every family regardless of which groups it\n// defines. First match wins scanning left-to-right; the gaps between\n// matches become plain-text tokens verbatim.\nconst RULES: Partial<Record<LangFamily, RegExp>> = {\n 'c-like':\n /(?<comment>\\/\\/.*$|\\/\\*.*?\\*\\/)|(?<string>\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|`(?:[^`\\\\]|\\\\.)*`)|(?<number>\\b\\d+(?:\\.\\d+)?\\b)|(?<word>[A-Za-z_$][A-Za-z0-9_$]*)/g,\n python:\n /(?<comment>#.*$)|(?<string>\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')|(?<number>\\b\\d+(?:\\.\\d+)?\\b)|(?<word>[A-Za-z_][A-Za-z0-9_]*)/g,\n shell: /(?<comment>#.*$)|(?<string>\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')|(?<word>[A-Za-z_][A-Za-z0-9_]*)/g,\n css: /(?<comment>\\/\\*.*?\\*\\/)|(?<string>\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')|(?<number>\\b\\d+(?:\\.\\d+)?\\b)|(?<word>[A-Za-z_-][A-Za-z0-9_-]*)/g,\n json: /(?<string>\"(?:[^\"\\\\]|\\\\.)*\")|(?<number>-?\\b\\d+(?:\\.\\d+)?\\b)|(?<word>\\btrue\\b|\\bfalse\\b|\\bnull\\b)/g,\n yaml: /(?<comment>#.*$)|(?<string>\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*')/g,\n};\n\nexport function tokenizeLine(text: string, family: LangFamily): Token[] {\n const rule = RULES[family];\n if (!rule) return [{ kind: 'plain', text }];\n const keywords = KEYWORDS[family];\n const tokens: Token[] = [];\n let last = 0;\n rule.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = rule.exec(text))) {\n if (match.index > last) tokens.push({ kind: 'plain', text: text.slice(last, match.index) });\n const g = match.groups ?? {};\n if (g.comment !== undefined) {\n tokens.push({ kind: 'comment', text: match[0] });\n } else if (g.string !== undefined) {\n tokens.push({ kind: 'string', text: match[0] });\n } else if (g.number !== undefined) {\n tokens.push({ kind: 'number', text: match[0] });\n } else if (g.word !== undefined) {\n const isKeyword = family === 'json' || keywords.has(g.word);\n tokens.push({ kind: isKeyword ? 'keyword' : 'plain', text: match[0] });\n } else {\n tokens.push({ kind: 'plain', text: match[0] });\n }\n last = match.index + match[0].length;\n if (match[0].length === 0) rule.lastIndex++; // guard against zero-width matches\n }\n if (last < text.length) tokens.push({ kind: 'plain', text: text.slice(last) });\n return tokens;\n}\n","/**\n * routes/inbox/DiffViewer.tsx — the core review interaction (operator-\n * console brief item 2). A multi-file unified diff gets a file tree plus a\n * syntax-highlighted, split/unified-toggleable hunk view instead of one\n * escaped <pre> block (the old UI's approach). No diff/highlighting\n * dependency: diff-parser.ts and highlight.ts are both hand-rolled per the\n * foundation's \"keep new runtime deps minimal\" constraint — checked\n * package.json first; nothing suitable was already a dependency.\n */\nimport { useEffect, useMemo, useState, type ReactNode } from 'react';\nimport { parseUnifiedDiff, toSplitRows, type DiffHunk } from './diff-parser.js';\nimport { languageForPath, tokenizeLine, type LangFamily } from './highlight.js';\nimport styles from './DiffViewer.module.css';\n\ntype ViewMode = 'unified' | 'split';\n\nexport function DiffViewer({ diff, proposalKind }: { diff: string | undefined; proposalKind: string }) {\n const parsed = useMemo(() => parseUnifiedDiff(diff), [diff]);\n const [selectedId, setSelectedId] = useState<string | null>(parsed.files[0]?.id ?? null);\n const [mode, setMode] = useState<ViewMode>('unified');\n\n // Diff identity changed (a different proposal is now shown) — reset the\n // selected file rather than holding on to a stale id from the last one.\n useEffect(() => {\n setSelectedId(parsed.files[0]?.id ?? null);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- reset on diff content change only\n }, [diff]);\n\n if (parsed.files.length === 0) {\n return (\n <div className={styles.empty}>No diff attached to this proposal (kind: {proposalKind}).</div>\n );\n }\n\n const selected = parsed.files.find((f) => f.id === selectedId) ?? parsed.files[0]!;\n\n function onTreeKeyDown(e: React.KeyboardEvent) {\n const idx = parsed.files.findIndex((f) => f.id === selected.id);\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setSelectedId(parsed.files[Math.min(idx + 1, parsed.files.length - 1)]!.id);\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n setSelectedId(parsed.files[Math.max(idx - 1, 0)]!.id);\n }\n }\n\n return (\n <div className={styles.viewer}>\n {parsed.malformed ? (\n <p className={styles.malformedNotice}>Could not parse this as a unified diff — showing raw content.</p>\n ) : null}\n <div className={styles.tree} role=\"tree\" aria-label=\"Changed files\" onKeyDown={onTreeKeyDown}>\n {parsed.files.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n role=\"treeitem\"\n aria-selected={f.id === selected.id}\n tabIndex={f.id === selected.id ? 0 : -1}\n className={`${styles.treeItem} ${f.id === selected.id ? styles.treeItemActive : ''}`}\n onClick={() => setSelectedId(f.id)}\n >\n <span className={`${styles.statusDot} ${styles[`status_${f.status}`]}`} aria-hidden=\"true\" />\n <span className={styles.treePath} title={f.displayPath}>\n {f.displayPath}\n </span>\n <span className={styles.treeStats}>\n {f.additions > 0 ? <span className={styles.add}>+{f.additions}</span> : null}\n {f.deletions > 0 ? <span className={styles.del}>-{f.deletions}</span> : null}\n </span>\n </button>\n ))}\n </div>\n\n <div className={styles.body}>\n <div className={styles.fileHeader}>\n <span className={styles.filePath}>{selected.displayPath}</span>\n <div className={styles.modeToggle} role=\"group\" aria-label=\"Diff view mode\">\n <button\n type=\"button\"\n aria-pressed={mode === 'unified'}\n className={mode === 'unified' ? styles.modeActive : ''}\n onClick={() => setMode('unified')}\n >\n Unified\n </button>\n <button\n type=\"button\"\n aria-pressed={mode === 'split'}\n className={mode === 'split' ? styles.modeActive : ''}\n onClick={() => setMode('split')}\n >\n Split\n </button>\n </div>\n </div>\n {selected.unparsedNotice ? <pre className={styles.notice}>{selected.unparsedNotice}</pre> : null}\n {selected.hunks.length === 0 && !selected.unparsedNotice ? (\n <p className={styles.emptyFile}>No line-level changes captured for this file.</p>\n ) : (\n selected.hunks.map((hunk, i) => <Hunk key={i} hunk={hunk} mode={mode} path={selected.displayPath} />)\n )}\n </div>\n </div>\n );\n}\n\nfunction Hunk({ hunk, mode, path }: { hunk: DiffHunk; mode: ViewMode; path: string }) {\n const lang = languageForPath(path);\n if (mode === 'split') {\n const rows = toSplitRows(hunk.lines);\n return (\n <table className={`${styles.hunkTable} ${styles.hunkTableSplit}`}>\n <caption className={styles.hunkCaption}>{hunk.header}</caption>\n <tbody>\n {rows.map((row, i) => (\n <tr key={i}>\n <td className={styles.lineNo}>{row.left?.oldLineNo ?? ''}</td>\n <td className={`${styles.lineText} ${row.left ? styles[`row_${row.left.kind}`] : styles.rowBlank}`}>\n {row.left ? <CodeLine text={row.left.text} lang={lang} /> : null}\n </td>\n <td className={styles.lineNo}>{row.right?.newLineNo ?? ''}</td>\n <td className={`${styles.lineText} ${row.right ? styles[`row_${row.right.kind}`] : styles.rowBlank}`}>\n {row.right ? <CodeLine text={row.right.text} lang={lang} /> : null}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n return (\n <table className={styles.hunkTable}>\n <caption className={styles.hunkCaption}>{hunk.header}</caption>\n <tbody>\n {hunk.lines.map((line, i) => (\n <tr key={i} className={styles[`row_${line.kind}`]}>\n <td className={styles.lineNo}>{line.oldLineNo ?? ''}</td>\n <td className={styles.lineNo}>{line.newLineNo ?? ''}</td>\n <td className={styles.lineMarker} aria-hidden=\"true\">\n {line.kind === 'add' ? '+' : line.kind === 'del' ? '-' : ''}\n </td>\n <td className={styles.lineText}>\n <CodeLine text={line.text} lang={lang} />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n\nfunction CodeLine({ text, lang }: { text: string; lang: LangFamily }): ReactNode {\n const tokens = tokenizeLine(text, lang);\n return (\n <code className={styles.code}>\n {tokens.map((t, i) => (\n <span key={i} className={styles[`tok_${t.kind}`]}>\n {t.text}\n </span>\n ))}\n </code>\n );\n}\n","/**\n * routes/inbox/ProposalDetail.tsx — evidence + diff review + approve/reject\n * for one proposal (operator-console brief items 2-4). Every judge-verdict\n * field is wrapped in <Epistemic/> keyed off decisionEvidence.sourceQuality\n * (src/core/web/api.ts's decisions-ledger join) — when the ledger read is\n * degraded or no decision row matches this proposal, this renders \"unknown\"\n * and withholds nothing it would have to guess, rather than presenting an\n * absent judgeReasonCode as \"never judged\". A judge-parse-failure/\n * judge-network-failure reason code is an infra failure, NOT a considered\n * judgment, and is rendered with its own distinct label/tone — never folded\n * into a genuine judge-review (see JUDGE_REASON_DISPLAY below).\n */\nimport { useState } from 'react';\nimport type { DecisionEntry, JudgeDecisionReasonCode } from '../../data/api-types.js';\nimport { proposalDetailQuery } from '../../data/queries.js';\nimport { useQuery } from '../../data/hooks.js';\nimport { hasMutationHold } from '../../data/auth-store.js';\nimport { approveProposal, rejectProposal } from '../../data/mutations.js';\nimport { DispatchDisabledError } from '../../data/client.js';\nimport { Epistemic } from '../../components/primitives/Epistemic.js';\nimport { StatusBadge, type Tone } from '../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../components/primitives/Skeleton.js';\nimport { MutationTokenDialog } from '../../components/auth/MutationTokenDialog.js';\nimport { ConfirmDialog } from './ConfirmDialog.js';\nimport { DiffViewer } from './DiffViewer.js';\nimport styles from './ProposalDetail.module.css';\n\nconst JUDGE_REASON_DISPLAY: Record<JudgeDecisionReasonCode, { label: string; tone: Tone }> = {\n 'judge-ship-would-merge': { label: 'Ship (would merge)', tone: 'success' },\n 'judge-ship-review-required': { label: 'Ship (review required)', tone: 'success' },\n 'judge-review': { label: 'Review', tone: 'warning' },\n 'judge-noise': { label: 'Noise', tone: 'neutral' },\n 'judge-harmful': { label: 'Harmful', tone: 'danger' },\n 'judge-verdict-unrecognized': { label: 'Unrecognized verdict', tone: 'unknown' },\n // Infra failures, not a considered judgment — the exact conflation bug\n // the backend just fixed. `tone: 'unknown'` (violet) deliberately, not\n // 'danger' or 'warning' — those would read as a real verdict.\n 'judge-parse-failure': { label: 'Judge parse failure — not a review', tone: 'unknown' },\n 'judge-network-failure': { label: 'Judge network failure — not a review', tone: 'unknown' },\n};\n\nfunction latestJudged(decisions: DecisionEntry[]): DecisionEntry | null {\n const judged = decisions.filter((d) => d.action === 'judged' && d.judgeReasonCode);\n if (judged.length === 0) return null;\n return judged.reduce((a, b) => (Date.parse(b.ts) > Date.parse(a.ts) ? b : a));\n}\n\nfunction formatRelative(iso: string | undefined): string {\n if (!iso) return '—';\n const ms = Date.parse(iso);\n if (Number.isNaN(ms)) return '—';\n const seconds = Math.max(0, Math.round((Date.now() - ms) / 1000));\n if (seconds < 60) return `${seconds}s ago`;\n const minutes = Math.round(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.round(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.round(hours / 24);\n return `${days}d ago`;\n}\n\ntype PendingAction = 'approve' | 'reject' | null;\n\nexport function ProposalDetail({ id, onDispatchDisabled }: { id: string; onDispatchDisabled: () => void }) {\n const query = useQuery(proposalDetailQuery(id));\n const [pendingAction, setPendingAction] = useState<PendingAction>(null);\n const [tokenDialogOpen, setTokenDialogOpen] = useState(false);\n const [confirmOpen, setConfirmOpen] = useState(false);\n const [busy, setBusy] = useState(false);\n const [actionError, setActionError] = useState<string | null>(null);\n\n function requestAction(action: 'approve' | 'reject') {\n setActionError(null);\n setPendingAction(action);\n if (hasMutationHold()) {\n setConfirmOpen(true);\n } else {\n setTokenDialogOpen(true);\n }\n }\n\n function onTokenDialogClose() {\n setTokenDialogOpen(false);\n // Live read, not the hook snapshot — MutationTokenDialog's onClose can\n // fire synchronously before this component re-renders, so a snapshot\n // captured at last render would still read stale here.\n if (hasMutationHold()) {\n setConfirmOpen(true);\n } else {\n setPendingAction(null); // dialog was cancelled/dismissed, not unlocked\n }\n }\n\n async function confirmPendingAction() {\n if (!pendingAction) return;\n setBusy(true);\n setActionError(null);\n try {\n if (pendingAction === 'approve') await approveProposal(id);\n else await rejectProposal(id);\n setConfirmOpen(false);\n setPendingAction(null);\n } catch (err) {\n if (err instanceof DispatchDisabledError) {\n setConfirmOpen(false);\n setPendingAction(null);\n onDispatchDisabled();\n } else {\n setActionError(err instanceof Error ? err.message : 'Action failed. Try again.');\n }\n } finally {\n setBusy(false);\n }\n }\n\n if (query.status === 'loading') {\n return (\n <div className={styles.panel}>\n <SkeletonLine width=\"60%\" />\n <SkeletonLine width=\"30%\" />\n <SkeletonLine width=\"90%\" />\n </div>\n );\n }\n\n if (query.status === 'error' || !query.data) {\n return (\n <div className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Failed to load this proposal.'}\n </div>\n );\n }\n\n const p = query.data;\n const evidence = p.decisionEvidence;\n const judged = latestJudged(evidence.decisions);\n const judgeDisplay = judged?.judgeReasonCode ? JUDGE_REASON_DISPLAY[judged.judgeReasonCode] : null;\n const canDecide = p.status === 'pending';\n\n return (\n <div className={styles.panel}>\n <header className={styles.header}>\n <div className={styles.titleRow}>\n <h2 className={styles.title}>{p.title}</h2>\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n </div>\n <div className={styles.metaRow}>\n <StatusBadge status={p.status} />\n <span className={styles.metaItem}>{p.kind}</span>\n <span className={styles.metaItem} title={p.repo ?? undefined}>\n {p.repo ?? 'no repo'}\n </span>\n <span className={styles.metaItem}>created {formatRelative(p.createdAt)}</span>\n {p.decidedAt ? <span className={styles.metaItem}>decided {formatRelative(p.decidedAt)}</span> : null}\n {p.riskClass ? <span className={`${styles.riskBadge} ${styles[`risk_${p.riskClass}`]}`}>{p.riskClass} risk</span> : null}\n </div>\n {p.summary ? <p className={styles.summary}>{p.summary}</p> : null}\n </header>\n\n <section className={styles.evidence} aria-label=\"Evidence\">\n <div className={styles.evidenceRow}>\n <span className={styles.evidenceLabel}>Judge verdict</span>\n <Epistemic quality={evidence.sourceQuality} label=\"judge verdict\">\n {judgeDisplay ? (\n <StatusBadge status={judged!.judgeReasonCode!} tone={judgeDisplay.tone}>\n {judgeDisplay.label}\n </StatusBadge>\n ) : (\n <span className={styles.muted}>not yet judged</span>\n )}\n </Epistemic>\n </div>\n {judged?.judgeRationaleState ? (\n <p className={styles.rationaleNote}>\n Model rationale:{' '}\n {judged.judgeRationaleState === 'not-persisted' ? 'not persisted' : 'legacy (redacted)'}\n </p>\n ) : null}\n\n {p.decisionReason ? (\n <div className={styles.evidenceRow}>\n <span className={styles.evidenceLabel}>Decision reason</span>\n <span>{p.decisionReason}</span>\n </div>\n ) : null}\n\n {p.verifyResult ? (\n <div className={styles.evidenceRow}>\n <span className={styles.evidenceLabel}>Verification</span>\n <div>\n <StatusBadge status={p.verifyResult.passed ? 'success' : 'failed'}>\n {p.verifyResult.passed ? 'passed' : 'failed'}\n </StatusBadge>\n {p.verifyResult.ran && p.verifyResult.ran.length > 0 ? (\n <span className={styles.muted}> · ran {p.verifyResult.ran.map((r) => r.kind).join(', ')}</span>\n ) : null}\n {p.verifyResult.failed && p.verifyResult.failed.length > 0 ? (\n <p className={styles.failedChecks}>Failed: {p.verifyResult.failed.join(', ')}</p>\n ) : null}\n </div>\n </div>\n ) : null}\n\n {p.evidenceOutcome ? (\n <div className={styles.evidenceRow}>\n <span className={styles.evidenceLabel}>Gates</span>\n <span className={styles.muted}>\n {p.evidenceOutcome.gateCount ?? 0} gate{p.evidenceOutcome.gateCount === 1 ? '' : 's'}\n {p.evidenceOutcome.policyAction ? ` · policy: ${p.evidenceOutcome.policyAction}` : ''}\n {p.evidenceOutcome.trustBasis ? ` · trust: ${p.evidenceOutcome.trustBasis}` : ''}\n </span>\n </div>\n ) : null}\n\n {p.result ? (\n <div className={styles.evidenceRow}>\n <span className={styles.evidenceLabel}>Result</span>\n <span>{p.result}</span>\n </div>\n ) : null}\n </section>\n\n <section className={styles.diffSection} aria-label=\"Diff\">\n <DiffViewer diff={p.diff} proposalKind={p.kind} />\n </section>\n\n {canDecide ? (\n <footer className={styles.actions}>\n {actionError && !confirmOpen ? (\n <p className={styles.actionError} role=\"alert\">\n {actionError}\n </p>\n ) : null}\n <button type=\"button\" className={styles.rejectButton} onClick={() => requestAction('reject')}>\n Reject\n </button>\n <button type=\"button\" className={styles.approveButton} onClick={() => requestAction('approve')}>\n Approve\n </button>\n </footer>\n ) : (\n <footer className={styles.decided}>\n This proposal is already <strong>{p.status}</strong> — no further action available.\n </footer>\n )}\n\n <MutationTokenDialog\n open={tokenDialogOpen}\n onClose={onTokenDialogClose}\n reason={\n pendingAction === 'approve'\n ? 'Approving a proposal mutates the fleet and requires the dispatch token.'\n : 'Rejecting a proposal requires the dispatch token.'\n }\n />\n\n <ConfirmDialog\n open={confirmOpen}\n onClose={() => {\n setConfirmOpen(false);\n setPendingAction(null);\n setActionError(null);\n }}\n title={pendingAction === 'approve' ? 'Approve this proposal?' : 'Reject this proposal?'}\n body={\n pendingAction === 'approve' ? (\n <>\n This applies <strong>{p.title}</strong> to <code>{p.repo}</code> now — it writes the diff to disk and\n cannot be undone from this dialog. Review the diff above before confirming.\n </>\n ) : (\n <>\n This rejects <strong>{p.title}</strong> and discards it. It stays visible in history (status:\n rejected) but will never be applied.\n </>\n )\n }\n confirmLabel={pendingAction === 'approve' ? 'Approve and apply' : 'Reject'}\n destructive={pendingAction === 'reject'}\n busy={busy}\n error={actionError}\n onConfirm={() => void confirmPendingAction()}\n />\n </div>\n );\n}\n","/**\n * routes/inbox/InboxView.tsx — proposal review: the human-in-the-loop\n * moment (operator-console brief). Mounted at both `/inbox` (list only) and\n * `/inbox/:id` (list + detail, deep-linkable) so a specific proposal is\n * bookmarkable/shareable, matching the param-route pattern established by\n * `/work/runs/:id` (app/routes.tsx).\n */\nimport { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { ProposalList } from './ProposalList.js';\nimport { ProposalDetail } from './ProposalDetail.js';\nimport styles from './InboxView.module.css';\n\nexport function InboxView() {\n const { id } = useParams<{ id?: string }>();\n const [dispatchDisabled, setDispatchDisabled] = useState(false);\n\n return (\n <div className={styles.view}>\n <header className={styles.header}>\n <h1 className={styles.title}>Inbox</h1>\n <p className={styles.subtitle}>Review proposals, inspect diffs and judge evidence, approve or reject.</p>\n </header>\n\n {dispatchDisabled ? (\n <div className={styles.dispatchBanner} role=\"alert\">\n This server was started without <code>--allow-dispatch</code>, so approve/reject are read-only right now.\n Restart <code>ashlr serve --allow-dispatch</code> to enable them. Browsing and diff review still work.\n </div>\n ) : null}\n\n <div className={styles.layout}>\n <div className={styles.listPane}>\n <ProposalList selectedId={id ?? null} onDispatchDisabled={() => setDispatchDisabled(true)} />\n </div>\n <div className={styles.detailPane}>\n {id ? (\n <ProposalDetail id={id} onDispatchDisabled={() => setDispatchDisabled(true)} />\n ) : (\n <div className={styles.emptyDetail}>\n <p>Select a proposal to review its diff and evidence.</p>\n <p className={styles.hint}>↑/↓ to move · Enter to open · Space to select · / to search</p>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n","/**\n * app/routes.tsx — the route table. Driven by NAV_GROUPS\n * (app/nav-config.ts) so every nav leaf resolves to *something* real:\n * FleetDashboardView for the one implemented leaf, PlaceholderView for\n * everything else. Two illustrative param routes (/work/runs/:id,\n * /work/swarms/:id) exist to prove deep-linking with a resource id works\n * end-to-end even before those views are built — that's the pattern a view\n * agent follows: add the real component, delete the placeholder route.\n *\n * ROUTING STRATEGY — hash-based (react-router-dom's HashRouter), on\n * purpose: src/core/web/static.ts (which this foundation must not modify)\n * only special-cases the literal \"/\" to resolve to index.html; every other\n * path is resolved as a literal file and 404s if it doesn't exist. A\n * pushState router would 404 on refresh or on a pasted deep link for any\n * route but \"/\". Hash routing sidesteps this entirely — the hash never\n * reaches the server — while still giving real hierarchical, bookmarkable,\n * shareable URLs (`#/work/runs/r_123`), which is what the foundation brief\n * actually asked for (\"real client-side routing with deep links, not just\n * hash-to-view\"). See DESIGN.md \"Routing\" for the full rationale and what\n * changes here once the legacy app is retired and server.ts gains a real\n * SPA catch-all.\n */\nimport { Navigate, Route, Routes } from 'react-router-dom';\nimport { Shell } from '../components/layout/Shell.js';\nimport { PlaceholderView } from '../routes/PlaceholderView.js';\nimport { FleetDashboardView } from '../routes/fleet-dashboard/FleetDashboardView.js';\nimport { JournalView } from '../routes/journal/JournalView.js';\nimport { PulseView } from '../routes/intelligence/pulse/PulseView.js';\nimport { GenomeView } from '../routes/intelligence/genome/GenomeView.js';\nimport { ProductionView } from '../routes/intelligence/production/ProductionView.js';\nimport { PortfolioView } from '../routes/portfolio/PortfolioView.js';\nimport { RunsView } from '../routes/work/runs/RunsView.js';\nimport { RunDetailView } from '../routes/work/runs/RunDetailView.js';\nimport { SwarmsView } from '../routes/work/swarms/SwarmsView.js';\nimport { SwarmDetailView } from '../routes/work/swarms/SwarmDetailView.js';\nimport { DaemonView } from '../routes/control/daemon/DaemonView.js';\nimport { FleetView } from '../routes/control/fleet/FleetView.js';\nimport { SecurityView } from '../routes/control/security/SecurityView.js';\nimport { GoalsView } from '../routes/goals/GoalsView.js';\nimport { InboxView } from '../routes/inbox/InboxView.js';\nimport { NAV_GROUPS, ALL_NAV_LEAVES } from './nav-config.js';\n\nexport function AppRoutes() {\n return (\n <Routes>\n <Route element={<Shell />}>\n <Route index element={<Navigate to=\"/overview\" replace />} />\n {ALL_NAV_LEAVES.map((leaf) =>\n leaf.implemented ? null : (\n <Route\n key={leaf.path}\n path={leaf.path}\n element={<PlaceholderView title={leaf.label} description={leaf.description} />}\n />\n ),\n )}\n <Route path=\"/overview\" element={<FleetDashboardView />} />\n <Route path=\"/journal\" element={<JournalView />} />\n <Route path=\"/intelligence/pulse\" element={<PulseView />} />\n <Route path=\"/intelligence/genome\" element={<GenomeView />} />\n <Route path=\"/intelligence/production\" element={<ProductionView />} />\n <Route path=\"/portfolio\" element={<PortfolioView />} />\n <Route path=\"/work/runs\" element={<RunsView />} />\n <Route path=\"/work/runs/:id\" element={<RunDetailView />} />\n <Route path=\"/work/swarms\" element={<SwarmsView />} />\n <Route path=\"/work/swarms/:id\" element={<SwarmDetailView />} />\n <Route path=\"/control/daemon\" element={<DaemonView />} />\n <Route path=\"/control/fleet\" element={<FleetView />} />\n <Route path=\"/control/security\" element={<SecurityView />} />\n <Route path=\"/goals\" element={<GoalsView />} />\n <Route path=\"/inbox\" element={<InboxView />} />\n <Route path=\"/inbox/:id\" element={<InboxView />} />\n <Route path=\"*\" element={<Navigate to=\"/overview\" replace />} />\n </Route>\n </Routes>\n );\n}\n\n// Referenced by tests / DESIGN.md to assert every group's leaves round-trip\n// through this route table without a manual re-listing.\nexport { NAV_GROUPS };\n","/**\n * app/SkipToContent.tsx — a real skip link, deliberately NOT `<a\n * href=\"#main-content\">`: this app uses HashRouter, so a literal `#`\n * anchor would rewrite location.hash and hijack client-side routing\n * instead of just scrolling. A button that imperatively focuses the\n * `#main-content` element (set on <main> in components/layout/Shell.tsx)\n * gets the same keyboard behavior without touching the route.\n */\nimport styles from './SkipToContent.module.css';\n\nexport function SkipToContent() {\n return (\n <button\n type=\"button\"\n className={styles.skipLink}\n onClick={() => {\n const main = document.getElementById('main-content');\n main?.focus();\n main?.scrollIntoView({ block: 'start' });\n }}\n >\n Skip to content\n </button>\n );\n}\n","/**\n * components/auth/SessionGate.tsx — replaces the old bare \"⚠ HTTP 401 +\n * Retry\" first-run experience (foundation brief item 5). Shown whenever\n * auth-store's phase is 'unauthenticated': on first load before any read\n * token has been entered, AND any time a session expires mid-use (SSE\n * disconnects, the next GET reports 401).\n *\n * This screen owns nothing about the MUTATION token — that is a separate,\n * later step (MutationTokenDialog), because read authority and dispatch\n * authority are genuinely different capabilities on this server (see\n * server.ts) and conflating them in one prompt is exactly the kind of\n * blurred-authority UX this foundation is supposed to fix.\n */\nimport { useId, useRef, useState, type FormEvent } from 'react';\nimport { establishReadSession } from '../../data/auth-store.js';\nimport styles from './SessionGate.module.css';\n\nexport function SessionGate({ onAuthenticated }: { onAuthenticated?: () => void }) {\n const [token, setToken] = useState('');\n const [error, setError] = useState<string | null>(null);\n const [busy, setBusy] = useState(false);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputId = useId();\n const errorId = useId();\n\n async function onSubmit(e: FormEvent) {\n e.preventDefault();\n setError(null);\n setBusy(true);\n try {\n await establishReadSession(token);\n setToken('');\n onAuthenticated?.();\n } catch (err) {\n setError(err instanceof Error ? err.message : 'Could not establish a session.');\n inputRef.current?.select();\n } finally {\n setBusy(false);\n }\n }\n\n return (\n <div className={styles.wrap}>\n <div className={styles.card}>\n <div className={styles.badge} aria-hidden=\"true\">\n ⛺\n </div>\n <h1 className={styles.heading}>Connect to ashlr serve</h1>\n <p className={styles.body}>\n This dashboard only ever talks to the ashlr server running on this machine\n (<code>127.0.0.1</code>, never a remote host). To read data, paste the{' '}\n <strong>read token</strong> printed in the terminal where you ran:\n </p>\n <pre className={styles.code}>ashlr serve</pre>\n <p className={styles.body}>\n It looks like a 64-character hex string, printed once at startup — something like{' '}\n <code className={styles.example}>a1b2c3…</code>. This dialog never stores it: it is\n exchanged once for a short-lived session cookie, then discarded.\n </p>\n <form onSubmit={onSubmit} className={styles.form} noValidate>\n <label htmlFor={inputId} className={styles.label}>\n Read token\n </label>\n <input\n ref={inputRef}\n id={inputId}\n name=\"read-token\"\n type=\"password\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n inputMode=\"text\"\n className={styles.input}\n value={token}\n onChange={(e) => setToken(e.target.value)}\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? errorId : undefined}\n placeholder=\"64 hex characters\"\n autoFocus\n />\n {error ? (\n <p id={errorId} className={styles.error} role=\"alert\">\n {error}\n </p>\n ) : null}\n <button type=\"submit\" className={styles.submit} disabled={busy || token.trim().length === 0}>\n {busy ? 'Connecting…' : 'Connect'}\n </button>\n </form>\n </div>\n </div>\n );\n}\n","/**\n * app/App.tsx — root composition: theme/reset CSS is imported once here,\n * the auth gate decides between <SessionGate/> and the routed shell, and\n * ToastProvider wraps everything so any component can surface an error\n * without prop-drilling a callback.\n *\n * BOOTSTRAP: on first mount we don't know yet whether the 15-minute read\n * session cookie from a previous page load is still valid, so we probe it\n * with a real protected GET rather than guessing from stored state (there\n * is deliberately nothing in storage that would tell us — see\n * data/auth-store.ts). A 200 means \"still logged in, skip SessionGate\"; a\n * 401 means show it. Either way this doubles as the first real data fetch,\n * not a throwaway ping.\n */\nimport { useEffect } from 'react';\nimport { HashRouter } from 'react-router-dom';\nimport { AppRoutes } from './routes.js';\nimport { SkipToContent } from './SkipToContent.js';\nimport { SessionGate } from '../components/auth/SessionGate.js';\nimport { ToastProvider } from '../components/primitives/Toast.js';\nimport { useAuthPhase } from '../data/hooks.js';\nimport { markCheckComplete } from '../data/auth-store.js';\nimport { runQuery, getQuerySnapshot } from '../data/cache.js';\nimport { dashboardSnapshotQuery } from '../data/queries.js';\nimport '../design/global.css';\n\nfunction useBootstrapSessionProbe(phase: ReturnType<typeof useAuthPhase>) {\n useEffect(() => {\n if (phase !== 'checking') return;\n let cancelled = false;\n void runQuery(dashboardSnapshotQuery.key, dashboardSnapshotQuery.fetch).then(() => {\n if (cancelled) return;\n const entry = getQuerySnapshot(dashboardSnapshotQuery.key);\n markCheckComplete(entry.status === 'success');\n });\n return () => {\n cancelled = true;\n };\n }, [phase]);\n}\n\nexport function App() {\n const phase = useAuthPhase();\n useBootstrapSessionProbe(phase);\n\n return (\n <ToastProvider>\n {phase === 'checking' ? (\n <div aria-live=\"polite\" className=\"visually-hidden\">\n Checking for an existing session…\n </div>\n ) : phase === 'unauthenticated' ? (\n <SessionGate />\n ) : (\n <HashRouter>\n <SkipToContent />\n <AppRoutes />\n </HashRouter>\n )}\n </ToastProvider>\n );\n}\n","import { StrictMode } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { App } from './app/App.js';\n\nconst container = document.getElementById('root');\nif (!container) {\n throw new Error('#root element missing from index.html');\n}\n\ncreateRoot(container).render(\n <StrictMode>\n <App />\n </StrictMode>,\n);\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","jsxRuntimeModule","require$$0","REACT_PORTAL_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","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","ReactNoopUpdateQueue","assign","emptyObject","Component","props","context","updater","partialState","callback","ComponentDummy","PureComponent","pureComponentPrototype","isArrayImpl","noop","ReactSharedInternals","hasOwnProperty","ReactElement","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","Children","forEachFunc","forEachContext","n","react_production","size","fn","childArray","defaultValue","childrenLength","render","compare","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","usable","action","initialState","permalink","deps","Context","value","initialValue","create","ref","passthrough","reducer","initialArg","init","subscribe","getSnapshot","getServerSnapshot","reactModule","push","heap","node","a","parentIndex","parent","peek","pop","first","last","length","halfLength","leftIndex","left","rightIndex","right","b","diff","exports","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","continuationCallback","channel","port","ms","task","fps","eventHandler","priorityLevel","options","timeout","parentPriorityLevel","schedulerModule","React","formatProdErrorMessage","code","url","Internals","createPortal$1","containerInfo","implementation","getCrossOriginStringAs","as","input","reactDom_production","container","previousTransition","previousUpdatePriority","href","crossOrigin","integrity","fetchPriority","form","checkDCE","err","reactDomModule","Scheduler","require$$1","ReactDOM","require$$2","isValidContainer","getNearestMountedFiber","fiber","nearestMounted","getSuspenseInstanceFromFiber","suspenseState","getActivityInstanceFromFiber","activityState","assertIsMounted","findCurrentFiberUsingSlowPath","alternate","parentA","parentB","didFindChild","child$0","findCurrentHostFiberImpl","tag","REACT_LEGACY_ELEMENT_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_CACHE_SENTINEL","REACT_CLIENT_REFERENCE","getComponentNameFromType","innerType","ReactDOMSharedInternals","sharedNotPendingObject","valueStack","createCursor","cursor","contextStackCursor","contextFiberStackCursor","rootInstanceStackCursor","hostTransitionProviderCursor","pushHostContainer","nextRootInstance","getOwnHostContext","getChildHostContextProd","popHostContainer","pushHostContext","JSCompiler_inline_result","popHostContext","HostTransitionContext","prefix","suffix","describeBuiltInComponentFrame","name","x","reentry","describeNativeComponentFrame","construct","previousPrepareStackTrace","RunInRootFrame","Fake","control","x$1","x$2","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","frame","describeFiber","childFiber","getStackByFiberInDevAndProd","workInProgress","info","previous","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","computeExpirationTime","lane","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","detachDeletedInstance","getClosestInstanceFromNode","targetNode","targetInst","parentNode","getParentHydrationBoundary","getInstanceFromNode","getNodeFromInstance","inst","getResourcesFromRoot","resources","markNodeAsHoistable","allNativeEvents","registrationNameDependencies","registerTwoPhaseEvent","registrationName","dependencies","registerDirectEvent","VALID_ATTRIBUTE_NAME_REGEX","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","attributeName","setValueForAttribute","prefix$10","setValueForKnownAttribute","setValueForNamespacedAttribute","namespace","getToStringValue","isCheckable","elem","trackValueOnNode","valueField","currentValue","descriptor","get","set","track","updateValueIfChanged","tracker","lastValue","getActiveElement","doc","escapeSelectorAttributeValueInsideDoubleQuotesRegex","escapeSelectorAttributeValueInsideDoubleQuotes","ch","updateInput","lastDefaultValue","checked","defaultChecked","setDefaultValue","initInput","isHydrating","updateOptions","multiple","propValue","setDefaultSelected","updateTextarea","initTextarea","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","target","internalInstance","otherNode","otherProps","isInsideEventHandler","batchedUpdates$1","flushSyncWork$1","getListener","stateNode","canUseDOM","passiveBrowserEventsSupported","startText","fallbackText","getData","start","startValue","startLength","end","endValue","endLength","minEnd","getEventCharCode","keyCode","functionThatReturnsTrue","functionThatReturnsFalse","createSyntheticEvent","Interface","SyntheticBaseEvent","reactName","reactEventType","nativeEventTarget","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","SyntheticKeyboardEvent","PointerEventInterface","SyntheticPointerEvent","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","JSCompiler_inline_result$jscomp$286","isSupported$jscomp$inline_427","element$jscomp$inline_428","stopWatchingForValueChange","handlePropertyChange","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","is","y","objectIs","shallowEqual","objA","objB","keysA","keysB","currentKey","getLeafNode","getNodeForCharacterOffset","offset","nodeEnd","containsNode","outerNode","innerNode","getActiveElementDeep","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","concurrentQueues","concurrentQueuesIndex","concurrentlyUpdatedLanes","finishQueueingConcurrentUpdates","endIndex","queue","pending","markUpdateLaneFromFiberToRoot","enqueueUpdate$1","enqueueConcurrentHookUpdate","getRootForUpdatedFiber","enqueueConcurrentRenderForLane","sourceFiber","isHidden","nestedUpdateCount","rootWithNestedUpdates","emptyContextObject","FiberNode","pendingProps","mode","createFiberImplClass","shouldConstruct","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","numberOfOverflowBits","pushMaterializedTreeId","popTreeContext","restoreSuspendedTreeContext","suspendedContext","hydrationParentFiber","nextHydratableInstance","hydrationErrors","rootOrSingletonContext","HydrationMismatchException","throwOnHydrationMismatch","queueHydrationError","prepareToHydrateHostInstance","instance","listenToNonDelegatedEvent","mediaEventTypes","checkForUnmatchedText","popToNextHostParent","popHydrationState","JSCompiler_temp","shouldSetTextContent","getNextHydratableInstanceAfterHydrationBoundary","isSingletonScope","previousHydratableOnEnteringScopedSingleton","getNextHydratable","resetHydrationState","upgradeHydrationErrorsToRecoverable","queuedErrors","workInProgressRootRecoverableErrors","valueCursor","currentlyRenderingFiber$1","lastContextDependency","pushProvider","providerFiber","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","currentEntangledListeners","currentEntangledPendingCount","currentEntangledLane","currentEntangledActionThenable","entangleAsyncAction","transition","entangledListeners","requestTransitionLane","resolve","pingEngtangledActionScope","chainThenableValue","thenableWithOverride","prevOnStartTransitionFinish","globalMostRecentTransitionTime","resumedCache","peekCacheFromPool","cacheResumedFromPreviousRender","workInProgressRoot","pushTransition","offscreenWorkInProgress","prevCachePool","getSuspendedCache","cacheFromPool","SuspenseException","SuspenseyCommitException","SuspenseActionException","noopSuspenseyCommitThenable","isThenableResolved","trackUsedThenable","thenableState","checkIfUseWrappedInAsyncCatch","fulfilledThenable","rejectedThenable","suspendedThenable","resolveLazy","lazyType","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","commitCallbacks","callbacks","currentTreeHiddenStackCursor","prevEntangledRenderLanesCursor","pushHiddenContext","entangledRenderLanes","reuseHiddenContextOnStack","popHiddenContext","suspenseHandlerStackCursor","shellBoundary","pushPrimaryTreeSuspenseHandler","handler","suspenseStackCursor","pushDehydratedActivitySuspenseHandler","pushOffscreenSuspenseHandler","reuseSuspenseHandlerOnStack","popSuspenseHandler","findFirstSuspended","row","state","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","useMemoCache","memoCache","basicStateReducer","updateReducer","updateReducerImpl","baseQueue","baseFirst","newBaseQueueFirst","newBaseQueueLast","didReadFromEntangledAsyncAction$60","revertLane","rerenderReducer","dispatch","lastRenderPhaseUpdate","updateSyncExternalStore","isHydrating$jscomp$0","snapshotChanged","updateEffect","subscribeToStore","pushSimpleEffect","updateStoreInstance","pushStoreConsistencyCheck","renderedSnapshot","nextSnapshot","checkIfSnapshotChanged","forceStoreRerender","latestGetSnapshot","scheduleUpdateOnFiber","mountStateImpl","initialStateInitializer","updateOptimisticImpl","dispatchActionState","actionQueue","setPendingState","setState","isRenderPhaseUpdate","actionNode","runActionStateAction","prevState","handleActionReturnValue","onActionError","error$66","nextState","onActionSuccess","notifyActionListeners","actionStateReducer","oldState","mountActionState","initialStateProp","ssrFormState","JSCompiler_inline_result$jscomp$0","inRootOrSingleton","dispatchSetState","dispatchOptimisticSetState","updateActionState","stateHook","updateActionStateImpl","currentStateHook","actionStateActionEffect","rerenderActionState","updateRef","mountEffectImpl","fiberFlags","hookFlags","updateEffectImpl","mountEffect","useEffectEventImpl","componentUpdateQueue","events","updateEvent","updateInsertionEffect","updateLayoutEffect","imperativeHandleEffect","refCleanup","updateImperativeHandle","mountDebugValue","updateCallback","updateMemo","nextCreate","mountDeferredValueImpl","requestDeferredLane","updateDeferredValueImpl","prevValue","startTransition","pendingState","finishedState","thenableForFinishedState","dispatchSetStateInternal","requestUpdateLane","startHostTransition","formFiber","formData","ensureFormComponentIsStateful","requestFormReset$1","existingStateHook","initialResetState","useHostTransitionStatus","updateId","updateRefresh","refreshCache","provider","root$69","dispatchReducerAction","enqueueRenderPhaseUpdate","entangleTransitionUpdate","currentState","eagerState","throwIfDuringRender","identifierPrefix","idWithLeadingBit","booleanOrThenable","applyDerivedStateFromProps","getDerivedStateFromProps","nextProps","classComponentUpdater","checkShouldComponentUpdate","oldProps","newProps","nextContext","callComponentWillReceiveProps","resolveClassComponentProps","baseProps","propName$73","defaultOnUncaughtError","defaultOnCaughtError","defaultOnRecoverableError","logUncaughtError","errorInfo","onUncaughtError","e$74","logCaughtError","boundary","onCaughtError","e$75","createRootErrorUpdate","createClassErrorUpdate","initializeClassErrorUpdate","getDerivedStateFromError","legacyErrorBoundariesThatAlreadyFailed","stack","throwException","rootRenderLanes","renderDidSuspendDelayIfPossible","workInProgressRootExitStatus","attachPingListener","wrapperError","workInProgressRootConcurrentErrors","SelectiveHydrationException","reconcileChildren","nextChildren","updateForwardRef","propsWithoutRef","bailoutOnAlreadyFinishedWork","updateMemoComponent","updateSimpleMemoComponent","checkScheduledUpdateOrContext","prevProps","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","nextPrimaryChildren","mountSuspensePrimaryChildren","retrySuspenseComponentWithoutHydrating","digest","primaryChildren","offscreenProps","scheduleSuspenseWorkOnFiber","initSuspenseListRenderState","isBackwards","tail","lastContentRow","tailMode","renderState","updateSuspenseListComponent","revealOrder","suspenseContext","shouldForceFallback","attemptEarlyBailoutIfNoScheduledUpdate","state$102","didSuspendBefore","beginWork","$$typeof","getResource","getOwnerDocumentFromRootContainer","setInitialProperties","resolveSingletonInstance","canHydrateInstance","canHydrateTextInstance","markUpdate","preloadInstanceAndSuspendIfNeeded","shouldRemainOnPreviousScreen","preloadResourceAndSuspendIfNeeded","resource","preloadResource","scheduleRetryEffect","retryQueue","workInProgressSuspendedRetryLanes","cutOffTailIfNeeded","hasRenderedATailFallback","lastTailNode","lastTailNode$106","bubbleProperties","completedWork","didBailout","newChildLanes","subtreeFlags","child$107","completeWork","nextResource","ownerDocument","listenToAllSupportedEvents","workInProgressRootRenderTargetTime","unwindWork","unwindInterruptedWork","interruptedWork","commitHookEffectListMount","flags","finishedWork","lastEffect","firstEffect","captureCommitPhaseError","commitHookEffectListUnmount","nearestMountedAncestor$jscomp$0","destroy","nearestMountedAncestor","destroy_","commitClassCallbacks","safelyCallComponentWillUnmount","safelyAttachRef","instanceToUse","safelyDetachRef","error$140","commitHostMount","commitHostUpdate","domElement","updateProperties","isHostParent","getHostSibling","insertOrAppendPlacementNodeIntoContainer","before","insertOrAppendPlacementNode","commitHostSingletonAcquisition","singleton","attributes","offscreenSubtreeIsHidden","offscreenSubtreeWasHidden","needsFormReset","PossiblyWeakSet","nextEffect","commitBeforeMutationEffects","eventsEnabled","_enabled","selection","anchorOffset","focusNode","indexWithinAnchor","indexWithinFocus","next","selectionInformation","resolvedPrevProps","clearContainerSparingly","commitLayoutEffectOnFiber","finishedRoot","recursivelyTraverseLayoutEffects","error$139","commitActivityHydrationCallbacks","commitSuspenseHydrationCallbacks","retryDehydratedSuspenseBoundary","registerSuspenseInstanceRetry","prevOffscreenSubtreeWasHidden","recursivelyTraverseReappearLayoutEffects","detachFiberAfterEffects","hostParent","hostParentIsContainer","recursivelyTraverseDeletionEffects","commitDeletionEffectsOnFiber","deletedFiber","prevHostParent","prevHostParentIsContainer","releaseSingletonInstance","clearHydrationBoundary","retryIfBlockedOn","getRetryCache","retryCache","attachSuspenseRetryListeners","wakeables","wakeable","retry","resolveRetryWakeable","recursivelyTraverseMutationEffects","root$jscomp$0","parentFiber","commitMutationEffectsOnFiber","currentHoistableRoot","commitReconciliationEffects","hoistableRoot","currentResource","maybeNodes","getHydratableHoistableCache","mountHoistable","acquireResource","tagCaches","getHoistableRoot","recursivelyResetForms","globalMostRecentFallbackTime","wasHidden","prevOffscreenSubtreeIsHidden","recursivelyTraverseDisappearLayoutEffects","display","hideOrUnhideDehydratedBoundary","hostParentFiber","parent$141","before$142","parent$143","before$144","finishedRoot$jscomp$0","includeWorkInProgressEffects","hiddenCallbacks","commitOffscreenPassiveMountEffects","previousCache","commitCachePassiveMountEffect","recursivelyTraversePassiveMountEffects","committedLanes","committedTransitions","commitPassiveMountOnFiber","_finishedWork$memoize2","id","onPostCommit","recursivelyTraverseAtomicPassiveEffects","recursivelyTraverseReconnectPassiveEffects","committedLanes$jscomp$0","committedTransitions$jscomp$0","suspenseyCommitFlag","recursivelyAccumulateSuspenseyCommit","suspendedState","accumulateSuspenseyCommitOnFiber","suspendResource","previousHoistableRoot","detachAlternateSiblings","previousFiber","recursivelyTraversePassiveUnmountEffects","commitPassiveUnmountEffectsInsideOfDeletedTree_begin","commitPassiveUnmountOnFiber","recursivelyTraverseDisconnectPassiveEffects","deletedSubtreeRoot","sibling","DefaultAsyncDispatcher","resourceType","cacheForType","PossiblyWeakMap","workInProgressSuspendedReason","workInProgressThrownValue","workInProgressRootDidSkipSuspendedSiblings","workInProgressRootIsPrerendering","workInProgressRootDidAttachPingListener","workInProgressRootInterleavedUpdatedLanes","workInProgressRootPingedLanes","workInProgressRootDidIncludeRecursiveRenderUpdate","workInProgressTransitions","pendingEffectsStatus","pendingEffectsRoot","pendingFinishedWork","pendingEffectsLanes","pendingEffectsRemainingLanes","pendingPassiveTransitions","pendingRecoverableErrors","prepareFreshStack","markRootSuspended","ensureRootIsScheduled","performWorkOnRoot","forceSync","shouldTimeSlice","exitStatus","renderRootConcurrent","renderRootSync","renderWasConcurrent","isRenderConsistentWithExternalStores","wasRootDehydrated","scheduleTimeout","commitRootWhenReady","recoverableErrors","transitions","didIncludeRenderPhaseUpdate","didSkipSuspendedSiblings","suspendedCommitReason","completedRenderStartTime","completedRenderEndTime","timeoutOffset","waitForCommitToBeReady","commitRoot","check","didAttemptEntireTree","index$6","flushSyncWorkAcrossRoots_impl","resetWorkInProgressStack","timeoutHandle","cancelTimeout","allEntangledLanes","index$4","handleThrow","thrownValue","pushDispatcher","prevDispatcher","pushAsyncDispatcher","prevAsyncDispatcher","shouldYieldForPrerendering","prevExecutionContext","unitOfWork","reason","throwAndUnwindWorkLoop","workLoopSync","thrownValue$165","performUnitOfWork","replaySuspendedUnitOfWork","hostFiber","completeUnitOfWork","workLoopConcurrentByScheduler","thrownValue$167","suspendedReason","unwindUnitOfWork","skipSiblings","flushPendingEffects","scheduleCallback$1","flushPassiveEffects","flushMutationEffects","flushLayoutEffects","flushSpawnedWork","rootMutationHasEffect","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","win","start$jscomp$0","end$jscomp$0","startMarker","endMarker","range","rootHasLayoutEffect","releaseRootPooledCache","onRecoverableError","recoverableError","renderPriority","captureCommitPhaseErrorOnRoot","rootFiber","pingCache","threadIDs","pingSuspendedRoot","retryTimedOutBoundary","boundaryFiber","retryLane","firstScheduledRoot","lastScheduledRoot","didScheduleMicrotask","mightHavePendingSyncWork","isFlushingWork","currentEventTransitionLane","scheduleImmediateRootScheduleTask","syncTransitionLanes","onlyLegacy","didPerformSomeWork","root$170","performSyncWorkOnRoot","processRootScheduleInImmediateTask","processRootScheduleInMicrotask","shouldAttemptEagerTransition","prev","scheduleTaskForRootDuringMicrotask","index$5","expirationTime","performWorkOnRootViaSchedulerTask","didTimeout","originalCallbackNode","workInProgressRootRenderLanes$jscomp$0","scheduleMicrotask","actionScopeLane","coerceFormActionProp","actionProp","createFormDataWithSubmitter","submitter","temp","extractEvents$1","maybeTargetInst","i$jscomp$inline_1577","eventName$jscomp$inline_1578","domEventName$jscomp$inline_1579","capitalizedEvent$jscomp$inline_1580","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","grandTag","SyntheticEventCtor","inCapturePhase","accumulateTargetOnly","reactEventName","lastHostComponent","_instance","createDispatchListener","getParent","tempB","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$184","lastProps","lastProp","propKey$201","propKey$217","propKey$222","propKey$227","propKey$232","isLikelyStaticResource","initiatorType","estimateBandwidth","bits","resourceEntries","entry","transferSize","duration","overlapEntry","overlapStartTime","overlapTransferSize","overlapInitiatorType","namespaceURI","parentNamespace","currentPopstateTransitionEvent","localPromise","handleErrorInNextTick","parentInstance","hydrationInstance","depth","nextNode","node$jscomp$0","nextNode$jscomp$0","suspenseInstance","anyProps","nodeType","data","targetInstance","rootContainerInstance","preloadPropsMap","preconnectsSet","previousDispatcher","flushSyncWork","requestFormReset","prefetchDNS","preconnect","preload","preloadModule","preinitScript","preinitStyle","preinitModuleScript","previousWasRendering","wasRendering","formInst","globalDocument","preconnectAs","rel","limitedEscapedHref","preloadSelector","getStyleKey","getScriptKey","getStylesheetSelectorFromKey","getScriptSelectorFromKey","precedence","adoptPreloadPropsForStylesheet","link","reject","insertStylesheet","src","scripts","adoptPreloadPropsForScript","currentProps","styles$243","resource$244","preloadStylesheet","stylesheetPropsFromRawProps","rawProps","preloadProps","styleProps","instance$249","linkInstance","nodes","prior","stylesheetProps","scriptProps","keyAttribute","caches","nodeKey","hostContext","onUnsuspend","estimatedBytesWithinLimit","insertSuspendedStylesheets","commit","stylesheetTimer","unsuspend","imgTimer","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","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_1840","componentOrElement","internals$jscomp$inline_2347","hook$jscomp$inline_2348","reactDomClient_production","clientModule","ABSOLUTE_URL_REGEX","PROTOCOL_RELATIVE_URL_REGEX","normalizeProtocolRelativeUrl","protocol","PopStateEventType","isLocation","obj","createHashHistory","createHashLocation","window2","globalHistory","pathname","search","hash","parsePath","createLocation","createHashHref","to","base","hashIndex","createPath","validateHashLocation","location","warning","getUrlBasedHistory","invariant","message","cond","createKey","getHistoryState","mask","path","parsedPath","searchIndex","getLocation","createHref2","validateLocation","v5Compat","getIndex","handlePop","nextIndex","delta","history","historyState","replace2","createURL","createBrowserURLImpl","windowImpl","isAbsolute","matchRoutes","routes","locationArg","basename","matchRoutesImpl","allowPartial","precomputedBranches","stripBasename","branches","flattenAndRankRoutes","matches","decoded","decodePath","matchRouteBranch","flattenRoutes","rankRouteBranches","parentsMeta","parentPath","_hasParentOptionalSegments","flattenRoute","route","hasParentOptionalSegments","relativePath","meta","joinPaths","routesMeta","computeScore","meta2","matcher","params","compilePath","exploded","explodeOptionalSegments","segments","rest","isOptional","required","restExploded","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","initialScore","s","score","segment","branch","matchedParams","matchedPathname","remainingPathname","pattern","matchPathImpl","matchPath","normalizePathname","compiledParams","pathnameBase","captureGroups","memo2","paramName","splatValue","caseSensitive","regexpSource","str","nextChar","v","startIndex","resolvePath","fromPathname","toPathname","removeDoubleSlashes","resolvePathname","normalizeSearch","normalizeHash","removeTrailingSlash","getInvalidPathError","char","field","dest","getPathContributingMatches","getResolveToMatches","pathMatches","idx","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","from","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","paths","ErrorResponseImpl","status","statusText","data2","internal","isRouteErrorResponse","getRoutePattern","parts","m","isBrowser","parseToInfo","_to","absoluteURL","isExternal","currentUrl","targetUrl","validMutationMethodsArr","validRequestMethodsArr","invalidProtocols","hasInvalidProtocol","DataRouterContext","React.createContext","DataRouterStateContext","RSCRouterContext","useIsRSCRouterContext","React.useContext","ViewTransitionContext","FetchersContext","AwaitContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","ERROR_DIGEST_BASE","ERROR_DIGEST_REDIRECT","ERROR_DIGEST_ROUTE_ERROR_RESPONSE","decodeRedirectErrorDigest","parsed","decodeRouteErrorResponseDigest","useHref","relative","useInRouterContext","navigator","React2.useContext","useResolvedPath","joinedPathname","useLocation","navigateEffectWarning","useIsomorphicLayoutEffect","cb","React2.useLayoutEffect","useNavigate","isDataRoute","useNavigateStable","useNavigateUnstable","dataRouterContext","routePathnamesJson","activeRef","React2.useRef","React2.useCallback","OutletContext","React2.createContext","useOutlet","outlet","React2.useMemo","React2.createElement","useParams","useRoutes","useRoutesImpl","dataRouterOpts","parentMatches","routeMatch","parentParams","parentPathname","parentPathnameBase","parentRoute","warningOnce","locationFromContext","parsedLocationArg","parentSegments","renderedMatches","_renderMatches","DefaultErrorComponent","useRouteError","lightgrey","preStyles","codeStyles","devInfo","React2.Fragment","defaultErrorElement","RenderErrorBoundary","React2.Component","RSCErrorHandler","errorRedirectHandledMap","redirect2","existingRedirect","redirectPromise","RenderedRoute","routeContext","dataRouterState","errors","errorIndex","renderFallback","fallbackIndex","loaderData","errors2","needsToRunLoader","onErrorHandler","onError","shouldRenderHydrateFallback","errorElement","hydrateFallbackElement","matches2","getChildren","getDataRouterConsoleError","hookName","useDataRouterContext","ctx","useDataRouterState","useRouteContext","useCurrentRouteId","thisRoute","useRouteId","routeId","router","alreadyWarned","React3.memo","DataRoutes2","manifest","future","isStatic","Navigate","React3.useContext","navigate","jsonPath","React3.useEffect","Outlet","Route","Router","basenameProp","locationProp","navigationType","staticProp","useTransitions","navigationContext","React3.useMemo","locationContext","trailingPathname","React3.createElement","Routes","createRoutesFromChildren","React3.Children","React3.isValidElement","treePath","React3.Fragment","defaultMethod","defaultEncType","isHtmlElement","isButtonElement","isFormElement","isInputElement","isModifiedEvent","shouldProcessLinkClick","_formDataSupportsSubmitter","isFormDataSubmitterSupported","supportedFormEncTypes","getFormEncType","encType","getFormSubmissionInfo","method","body","attr","invariant2","singleFetchUrl","reqUrl","trailingSlashAware","extension","loadRouteModule","routeModulesCache","routeModule","isHtmlLinkDescriptor","getKeyedPrefetchLinks","routeModules","links","mod","dedupeLinkDescriptors","getNewMatchesForLinks","page","nextMatches","currentMatches","isNew","matchPathChanged","manifestRoute","routeChoice","getModuleLinkHrefs","includeHydrateFallback","dedupeHrefs","hrefs","sortKeys","sorted","keys","descriptors","preloads","deduped","useDataRouterContext2","React8.useContext","useDataRouterStateContext","FrameworkContext","React8.createContext","useFrameworkContext","usePrefetchBehavior","prefetch","theirElementProps","frameworkContext","maybePrefetch","setMaybePrefetch","React8.useState","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","React8.useRef","React8.useEffect","entries","observer","setIntent","cancelIntent","composeEventHandlers","theirHandler","ourHandler","PrefetchPageLinks","linkProps","rsc","contextNonce","React8.useMemo","React8.createElement","RSCPrefetchPageLinksImpl","PrefetchPageLinksImpl","useKeyedPrefetchLinks","keyedPrefetchLinks","setKeyedPrefetchLinks","interrupted","dataHrefs","hasSomeRoutesWithShouldRevalidate","targetRoutes","React8.Fragment","newMatchesForData","newMatchesForAssets","routesParams","foundOptOutRoute","m2","moduleHrefs","mergeRefs","refs","isBrowser2","HashRouter","historyRef","React10.useRef","setStateImpl","React10.useState","React10.useCallback","React10.startTransition","React10.useLayoutEffect","React10.createElement","Link","React10.forwardRef","onClick","discover","reloadDocument","preventScrollReset","viewTransition","defaultShouldRevalidate","forwardedRef","React10.useContext","maskedHref","resolved","prefetchRef","prefetchHandlers","internalOnClick","useLinkClickHandler","handleClick","isSpaLink","React10.Fragment","NavLink","ariaCurrentProp","classNameProp","routerState","isTransitioning","useViewTransitionState","nextLocationPathname","endSlashPosition","isActive","isPending","renderProps","ariaCurrent","className","Form","fetcherKey","onSubmit","submit","useSubmit","formAction","useFormAction","formMethod","submitHandler","submitMethod","doSubmit","getDataRouterConsoleError2","useDataRouterContext3","replaceProp","doNavigate","fetcherId","getUniqueFetcherId","currentRouteId","routerFetch","routerNavigate","indexValues","qs","vtContext","currentPath","nextPath","NAV_GROUPS","ALL_NAV_LEAVES","g","Sidebar","jsxs","jsx","group","leaf","IDLE_SNAPSHOT","store","entryFor","e","setSnapshot","patch","notify","subscribeQuery","getQuerySnapshot","runQuery","fetcher","invalidate","invalidatePrefix","READ_CLIENT_STORAGE_KEY","READ_CLIENT_RE","MUTATION_HOLD_MS","randomHex64","bytes","loadOrCreateClientProof","proof","clientProof","mutationToken","mutationHoldTimer","emit","l","subscribeAuth","getAuthSnapshot","getReadClientProof","establishReadSession","rawReadToken","trimmed","res","reportSessionExpired","markCheckComplete","authenticated","getMutationToken","hasMutationHold","armIdleClear","clearMutationToken","setMutationToken","token","heldUntil","touchMutationHold","SSE_EVENT_NAMES","EVENT_TO_CACHE_KEYS","rawListeners","reconnectTimer","reconnectAttempt","backoffMs","teardown","scheduleReconnect","connect","es","evt","messageEvent","useQuery","def","snapshot","useSyncExternalStore","useCallback","useEffect","controller","useRefetch","useAuthPhase","useMutationHold","storeSetMutationToken","RUN_STALL_NOTIFY_MS","PROPOSAL_BACKLOG_ESCALATE_MS","RUN_FAILURE_NOTIFY_WINDOW_MS","fleetActionHref","lower","deriveNotifications","out","readiness","security","top","f","limit","daemon","oldest","min","p","t","ageMs","severity","run","age","sortNotifications","items","rank","MUTE_STORAGE_KEY","DESKTOP_PREF_STORAGE_KEY","loadMuted","raw","saveMuted","muted","loadDesktopPref","currentDesktopPermission","mutedCategories","allItems","panelOpen","desktopEnabled","everSeenIds","recompute","subscribeNotifications","getNotificationSnapshot","reconcileNotifications","derived","previousIds","openPanel","closePanel","togglePanel","isMuted","category","setMuted","enableDesktopNotifications","permission","disableDesktopNotifications","useNotifications","NotificationBell","urgent","total","FOCUSABLE_SELECTOR","Dialog","open","onClose","titleId","title","initialFocusRef","widthClassName","dialogRef","useRef","previouslyFocused","onKeyDown","focusable","el","createPortal","isKnown","quality","Epistemic","renderControl","label","Fragment","EpistemicBadge","STATUS_TONE","statusToTone","StatusBadge","tone","PhaseDot","severityToTone","NOTIFICATION_CATEGORY_LABEL","formatRelative","iso","seconds","minutes","hours","NotificationItem","item","ApiError","DispatchDisabledError","apiGet","apiPost","detail","j","dashboardSnapshotQuery","controlSnapshotQuery","runsQuery","runDetailQuery","swarmsQuery","swarmDetailQuery","daemonObservationQuery","fleetStatusQuery","fleetActivityQuery","goalsQuery","visionMissionQuery","inboxQuery","inboxListQuery","filters","proposalDetailQuery","controlLogsObservationQuery","pulseQuery","window","isRecallHit","genomeQuery","q","modelsQuery","portfolioQuery","NOTIFICATION_SUMMARY_POLL_MS","useNotificationEngine","fleet","runs","inbox","refetchControl","refetchFleet","controlData","fleetData","runsData","inboxData","NotificationCenter","desktopPermission","closeBtnRef","toggleDesktop","THEME_STORAGE_KEY","applyTheme","pref","loadTheme","Topbar","onOpenPalette","theme","setTheme","useState","mutation","cycleTheme","MissingMutationTokenError","post","pauseFleet","resumeFleet","approveProposal","rejectProposal","navCommands","nav","actionCommands","openNotificationPanel","COMMANDS","filterCommands","query","haystack","term","TOKEN_RE","MutationTokenDialog","setToken","setValue","reveal","setReveal","setError","inputRef","useId","inputId","r","ToastContext","createContext","useToast","useContext","AUTO_DISMISS_MS","ToastProvider","toasts","setToasts","nextId","dismiss","show","useMemo","useCommandPaletteShortcut","setOpen","CommandPalette","setQuery","activeIndex","setActiveIndex","pendingCommand","setPendingCommand","listId","toast","results","execute","cmd","RouteErrorBoundary","stateByKey","capture","active","focusKey","details","restore","saved","useScrollRestore","routeKey","containerRef","routeKeyRef","useLayoutEffect","raf","onScroll","Shell","mainRef","paletteOpen","setPaletteOpen","PlaceholderView","description","RefreshIndicator","SkeletonLine","width","SkeletonCard","SkeletonRow","SkeletonCardGrid","_","StatGridSkeleton","Stat","caption","StatGrid","mcpUp","RunsPanelSkeleton","panel","RunsPanel","SwarmsPanel","swarms","swarm","pct","DaemonPanelSkeleton","DaemonPanel","FleetDashboardView","snapshotQuery","controlQuery","ErrorBanner","ts","RUN_STREAM_POLL_MS","STALL_AFTER_MS","fingerprintOf","useRunStream","runId","refetch","lastChangedAt","setLastChangedAt","lastPolledAt","setLastPolledAt","forceTick","fingerprint","isTerminal","is404","interval","phase","STEP_KIND_LABEL","formatElapsed","startIso","endIso","rem","formatClock","PhaseBanner","secs","RunStreamPanelSkeleton","RunStreamPanel","stream","scrollRef","stickToBottomRef","distanceFromBottom","LiveNowStrip","watchingRunId","setWatchingRunId","runningRuns","SOURCE_OPTIONS","WINDOW_OPTIONS","JournalFilters","sources","onSourcesChange","onQueryChange","windowValue","onWindowChange","toggleSource","opt","o","ALL_JOURNAL_SOURCES","logKindToStatus","kind","buildJournalEntries","tick","merge","proposal","filterJournalEntries","filter","bucketByHour","hourMs","buckets","JournalTimeline","onScrubTo","max","ProposalDetail","proposalId","JournalEntryDetail","drillIn","SOURCE_LABEL","formatWhen","d","JournalEntryRow","hasDrillIn","expanded","setExpanded","LOGS_POLL_MS","JournalView","logsQuery","activityQuery","runsListQuery","refetchLogs","setSources","setWindowValue","windowMs","setWindowMs","filtered","rowRefs","scrubTo","bucketStartMs","anyLoading","anyRefreshing","latestUpdatedAt","ChartContainer","caveat","table","empty","emptyMessage","Legend","it","SERIES_SLOTS","seriesColor","slot","CHART_SEQUENTIAL","CHART_GRID","CHART_AXIS","VBOX_W","PAD_L","PAD_R","PAD_T","PAD_B","TICKS_Y","splitRuns","points","niceTicks","LineChart","series","height","area","formatX","formatY","ariaLabel","svgRef","hoverX","setHoverX","tooltipPos","setTooltipPos","allX","knownY","xMin","xMax","yMin","yMax","xRange","yRange","plotW","plotH","xScale","yScale","yTicks","xAxis","nearestX","clientX","svg","rect","svgX","dataX","nearest","best","handleMove","px","showLegend","showEndLabels","hoverPoints","si","color","ri","lastRun","pt","point","BAR_MAX","GAP","BarChart","orientation","formatValue","uid","hover","setHover","known","maxVal","minVal","rowH","svgH","svgW","barW","h","barSlot","zeroY","barH","Sparkline","stepX","yOf","lastKnownIndex","lastPoint","formatCompact","abs","formatUsd","sign","formatPercent","fraction","digits","formatSignedCompact","formatDayLabel","day","StatTile","trend","trendLabel","deltaTone","TableView","columns","rows","rowKey","WINDOWS","BUDGET_TONE","projectLabel","PulseView","setWindow","w","PulseBody","rollup","costSeries","topProjects","projectBars","topModels","modelBars","projectColumns","chartFormat.formatUsd","modelColumns","chartFormat.formatCompact","BROWSE_LIMIT","DEBOUNCE_MS","useDebounced","debounced","setDebounced","snippetOf","relativeTs","days","GenomeView","debouncedQuery","resourceQuery","isSearching","totalCount","counts","hit","engineModelLabel","ProductionView","modelsResult","production","ProductionSection","ModelStatsSection","jv","verdictBars","shipTrend","chartFormat.formatDayLabel","totalShipped","sum","models","shipRateBars","chartFormat.formatPercent","PortfolioView","PortfolioBody","portfolio","health","goalsInFlight","backlogTop","cost","effectiveness","today","worstRepoBars","backlogColumns","runTokens","matchesSearch","formatDate","RunsView","runsResult","setSearch","statusFilter","setStatusFilter","engineFilter","setEngineFilter","providerFilter","setProviderFilter","since","setSince","sortKey","setSortKey","sortDir","setSortDir","statuses","engines","providers","sinceMs","createdMs","cmp","toggleSort","sortIndicator","taskAnchorId","taskId","RunDetailView","tasksById","depId","swarmTasksDone","sw","swarmTasksTotal","swarmUsage","swarmTokens","u","SwarmsView","swarmsResult","pa","pb","done","usage","PHASE_ORDER","mergeSwarmTasks","plan","taskRuns","truncate","NODE_W","NODE_H","H_GAP","V_GAP","PAD","SwarmDag","tasks","taskAnchorPrefix","phaseGroups","ph","phases","colX","totalW","nodePos","totalH","edges","x1","y1","x2","y2","mx","pos","TASK_ANCHOR_PREFIX","SwarmDetailView","dagNodes","esc","REASON_COPY","RecoveryCallout","copy","DaemonView","observationQuery","observation","FleetView","fleetQuery","mutationHold","pendingAction","setPendingAction","confirmOpen","setConfirmOpen","tokenOpen","setTokenOpen","mutating","setMutating","mutationError","setMutationError","executeAction","requestAction","confirmIntent","killSwitch","killQuality","isPaused","SEVERITY_TONE","SEVERITY_ORDER","SecurityView","severityFilter","setSeverityFilter","repoFilter","setRepoFilter","repos","GoalsView","goalsResult","missionResult","goals","mission","goal","ConfirmDialog","confirmLabel","destructive","onConfirm","busy","confirmRef","STATUS_OPTIONS","formatAge","ProposalList","selectedId","onDispatchDisabled","setStatus","selectedIds","setSelectedIds","focusedIndex","setFocusedIndex","batchAction","setBatchAction","tokenDialogOpen","setTokenDialogOpen","batchConfirmOpen","setBatchConfirmOpen","batchBusy","setBatchBusy","batchError","setBatchError","searchInputRef","all","toggleSelected","proposalStatus","onListKeyDown","requestBatchAction","onTokenDialogClose","confirmBatchAction","ids","failures","selectedPendingCount","FILE_HEADER_RE","OLD_PATH_RE","NEW_PATH_RE","HUNK_HEADER_RE","stripPathPrefix","splitFileChunks","lines","hasGitHeaders","starts","line","chunks","parseFileChunk","chunk","oldPath","newPath","bodyStart","oldMatch","newMatch","gitHeader","displayPath","hunks","additions","unparsedNotice","header","oldStart","oldLines","newStart","newLines","hunk","oldNo","newNo","marker","parseUnifiedDiff","toSplitRows","dels","adds","EXT_TO_FAMILY","languageForPath","ext","KEYWORDS","RULES","tokenizeLine","family","rule","keywords","tokens","isKeyword","DiffViewer","proposalKind","setSelectedId","setMode","selected","onTreeKeyDown","Hunk","lang","CodeLine","JUDGE_REASON_DISPLAY","latestJudged","decisions","judged","setBusy","actionError","setActionError","confirmPendingAction","evidence","judgeDisplay","canDecide","InboxView","dispatchDisabled","setDispatchDisabled","AppRoutes","SkipToContent","main","SessionGate","onAuthenticated","errorId","useBootstrapSessionProbe","cancelled","App","createRoot","StrictMode"],"mappings":";;;;;;;;6CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,E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K,SACL,IAAK,QACL,IAAK,QACL,IAAK,cACL,IAAK,OACL,IAAK,MACL,IAAK,WACL,IAAK,WACL,IAAK,UACL,IAAK,YACL,IAAK,OACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,UACL,IAAK,UACL,IAAK,WACL,IAAK,QACL,IAAK,YACL,IAAK,UACL,IAAK,QACL,IAAK,QACL,IAAK,OACL,IAAK,gBACL,IAAK,cACL,IAAK,YACL,IAAK,aACL,IAAK,QACL,IAAK,SACL,IAAK,SACL,IAAK,SACL,IAAK,SACL,IAAK,cACL,IAAK,WACL,IAAK,aACL,IAAK,eACL,IAAK,SACL,IAAK,kBACL,IAAK,YACL,IAAK,mBACL,IAAK,iBACL,IAAK,oBACL,IAAK,aACL,IAAK,YACL,IAAK,cACL,IAAK,OACL,IAAK,mBACL,IAAK,QACL,IAAK,aACL,IAAK,WACL,IAAK,SACL,IAAK,cACH,MAAO,GACT,IAAK,OACL,IAAK,YACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,YACL,IAAK,WACL,IAAK,YACL,IAAK,cACL,IAAK,aACL,IAAK,cACL,IAAK,SACL,IAAK,YACL,IAAK,QACL,IAAK,aACL,IAAK,aACL,IAAK,eACL,IAAK,eACH,MAAO,GACT,IAAK,UACH,OAAQ/O,GAAuB,EAAE,CAC/B,KAAKC,GACH,MAAO,GACT,KAAKC,GACH,MAAO,GACT,KAAKC,GACL,KAAKC,GACH,MAAO,IACT,KAAKC,GACH,MAAO,WACT,QACE,MAAO,GACjB,CACI,QACE,MAAO,GACb,CACA,CACA,IAAIkwC,GAA4B,GAC9BC,GAAc,KACdC,GAAa,KACbC,GAAc,KACdC,GAAiB,IAAI,IACrBC,GAAwB,IAAI,IAC5BC,GAAiC,CAAA,EACjCR,GACE,sPAAsP,MACpP,KAEN,SAASF,GAAuBphC,EAAchF,EAAa,CACzD,OAAQgF,EAAY,CAClB,IAAK,UACL,IAAK,WACHyhC,GAAc,KACd,MACF,IAAK,YACL,I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