start-fapi 1.0.0-alpha.2 → 1.0.0-alpha.4
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/create-endpoint/route.js.nft.json +1 -1
- package/.next/server/app/api/delete-endpoint/route.js.nft.json +1 -1
- package/.next/server/app/api/fapi/[[...path]]/route.js.nft.json +1 -1
- package/.next/server/app/api/fapi-health-check/route.js.nft.json +1 -1
- package/.next/server/app/api/get-endpoints/route.js.nft.json +1 -1
- package/.next/server/app/api/import-endpoints/route.js.nft.json +1 -1
- package/.next/server/app/api/update-endpoint/route.js.nft.json +1 -1
- package/.next/server/app/api/update-project-name/route.js.nft.json +1 -1
- package/.next/server/app/fapi-simulator/page.js.nft.json +1 -1
- package/.next/server/app/fapi-simulator/page_client-reference-manifest.js +1 -1
- package/.next/server/app/home/page.js.nft.json +1 -1
- package/.next/server/app/home/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0a4e787e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__12a603e9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__32ce7884._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__38a55164._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__491c7442._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__a2da0223._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__d0397225._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__dc672030._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1c7254d0._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__495a2284._.js +1 -1
- package/.next/server/chunks/ssr/_5f3fe325._.js +1 -1
- package/.next/server/chunks/ssr/_949fae44._.js +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/6dd614efa6129557.js +28 -0
- package/.next/static/chunks/{b3b2ce24850fb31c.js → e89c00824da88a04.js} +1 -1
- package/.next/static/chunks/{5a28824971f2ef0b.js → f7895cc6dc4b5421.js} +1 -1
- package/package.json +7 -2
- package/src/utils/data/global.constants.ts +1 -1
- package/.next/build/chunks/[root-of-the-server]__44695d76._.js +0 -500
- package/.next/build/chunks/[root-of-the-server]__44695d76._.js.map +0 -11
- package/.next/build/chunks/[root-of-the-server]__6d51cb5d._.js +0 -233
- package/.next/build/chunks/[root-of-the-server]__6d51cb5d._.js.map +0 -8
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_df7a5b11._.js +0 -13
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_df7a5b11._.js.map +0 -5
- package/.next/build/chunks/[turbopack]_runtime.js +0 -795
- package/.next/build/chunks/[turbopack]_runtime.js.map +0 -10
- package/.next/build/chunks/node_modules_fe693df6._.js +0 -6758
- package/.next/build/chunks/node_modules_fe693df6._.js.map +0 -47
- package/.next/build/package.json +0 -1
- package/.next/build/postcss.js +0 -6
- package/.next/build/postcss.js.map +0 -5
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/server/app/_global-error/page.js.map +0 -5
- package/.next/server/app/_not-found/page.js.map +0 -5
- package/.next/server/app/api/create-endpoint/route.js.map +0 -5
- package/.next/server/app/api/delete-endpoint/route.js.map +0 -5
- package/.next/server/app/api/fapi/[[...path]]/route.js.map +0 -5
- package/.next/server/app/api/fapi-health-check/route.js.map +0 -5
- package/.next/server/app/api/get-endpoints/route.js.map +0 -5
- package/.next/server/app/api/import-endpoints/route.js.map +0 -5
- package/.next/server/app/api/update-endpoint/route.js.map +0 -5
- package/.next/server/app/api/update-project-name/route.js.map +0 -5
- package/.next/server/app/fapi-simulator/page.js.map +0 -5
- package/.next/server/app/favicon.ico/route.js.map +0 -5
- package/.next/server/app/home/page.js.map +0 -5
- package/.next/server/app/page.js.map +0 -5
- package/.next/server/chunks/[externals]_next_dist_b01ab6e1._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0a4e787e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__12a603e9._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__32ce7884._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__38a55164._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__491c7442._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a2da0223._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__d0397225._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__dc672030._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__f408c708._.js.map +0 -1
- package/.next/server/chunks/[turbopack]_runtime.js.map +0 -10
- package/.next/server/chunks/_next-internal_server_app_api_create-endpoint_route_actions_265d5d8d.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_delete-endpoint_route_actions_29dea99c.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_fapi-health-check_route_actions_17990631.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_fapi_[[___path]]_route_actions_d7916fbd.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_get-endpoints_route_actions_57061d88.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_import-endpoints_route_actions_1bc78fec.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_update-endpoint_route_actions_7a4d8909.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_api_update-project-name_route_actions_ca3eb483.js.map +0 -1
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_353150a5.js.map +0 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f5680d9e.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__15600e29._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1c7254d0._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__205ab819._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2fcabfe1._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__495a2284._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__70ec25d3._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__8e313ee7._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__b9356576._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__cb16e16e._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d2487f31._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d78bcd3a._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e8196cc2._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__ff065057._.js.map +0 -1
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -10
- package/.next/server/chunks/ssr/_07720ad9._.js.map +0 -1
- package/.next/server/chunks/ssr/_25e6aab8._.js.map +0 -1
- package/.next/server/chunks/ssr/_3f16b2e8._.js.map +0 -1
- package/.next/server/chunks/ssr/_5f3fe325._.js.map +0 -1
- package/.next/server/chunks/ssr/_77554662._.js.map +0 -1
- package/.next/server/chunks/ssr/_8c79556d._.js.map +0 -1
- package/.next/server/chunks/ssr/_91f266f0._.js.map +0 -1
- package/.next/server/chunks/ssr/_949fae44._.js.map +0 -1
- package/.next/server/chunks/ssr/_b14f015c._.js.map +0 -1
- package/.next/server/chunks/ssr/_d4f9967f._.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_fapi-simulator_page_actions_cef60f82.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_home_page_actions_3545fce0.js.map +0 -1
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_920e7746._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_12287b3d._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_81959fb0._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_68c68167.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_5b2047f8._.js.map +0 -1
- package/.next/static/chunks/2edeb71587820f5e.js +0 -28
- package/.next/static/chunks/a6dad97d9634a72d.js.map +0 -1
- package/.next/trace +0 -1
- package/.next/trace-build +0 -1
- package/.next/turbopack +0 -0
- package/.next/types/routes.d.ts +0 -82
- package/.next/types/validator.ts +0 -160
- /package/.next/static/{470A4yhTFj_sXSZscBzC0 → Q9Pd1ZVwlmslmLTjeJxzD}/_buildManifest.js +0 -0
- /package/.next/static/{470A4yhTFj_sXSZscBzC0 → Q9Pd1ZVwlmslmLTjeJxzD}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{470A4yhTFj_sXSZscBzC0 → Q9Pd1ZVwlmslmLTjeJxzD}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/%40mui/utils/esm/useLazyRef/useLazyRef.js","../../../../node_modules/%40mui/utils/esm/useTimeout/useTimeout.js","../../../../node_modules/%40mui/utils/esm/useOnMount/useOnMount.js","../../../../node_modules/%40mui/utils/esm/composeClasses/composeClasses.js","../../../../node_modules/%40mui/utils/esm/isFocusVisible/isFocusVisible.js","../../../../node_modules/%40mui/utils/esm/getReactElementRef/getReactElementRef.js","../../../../node_modules/%40mui/system/esm/createStyled/createStyled.js","../../../../node_modules/%40mui/utils/esm/getDisplayName/getDisplayName.js","../../../../node_modules/%40mui/system/esm/preprocessStyles.js","../../../../node_modules/%40mui/material/esm/styles/styled.js","../../../../node_modules/%40mui/material/esm/styles/slotShouldForwardProp.js","../../../../node_modules/%40mui/material/esm/styles/rootShouldForwardProp.js","../../../../node_modules/%40mui/system/esm/memoTheme.js","../../../../node_modules/%40mui/material/esm/utils/memoTheme.js","../../../../node_modules/%40mui/material/esm/utils/capitalize.js","../../../../node_modules/%40babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../node_modules/%40babel/runtime/helpers/esm/setPrototypeOf.js","../../../../node_modules/%40babel/runtime/helpers/esm/inheritsLoose.js","../../../../node_modules/react-transition-group/esm/Transition.js","../../../../node_modules/react-transition-group/esm/config.js","../../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../../node_modules/%40mui/material/esm/transitions/utils.js","../../../../node_modules/%40mui/utils/esm/useForkRef/useForkRef.js","../../../../node_modules/%40mui/material/esm/utils/useForkRef.js","../../../../node_modules/%40mui/material/esm/Grow/Grow.js","../../../../node_modules/%40mui/utils/esm/ownerDocument/ownerDocument.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/%40popperjs/core/lib/utils/math.js","../../../../node_modules/%40popperjs/core/lib/utils/userAgent.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getWindowScroll.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getNodeScroll.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getDocumentElement.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getComputedStyle.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/isScrollParent.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getCompositeRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getLayoutRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getParentNode.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getScrollParent.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/listScrollParents.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/isTableElement.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getOffsetParent.js","../../../../node_modules/%40popperjs/core/lib/enums.js","../../../../node_modules/%40popperjs/core/lib/utils/orderModifiers.js","../../../../node_modules/%40popperjs/core/lib/utils/debounce.js","../../../../node_modules/%40popperjs/core/lib/utils/mergeByName.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getViewportRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getDocumentRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/contains.js","../../../../node_modules/%40popperjs/core/lib/utils/rectToClientRect.js","../../../../node_modules/%40popperjs/core/lib/dom-utils/getClippingRect.js","../../../../node_modules/%40popperjs/core/lib/utils/getBasePlacement.js","../../../../node_modules/%40popperjs/core/lib/utils/getVariation.js","../../../../node_modules/%40popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../../node_modules/%40popperjs/core/lib/utils/computeOffsets.js","../../../../node_modules/%40popperjs/core/lib/utils/getFreshSideObject.js","../../../../node_modules/%40popperjs/core/lib/utils/mergePaddingObject.js","../../../../node_modules/%40popperjs/core/lib/utils/expandToHashMap.js","../../../../node_modules/%40popperjs/core/lib/utils/detectOverflow.js","../../../../node_modules/%40popperjs/core/lib/createPopper.js","../../../../node_modules/%40popperjs/core/lib/modifiers/eventListeners.js","../../../../node_modules/%40popperjs/core/lib/modifiers/popperOffsets.js","../../../../node_modules/%40popperjs/core/lib/modifiers/computeStyles.js","../../../../node_modules/%40popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/%40popperjs/core/lib/modifiers/offset.js","../../../../node_modules/%40popperjs/core/lib/utils/getOppositePlacement.js","../../../../node_modules/%40popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../../node_modules/%40popperjs/core/lib/utils/computeAutoPlacement.js","../../../../node_modules/%40popperjs/core/lib/modifiers/flip.js","../../../../node_modules/%40popperjs/core/lib/utils/getAltAxis.js","../../../../node_modules/%40popperjs/core/lib/utils/within.js","../../../../node_modules/%40popperjs/core/lib/modifiers/preventOverflow.js","../../../../node_modules/%40popperjs/core/lib/modifiers/arrow.js","../../../../node_modules/%40popperjs/core/lib/modifiers/hide.js","../../../../node_modules/%40popperjs/core/lib/popper.js","../../../../node_modules/%40mui/utils/esm/isHostComponent/isHostComponent.js","../../../../node_modules/%40mui/utils/esm/appendOwnerState/appendOwnerState.js","../../../../node_modules/%40mui/utils/esm/mergeSlotProps/mergeSlotProps.js","../../../../node_modules/%40mui/utils/esm/extractEventHandlers/extractEventHandlers.js","../../../../node_modules/%40mui/utils/esm/omitEventHandlers/omitEventHandlers.js","../../../../node_modules/%40mui/utils/esm/resolveComponentProps/resolveComponentProps.js","../../../../node_modules/%40mui/utils/esm/useSlotProps/useSlotProps.js","../../../../node_modules/%40mui/material/esm/Portal/Portal.js","../../../../node_modules/%40mui/utils/esm/setRef/setRef.js","../../../../node_modules/%40mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","../../../../node_modules/%40mui/utils/esm/generateUtilityClass/generateUtilityClass.js","../../../../node_modules/%40mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","../../../../node_modules/%40mui/material/esm/Popper/Popper.js","../../../../node_modules/%40mui/material/esm/Popper/BasePopper.js","../../../../node_modules/%40mui/material/esm/Popper/popperClasses.js","../../../../node_modules/%40mui/utils/esm/useEventCallback/useEventCallback.js","../../../../node_modules/%40mui/material/esm/utils/useEventCallback.js","../../../../node_modules/%40mui/material/esm/utils/useId.js","../../../../node_modules/%40mui/utils/esm/useControlled/useControlled.js","../../../../node_modules/%40mui/material/esm/utils/useControlled.js","../../../../node_modules/%40mui/material/esm/utils/useSlot.js","../../../../node_modules/%40mui/material/esm/Tooltip/Tooltip.js","../../../../node_modules/%40mui/material/esm/Tooltip/tooltipClasses.js","../../../../node_modules/next/src/shared/lib/router/utils/querystring.ts","../../../../node_modules/next/src/shared/lib/router/utils/format-url.ts","../../../../node_modules/next/src/client/use-merged-ref.ts","../../../../node_modules/next/src/shared/lib/utils.ts","../../../../node_modules/next/src/shared/lib/router/utils/parse-path.ts","../../../../node_modules/next/src/shared/lib/router/utils/add-path-prefix.ts","../../../../node_modules/next/src/shared/lib/router/utils/remove-trailing-slash.ts","../../../../node_modules/next/src/client/normalize-trailing-slash.ts","../../../../node_modules/next/src/client/add-base-path.ts","../../../../node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../node_modules/next/src/client/components/segment-cache/types.ts","../../../../node_modules/next/src/client/components/segment-cache/cache-key.ts","../../../../node_modules/next/src/shared/lib/app-router-types.ts","../../../../node_modules/next/src/client/components/match-segments.ts","../../../../node_modules/next/src/client/components/app-router-headers.ts","../../../../node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../node_modules/next/src/shared/lib/is-thenable.ts","../../../../node_modules/next/src/client/components/use-action-queue.ts","../../../../node_modules/next/src/client/app-call-server.ts","../../../../node_modules/next/src/client/app-find-source-map-url.ts","../../../../node_modules/next/src/shared/lib/segment-cache/segment-value-encoding.ts","../../../../node_modules/next/src/client/route-params.ts","../../../../node_modules/next/src/client/components/router-reducer/create-href-from-url.ts","../../../../node_modules/next/src/client/flight-data-helpers.ts","../../../../node_modules/next/src/client/app-build-id.ts","../../../../node_modules/next/src/shared/lib/hash.ts","../../../../node_modules/next/src/shared/lib/router/utils/cache-busting-search-param.ts","../../../../node_modules/next/src/client/components/router-reducer/set-cache-busting-search-param.ts","../../../../node_modules/next/src/shared/lib/deployment-id.ts","../../../../node_modules/next/src/client/components/router-reducer/fetch-server-response.ts","../../../../node_modules/next/src/client/components/segment-cache/lru.ts","../../../../node_modules/next/src/client/components/segment-cache/cache-map.ts","../../../../node_modules/next/src/client/components/segment-cache/vary-path.ts","../../../../node_modules/next/src/shared/lib/page-path/ensure-leading-slash.ts","../../../../node_modules/next/src/shared/lib/router/utils/app-paths.ts","../../../../node_modules/next/src/shared/lib/router/utils/interception-routes.ts","../../../../node_modules/next/src/client/components/router-reducer/compute-changed-path.ts","../../../../node_modules/next/src/client/components/router-reducer/handle-mutable.ts","../../../../node_modules/next/src/client/components/router-reducer/create-router-cache-key.ts","../../../../node_modules/next/src/client/components/router-reducer/is-navigating-to-new-root-layout.ts","../../../../node_modules/next/src/client/components/router-reducer/ppr-navigations.ts","../../../../node_modules/next/src/client/components/segment-cache/navigation.ts","../../../../node_modules/next/src/client/components/router-reducer/reducers/navigate-reducer.ts","../../../../node_modules/next/src/shared/lib/promise-with-resolvers.ts","../../../../node_modules/next/src/client/components/segment-cache/cache.ts","../../../../node_modules/next/src/client/components/segment-cache/scheduler.ts","../../../../node_modules/next/src/client/components/links.ts","../../../../node_modules/next/src/shared/lib/router/utils/path-has-prefix.ts","../../../../node_modules/next/src/client/has-base-path.ts","../../../../node_modules/next/src/shared/lib/router/utils/is-local-url.ts","../../../../node_modules/next/src/shared/lib/utils/error-once.ts","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../src/lib/animatedBackground/index.tsx","../../../../src/lib/appName/index.tsx","../../../../src/utils/data/global.constants.ts","../../../../src/utils/data/paths/paths.api.constants.ts","../../../../src/utils/data/paths/paths.ui.constants.ts","../../../../src/lib/badge/index.tsx","../../../../src/lib/badge/data.ts","../../../../src/lib/button/data.ts","../../../../src/lib/button/utils.ts","../../../../src/lib/button/index.tsx","../../../../src/lib/card/data.ts","../../../../src/lib/card/utils.ts","../../../../src/lib/card/index.tsx","../../../../node_modules/%40mui/material/esm/Unstable_TrapFocus/FocusTrap.js","../../../../node_modules/%40mui/utils/esm/getActiveElement/getActiveElement.js","../../../../node_modules/%40mui/material/esm/utils/getActiveElement.js","../../../../node_modules/%40mui/material/esm/Fade/Fade.js","../../../../node_modules/%40mui/material/esm/Backdrop/Backdrop.js","../../../../node_modules/%40mui/material/esm/Backdrop/backdropClasses.js","../../../../node_modules/%40mui/material/esm/Modal/Modal.js","../../../../node_modules/%40mui/material/esm/Modal/useModal.js","../../../../node_modules/%40mui/utils/esm/createChainedFunction/createChainedFunction.js","../../../../node_modules/%40mui/utils/esm/ownerWindow/ownerWindow.js","../../../../node_modules/%40mui/utils/esm/getScrollbarSize/getScrollbarSize.js","../../../../node_modules/%40mui/material/esm/Modal/ModalManager.js","../../../../node_modules/%40mui/material/esm/Modal/modalClasses.js","../../../../node_modules/%40mui/material/esm/utils/createSimplePaletteValueFilter.js","../../../../node_modules/%40mui/material/esm/useLazyRipple/useLazyRipple.js","../../../../node_modules/react-transition-group/esm/TransitionGroup.js","../../../../node_modules/%40babel/runtime/helpers/esm/assertThisInitialized.js","../../../../node_modules/react-transition-group/esm/utils/ChildMapping.js","../../../../node_modules/%40mui/material/esm/ButtonBase/ButtonBase.js","../../../../node_modules/%40mui/material/esm/ButtonBase/TouchRipple.js","../../../../node_modules/%40mui/material/esm/ButtonBase/Ripple.js","../../../../node_modules/%40mui/material/esm/ButtonBase/touchRippleClasses.js","../../../../node_modules/%40mui/material/esm/ButtonBase/buttonBaseClasses.js","../../../../node_modules/%40mui/material/esm/IconButton/IconButton.js","../../../../node_modules/%40mui/material/esm/CircularProgress/CircularProgress.js","../../../../node_modules/%40mui/material/esm/CircularProgress/circularProgressClasses.js","../../../../node_modules/%40mui/material/esm/IconButton/iconButtonClasses.js","../../../../node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/shared/src/utils.ts","../../../../node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/lucide-react/src/Icon.ts","../../../../src/lib/modal/index.tsx","../../../../node_modules/%40monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../../../node_modules/state-local/lib/es/state-local.js","../../../../node_modules/%40monaco-editor/loader/lib/es/config/index.js","../../../../node_modules/%40monaco-editor/loader/lib/es/utils/curry.js","../../../../node_modules/%40monaco-editor/loader/lib/es/utils/isObject.js","../../../../node_modules/%40monaco-editor/loader/lib/es/utils/compose.js","../../../../node_modules/%40monaco-editor/loader/lib/es/utils/makeCancelable.js","../../../../src/lib/confirmationModal/utils.ts","../../../../src/lib/modal/data.ts","../../../../src/lib/editor/data.ts","../../../../node_modules/%40monaco-editor/react/dist/index.mjs","../../../../node_modules/%40monaco-editor/loader/lib/es/utils/deepMerge.js","../../../../src/lib/confirmationModal/index.tsx","../../../../node_modules/%40monaco-editor/loader/lib/es/validators/index.js","../../../../src/lib/loadingOverlay/index.tsx","../../../../node_modules/%40monaco-editor/loader/lib/es/loader/index.js","../../../../src/lib/editor/index.tsx","../../../../node_modules/lucide-react/src/icons/x.ts","../../../../node_modules/lucide-react/src/icons/shield.ts","../../../../src/lib/privacyBanner/index.tsx","../../../../node_modules/%40mui/material/esm/Snackbar/useSnackbar.js","../../../../node_modules/%40mui/material/esm/ClickAwayListener/ClickAwayListener.js","../../../../src/lib/index.ts","../../../../node_modules/%40mui/material/esm/Snackbar/Snackbar.js","../../../../node_modules/%40mui/material/esm/SnackbarContent/SnackbarContent.js","../../../../node_modules/%40mui/material/esm/Paper/Paper.js","../../../../node_modules/%40mui/material/esm/Paper/paperClasses.js","../../../../node_modules/%40mui/material/esm/SnackbarContent/snackbarContentClasses.js","../../../../node_modules/%40mui/material/esm/Snackbar/snackbarClasses.js","../../../../src/lib/snackbar/utils.tsx","../../../../src/lib/snackbar/data.ts","../../../../src/lib/snackbar/index.tsx","../../../../src/components/endpointModal/data.ts","../../../../src/components/endpointModal/hooks/useEndpointForm.ts","../../../../src/utils/functions/createEndpoint.ts","../../../../src/utils/functions/updateFapiEndpoint.ts","../../../../src/utils/functions/deleteEndpoint.ts","../../../../src/utils/functions/loadEndpoints.ts","../../../../src/utils/validators/fileValidator.ts","../../../../src/utils/validators/endpointValidator.ts","../../../../src/utils/validators/importValidator.ts","../../../../src/utils/functions/importEndpoints.ts","../../../../src/utils/functions/exportEndpoints.ts","../../../../src/utils/functions/updateProjectName.ts","../../../../src/utils/functions/createEndpointKey.ts","../../../../src/utils/functions/validateJSON.ts","../../../../src/components/endpointModal/hooks/useEndpointSubmit.ts","../../../../node_modules/%40mui/material/esm/InputBase/utils.js","../../../../node_modules/%40mui/utils/esm/isMuiElement/isMuiElement.js","../../../../node_modules/%40mui/material/esm/utils/isMuiElement.js","../../../../node_modules/%40mui/material/esm/FormControl/FormControlContext.js","../../../../node_modules/%40mui/material/esm/FormControl/formControlClasses.js","../../../../node_modules/%40mui/material/esm/FormControl/FormControl.js","../../../../node_modules/%40mui/material/esm/FormControl/formControlState.js","../../../../node_modules/%40mui/material/esm/FormControl/useFormControl.js","../../../../node_modules/%40mui/material/esm/FormLabel/FormLabel.js","../../../../node_modules/%40mui/material/esm/FormLabel/formLabelClasses.js","../../../../node_modules/%40mui/material/esm/InputLabel/InputLabel.js","../../../../node_modules/%40mui/material/esm/InputLabel/inputLabelClasses.js","../../../../node_modules/%40mui/material/esm/List/ListContext.js","../../../../node_modules/%40mui/material/esm/MenuItem/MenuItem.js","../../../../node_modules/%40mui/material/esm/utils/useEnhancedEffect.js","../../../../node_modules/%40mui/material/esm/Divider/dividerClasses.js","../../../../node_modules/%40mui/material/esm/ListItemIcon/listItemIconClasses.js","../../../../node_modules/%40mui/material/esm/ListItemText/listItemTextClasses.js","../../../../node_modules/%40mui/material/esm/MenuItem/menuItemClasses.js","../../../../node_modules/%40mui/material/esm/utils/ownerDocument.js","../../../../node_modules/%40mui/material/esm/Menu/Menu.js","../../../../node_modules/%40mui/material/esm/MenuList/MenuList.js","../../../../node_modules/%40mui/material/esm/List/List.js","../../../../node_modules/%40mui/material/esm/List/listClasses.js","../../../../node_modules/%40mui/material/esm/utils/getScrollbarSize.js","../../../../node_modules/%40mui/material/esm/utils/ownerWindow.js","../../../../node_modules/%40mui/material/esm/Popover/Popover.js","../../../../node_modules/%40mui/utils/esm/debounce/debounce.js","../../../../node_modules/%40mui/material/esm/utils/debounce.js","../../../../node_modules/%40mui/material/esm/Popover/popoverClasses.js","../../../../node_modules/%40mui/material/esm/utils/mergeSlotProps.js","../../../../node_modules/%40mui/material/esm/Menu/menuClasses.js","../../../../node_modules/%40mui/material/esm/NativeSelect/NativeSelectInput.js","../../../../node_modules/%40mui/material/esm/NativeSelect/nativeSelectClasses.js","../../../../src/components/endpointModal/subcomponents/endpointFormFields/index.tsx","../../../../node_modules/%40mui/material/esm/Select/Select.js","../../../../node_modules/%40mui/material/esm/Select/SelectInput.js","../../../../node_modules/%40mui/material/esm/Select/selectClasses.js","../../../../node_modules/%40mui/material/esm/SvgIcon/SvgIcon.js","../../../../node_modules/%40mui/material/esm/SvgIcon/svgIconClasses.js","../../../../node_modules/%40mui/material/esm/utils/createSvgIcon.js","../../../../node_modules/%40mui/material/esm/internal/svg-icons/ArrowDropDown.js","../../../../node_modules/%40mui/material/esm/InputBase/InputBase.js","../../../../node_modules/%40mui/material/esm/TextareaAutosize/TextareaAutosize.js","../../../../node_modules/%40mui/material/esm/InputBase/inputBaseClasses.js","../../../../node_modules/%40mui/material/esm/Input/Input.js","../../../../node_modules/%40mui/material/esm/Input/inputClasses.js","../../../../node_modules/%40mui/material/esm/FilledInput/filledInputClasses.js","../../../../node_modules/%40mui/material/esm/FilledInput/FilledInput.js","../../../../node_modules/%40mui/material/esm/OutlinedInput/NotchedOutline.js","../../../../node_modules/%40mui/material/esm/OutlinedInput/outlinedInputClasses.js","../../../../node_modules/%40mui/material/esm/OutlinedInput/OutlinedInput.js","../../../../node_modules/%40mui/material/esm/TextField/TextField.js","../../../../node_modules/%40mui/material/esm/FormHelperText/formHelperTextClasses.js","../../../../node_modules/%40mui/material/esm/FormHelperText/FormHelperText.js","../../../../node_modules/%40mui/material/esm/TextField/textFieldClasses.js","../../../../src/components/endpointModal/subcomponents/responseEditor/index.tsx","../../../../src/components/endpointModal/index.tsx","../../../../src/components/endpointModal/subcomponents/formActions/index.tsx","../../../../src/components/endpointStats/index.tsx","../../../../src/components/fapiSimulationCard/subcomponents/responseControls/index.tsx","../../../../node_modules/%40mui/material/esm/Button/buttonClasses.js","../../../../node_modules/%40mui/material/esm/ButtonGroup/ButtonGroupContext.js","../../../../node_modules/%40mui/material/esm/ButtonGroup/ButtonGroupButtonContext.js","../../../../node_modules/%40mui/material/esm/Button/Button.js","../../../../src/components/fapiSimulationCard/subcomponents/cardActions/index.tsx","../../../../src/components/fapiSimulationCard/index.tsx","../../../../src/components/projectNameSection/index.tsx","../../../../src/components/endpointModal/subcomponents/formActions/utils.ts","../../../../src/components/importExportActions/utils.ts","../../../../src/components/projectNameSection/utils.ts","../../../../src/components/fapiSimulationCard/hooks/useCardActions.ts","../../../../src/components/featureCard/index.tsx","../../../../src/components/fapiSimulationCard/subcomponents/cardHeader/data.ts","../../../../src/components/importExportActions/index.tsx","../../../../src/components/importConfirmationModal/index.tsx","../../../../src/components/fapiSimulationCard/subcomponents/cardHeader/index.tsx","../../../../node_modules/lucide-react/src/icons/square-pen.ts","../../../../node_modules/lucide-react/src/icons/copy.ts","../../../../node_modules/lucide-react/src/icons/trash-2.ts","../../../../node_modules/lucide-react/src/icons/save.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport useLazyRef from \"../useLazyRef/useLazyRef.js\";\nimport useOnMount from \"../useOnMount/useOnMount.js\";\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = null;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !window.navigator.userAgent.includes('jsdom')) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref<any> | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n return element?.props?.ref || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return element?.ref || null;\n}","import styledEngineStyled, { internal_mutateStyles as mutateStyles, internal_serializeStyles as serializeStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nimport preprocessStyles from \"../preprocessStyles.js\";\n\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-labels */\n/* eslint-disable no-lone-blocks */\n\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction shallowLayer(serialized, layerName) {\n if (layerName && serialized && typeof serialized === 'object' && serialized.styles && !serialized.styles.startsWith('@layer') // only add the layer if it is not already there.\n ) {\n serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;\n }\n return serialized;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction attachTheme(props, themeId, defaultTheme) {\n props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;\n}\nfunction processStyle(props, style, layerName) {\n /*\n * Style types:\n * - null/undefined\n * - string\n * - CSS style object: { [cssKey]: [cssValue], variants }\n * - Processed style object: { style, variants, isProcessed: true }\n * - Array of any of the above\n */\n\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle, layerName));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n let rootStyle;\n if (resolvedStyle.isProcessed) {\n rootStyle = layerName ? shallowLayer(resolvedStyle.style, layerName) : resolvedStyle.style;\n } else {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n rootStyle = layerName ? shallowLayer(serializeStyles(otherStyles), layerName) : otherStyles;\n }\n return processStyleVariants(props, resolvedStyle.variants, [rootStyle], layerName);\n }\n if (resolvedStyle?.isProcessed) {\n return layerName ? shallowLayer(serializeStyles(resolvedStyle.style), layerName) : resolvedStyle.style;\n }\n return layerName ? shallowLayer(serializeStyles(resolvedStyle), layerName) : resolvedStyle;\n}\nfunction processStyleVariants(props, variants, results = [], layerName = undefined) {\n let mergedState; // We might not need it, initialized lazily\n\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n results.push(layerName ? shallowLayer(serializeStyles(variant.style(mergedState)), layerName) : variant.style(mergedState));\n } else {\n results.push(layerName ? shallowLayer(serializeStyles(variant.style), layerName) : variant.style);\n }\n }\n return results;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n function styleAttachTheme(props) {\n attachTheme(props, themeId, defaultTheme);\n }\n const styled = (tag, inputOptions = {}) => {\n // If `tag` is already a styled component, filter out the `sx` style function\n // to prevent unnecessary styles generated by the composite components.\n mutateStyles(tag, styles => styles.filter(style => style !== styleFunctionSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n const layerName = componentName && componentName.startsWith('Mui') || !!componentSlot ? 'components' : 'custom';\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label: generateStyledLabel(componentName, componentSlot),\n ...options\n });\n const transformStyle = style => {\n // - On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n // - `style` could be a styled component from a babel plugin for component selectors, This condition\n // makes sure that we do not interpolate them.\n if (style.__emotion_real === style) {\n return style;\n }\n if (typeof style === 'function') {\n return function styleFunctionProcessor(props) {\n return processStyle(props, style, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n if (isPlainObject(style)) {\n const serialized = preprocessStyles(style);\n return function styleObjectProcessor(props) {\n if (!serialized.variants) {\n return props.theme.modularCssLayers ? shallowLayer(serialized.style, layerName) : serialized.style;\n }\n return processStyle(props, serialized, props.theme.modularCssLayers ? layerName : undefined);\n };\n }\n return style;\n };\n const muiStyledResolver = (...expressionsInput) => {\n const expressionsHead = [];\n const expressionsBody = expressionsInput.map(transformStyle);\n const expressionsTail = [];\n\n // Preprocess `props` to set the scoped theme value.\n // This must run before any other expression.\n expressionsHead.push(styleAttachTheme);\n if (componentName && overridesResolver) {\n expressionsTail.push(function styleThemeOverrides(props) {\n const theme = props.theme;\n const styleOverrides = theme.components?.[componentName]?.styleOverrides;\n if (!styleOverrides) {\n return null;\n }\n const resolvedStyleOverrides = {};\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey], props.theme.modularCssLayers ? 'theme' : undefined);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsTail.push(function styleThemeVariants(props) {\n const theme = props.theme;\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyleVariants(props, themeVariants, [], props.theme.modularCssLayers ? 'theme' : undefined);\n });\n }\n if (!skipSx) {\n expressionsTail.push(styleFunctionSx);\n }\n\n // This function can be called as a tagged template, so the first argument would contain\n // CSS `string[]` values.\n if (Array.isArray(expressionsBody[0])) {\n const inputStrings = expressionsBody.shift();\n\n // We need to add placeholders in the tagged template for the custom functions we have\n // possibly added (attachTheme, overrides, variants, and sx).\n const placeholdersHead = new Array(expressionsHead.length).fill('');\n const placeholdersTail = new Array(expressionsTail.length).fill('');\n let outputStrings;\n // prettier-ignore\n {\n outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];\n outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];\n }\n\n // The only case where we put something before `attachTheme`\n expressionsHead.unshift(outputStrings);\n }\n const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];\n const Component = defaultStyledResolver(...expressions);\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n if (process.env.NODE_ENV !== 'production') {\n Component.displayName = generateDisplayName(componentName, componentSlot, tag);\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction generateDisplayName(componentName, componentSlot, tag) {\n if (componentName) {\n return `${componentName}${capitalize(componentSlot || '')}`;\n }\n return `Styled(${getDisplayName(tag)})`;\n}\nfunction generateStyledLabel(componentName, componentSlot) {\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n return label;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","import { ForwardRef, Memo } from 'react-is';\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","import { internal_serializeStyles } from '@mui/styled-engine';\nexport default function preprocessStyles(input) {\n const {\n variants,\n ...style\n } = input;\n const result = {\n variants,\n style: internal_serializeStyles(style),\n isProcessed: true\n };\n\n // Not supported on styled-components\n if (result.style === style) {\n return result;\n }\n if (variants) {\n variants.forEach(variant => {\n if (typeof variant.style !== 'function') {\n variant.style = internal_serializeStyles(variant.style);\n }\n });\n }\n return result;\n}","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","import preprocessStyles from \"./preprocessStyles.js\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function unstable_memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return function styleMemoized(props) {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = preprocessStyles(styleFn(arg));\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","import { unstable_memoTheme } from '@mui/system';\nconst memoTheme = unstable_memoTheme;\nexport default memoTheme;","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n *\n * ```tsx\n * const rootRef = React.useRef<Instance>(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * <Root {...props} ref={refFork} />\n * );\n * ```\n *\n * @param {Array<React.Ref<Instance> | undefined>} refs The ref array.\n * @returns {React.RefCallback<Instance> | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return null;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup?.());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nexport default useForkRef;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { Transition } from 'react-transition-group';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { getTransitionProps, reflow } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Grow) {\n Grow.muiSupportAuto = true;\n}\nexport default Grow;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useForkRef from '@mui/utils/useForkRef';\nimport setRef from '@mui/utils/setRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport exactProp from '@mui/utils/exactProp';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/material-ui/api/portal/)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if (/*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return children;\n }\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport default Portal;","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root'\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n const isRtl = useRtl();\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps,\n ...other\n } = props;\n const RootComponent = slots?.root ?? components?.Root;\n const otherProps = {\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n ...other\n };\n return /*#__PURE__*/_jsx(PopperRoot, {\n as: component,\n direction: isRtl ? 'rtl' : 'ltr',\n slots: {\n root: RootComponent\n },\n slotProps: slotProps ?? componentsProps,\n ...otherProps,\n ref: ref\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport * as React from 'react';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useForkRef from '@mui/utils/useForkRef';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport refType from '@mui/utils/refType';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport Portal from \"../Portal/index.js\";\nimport { getPopperUtilityClass } from \"./popperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPopperUtilityClass, classes);\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps,\n // @ts-ignore internal logic\n ownerState: ownerStateProp,\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n ...other\n } = props;\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {\n placement: rtlPlacement,\n ...popperOptions,\n modifiers: popperModifiers\n });\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses(props);\n const Root = slots.root ?? 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: typeof children === 'function' ? children(childProps) : children\n });\n});\n\n/**\n * @ignore - internal component.\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, {\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots,\n ...other,\n style: {\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display,\n ...style\n },\n TransitionProps: transitionProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nconst popperClasses = generateUtilityClasses('MuiPopper', ['root']);\nexport default popperClasses;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(props) {\n const {\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n } = props;\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && JSON.stringify(defaultProp) !== JSON.stringify(defaultValue)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n // TODO: provide overloads for the useControlled function to account for the case where either\n // controlled or default is not undefined.\n // In that case the return type should be [T, React.Dispatch<React.SetStateAction<T>>]\n // otherwise it should be [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>]\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport useControlled from '@mui/utils/useControlled';\nexport default useControlled;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n internalForwardedProps,\n shouldForwardComponentProp = false,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && !shouldForwardComponentProp && {\n as: LeafComponent\n }),\n ...(LeafComponent && shouldForwardComponentProp && {\n component: LeafComponent\n }),\n ref\n }, ownerState);\n return [elementType, props];\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow'\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n if (!isFocusVisible(event.target)) {\n setChildIsFocusVisible(false);\n handleMouseLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n /**\n * Object of `query` values from url\n */\n query: Partial<{\n [key: string]: string | string[]\n }>\n /**\n * Object of `cookies` from header\n */\n cookies: Partial<{\n [key: string]: string\n }>\n\n body: any\n\n env: Env\n\n draftMode?: boolean\n\n preview?: boolean\n /**\n * Preview data set on the request, if any\n * */\n previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n /**\n * Send data `any` data in response\n */\n send: Send<Data>\n /**\n * Send data `json` data in response\n */\n json: Send<Data>\n status: (statusCode: number) => NextApiResponse<Data>\n redirect(url: string): NextApiResponse<Data>\n redirect(status: number, url: string): NextApiResponse<Data>\n\n /**\n * Set draft mode\n */\n setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n /**\n * Set preview data for Next.js' prerender mode\n */\n setPreviewData: (\n data: object | string,\n options?: {\n /**\n * Specifies the number (in seconds) for the preview session to last for.\n * The given number will be converted to an integer by rounding down.\n * By default, no maximum age is set and the preview session finishes\n * when the client shuts down (browser is closed).\n */\n maxAge?: number\n /**\n * Specifies the path for the preview session to work under. By default,\n * the path is considered the \"default path\", i.e., any pages under \"/\".\n */\n path?: string\n }\n ) => NextApiResponse<Data>\n\n /**\n * Clear preview data for Next.js' prerender mode\n */\n clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n /**\n * Revalidate a specific page and regenerate it using On-Demand Incremental\n * Static Regeneration.\n * The path should be an actual path, not a rewritten path. E.g. for\n * \"/blog/[slug]\" this should be \"/blog/post-1\".\n * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n */\n revalidate: (\n urlPath: string,\n opts?: {\n unstable_onlyGenerated?: boolean\n }\n ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n req: NextApiRequest,\n res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n fn: T\n): T {\n let used = false\n let result: ReturnType<T>\n\n return ((...args: any[]) => {\n if (!used) {\n used = true\n result = fn(...args)\n }\n return result\n }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location\n return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n const { href } = window.location\n const origin = getLocationOrigin()\n return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n return typeof Component === 'string'\n ? Component\n : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n const urlParts = url.split('?')\n const urlNoQuery = urlParts[0]\n\n return (\n urlNoQuery\n // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/')\n .replace(/\\/\\/+/g, '/') +\n (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n )\n}\n\nexport async function loadGetInitialProps<\n C extends BaseContext,\n IP = {},\n P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n throw new Error(message)\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n }\n }\n return {} as IP\n }\n\n const props = await App.getInitialProps(ctx)\n\n if (res && isResSent(res)) {\n return props\n }\n\n if (!props) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n throw new Error(message)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\n `${getDisplayName(\n App\n )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n )\n }\n }\n\n return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n SP &&\n (['mark', 'measure', 'getEntriesByName'] as const).every(\n (method) => typeof performance[method] === 'function'\n )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n code: string\n\n constructor(page: string) {\n super()\n this.code = 'ENOENT'\n this.name = 'PageNotFoundError'\n this.message = `Cannot find module for page: ${page}`\n }\n}\n\nexport class MissingStaticPage extends Error {\n constructor(page: string, message: string) {\n super()\n this.message = `Failed to load static file for page: ${page} ${message}`\n }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n code: string\n constructor() {\n super()\n this.code = 'ENOENT'\n this.message = `Cannot find the middleware module`\n }\n}\n\nexport interface CacheFs {\n existsSync: typeof fs.existsSync\n readFile: typeof fs.promises.readFile\n readFileSync: typeof fs.readFileSync\n writeFile(f: string, d: any): Promise<void>\n mkdir(dir: string): Promise<void | string>\n stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n if (process.env.__NEXT_TRAILING_SLASH) {\n if (/\\.[^/]+\\/?$/.test(pathname)) {\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n } else if (pathname.endsWith('/')) {\n return `${pathname}${query}${hash}`\n } else {\n return `${pathname}/${query}${hash}`\n }\n }\n\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n return normalizePathTrailingSlash(\n process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n ? path\n : addPathPrefix(path, basePath)\n )\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","/**\n * Shared types and constants for the Segment Cache.\n */\n\nexport const enum NavigationResultTag {\n MPA,\n Success,\n NoOp,\n Async,\n}\n\n/**\n * The priority of the prefetch task. Higher numbers are higher priority.\n */\nexport const enum PrefetchPriority {\n /**\n * Assigned to the most recently hovered/touched link. Special network\n * bandwidth is reserved for this task only. There's only ever one Intent-\n * priority task at a time; when a new Intent task is scheduled, the previous\n * one is bumped down to Default.\n */\n Intent = 2,\n /**\n * The default priority for prefetch tasks.\n */\n Default = 1,\n /**\n * Assigned to tasks when they spawn non-blocking background work, like\n * revalidating a partially cached entry to see if more data is available.\n */\n Background = 0,\n}\n\nexport const enum FetchStrategy {\n // Deliberately ordered so we can easily compare two segments\n // and determine if one segment is \"more specific\" than another\n // (i.e. if it's likely that it contains more data)\n LoadingBoundary = 0,\n PPR = 1,\n PPRRuntime = 2,\n Full = 3,\n}\n\n/**\n * A subset of fetch strategies used for prefetch tasks.\n * A prefetch task can't know if it should use `PPR` or `LoadingBoundary`\n * until we complete the initial tree prefetch request, so we use `PPR` to signal both cases\n * and adjust it based on the route when actually fetching.\n * */\nexport type PrefetchTaskFetchStrategy =\n | FetchStrategy.PPR\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full\n","// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\n// Only functions in this module should be allowed to create CacheKeys.\nexport type NormalizedPathname = Opaque<'NormalizedPathname', string>\nexport type NormalizedSearch = Opaque<'NormalizedSearch', string>\nexport type NormalizedNextUrl = Opaque<'NormalizedNextUrl', string>\n\nexport type RouteCacheKey = Opaque<\n 'RouteCacheKey',\n {\n pathname: NormalizedPathname\n search: NormalizedSearch\n nextUrl: NormalizedNextUrl | null\n\n // TODO: Eventually the dynamic params will be added here, too.\n }\n>\n\nexport function createCacheKey(\n originalHref: string,\n nextUrl: string | null\n): RouteCacheKey {\n const originalUrl = new URL(originalHref)\n const cacheKey = {\n pathname: originalUrl.pathname as NormalizedPathname,\n search: originalUrl.search as NormalizedSearch,\n nextUrl: nextUrl as NormalizedNextUrl | null,\n } as RouteCacheKey\n return cacheKey\n}\n","/**\n * App Router types - Client-safe types for the Next.js App Router\n *\n * This file contains type definitions that can be safely imported\n * by both client-side and server-side code without circular dependencies.\n */\n\nimport type React from 'react'\n\nexport type LoadingModuleData =\n | [React.JSX.Element, React.ReactNode, React.ReactNode]\n | null\n\n/** viewport metadata node */\nexport type HeadData = React.ReactNode\n\nexport type ChildSegmentMap = Map<string, CacheNode>\n\n/**\n * Cache node used in app-router / layout-router.\n */\n\nexport type CacheNode = {\n /**\n * When rsc is not null, it represents the RSC data for the\n * corresponding segment.\n *\n * `null` is a valid React Node but because segment data is always a\n * <LayoutRouter> component, we can use `null` to represent empty. When it is\n * null, it represents missing data, and rendering should suspend.\n */\n rsc: React.ReactNode\n\n /**\n * Represents a static version of the segment that can be shown immediately,\n * and may or may not contain dynamic holes. It's prefetched before a\n * navigation occurs.\n *\n * During rendering, we will choose whether to render `rsc` or `prefetchRsc`\n * with `useDeferredValue`. As with the `rsc` field, a value of `null` means\n * no value was provided. In this case, the LayoutRouter will go straight to\n * rendering the `rsc` value; if that one is also missing, it will suspend and\n * trigger a lazy fetch.\n */\n prefetchRsc: React.ReactNode\n\n prefetchHead: HeadData | null\n\n head: HeadData\n\n loading: LoadingModuleData | Promise<LoadingModuleData>\n\n parallelRoutes: Map<string, ChildSegmentMap>\n\n /**\n * The timestamp of the navigation that last updated the CacheNode's data. If\n * a CacheNode is reused from a previous navigation, this value is not\n * updated. Used to track the staleness of the data.\n */\n navigatedAt: number\n}\n\nexport type DynamicParamTypes =\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall'\n | 'dynamic'\n | 'dynamic-intercepted-(..)(..)'\n | 'dynamic-intercepted-(.)'\n | 'dynamic-intercepted-(..)'\n | 'dynamic-intercepted-(...)'\n\nexport type DynamicParamTypesShort =\n | 'c'\n | 'ci(..)(..)'\n | 'ci(.)'\n | 'ci(..)'\n | 'ci(...)'\n | 'oc'\n | 'd'\n | 'di(..)(..)'\n | 'di(.)'\n | 'di(..)'\n | 'di(...)'\n\nexport type Segment =\n | string\n | [\n // Param name\n paramName: string,\n // Param cache key (almost the same as the value, but arrays are\n // concatenated into strings)\n // TODO: We should change this to just be the value. Currently we convert\n // it back to a value when passing to useParams. It only needs to be\n // a string when converted to a a cache key, but that doesn't mean we\n // need to store it as that representation.\n paramCacheKey: string,\n // Dynamic param type\n dynamicParamType: DynamicParamTypesShort,\n ]\n\n/**\n * Router state\n */\nexport type FlightRouterState = [\n segment: Segment,\n parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },\n url?: string | null,\n /**\n * \"refresh\" and \"refetch\", despite being similarly named, have different\n * semantics:\n * - \"refetch\" is used during a request to inform the server where rendering\n * should start from.\n *\n * - \"refresh\" is used by the client to mark that a segment should re-fetch the\n * data from the server for the current segment. It uses the \"url\" property\n * above to determine where to fetch from.\n *\n * - \"inside-shared-layout\" is used during a prefetch request to inform the\n * server that even if the segment matches, it should be treated as if it's\n * within the \"new\" part of a navigation — inside the shared layout. If\n * the segment doesn't match, then it has no effect, since it would be\n * treated as new regardless. If it does match, though, the server does not\n * need to render it, because the client already has it.\n *\n * - \"metadata-only\" instructs the server to skip rendering the segments and\n * only send the head data.\n *\n * A bit confusing, but that's because it has only one extremely narrow use\n * case — during a non-PPR prefetch, the server uses it to find the first\n * loading boundary beneath a shared layout.\n *\n * TODO: We should rethink the protocol for dynamic requests. It might not\n * make sense for the client to send a FlightRouterState, since this type is\n * overloaded with concerns.\n */\n refresh?:\n | 'refetch'\n | 'refresh'\n | 'inside-shared-layout'\n | 'metadata-only'\n | null,\n isRootLayout?: boolean,\n /**\n * Only present when responding to a tree prefetch request. Indicates whether\n * there is a loading boundary somewhere in the tree. The client cache uses\n * this to determine if it can skip the data prefetch request.\n */\n hasLoadingBoundary?: HasLoadingBoundary,\n]\n\nexport const enum HasLoadingBoundary {\n // There is a loading boundary in this particular segment\n SegmentHasLoadingBoundary = 1,\n // There is a loading boundary somewhere in the subtree (but not in\n // this segment)\n SubtreeHasLoadingBoundary = 2,\n // There is no loading boundary in this segment or any of its descendants\n SubtreeHasNoLoadingBoundary = 3,\n}\n\n/**\n * Individual Flight response path\n */\nexport type FlightSegmentPath =\n // Uses `any` as repeating pattern can't be typed.\n | any[]\n // Looks somewhat like this\n | [\n segment: Segment,\n parallelRouterKey: string,\n segment: Segment,\n parallelRouterKey: string,\n segment: Segment,\n parallelRouterKey: string,\n ]\n\n/**\n * Represents a tree of segments and the Flight data (i.e. React nodes) that\n * correspond to each one. The tree is isomorphic to the FlightRouterState;\n * however in the future we want to be able to fetch arbitrary partial segments\n * without having to fetch all its children. So this response format will\n * likely change.\n */\nexport type CacheNodeSeedData = [\n node: React.ReactNode | null,\n parallelRoutes: {\n [parallelRouterKey: string]: CacheNodeSeedData | null\n },\n loading: LoadingModuleData | Promise<LoadingModuleData>,\n isPartial: boolean,\n /** TODO: this doesn't feel like it belongs here, because it's only used during build, in `collectSegmentData` */\n hasRuntimePrefetch: boolean,\n]\n\nexport type FlightDataSegment = [\n /* segment of the rendered slice: */ Segment,\n /* treePatch */ FlightRouterState,\n /* cacheNodeSeedData */ CacheNodeSeedData | null, // Can be null during prefetch if there's no loading component\n /* head: viewport */ HeadData,\n /* isHeadPartial */ boolean,\n]\n\nexport type FlightDataPath =\n // Uses `any` as repeating pattern can't be typed.\n | any[]\n // Looks somewhat like this\n | [\n // Holds full path to the segment.\n ...FlightSegmentPath[],\n ...FlightDataSegment,\n ]\n\n/**\n * The Flight response data\n */\nexport type FlightData = Array<FlightDataPath> | string\n\nexport type ActionResult = Promise<any>\n\nexport type InitialRSCPayload = {\n /** buildId */\n b: string\n /** initialCanonicalUrlParts */\n c: string[]\n /** initialRenderedSearch */\n q: string\n /** couldBeIntercepted */\n i: boolean\n /** initialFlightData */\n f: FlightDataPath[]\n /** missingSlots */\n m: Set<string> | undefined\n /** GlobalError */\n G: [React.ComponentType<any>, React.ReactNode | undefined]\n /** prerendered */\n S: boolean\n}\n\n// Response from `createFromFetch` for normal rendering\nexport type NavigationFlightResponse = {\n /** buildId */\n b: string\n /** flightData */\n f: FlightData\n /** prerendered */\n S: boolean\n /** renderedSearch */\n q: string\n /** couldBeIntercepted */\n i: boolean\n /** runtimePrefetch - [isPartial, staleTime]. Only present in runtime prefetch responses. */\n rp?: [boolean, number]\n}\n\n// Response from `createFromFetch` for server actions. Action's flight data can be null\nexport type ActionFlightResponse = {\n /** actionResult */\n a: ActionResult\n /** buildId */\n b: string\n /** flightData */\n f: FlightData\n /** renderedSearch */\n q: string\n /** couldBeIntercepted */\n i: boolean\n}\n\nexport type RSCPayload =\n | InitialRSCPayload\n | NavigationFlightResponse\n | ActionFlightResponse\n","import type { Segment } from '../../shared/lib/app-router-types'\n\nexport const matchSegment = (\n existingSegment: Segment,\n segment: Segment\n): boolean => {\n // segment is either Array or string\n if (typeof existingSegment === 'string') {\n if (typeof segment === 'string') {\n // Common case: segment is just a string\n return existingSegment === segment\n }\n return false\n }\n\n if (typeof segment === 'string') {\n return false\n }\n return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]\n}\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n 'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\nexport const FLIGHT_HEADERS = [\n RSC_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","import { PAGE_SEGMENT_KEY } from '../segment'\nimport type { Segment as FlightRouterStateSegment } from '../app-router-types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type SegmentRequestKeyPart = Opaque<'SegmentRequestKeyPart', string>\nexport type SegmentRequestKey = Opaque<'SegmentRequestKey', string>\n\nexport const ROOT_SEGMENT_REQUEST_KEY = '' as SegmentRequestKey\n\nexport const HEAD_REQUEST_KEY = '/_head' as SegmentRequestKey\n\nexport function createSegmentRequestKeyPart(\n segment: FlightRouterStateSegment\n): SegmentRequestKeyPart {\n if (typeof segment === 'string') {\n if (segment.startsWith(PAGE_SEGMENT_KEY)) {\n // The Flight Router State type sometimes includes the search params in\n // the page segment. However, the Segment Cache tracks this as a separate\n // key. So, we strip the search params here, and then add them back when\n // the cache entry is turned back into a FlightRouterState. This is an\n // unfortunate consequence of the FlightRouteState being used both as a\n // transport type and as a cache key; we'll address this once more of the\n // Segment Cache implementation has settled.\n // TODO: We should hoist the search params out of the FlightRouterState\n // type entirely, This is our plan for dynamic route params, too.\n return PAGE_SEGMENT_KEY as SegmentRequestKeyPart\n }\n const safeName =\n // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n // But params typically don't include the leading slash. We should use\n // a different encoding to avoid this special case.\n segment === '/_not-found'\n ? '_not-found'\n : encodeToFilesystemAndURLSafeString(segment)\n // Since this is not a dynamic segment, it's fully encoded. It does not\n // need to be \"hydrated\" with a param value.\n return safeName as SegmentRequestKeyPart\n }\n\n const name = segment[0]\n const paramType = segment[2]\n const safeName = encodeToFilesystemAndURLSafeString(name)\n\n const encodedName = '$' + paramType + '$' + safeName\n return encodedName as SegmentRequestKeyPart\n}\n\nexport function appendSegmentRequestKeyPart(\n parentRequestKey: SegmentRequestKey,\n parallelRouteKey: string,\n childRequestKeyPart: SegmentRequestKeyPart\n): SegmentRequestKey {\n // Aside from being filesystem safe, segment keys are also designed so that\n // each segment and parallel route creates its own subdirectory. Roughly in\n // the same shape as the source app directory. This is mostly just for easier\n // debugging (you can open up the build folder and navigate the output); if\n // we wanted to do we could just use a flat structure.\n\n // Omit the parallel route key for children, since this is the most\n // common case. Saves some bytes (and it's what the app directory does).\n const slotKey =\n parallelRouteKey === 'children'\n ? childRequestKeyPart\n : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`\n return (parentRequestKey + '/' + slotKey) as SegmentRequestKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n if (simpleParamValueRegex.test(value)) {\n return value\n }\n // If there are any unsafe characters, base64url-encode the entire value.\n // We also add a ! prefix so it doesn't collide with the simple case.\n const base64url = btoa(value)\n .replace(/\\+/g, '-') // Replace '+' with '-'\n .replace(/\\//g, '_') // Replace '/' with '_'\n .replace(/=+$/, '') // Remove trailing '='\n return '!' + base64url\n}\n\nexport function convertSegmentPathToStaticExportFilename(\n segmentPath: string\n): string {\n return `__next${segmentPath.replace(/\\//g, '.')}.txt`\n}\n","import type { DynamicParamTypesShort } from '../shared/lib/app-router-types'\nimport {\n addSearchParamsIfPageSegment,\n DEFAULT_SEGMENT_KEY,\n PAGE_SEGMENT_KEY,\n} from '../shared/lib/segment'\nimport { ROOT_SEGMENT_REQUEST_KEY } from '../shared/lib/segment-cache/segment-value-encoding'\nimport {\n NEXT_REWRITTEN_PATH_HEADER,\n NEXT_REWRITTEN_QUERY_HEADER,\n NEXT_RSC_UNION_QUERY,\n} from './components/app-router-headers'\nimport type {\n NormalizedPathname,\n NormalizedSearch,\n} from './components/segment-cache/cache-key'\nimport type { RSCResponse } from './components/router-reducer/fetch-server-response'\nimport type { ParsedUrlQuery } from 'querystring'\n\nexport type RouteParamValue = string | Array<string> | null\n\nexport function getRenderedSearch(\n response: RSCResponse<unknown> | Response\n): NormalizedSearch {\n // If the server performed a rewrite, the search params used to render the\n // page will be different from the params in the request URL. In this case,\n // the response will include a header that gives the rewritten search query.\n const rewrittenQuery = response.headers.get(NEXT_REWRITTEN_QUERY_HEADER)\n if (rewrittenQuery !== null) {\n return (\n rewrittenQuery === '' ? '' : '?' + rewrittenQuery\n ) as NormalizedSearch\n }\n // If the header is not present, there was no rewrite, so we use the search\n // query of the response URL.\n return urlToUrlWithoutFlightMarker(new URL(response.url))\n .search as NormalizedSearch\n}\n\nexport function getRenderedPathname(\n response: RSCResponse<unknown> | Response\n): NormalizedPathname {\n // If the server performed a rewrite, the pathname used to render the\n // page will be different from the pathname in the request URL. In this case,\n // the response will include a header that gives the rewritten pathname.\n const rewrittenPath = response.headers.get(NEXT_REWRITTEN_PATH_HEADER)\n return (rewrittenPath ??\n urlToUrlWithoutFlightMarker(new URL(response.url))\n .pathname) as NormalizedPathname\n}\n\nexport function parseDynamicParamFromURLPart(\n paramType: DynamicParamTypesShort,\n pathnameParts: Array<string>,\n partIndex: number\n): RouteParamValue {\n // This needs to match the behavior in get-dynamic-param.ts.\n switch (paramType) {\n // Catchalls\n case 'c': {\n // Catchalls receive all the remaining URL parts. If there are no\n // remaining pathname parts, return an empty array.\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s) => encodeURIComponent(s))\n : []\n }\n // Catchall intercepted\n case 'ci(..)(..)':\n case 'ci(.)':\n case 'ci(..)':\n case 'ci(...)': {\n const prefix = paramType.length - 2\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s, i) => {\n if (i === 0) {\n return encodeURIComponent(s.slice(prefix))\n }\n\n return encodeURIComponent(s)\n })\n : []\n }\n // Optional catchalls\n case 'oc': {\n // Optional catchalls receive all the remaining URL parts, unless this is\n // the end of the pathname, in which case they return null.\n return partIndex < pathnameParts.length\n ? pathnameParts.slice(partIndex).map((s) => encodeURIComponent(s))\n : null\n }\n // Dynamic\n case 'd': {\n if (partIndex >= pathnameParts.length) {\n // The route tree expected there to be more parts in the URL than there\n // actually are. This could happen if the x-nextjs-rewritten-path header\n // is incorrectly set, or potentially due to bug in Next.js. TODO:\n // Should this be a hard error? During a prefetch, we can just abort.\n // During a client navigation, we could trigger a hard refresh. But if\n // it happens during initial render, we don't really have any\n // recovery options.\n return ''\n }\n return encodeURIComponent(pathnameParts[partIndex])\n }\n // Dynamic intercepted\n case 'di(..)(..)':\n case 'di(.)':\n case 'di(..)':\n case 'di(...)': {\n const prefix = paramType.length - 2\n if (partIndex >= pathnameParts.length) {\n // The route tree expected there to be more parts in the URL than there\n // actually are. This could happen if the x-nextjs-rewritten-path header\n // is incorrectly set, or potentially due to bug in Next.js. TODO:\n // Should this be a hard error? During a prefetch, we can just abort.\n // During a client navigation, we could trigger a hard refresh. But if\n // it happens during initial render, we don't really have any\n // recovery options.\n return ''\n }\n\n return encodeURIComponent(pathnameParts[partIndex].slice(prefix))\n }\n default:\n paramType satisfies never\n return ''\n }\n}\n\nexport function doesStaticSegmentAppearInURL(segment: string): boolean {\n // This is not a parameterized segment; however, we need to determine\n // whether or not this segment appears in the URL. For example, this route\n // groups do not appear in the URL, so they should be skipped. Any other\n // special cases must be handled here.\n // TODO: Consider encoding this directly into the router tree instead of\n // inferring it on the client based on the segment type. Something like\n // a `doesAppearInURL` flag in FlightRouterState.\n if (\n segment === ROOT_SEGMENT_REQUEST_KEY ||\n // For some reason, the loader tree sometimes includes extra __PAGE__\n // \"layouts\" when part of a parallel route. But it's not a leaf node.\n // Otherwise, we wouldn't need this special case because pages are\n // always leaf nodes.\n // TODO: Investigate why the loader produces these fake page segments.\n segment.startsWith(PAGE_SEGMENT_KEY) ||\n // Route groups.\n (segment[0] === '(' && segment.endsWith(')')) ||\n segment === DEFAULT_SEGMENT_KEY ||\n segment === '/_not-found'\n ) {\n return false\n } else {\n // All other segment types appear in the URL\n return true\n }\n}\n\nexport function getCacheKeyForDynamicParam(\n paramValue: RouteParamValue,\n renderedSearch: NormalizedSearch\n): string {\n // This needs to match the logic in get-dynamic-param.ts, until we're able to\n // unify the various implementations so that these are always computed on\n // the client.\n if (typeof paramValue === 'string') {\n // TODO: Refactor or remove this helper function to accept a string rather\n // than the whole segment type. Also we can probably just append the\n // search string instead of turning it into JSON.\n const pageSegmentWithSearchParams = addSearchParamsIfPageSegment(\n paramValue,\n Object.fromEntries(new URLSearchParams(renderedSearch))\n ) as string\n return pageSegmentWithSearchParams\n } else if (paramValue === null) {\n return ''\n } else {\n return paramValue.join('/')\n }\n}\n\nexport function urlToUrlWithoutFlightMarker(url: URL): URL {\n const urlWithoutFlightParameters = new URL(url)\n urlWithoutFlightParameters.searchParams.delete(NEXT_RSC_UNION_QUERY)\n if (process.env.NODE_ENV === 'production') {\n if (\n process.env.__NEXT_CONFIG_OUTPUT === 'export' &&\n urlWithoutFlightParameters.pathname.endsWith('.txt')\n ) {\n const { pathname } = urlWithoutFlightParameters\n const length = pathname.endsWith('/index.txt') ? 10 : 4\n // Slice off `/index.txt` or `.txt` from the end of the pathname\n urlWithoutFlightParameters.pathname = pathname.slice(0, -length)\n }\n }\n return urlWithoutFlightParameters\n}\n\nexport function getParamValueFromCacheKey(\n paramCacheKey: string,\n paramType: DynamicParamTypesShort\n) {\n // Turn the cache key string sent by the server (as part of FlightRouterState)\n // into a value that can be passed to `useParams` and client components.\n const isCatchAll = paramType === 'c' || paramType === 'oc'\n if (isCatchAll) {\n // Catch-all param keys are a concatenation of the path segments.\n // See equivalent logic in `getSelectedParams`.\n // TODO: We should just pass the array directly, rather than concatenate\n // it to a string and then split it back to an array. It needs to be an\n // array in some places, like when passing a key React, but we can convert\n // it at runtime in those places.\n return paramCacheKey.split('/')\n }\n return paramCacheKey\n}\n\nexport function urlSearchParamsToParsedUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n // Converts a URLSearchParams object to the same type used by the server when\n // creating search params props, i.e. the type returned by Node's\n // \"querystring\" module.\n const result: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n if (result[key] === undefined) {\n result[key] = value\n } else if (Array.isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [result[key], value]\n }\n }\n return result\n}\n","export function createHrefFromUrl(\n url: Pick<URL, 'pathname' | 'search' | 'hash'>,\n includeHash: boolean = true\n): string {\n return url.pathname + url.search + (includeHash ? url.hash : '')\n}\n","import type {\n CacheNodeSeedData,\n FlightData,\n FlightDataPath,\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n HeadData,\n InitialRSCPayload,\n} from '../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../shared/lib/segment'\nimport type { NormalizedSearch } from './components/segment-cache/cache-key'\nimport {\n getCacheKeyForDynamicParam,\n parseDynamicParamFromURLPart,\n doesStaticSegmentAppearInURL,\n getRenderedPathname,\n getRenderedSearch,\n} from './route-params'\nimport { createHrefFromUrl } from './components/router-reducer/create-href-from-url'\n\nexport type NormalizedFlightData = {\n /**\n * The full `FlightSegmentPath` inclusive of the final `Segment`\n */\n segmentPath: FlightSegmentPath\n /**\n * The `FlightSegmentPath` exclusive of the final `Segment`\n */\n pathToSegment: FlightSegmentPath\n segment: Segment\n tree: FlightRouterState\n seedData: CacheNodeSeedData | null\n head: HeadData\n isHeadPartial: boolean\n isRootRender: boolean\n}\n\n// TODO: We should only have to export `normalizeFlightData`, however because the initial flight data\n// that gets passed to `createInitialRouterState` doesn't conform to the `FlightDataPath` type (it's missing the root segment)\n// we're currently exporting it so we can use it directly. This should be fixed as part of the unification of\n// the different ways we express `FlightSegmentPath`.\nexport function getFlightDataPartsFromPath(\n flightDataPath: FlightDataPath\n): NormalizedFlightData {\n // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].\n const flightDataPathLength = 4\n // tree, seedData, and head are *always* the last three items in the `FlightDataPath`.\n const [tree, seedData, head, isHeadPartial] =\n flightDataPath.slice(-flightDataPathLength)\n // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.\n const segmentPath = flightDataPath.slice(0, -flightDataPathLength)\n\n return {\n // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment (\"\")\n // to the start of the segment path in some places which makes it hard to use solely the segment path.\n // Look for \"// TODO-APP: remove ''\" in the codebase.\n pathToSegment: segmentPath.slice(0, -1),\n segmentPath,\n // if the `FlightDataPath` corresponds with the root, there'll be no segment path,\n // in which case we default to ''.\n segment: segmentPath[segmentPath.length - 1] ?? '',\n tree,\n seedData,\n head,\n isHeadPartial,\n isRootRender: flightDataPath.length === flightDataPathLength,\n }\n}\n\nexport function createInitialRSCPayloadFromFallbackPrerender(\n response: Response,\n fallbackInitialRSCPayload: InitialRSCPayload\n): InitialRSCPayload {\n // This is a static fallback page. In order to hydrate the page, we need to\n // parse the client params from the URL, but to account for the possibility\n // that the page was rewritten, we need to check the response headers\n // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since\n // we can't access the headers of the initial document response, the client\n // performs a fetch request to the current location. Since it's possible that\n // the fetch request will be dynamically rewritten to a different path than\n // the initial document, this fetch request delivers _all_ the hydration data\n // for the page; it was not inlined into the document, like it normally\n // would be.\n //\n // TODO: Consider treating the case where fetch is rewritten to a different\n // path from the document as a special deopt case. We should optimistically\n // assume this won't happen, inline the data into the document, and perform\n // a minimal request (like a HEAD or range request) to verify that the\n // response matches. Tricky to get right because we need to account for\n // all the different deployment environments we support, like output:\n // \"export\" mode, where we currently don't assume that custom response\n // headers are present.\n\n // Patch the Flight data sent by the server with the correct params parsed\n // from the URL + response object.\n const renderedPathname = getRenderedPathname(response)\n const renderedSearch = getRenderedSearch(response)\n const canonicalUrl = createHrefFromUrl(new URL(location.href))\n const originalFlightDataPath = fallbackInitialRSCPayload.f[0]\n const originalFlightRouterState = originalFlightDataPath[0]\n return {\n b: fallbackInitialRSCPayload.b,\n c: canonicalUrl.split('/'),\n q: renderedSearch,\n i: fallbackInitialRSCPayload.i,\n f: [\n [\n fillInFallbackFlightRouterState(\n originalFlightRouterState,\n renderedPathname,\n renderedSearch as NormalizedSearch\n ),\n originalFlightDataPath[1],\n originalFlightDataPath[2],\n originalFlightDataPath[2],\n ],\n ],\n m: fallbackInitialRSCPayload.m,\n G: fallbackInitialRSCPayload.G,\n S: fallbackInitialRSCPayload.S,\n }\n}\n\nfunction fillInFallbackFlightRouterState(\n flightRouterState: FlightRouterState,\n renderedPathname: string,\n renderedSearch: NormalizedSearch\n): FlightRouterState {\n const pathnameParts = renderedPathname.split('/').filter((p) => p !== '')\n const index = 0\n return fillInFallbackFlightRouterStateImpl(\n flightRouterState,\n renderedSearch,\n pathnameParts,\n index\n )\n}\n\nfunction fillInFallbackFlightRouterStateImpl(\n flightRouterState: FlightRouterState,\n renderedSearch: NormalizedSearch,\n pathnameParts: Array<string>,\n pathnamePartsIndex: number\n): FlightRouterState {\n const originalSegment = flightRouterState[0]\n let newSegment: Segment\n let doesAppearInURL: boolean\n if (typeof originalSegment === 'string') {\n newSegment = originalSegment\n doesAppearInURL = doesStaticSegmentAppearInURL(originalSegment)\n } else {\n const paramName = originalSegment[0]\n const paramType = originalSegment[2]\n const paramValue = parseDynamicParamFromURLPart(\n paramType,\n pathnameParts,\n pathnamePartsIndex\n )\n const cacheKey = getCacheKeyForDynamicParam(paramValue, renderedSearch)\n newSegment = [paramName, cacheKey, paramType]\n doesAppearInURL = true\n }\n\n // Only increment the index if the segment appears in the URL. If it's a\n // \"virtual\" segment, like a route group, it remains the same.\n const childPathnamePartsIndex = doesAppearInURL\n ? pathnamePartsIndex + 1\n : pathnamePartsIndex\n\n const children = flightRouterState[1]\n const newChildren: { [key: string]: FlightRouterState } = {}\n for (let key in children) {\n const childFlightRouterState = children[key]\n newChildren[key] = fillInFallbackFlightRouterStateImpl(\n childFlightRouterState,\n renderedSearch,\n pathnameParts,\n childPathnamePartsIndex\n )\n }\n\n const newState: FlightRouterState = [\n newSegment,\n newChildren,\n null,\n flightRouterState[3],\n flightRouterState[4],\n ]\n return newState\n}\n\nexport function getNextFlightSegmentPath(\n flightSegmentPath: FlightSegmentPath\n): FlightSegmentPath {\n // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items\n // to get the next segment path.\n return flightSegmentPath.slice(2)\n}\n\nexport function normalizeFlightData(\n flightData: FlightData\n): NormalizedFlightData[] | string {\n // FlightData can be a string when the server didn't respond with a proper flight response,\n // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation.\n if (typeof flightData === 'string') {\n return flightData\n }\n\n return flightData.map((flightDataPath) =>\n getFlightDataPartsFromPath(flightDataPath)\n )\n}\n\n/**\n * This function is used to prepare the flight router state for the request.\n * It removes markers that are not needed by the server, and are purely used\n * for stashing state on the client.\n * @param flightRouterState - The flight router state to prepare.\n * @param isHmrRefresh - Whether this is an HMR refresh request.\n * @returns The prepared flight router state.\n */\nexport function prepareFlightRouterStateForRequest(\n flightRouterState: FlightRouterState,\n isHmrRefresh?: boolean\n): string {\n // HMR requests need the complete, unmodified state for proper functionality\n if (isHmrRefresh) {\n return encodeURIComponent(JSON.stringify(flightRouterState))\n }\n\n return encodeURIComponent(\n JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))\n )\n}\n\n/**\n * Recursively strips client-only data from FlightRouterState while preserving\n * server-needed information for proper rendering decisions.\n */\nfunction stripClientOnlyDataFromFlightRouterState(\n flightRouterState: FlightRouterState\n): FlightRouterState {\n const [\n segment,\n parallelRoutes,\n _url, // Intentionally unused - URLs are client-only\n refreshMarker,\n isRootLayout,\n hasLoadingBoundary,\n ] = flightRouterState\n\n // __PAGE__ segments are always fetched from the server, so there's\n // no need to send them up\n const cleanedSegment = stripSearchParamsFromPageSegment(segment)\n\n // Recursively process parallel routes\n const cleanedParallelRoutes: { [key: string]: FlightRouterState } = {}\n for (const [key, childState] of Object.entries(parallelRoutes)) {\n cleanedParallelRoutes[key] =\n stripClientOnlyDataFromFlightRouterState(childState)\n }\n\n const result: FlightRouterState = [\n cleanedSegment,\n cleanedParallelRoutes,\n null, // URLs omitted - server reconstructs paths from segments\n shouldPreserveRefreshMarker(refreshMarker) ? refreshMarker : null,\n ]\n\n // Append optional fields if present\n if (isRootLayout !== undefined) {\n result[4] = isRootLayout\n }\n if (hasLoadingBoundary !== undefined) {\n result[5] = hasLoadingBoundary\n }\n\n return result\n}\n\n/**\n * Strips search parameters from __PAGE__ segments to prevent sensitive\n * client-side data from being sent to the server.\n */\nfunction stripSearchParamsFromPageSegment(segment: Segment): Segment {\n if (\n typeof segment === 'string' &&\n segment.startsWith(PAGE_SEGMENT_KEY + '?')\n ) {\n return PAGE_SEGMENT_KEY\n }\n return segment\n}\n\n/**\n * Determines whether the refresh marker should be sent to the server\n * Client-only markers like 'refresh' are stripped, while server-needed markers\n * like 'refetch' and 'inside-shared-layout' are preserved.\n */\nfunction shouldPreserveRefreshMarker(\n refreshMarker: FlightRouterState[3]\n): boolean {\n return Boolean(refreshMarker && refreshMarker !== 'refresh')\n}\n","// This gets assigned as a side-effect during app initialization. Because it\n// represents the build used to create the JS bundle, it should never change\n// after being set, so we store it in a global variable.\n//\n// When performing RSC requests, if the incoming data has a different build ID,\n// we perform an MPA navigation/refresh to load the updated build and ensure\n// that the client and server in sync.\n\n// Starts as an empty string. In practice, because setAppBuildId is called\n// during initialization before hydration starts, this will always get\n// reassigned to the actual build ID before it's ever needed by a navigation.\n// If for some reasons it didn't, due to a bug or race condition, then on\n// navigation the build comparision would fail and trigger an MPA navigation.\nlet globalBuildId: string = ''\n\nexport function setAppBuildId(buildId: string) {\n globalBuildId = buildId\n}\n\nexport function getAppBuildId(): string {\n return globalBuildId\n}\n","// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n let hash = 5381\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = ((hash << 5) + hash + char) & 0xffffffff\n }\n return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n return djb2Hash(str).toString(36).slice(0, 5)\n}\n","import { hexHash } from '../../hash'\n\nexport function computeCacheBustingSearchParam(\n prefetchHeader: '1' | '2' | '0' | undefined,\n segmentPrefetchHeader: string | string[] | undefined,\n stateTreeHeader: string | string[] | undefined,\n nextUrlHeader: string | string[] | undefined\n): string {\n if (\n (prefetchHeader === undefined || prefetchHeader === '0') &&\n segmentPrefetchHeader === undefined &&\n stateTreeHeader === undefined &&\n nextUrlHeader === undefined\n ) {\n return ''\n }\n return hexHash(\n [\n prefetchHeader || '0',\n segmentPrefetchHeader || '0',\n stateTreeHeader || '0',\n nextUrlHeader || '0',\n ].join(',')\n )\n}\n","'use client'\n\nimport { computeCacheBustingSearchParam } from '../../../shared/lib/router/utils/cache-busting-search-param'\nimport {\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_URL,\n NEXT_RSC_UNION_QUERY,\n} from '../app-router-headers'\nimport type { RequestHeaders } from './fetch-server-response'\n\n/**\n * Mutates the provided URL by adding a cache-busting search parameter for CDNs that don't\n * support custom headers. This helps avoid caching conflicts by making each request unique.\n *\n * Rather than relying on the Vary header which some CDNs ignore, we append a search param\n * to create a unique URL that forces a fresh request.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * Note: This function mutates the input URL directly and does not return anything.\n *\n * TODO: Since we need to use a search param anyway, we could simplify by removing the custom\n * headers approach entirely and just use search params.\n */\nexport const setCacheBustingSearchParam = (\n url: URL,\n headers: RequestHeaders\n): void => {\n const uniqueCacheKey = computeCacheBustingSearchParam(\n headers[NEXT_ROUTER_PREFETCH_HEADER],\n headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n headers[NEXT_ROUTER_STATE_TREE_HEADER],\n headers[NEXT_URL]\n )\n setCacheBustingSearchParamWithHash(url, uniqueCacheKey)\n}\n\n/**\n * Sets a cache-busting search parameter on a URL using a provided hash value.\n *\n * This function performs the same logic as `setCacheBustingSearchParam` but accepts\n * a pre-computed hash instead of computing it from headers.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * hash: \"abc123\"\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * If the hash is null, we will set `_rsc` search param without a value.\n * Like this: https://example.com/path?query=1&_rsc\n *\n * Note: This function mutates the input URL directly and does not return anything.\n */\nexport const setCacheBustingSearchParamWithHash = (\n url: URL,\n hash: string\n): void => {\n /**\n * Note that we intentionally do not use `url.searchParams.set` here:\n *\n * const url = new URL('https://example.com/search?q=custom%20spacing');\n * url.searchParams.set('_rsc', 'abc123');\n * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123\n * ^ <--- this is causing confusion\n * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but\n * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom\n * logic below.\n */\n const existingSearch = url.search\n const rawQuery = existingSearch.startsWith('?')\n ? existingSearch.slice(1)\n : existingSearch\n\n // Always remove any existing cache busting param and add a fresh one to ensure\n // we have the correct value based on current request headers\n const pairs = rawQuery\n .split('&')\n .filter((pair) => pair && !pair.startsWith(`${NEXT_RSC_UNION_QUERY}=`))\n\n if (hash.length > 0) {\n pairs.push(`${NEXT_RSC_UNION_QUERY}=${hash}`)\n } else {\n pairs.push(`${NEXT_RSC_UNION_QUERY}`)\n }\n url.search = pairs.length ? `?${pairs.join('&')}` : ''\n}\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","'use client'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createFromReadableStream as createFromReadableStreamBrowser,\n createFromFetch as createFromFetchBrowser,\n} from 'react-server-dom-webpack/client'\n\nimport type {\n FlightRouterState,\n NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\n\nimport {\n type NEXT_ROUTER_PREFETCH_HEADER,\n type NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_RSC_UNION_QUERY,\n NEXT_URL,\n RSC_HEADER,\n RSC_CONTENT_TYPE_HEADER,\n NEXT_HMR_REFRESH_HEADER,\n NEXT_DID_POSTPONE_HEADER,\n NEXT_ROUTER_STALE_TIME_HEADER,\n NEXT_HTML_REQUEST_ID_HEADER,\n NEXT_REQUEST_ID_HEADER,\n} from '../app-router-headers'\nimport { callServer } from '../../app-call-server'\nimport { findSourceMapURL } from '../../app-find-source-map-url'\nimport {\n normalizeFlightData,\n prepareFlightRouterStateForRequest,\n type NormalizedFlightData,\n} from '../../flight-data-helpers'\nimport { getAppBuildId } from '../../app-build-id'\nimport { setCacheBustingSearchParam } from './set-cache-busting-search-param'\nimport {\n getRenderedSearch,\n urlToUrlWithoutFlightMarker,\n} from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport { getDeploymentId } from '../../../shared/lib/deployment-id'\n\nconst createFromReadableStream =\n createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\nconst createFromFetch =\n createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n | typeof import('../../dev/debug-channel').createDebugChannel\n | undefined\n\nif (\n process.env.NODE_ENV !== 'production' &&\n process.env.__NEXT_REACT_DEBUG_CHANNEL\n) {\n createDebugChannel = (\n require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')\n ).createDebugChannel\n}\n\nexport interface FetchServerResponseOptions {\n readonly flightRouterState: FlightRouterState\n readonly nextUrl: string | null\n readonly isHmrRefresh?: boolean\n}\n\ntype SpaFetchServerResponseResult = {\n flightData: NormalizedFlightData[]\n canonicalUrl: URL\n renderedSearch: NormalizedSearch\n couldBeIntercepted: boolean\n prerendered: boolean\n postponed: boolean\n staleTime: number\n debugInfo: Array<any> | null\n}\n\ntype MpaFetchServerResponseResult = string\n\nexport type FetchServerResponseResult =\n | MpaFetchServerResponseResult\n | SpaFetchServerResponseResult\n\nexport type RequestHeaders = {\n [RSC_HEADER]?: '1'\n [NEXT_ROUTER_STATE_TREE_HEADER]?: string\n [NEXT_URL]?: string\n [NEXT_ROUTER_PREFETCH_HEADER]?: '1' | '2'\n [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]?: string\n 'x-deployment-id'?: string\n [NEXT_HMR_REFRESH_HEADER]?: '1'\n // A header that is only added in test mode to assert on fetch priority\n 'Next-Test-Fetch-Priority'?: RequestInit['priority']\n [NEXT_HTML_REQUEST_ID_HEADER]?: string // dev-only\n [NEXT_REQUEST_ID_HEADER]?: string // dev-only\n}\n\nfunction doMpaNavigation(url: string): FetchServerResponseResult {\n return urlToUrlWithoutFlightMarker(new URL(url, location.origin)).toString()\n}\n\nlet isPageUnloading = false\n\nif (typeof window !== 'undefined') {\n // Track when the page is unloading, e.g. due to reloading the page or\n // performing hard navigations. This allows us to suppress error logging when\n // the browser cancels in-flight requests during page unload.\n window.addEventListener('pagehide', () => {\n isPageUnloading = true\n })\n\n // Reset the flag on pageshow, e.g. when navigating back and the JavaScript\n // execution context is restored by the browser.\n window.addEventListener('pageshow', () => {\n isPageUnloading = false\n })\n}\n\n/**\n * Fetch the flight data for the provided url. Takes in the current router state\n * to decide what to render server-side.\n */\nexport async function fetchServerResponse(\n url: URL,\n options: FetchServerResponseOptions\n): Promise<FetchServerResponseResult> {\n const { flightRouterState, nextUrl } = options\n\n const headers: RequestHeaders = {\n // Enable flight response\n [RSC_HEADER]: '1',\n // Provide the current router state\n [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n flightRouterState,\n options.isHmrRefresh\n ),\n }\n\n if (process.env.NODE_ENV === 'development' && options.isHmrRefresh) {\n headers[NEXT_HMR_REFRESH_HEADER] = '1'\n }\n\n if (nextUrl) {\n headers[NEXT_URL] = nextUrl\n }\n\n // In static export mode, we need to modify the URL to request the .txt file,\n // but we should preserve the original URL for the canonical URL and error handling.\n const originalUrl = url\n\n try {\n if (process.env.NODE_ENV === 'production') {\n if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n // In \"output: export\" mode, we can't rely on headers to distinguish\n // between HTML and RSC requests. Instead, we append an extra prefix\n // to the request.\n url = new URL(url)\n if (url.pathname.endsWith('/')) {\n url.pathname += 'index.txt'\n } else {\n url.pathname += '.txt'\n }\n }\n }\n\n // Typically, during a navigation, we decode the response using Flight's\n // `createFromFetch` API, which accepts a `fetch` promise.\n // TODO: Remove this check once the old PPR flag is removed\n const isLegacyPPR =\n process.env.__NEXT_PPR && !process.env.__NEXT_CACHE_COMPONENTS\n const shouldImmediatelyDecode = !isLegacyPPR\n const res = await createFetch<NavigationFlightResponse>(\n url,\n headers,\n 'auto',\n shouldImmediatelyDecode\n )\n\n const responseUrl = urlToUrlWithoutFlightMarker(new URL(res.url))\n const canonicalUrl = res.redirected ? responseUrl : originalUrl\n\n const contentType = res.headers.get('content-type') || ''\n const interception = !!res.headers.get('vary')?.includes(NEXT_URL)\n const postponed = !!res.headers.get(NEXT_DID_POSTPONE_HEADER)\n const staleTimeHeaderSeconds = res.headers.get(\n NEXT_ROUTER_STALE_TIME_HEADER\n )\n const staleTime =\n staleTimeHeaderSeconds !== null\n ? parseInt(staleTimeHeaderSeconds, 10) * 1000\n : -1\n let isFlightResponse = contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n\n if (process.env.NODE_ENV === 'production') {\n if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n if (!isFlightResponse) {\n isFlightResponse = contentType.startsWith('text/plain')\n }\n }\n }\n\n // If fetch returns something different than flight response handle it like a mpa navigation\n // If the fetch was not 200, we also handle it like a mpa navigation\n if (!isFlightResponse || !res.ok || !res.body) {\n // in case the original URL came with a hash, preserve it before redirecting to the new URL\n if (url.hash) {\n responseUrl.hash = url.hash\n }\n\n return doMpaNavigation(responseUrl.toString())\n }\n\n // We may navigate to a page that requires a different Webpack runtime.\n // In prod, every page will have the same Webpack runtime.\n // In dev, the Webpack runtime is minimal for each page.\n // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page.\n // TODO: This needs to happen in the Flight Client.\n // Or Webpack needs to include the runtime update in the Flight response as\n // a blocking script.\n if (process.env.NODE_ENV !== 'production' && !process.env.TURBOPACK) {\n await (\n require('../../dev/hot-reloader/app/hot-reloader-app') as typeof import('../../dev/hot-reloader/app/hot-reloader-app')\n ).waitForWebpackRuntimeHotUpdate()\n }\n\n let flightResponsePromise = res.flightResponse\n if (flightResponsePromise === null) {\n // Typically, `createFetch` would have already started decoding the\n // Flight response. If it hasn't, though, we need to decode it now.\n // TODO: This should only be reachable if legacy PPR is enabled (i.e. PPR\n // without Cache Components). Remove this branch once legacy PPR\n // is deleted.\n const flightStream = postponed\n ? createUnclosingPrefetchStream(res.body)\n : res.body\n flightResponsePromise =\n createFromNextReadableStream<NavigationFlightResponse>(\n flightStream,\n headers\n )\n }\n\n const flightResponse = await flightResponsePromise\n\n if (getAppBuildId() !== flightResponse.b) {\n return doMpaNavigation(res.url)\n }\n\n const normalizedFlightData = normalizeFlightData(flightResponse.f)\n if (typeof normalizedFlightData === 'string') {\n return doMpaNavigation(normalizedFlightData)\n }\n\n return {\n flightData: normalizedFlightData,\n canonicalUrl: canonicalUrl,\n renderedSearch: getRenderedSearch(res),\n couldBeIntercepted: interception,\n prerendered: flightResponse.S,\n postponed,\n staleTime,\n debugInfo: flightResponsePromise._debugInfo ?? null,\n }\n } catch (err) {\n if (!isPageUnloading) {\n console.error(\n `Failed to fetch RSC payload for ${originalUrl}. Falling back to browser navigation.`,\n err\n )\n }\n\n // If fetch fails handle it like a mpa navigation\n // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.\n // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.\n return originalUrl.toString()\n }\n}\n\n// This is a subset of the standard Response type. We use a custom type for\n// this so we can limit which details about the response leak into the rest of\n// the codebase. For example, there's some custom logic for manually following\n// redirects, so \"redirected\" in this type could be a composite of multiple\n// browser fetch calls; however, this fact should not leak to the caller.\nexport type RSCResponse<T> = {\n ok: boolean\n redirected: boolean\n headers: Headers\n body: ReadableStream<Uint8Array> | null\n status: number\n url: string\n flightResponse: (Promise<T> & { _debugInfo?: Array<any> }) | null\n}\n\nexport async function createFetch<T>(\n url: URL,\n headers: RequestHeaders,\n fetchPriority: 'auto' | 'high' | 'low' | null,\n shouldImmediatelyDecode: boolean,\n signal?: AbortSignal\n): Promise<RSCResponse<T>> {\n // TODO: In output: \"export\" mode, the headers do nothing. Omit them (and the\n // cache busting search param) from the request so they're\n // maximally cacheable.\n\n if (process.env.__NEXT_TEST_MODE && fetchPriority !== null) {\n headers['Next-Test-Fetch-Priority'] = fetchPriority\n }\n\n const deploymentId = getDeploymentId()\n if (deploymentId) {\n headers['x-deployment-id'] = deploymentId\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (self.__next_r) {\n headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n }\n\n // Create a new request ID for the server action request. The server uses\n // this to tag debug information sent via WebSocket to the client, which\n // then routes those chunks to the debug channel associated with this ID.\n headers[NEXT_REQUEST_ID_HEADER] = crypto\n .getRandomValues(new Uint32Array(1))[0]\n .toString(16)\n }\n\n const fetchOptions: RequestInit = {\n // Backwards compat for older browsers. `same-origin` is the default in modern browsers.\n credentials: 'same-origin',\n headers,\n priority: fetchPriority || undefined,\n signal,\n }\n // `fetchUrl` is slightly different from `url` because we add a cache-busting\n // search param to it. This should not leak outside of this function, so we\n // track them separately.\n let fetchUrl = new URL(url)\n setCacheBustingSearchParam(fetchUrl, headers)\n let fetchPromise = fetch(fetchUrl, fetchOptions)\n // Immediately pass the fetch promise to the Flight client so that the debug\n // info includes the latency from the client to the server. The internal timer\n // in React starts as soon as `createFromFetch` is called.\n //\n // The only case where we don't do this is during a prefetch, because we have\n // to do some extra processing of the response stream (see\n // `createUnclosingPrefetchStream`). But this is fine, because a top-level\n // prefetch response never blocks a navigation; if it hasn't already been\n // written into the cache by the time the navigation happens, the router will\n // go straight to a dynamic request.\n let flightResponsePromise = shouldImmediatelyDecode\n ? createFromNextFetch<T>(fetchPromise, headers)\n : null\n let browserResponse = await fetchPromise\n\n // If the server responds with a redirect (e.g. 307), and the redirected\n // location does not contain the cache busting search param set in the\n // original request, the response is likely invalid — when following the\n // redirect, the browser forwards the request headers, but since the cache\n // busting search param is missing, the server will reject the request due to\n // a mismatch.\n //\n // Ideally, we would be able to intercept the redirect response and perform it\n // manually, instead of letting the browser automatically follow it, but this\n // is not allowed by the fetch API.\n //\n // So instead, we must \"replay\" the redirect by fetching the new location\n // again, but this time we'll append the cache busting search param to prevent\n // a mismatch.\n //\n // TODO: We can optimize Next.js's built-in middleware APIs by returning a\n // custom status code, to prevent the browser from automatically following it.\n //\n // This does not affect Server Action-based redirects; those are encoded\n // differently, as part of the Flight body. It only affects redirects that\n // occur in a middleware or a third-party proxy.\n\n let redirected = browserResponse.redirected\n if (process.env.__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS) {\n // This is to prevent a redirect loop. Same limit used by Chrome.\n const MAX_REDIRECTS = 20\n for (let n = 0; n < MAX_REDIRECTS; n++) {\n if (!browserResponse.redirected) {\n // The server did not perform a redirect.\n break\n }\n const responseUrl = new URL(browserResponse.url, fetchUrl)\n if (responseUrl.origin !== fetchUrl.origin) {\n // The server redirected to an external URL. The rest of the logic below\n // is not relevant, because it only applies to internal redirects.\n break\n }\n if (\n responseUrl.searchParams.get(NEXT_RSC_UNION_QUERY) ===\n fetchUrl.searchParams.get(NEXT_RSC_UNION_QUERY)\n ) {\n // The redirected URL already includes the cache busting search param.\n // This was probably intentional. Regardless, there's no reason to\n // issue another request to this URL because it already has the param\n // value that we would have added below.\n break\n }\n // The RSC request was redirected. Assume the response is invalid.\n //\n // Append the cache busting search param to the redirected URL and\n // fetch again.\n // TODO: We should abort the previous request.\n fetchUrl = new URL(responseUrl)\n setCacheBustingSearchParam(fetchUrl, headers)\n fetchPromise = fetch(fetchUrl, fetchOptions)\n flightResponsePromise = shouldImmediatelyDecode\n ? createFromNextFetch<T>(fetchPromise, headers)\n : null\n browserResponse = await fetchPromise\n // We just performed a manual redirect, so this is now true.\n redirected = true\n }\n }\n\n // Remove the cache busting search param from the response URL, to prevent it\n // from leaking outside of this function.\n const responseUrl = new URL(browserResponse.url, fetchUrl)\n responseUrl.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n const rscResponse: RSCResponse<T> = {\n url: responseUrl.href,\n\n // This is true if any redirects occurred, either automatically by the\n // browser, or manually by us. So it's different from\n // `browserResponse.redirected`, which only tells us whether the browser\n // followed a redirect, and only for the last response in the chain.\n redirected,\n\n // These can be copied from the last browser response we received. We\n // intentionally only expose the subset of fields that are actually used\n // elsewhere in the codebase.\n ok: browserResponse.ok,\n headers: browserResponse.headers,\n body: browserResponse.body,\n status: browserResponse.status,\n\n // This is the exact promise returned by `createFromFetch`. It contains\n // debug information that we need to transfer to any derived promises that\n // are later rendered by React.\n flightResponse: flightResponsePromise,\n }\n\n return rscResponse\n}\n\nexport function createFromNextReadableStream<T>(\n flightStream: ReadableStream<Uint8Array>,\n requestHeaders: RequestHeaders\n): Promise<T> {\n return createFromReadableStream(flightStream, {\n callServer,\n findSourceMapURL,\n debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n })\n}\n\nfunction createFromNextFetch<T>(\n promiseForResponse: Promise<Response>,\n requestHeaders: RequestHeaders\n): Promise<T> & { _debugInfo?: Array<any> } {\n return createFromFetch(promiseForResponse, {\n callServer,\n findSourceMapURL,\n debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n })\n}\n\nfunction createUnclosingPrefetchStream(\n originalFlightStream: ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return\n }\n },\n })\n}\n","import { deleteMapEntry } from './cache-map'\nimport type { UnknownMapEntry } from './cache-map'\n\n// We use an LRU for memory management. We must update this whenever we add or\n// remove a new cache entry, or when an entry changes size.\n\nlet head: UnknownMapEntry | null = null\nlet didScheduleCleanup: boolean = false\nlet lruSize: number = 0\n\n// TODO: I chose the max size somewhat arbitrarily. Consider setting this based\n// on navigator.deviceMemory, or some other heuristic. We should make this\n// customizable via the Next.js config, too.\nconst maxLruSize = 50 * 1024 * 1024 // 50 MB\n\nexport function lruPut(node: UnknownMapEntry) {\n if (head === node) {\n // Already at the head\n return\n }\n const prev = node.prev\n const next = node.next\n if (next === null || prev === null) {\n // This is an insertion\n lruSize += node.size\n // Whenever we add an entry, we need to check if we've exceeded the\n // max size. We don't evict entries immediately; they're evicted later in\n // an asynchronous task.\n ensureCleanupIsScheduled()\n } else {\n // This is a move. Remove from its current position.\n prev.next = next\n next.prev = prev\n }\n\n // Move to the front of the list\n if (head === null) {\n // This is the first entry\n node.prev = node\n node.next = node\n } else {\n // Add to the front of the list\n const tail = head.prev\n node.prev = tail\n // In practice, this is never null, but that isn't encoded in the type\n if (tail !== null) {\n tail.next = node\n }\n node.next = head\n head.prev = node\n }\n head = node\n}\n\nexport function updateLruSize(node: UnknownMapEntry, newNodeSize: number) {\n // This is a separate function from `put` so that we can resize the entry\n // regardless of whether it's currently being tracked by the LRU.\n const prevNodeSize = node.size\n node.size = newNodeSize\n if (node.next === null) {\n // This entry is not currently being tracked by the LRU.\n return\n }\n // Update the total LRU size\n lruSize = lruSize - prevNodeSize + newNodeSize\n ensureCleanupIsScheduled()\n}\n\nexport function deleteFromLru(deleted: UnknownMapEntry) {\n const next = deleted.next\n const prev = deleted.prev\n if (next !== null && prev !== null) {\n lruSize -= deleted.size\n\n deleted.next = null\n deleted.prev = null\n\n // Remove from the list\n if (head === deleted) {\n // Update the head\n if (next === head) {\n // This was the last entry\n head = null\n } else {\n head = next\n }\n } else {\n prev.next = next\n next.prev = prev\n }\n } else {\n // Already deleted\n }\n}\n\nfunction ensureCleanupIsScheduled() {\n if (didScheduleCleanup || lruSize <= maxLruSize) {\n return\n }\n didScheduleCleanup = true\n requestCleanupCallback(cleanup)\n}\n\nfunction cleanup() {\n didScheduleCleanup = false\n\n // Evict entries until we're at 90% capacity. We can assume this won't\n // infinite loop because even if `maxLruSize` were 0, eventually\n // `deleteFromLru` sets `head` to `null` when we run out entries.\n const ninetyPercentMax = maxLruSize * 0.9\n while (lruSize > ninetyPercentMax && head !== null) {\n const tail = head.prev\n // In practice, this is never null, but that isn't encoded in the type\n if (tail !== null) {\n // Delete the entry from the map. In turn, this will remove it from\n // the LRU.\n deleteMapEntry(tail)\n }\n }\n}\n\nconst requestCleanupCallback =\n typeof requestIdleCallback === 'function'\n ? requestIdleCallback\n : (cb: () => void) => setTimeout(cb, 0)\n","import type { VaryPath } from './vary-path'\nimport { lruPut, updateLruSize, deleteFromLru } from './lru'\n\n/**\n * A specialized data type for storing multi-key cache entries.\n *\n * The basic structure is a map whose keys are tuples, called the keypath.\n * When querying the cache, keypaths are compared per-element.\n *\n * Example:\n * set(map, ['https://localhost', 'foo/bar/baz'], 'yay');\n * get(map, ['https://localhost', 'foo/bar/baz']) -> 'yay'\n *\n * NOTE: Array syntax is used in these examples for illustration purposes, but\n * in reality the paths are lists.\n * \n * The parts of the keypath represent the different inputs that contribute\n * to the entry value. To illustrate, if you were to use this data type to store\n * HTTP responses, the keypath would include the URL and everything listed by\n * the Vary header.\n * \n * See vary-path.ts for more details.\n *\n * The order of elements in a keypath must be consistent between lookups to\n * be considered the same, but besides that, the order of the keys is not\n * semantically meaningful.\n *\n * Keypaths may include a special kind of key called Fallback. When an entry is\n * stored with Fallback as part of its keypath, it means that the entry does not\n * vary by that key. When querying the cache, if an exact match is not found for\n * a keypath, the cache will check for a Fallback match instead. Each element of\n * the keypath may have a Fallback, so retrieval is an O(n ^ 2) operation, but\n * it's expected that keypaths are relatively short.\n *\n * Example:\n * set(cacheMap, ['store', 'product', 1], PRODUCT_PAGE_1);\n * set(cacheMap, ['store', 'product', Fallback], GENERIC_PRODUCT_PAGE);\n *\n * // Exact match\n * get(cacheMap, ['store', 'product', 1]) -> PRODUCT_PAGE_1\n *\n * // Fallback match\n * get(cacheMap, ['store', 'product', 2]) -> GENERIC_PRODUCT_PAGE\n *\n * Because we have the Fallback mechanism, we can impose a constraint that\n * regular JS maps do not have: a value cannot be stored at multiple keypaths\n * simultaneously. These cases should be expressed with Fallback keys instead.\n *\n * Additionally, because values only exist at a single keypath at a time, we\n * can optimize successive lookups by caching the internal map entry on the\n * value itself, using the `ref` field. This is especially useful because it\n * lets us skip the O(n ^ 2) lookup that occurs when Fallback entries\n * are present.\n *\n\n * How to decide if stuff belongs in here, or in cache.ts?\n * -------------------------------------------------------\n * \n * Anything to do with retrival, lifetimes, or eviction needs to go in this\n * module because it affects the fallback algorithm. For example, when\n * performing a lookup, if an entry is stale, it needs to be treated as\n * semantically equivalent to if the entry was not present at all.\n * \n * If there's logic that's not related to the fallback algorithm, though, we\n * should prefer to put it in cache.ts.\n */\n\n// The protocol that values must implement. In practice, the only two types that\n// we ever actually deal with in this module are RouteCacheEntry and\n// SegmentCacheEntry; this is just to keep track of the coupling so we don't\n// leak concerns between the modules unnecessarily.\nexport interface MapValue {\n ref: UnknownMapEntry | null\n size: number\n staleAt: number\n version: number\n}\n\n/**\n * Represents a node in the cache map and LRU.\n * MapEntry<V> structurally satisfies this interface for any V extends MapValue.\n *\n * The LRU can contain entries of different value types\n * (e.g., both RouteCacheEntry and SegmentCacheEntry). This interface captures\n * the common structure needed for cache map and LRU operations without\n * requiring knowledge of the specific value type.\n */\nexport interface MapEntry<V extends MapValue> {\n // Cache map structure fields\n parent: MapEntry<V> | null\n key: unknown\n map: Map<unknown, MapEntry<V>> | null\n value: V | null\n\n // LRU linked list fields\n prev: MapEntry<V> | null\n next: MapEntry<V> | null\n size: number\n}\n\n/**\n * A looser type for MapEntry\n * This allows the LRU to work with entries of different\n * value types while still providing type safety.\n *\n * The `map` field lets Map<unknown, MapEntry<V>> be assignable to this\n * type since we're only reading from the map, not inserting into it.\n */\nexport type UnknownMapEntry = {\n parent: UnknownMapEntry | null\n key: unknown\n map: Pick<Map<unknown, UnknownMapEntry>, 'get' | 'delete' | 'size'> | null\n value: MapValue | null\n\n prev: UnknownMapEntry | null\n next: UnknownMapEntry | null\n size: number\n}\n\n// The CacheMap type is just the root entry of the map.\nexport type CacheMap<V extends MapValue> = MapEntry<V>\n\nexport type FallbackType = { __brand: 'Fallback' }\nexport const Fallback = {} as FallbackType\n\n// This is a special internal key that is used for \"revalidation\" entries. It's\n// an implementation detail that shouldn't leak outside of this module.\nconst Revalidation = {}\n\nexport function createCacheMap<V extends MapValue>(): CacheMap<V> {\n const cacheMap: MapEntry<V> = {\n parent: null,\n key: null,\n value: null,\n map: null,\n\n // LRU-related fields\n prev: null,\n next: null,\n size: 0,\n }\n return cacheMap\n}\n\nfunction getOrInitialize<V extends MapValue>(\n cacheMap: CacheMap<V>,\n keys: VaryPath,\n isRevalidation: boolean\n): MapEntry<V> {\n // Go through each level of keys until we find the entry that matches, or\n // create a new entry if one doesn't exist.\n //\n // This function will only return entries that match the keypath _exactly_.\n // Unlike getWithFallback, it will not access fallback entries unless it's\n // explicitly part of the keypath.\n let entry = cacheMap\n let remainingKeys: VaryPath | null = keys\n let key: unknown | null = null\n while (true) {\n const previousKey = key\n if (remainingKeys !== null) {\n key = remainingKeys.value\n remainingKeys = remainingKeys.parent\n } else if (isRevalidation && previousKey !== Revalidation) {\n // During a revalidation, we append an internal \"Revalidation\" key to\n // the end of the keypath. The \"normal\" entry is its parent.\n\n // However, if the parent entry is currently empty, we don't need to store\n // this as a revalidation entry. Just insert the revalidation into the\n // normal slot.\n if (entry.value === null) {\n return entry\n }\n\n // Otheriwse, create a child entry.\n key = Revalidation\n } else {\n // There are no more keys. This is the terminal entry.\n break\n }\n\n let map = entry.map\n if (map !== null) {\n const existingEntry = map.get(key)\n if (existingEntry !== undefined) {\n // Found a match. Keep going.\n entry = existingEntry\n continue\n }\n } else {\n map = new Map()\n entry.map = map\n }\n // No entry exists yet at this level. Create a new one.\n const newEntry: MapEntry<V> = {\n parent: entry,\n key,\n value: null,\n map: null,\n\n // LRU-related fields\n prev: null,\n next: null,\n size: 0,\n }\n map.set(key, newEntry)\n entry = newEntry\n }\n\n return entry\n}\n\nexport function getFromCacheMap<V extends MapValue>(\n now: number,\n currentCacheVersion: number,\n rootEntry: CacheMap<V>,\n keys: VaryPath,\n isRevalidation: boolean\n): V | null {\n const entry = getEntryWithFallbackImpl(\n now,\n currentCacheVersion,\n rootEntry,\n keys,\n isRevalidation,\n 0\n )\n if (entry === null || entry.value === null) {\n return null\n }\n // This is an LRU access. Move the entry to the front of the list.\n lruPut(entry)\n return entry.value\n}\n\nexport function isValueExpired(\n now: number,\n currentCacheVersion: number,\n value: MapValue\n): boolean {\n return value.staleAt <= now || value.version < currentCacheVersion\n}\n\nfunction lazilyEvictIfNeeded<V extends MapValue>(\n now: number,\n currentCacheVersion: number,\n entry: MapEntry<V>\n) {\n // We have a matching entry, but before we can return it, we need to check if\n // it's still fresh. Otherwise it should be treated the same as a cache miss.\n\n if (entry.value === null) {\n // This entry has no value, so there's nothing to evict.\n return entry\n }\n\n const value = entry.value\n if (isValueExpired(now, currentCacheVersion, value)) {\n // The value expired. Lazily evict it from the cache, and return null. This\n // is conceptually the same as a cache miss.\n deleteMapEntry(entry)\n return null\n }\n\n // The matched entry has not expired. Return it.\n return entry\n}\n\nfunction getEntryWithFallbackImpl<V extends MapValue>(\n now: number,\n currentCacheVersion: number,\n entry: MapEntry<V>,\n keys: VaryPath | null,\n isRevalidation: boolean,\n previousKey: unknown | null\n): MapEntry<V> | null {\n // This is similar to getExactEntry, but if an exact match is not found for\n // a key, it will return the fallback entry instead. This is recursive at\n // every level, e.g. an entry with keypath [a, Fallback, c, Fallback] is\n // valid match for [a, b, c, d].\n //\n // It will return the most specific match available.\n let key\n let remainingKeys: VaryPath | null\n if (keys !== null) {\n key = keys.value\n remainingKeys = keys.parent\n } else if (isRevalidation && previousKey !== Revalidation) {\n // During a revalidation, we append an internal \"Revalidation\" key to\n // the end of the keypath.\n key = Revalidation\n remainingKeys = null\n } else {\n // There are no more keys. This is the terminal entry.\n\n // TODO: When performing a lookup during a navigation, as opposed to a\n // prefetch, we may want to skip entries that are Pending if there's also\n // a Fulfilled fallback entry. Tricky to say, though, since if it's\n // already pending, it's likely to stream in soon. Maybe we could do this\n // just on slow connections and offline mode.\n\n return lazilyEvictIfNeeded(now, currentCacheVersion, entry)\n }\n const map = entry.map\n if (map !== null) {\n const existingEntry = map.get(key)\n if (existingEntry !== undefined) {\n // Found an exact match for this key. Keep searching.\n const result = getEntryWithFallbackImpl(\n now,\n currentCacheVersion,\n existingEntry,\n remainingKeys,\n isRevalidation,\n key\n )\n if (result !== null) {\n return result\n }\n }\n // No match found for this key. Check if there's a fallback.\n const fallbackEntry = map.get(Fallback)\n if (fallbackEntry !== undefined) {\n // Found a fallback for this key. Keep searching.\n return getEntryWithFallbackImpl(\n now,\n currentCacheVersion,\n fallbackEntry,\n remainingKeys,\n isRevalidation,\n key\n )\n }\n }\n return null\n}\n\nexport function setInCacheMap<V extends MapValue>(\n cacheMap: CacheMap<V>,\n keys: VaryPath,\n value: V,\n isRevalidation: boolean\n): void {\n // Add a value to the map at the given keypath. If the value is already\n // part of the map, it's removed from its previous keypath. (NOTE: This is\n // unlike a regular JS map, but the behavior is intentional.)\n const entry = getOrInitialize(cacheMap, keys, isRevalidation)\n setMapEntryValue(entry, value)\n\n // This is an LRU access. Move the entry to the front of the list.\n lruPut(entry)\n updateLruSize(entry, value.size)\n}\n\nfunction setMapEntryValue(entry: UnknownMapEntry, value: MapValue): void {\n if (entry.value !== null) {\n // There's already a value at the given keypath. Disconnect the old value\n // from the map. We're not calling `deleteMapEntry` here because the\n // entry itself is still in the map. We just want to overwrite its value.\n dropRef(entry.value)\n entry.value = null\n }\n\n // This value may already be in the map at a different keypath.\n // Grab a reference before we overwrite it.\n const oldEntry = value.ref\n\n entry.value = value\n value.ref = entry\n\n updateLruSize(entry, value.size)\n\n if (oldEntry !== null && oldEntry !== entry && oldEntry.value === value) {\n // This value is already in the map at a different keypath in the map.\n // Values only exist at a single keypath at a time. Remove it from the\n // previous keypath.\n //\n // Note that only the internal map entry is garbage collected; we don't\n // call `dropRef` here because it's still in the map, just\n // at a new keypath (the one we just set, above).\n deleteMapEntry(oldEntry)\n }\n}\n\nexport function deleteFromCacheMap(value: MapValue): void {\n const entry = value.ref\n if (entry === null) {\n // This value is not a member of any map.\n return\n }\n\n dropRef(value)\n deleteMapEntry(entry)\n}\n\nfunction dropRef(value: MapValue): void {\n // Drop the value from the map by setting its `ref` backpointer to\n // null. This is a separate operation from `deleteMapEntry` because when\n // re-keying a value we need to be able to delete the old, internal map\n // entry without garbage collecting the value itself.\n value.ref = null\n}\n\nexport function deleteMapEntry(entry: UnknownMapEntry): void {\n // Delete the entry from the cache.\n entry.value = null\n\n deleteFromLru(entry)\n\n // Check if we can garbage collect the entry.\n const map = entry.map\n if (map === null) {\n // Since this entry has no value, and also no child entries, we can\n // garbage collect it. Remove it from its parent, and keep garbage\n // collecting the parents until we reach a non-empty entry.\n let parent = entry.parent\n let key = entry.key\n while (parent !== null) {\n const parentMap = parent.map\n if (parentMap !== null) {\n parentMap.delete(key)\n if (parentMap.size === 0) {\n // We just removed the last entry in the parent map.\n parent.map = null\n if (parent.value === null) {\n // The parent node has no child entries, nor does it have a value\n // on itself. It can be garbage collected. Keep going.\n key = parent.key\n parent = parent.parent\n continue\n }\n }\n }\n // The parent is not empty. Stop garbage collecting.\n break\n }\n } else {\n // Check if there's a revalidating entry. If so, promote it to a\n // \"normal\" entry, since the normal one was just deleted.\n const revalidatingEntry = map.get(Revalidation)\n if (revalidatingEntry !== undefined && revalidatingEntry.value !== null) {\n setMapEntryValue(entry, revalidatingEntry.value)\n }\n }\n}\n\nexport function setSizeInCacheMap<V extends MapValue>(\n value: V,\n size: number\n): void {\n const entry = value.ref\n if (entry === null) {\n // This value is not a member of any map.\n return\n }\n // Except during initialization (when the size is set to 0), this is the only\n // place the `size` field should be updated, to ensure it's in sync with the\n // the LRU.\n value.size = size\n updateLruSize(entry, size)\n}\n","import { FetchStrategy } from './types'\nimport type {\n NormalizedPathname,\n NormalizedSearch,\n NormalizedNextUrl,\n} from './cache-key'\nimport type { RouteTree } from './cache'\nimport { Fallback, type FallbackType } from './cache-map'\nimport { HEAD_REQUEST_KEY } from '../../../shared/lib/segment-cache/segment-value-encoding'\n\ntype Opaque<T, K> = T & { __brand: K }\n\n/**\n * A linked-list of all the params (or other param-like) inputs that a cache\n * entry may vary by. This is used by the CacheMap module to reuse cache entries\n * across different param values. If a param has a value of Fallback, it means\n * the cache entry is reusable for all possible values of that param. See\n * cache-map.ts for details.\n *\n * A segment's vary path is a pure function of a segment's position in a\n * particular route tree and the (post-rewrite) URL that is being queried. More\n * concretely, successive queries of the cache for the same segment always use\n * the same vary path.\n *\n * A route's vary path is simpler: it's comprised of the pathname, search\n * string, and Next-URL header.\n */\nexport type VaryPath = {\n value: string | null | FallbackType\n parent: VaryPath | null\n}\n\n// Because it's so important for vary paths to line up across cache accesses,\n// we use opaque type aliases to ensure these are only created within\n// this module.\n\n// requestKey -> searchParams -> nextUrl\nexport type RouteVaryPath = Opaque<\n {\n value: NormalizedPathname\n parent: {\n value: NormalizedSearch\n parent: {\n value: NormalizedNextUrl | null | FallbackType\n parent: null\n }\n }\n },\n 'RouteVaryPath'\n>\n\n// requestKey -> pathParams\nexport type LayoutVaryPath = Opaque<\n {\n value: string\n parent: PartialSegmentVaryPath | null\n },\n 'LayoutVaryPath'\n>\n\n// requestKey -> searchParams -> pathParams\nexport type PageVaryPath = Opaque<\n {\n value: string\n parent: {\n value: NormalizedSearch | FallbackType\n parent: PartialSegmentVaryPath | null\n }\n },\n 'PageVaryPath'\n>\n\nexport type SegmentVaryPath = LayoutVaryPath | PageVaryPath\n\n// Intermediate type used when building a vary path during a recursive traversal\n// of the route tree.\nexport type PartialSegmentVaryPath = Opaque<VaryPath, 'PartialSegmentVaryPath'>\n\nexport function getRouteVaryPath(\n pathname: NormalizedPathname,\n search: NormalizedSearch,\n nextUrl: NormalizedNextUrl | null\n): RouteVaryPath {\n // requestKey -> searchParams -> nextUrl\n const varyPath: VaryPath = {\n value: pathname,\n parent: {\n value: search,\n parent: {\n value: nextUrl,\n parent: null,\n },\n },\n }\n return varyPath as RouteVaryPath\n}\n\nexport function getFulfilledRouteVaryPath(\n pathname: NormalizedPathname,\n search: NormalizedSearch,\n nextUrl: NormalizedNextUrl | null,\n couldBeIntercepted: boolean\n): RouteVaryPath {\n // This is called when a route's data is fulfilled. The cache entry will be\n // re-keyed based on which inputs the response varies by.\n // requestKey -> searchParams -> nextUrl\n const varyPath: VaryPath = {\n value: pathname,\n parent: {\n value: search,\n parent: {\n value: couldBeIntercepted ? nextUrl : Fallback,\n parent: null,\n },\n },\n }\n return varyPath as RouteVaryPath\n}\n\nexport function appendLayoutVaryPath(\n parentPath: PartialSegmentVaryPath | null,\n cacheKey: string\n): PartialSegmentVaryPath {\n const varyPathPart: VaryPath = {\n value: cacheKey,\n parent: parentPath,\n }\n return varyPathPart as PartialSegmentVaryPath\n}\n\nexport function finalizeLayoutVaryPath(\n requestKey: string,\n varyPath: PartialSegmentVaryPath | null\n): LayoutVaryPath {\n const layoutVaryPath: VaryPath = {\n value: requestKey,\n parent: varyPath,\n }\n return layoutVaryPath as LayoutVaryPath\n}\n\nexport function finalizePageVaryPath(\n requestKey: string,\n renderedSearch: NormalizedSearch,\n varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n // Unlike layouts, a page segment's vary path also includes the search string.\n // requestKey -> searchParams -> pathParams\n const pageVaryPath: VaryPath = {\n value: requestKey,\n parent: {\n value: renderedSearch,\n parent: varyPath,\n },\n }\n return pageVaryPath as PageVaryPath\n}\n\nexport function finalizeMetadataVaryPath(\n pageRequestKey: string,\n renderedSearch: NormalizedSearch,\n varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n // The metadata \"segment\" is not a real segment because it doesn't exist in\n // the normal structure of the route tree, but in terms of caching, it\n // behaves like a page segment because it varies by all the same params as\n // a page.\n //\n // To keep the protocol for querying the server simple, the request key for\n // the metadata does not include any path information. It's unnecessary from\n // the server's perspective, because unlike page segments, there's only one\n // metadata response per URL, i.e. there's no need to distinguish multiple\n // parallel pages.\n //\n // However, this means the metadata request key is insufficient for\n // caching the the metadata in the client cache, because on the client we\n // use the request key to distinguish the metadata entry from all other\n // page's metadata entries.\n //\n // So instead we create a simulated request key based on the page segment.\n // Conceptually this is equivalent to the request key the server would have\n // assigned the metadata segment if it treated it as part of the actual\n // route structure.\n\n // If there are multiple parallel pages, we use whichever is the first one.\n // This is fine because the only difference between request keys for\n // different parallel pages are things like route groups and parallel\n // route slots. As long as it's always the same one, it doesn't matter.\n const pageVaryPath: VaryPath = {\n // Append the actual metadata request key to the page request key. Note\n // that we're not using a separate vary path part; it's unnecessary because\n // these are not conceptually separate inputs.\n value: pageRequestKey + HEAD_REQUEST_KEY,\n parent: {\n value: renderedSearch,\n parent: varyPath,\n },\n }\n return pageVaryPath as PageVaryPath\n}\n\nexport function getSegmentVaryPathForRequest(\n fetchStrategy: FetchStrategy,\n tree: RouteTree\n): SegmentVaryPath {\n // This is used for storing pending requests in the cache. We want to choose\n // the most generic vary path based on the strategy used to fetch it, i.e.\n // static/PPR versus runtime prefetching, so that it can be reused as much\n // as possible.\n //\n // We may be able to re-key the response to something even more generic once\n // we receive it — for example, if the server tells us that the response\n // doesn't vary on a particular param — but even before we send the request,\n // we know some params are reusable based on the fetch strategy alone. For\n // example, a static prefetch will never vary on search params.\n //\n // The original vary path with all the params filled in is stored on the\n // route tree object. We will clone this one to create a new vary path\n // where certain params are replaced with Fallback.\n //\n // This result of this function is not stored anywhere. It's only used to\n // access the cache a single time.\n //\n // TODO: Rather than create a new list object just to access the cache, the\n // plan is to add the concept of a \"vary mask\". This will represent all the\n // params that can be treated as Fallback. (Or perhaps the inverse.)\n const originalVaryPath = tree.varyPath\n\n // Only page segments (and the special \"metadata\" segment, which is treated\n // like a page segment for the purposes of caching) may contain search\n // params. There's no reason to include them in the vary path otherwise.\n if (tree.isPage) {\n // Only a runtime prefetch will include search params in the vary path.\n // Static prefetches never include search params, so they can be reused\n // across all possible search param values.\n const doesVaryOnSearchParams =\n fetchStrategy === FetchStrategy.Full ||\n fetchStrategy === FetchStrategy.PPRRuntime\n\n if (!doesVaryOnSearchParams) {\n // The response from the the server will not vary on search params. Clone\n // the end of the original vary path to replace the search params\n // with Fallback.\n //\n // requestKey -> searchParams -> pathParams\n // ^ This part gets replaced with Fallback\n const searchParamsVaryPath = (originalVaryPath as PageVaryPath).parent\n const pathParamsVaryPath = searchParamsVaryPath.parent\n const patchedVaryPath: VaryPath = {\n value: originalVaryPath.value,\n parent: {\n value: Fallback,\n parent: pathParamsVaryPath,\n },\n }\n return patchedVaryPath as SegmentVaryPath\n }\n }\n\n // The request does vary on search params. We don't need to modify anything.\n return originalVaryPath as SegmentVaryPath\n}\n\nexport function clonePageVaryPathWithNewSearchParams(\n originalVaryPath: PageVaryPath,\n newSearch: NormalizedSearch\n): PageVaryPath {\n // requestKey -> searchParams -> pathParams\n // ^ This part gets replaced with newSearch\n const searchParamsVaryPath = originalVaryPath.parent\n const clonedVaryPath: VaryPath = {\n value: originalVaryPath.value,\n parent: {\n value: newSearch,\n parent: searchParamsVaryPath.parent,\n },\n }\n return clonedVaryPath as PageVaryPath\n}\n","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n","import type {\n FlightRouterState,\n Segment,\n} from '../../../shared/lib/app-router-types'\nimport { INTERCEPTION_ROUTE_MARKERS } from '../../../shared/lib/router/utils/interception-routes'\nimport type { Params } from '../../../server/request/params'\nimport {\n isGroupSegment,\n DEFAULT_SEGMENT_KEY,\n PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\n\nconst removeLeadingSlash = (segment: string): string => {\n return segment[0] === '/' ? segment.slice(1) : segment\n}\n\nconst segmentToPathname = (segment: Segment): string => {\n if (typeof segment === 'string') {\n // 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page\n // if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.\n if (segment === 'children') return ''\n\n return segment\n }\n\n return segment[1]\n}\n\nfunction normalizeSegments(segments: string[]): string {\n return (\n segments.reduce((acc, segment) => {\n segment = removeLeadingSlash(segment)\n if (segment === '' || isGroupSegment(segment)) {\n return acc\n }\n\n return `${acc}/${segment}`\n }, '') || '/'\n )\n}\n\nexport function extractPathFromFlightRouterState(\n flightRouterState: FlightRouterState\n): string | undefined {\n const segment = Array.isArray(flightRouterState[0])\n ? flightRouterState[0][1]\n : flightRouterState[0]\n\n if (\n segment === DEFAULT_SEGMENT_KEY ||\n INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m))\n )\n return undefined\n\n if (segment.startsWith(PAGE_SEGMENT_KEY)) return ''\n\n const segments = [segmentToPathname(segment)]\n const parallelRoutes = flightRouterState[1] ?? {}\n\n const childrenPath = parallelRoutes.children\n ? extractPathFromFlightRouterState(parallelRoutes.children)\n : undefined\n\n if (childrenPath !== undefined) {\n segments.push(childrenPath)\n } else {\n for (const [key, value] of Object.entries(parallelRoutes)) {\n if (key === 'children') continue\n\n const childPath = extractPathFromFlightRouterState(value)\n\n if (childPath !== undefined) {\n segments.push(childPath)\n }\n }\n }\n\n return normalizeSegments(segments)\n}\n\nfunction computeChangedPathImpl(\n treeA: FlightRouterState,\n treeB: FlightRouterState\n): string | null {\n const [segmentA, parallelRoutesA] = treeA\n const [segmentB, parallelRoutesB] = treeB\n\n const normalizedSegmentA = segmentToPathname(segmentA)\n const normalizedSegmentB = segmentToPathname(segmentB)\n\n if (\n INTERCEPTION_ROUTE_MARKERS.some(\n (m) =>\n normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m)\n )\n ) {\n return ''\n }\n\n if (!matchSegment(segmentA, segmentB)) {\n // once we find where the tree changed, we compute the rest of the path by traversing the tree\n return extractPathFromFlightRouterState(treeB) ?? ''\n }\n\n for (const parallelRouterKey in parallelRoutesA) {\n if (parallelRoutesB[parallelRouterKey]) {\n const changedPath = computeChangedPathImpl(\n parallelRoutesA[parallelRouterKey],\n parallelRoutesB[parallelRouterKey]\n )\n if (changedPath !== null) {\n return `${segmentToPathname(segmentB)}/${changedPath}`\n }\n }\n }\n\n return null\n}\n\nexport function computeChangedPath(\n treeA: FlightRouterState,\n treeB: FlightRouterState\n): string | null {\n const changedPath = computeChangedPathImpl(treeA, treeB)\n\n if (changedPath == null || changedPath === '/') {\n return changedPath\n }\n\n // lightweight normalization to remove route groups\n return normalizeSegments(changedPath.split('/'))\n}\n\n/**\n * Recursively extracts dynamic parameters from FlightRouterState.\n */\nexport function getSelectedParams(\n currentTree: FlightRouterState,\n params: Params = {}\n): Params {\n const parallelRoutes = currentTree[1]\n\n for (const parallelRoute of Object.values(parallelRoutes)) {\n const segment = parallelRoute[0]\n const isDynamicParameter = Array.isArray(segment)\n const segmentValue = isDynamicParameter ? segment[1] : segment\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) continue\n\n // Ensure catchAll and optional catchall are turned into an array\n const isCatchAll =\n isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc')\n\n if (isCatchAll) {\n params[segment[0]] = segment[1].split('/')\n } else if (isDynamicParameter) {\n params[segment[0]] = segment[1]\n }\n\n params = getSelectedParams(parallelRoute, params)\n }\n\n return params\n}\n","import { computeChangedPath } from './compute-changed-path'\nimport type {\n Mutable,\n ReadonlyReducerState,\n ReducerState,\n} from './router-reducer-types'\n\nfunction isNotUndefined<T>(value: T): value is Exclude<T, undefined> {\n return typeof value !== 'undefined'\n}\n\nexport function handleMutable(\n state: ReadonlyReducerState,\n mutable: Mutable\n): ReducerState {\n // shouldScroll is true by default, can override to false.\n const shouldScroll = mutable.shouldScroll ?? true\n\n let previousNextUrl = state.previousNextUrl\n let nextUrl = state.nextUrl\n\n if (isNotUndefined(mutable.patchedTree)) {\n // If we received a patched tree, we need to compute the changed path.\n const changedPath = computeChangedPath(state.tree, mutable.patchedTree)\n if (changedPath) {\n // If the tree changed, we need to update the nextUrl\n previousNextUrl = nextUrl\n nextUrl = changedPath\n } else if (!nextUrl) {\n // if the tree ends up being the same (ie, no changed path), and we don't have a nextUrl, then we should use the canonicalUrl\n nextUrl = state.canonicalUrl\n }\n // otherwise this will be a no-op and continue to use the existing nextUrl\n }\n\n return {\n // Set href.\n canonicalUrl: mutable.canonicalUrl ?? state.canonicalUrl,\n renderedSearch: mutable.renderedSearch ?? state.renderedSearch,\n pushRef: {\n pendingPush: isNotUndefined(mutable.pendingPush)\n ? mutable.pendingPush\n : state.pushRef.pendingPush,\n mpaNavigation: isNotUndefined(mutable.mpaNavigation)\n ? mutable.mpaNavigation\n : state.pushRef.mpaNavigation,\n preserveCustomHistoryState: isNotUndefined(\n mutable.preserveCustomHistoryState\n )\n ? mutable.preserveCustomHistoryState\n : state.pushRef.preserveCustomHistoryState,\n },\n // All navigation requires scroll and focus management to trigger.\n focusAndScrollRef: {\n apply: shouldScroll\n ? isNotUndefined(mutable?.scrollableSegments)\n ? true\n : state.focusAndScrollRef.apply\n : // If shouldScroll is false then we should not apply scroll and focus management.\n false,\n onlyHashChange: mutable.onlyHashChange || false,\n hashFragment: shouldScroll\n ? // Empty hash should trigger default behavior of scrolling layout into view.\n // #top is handled in layout-router.\n mutable.hashFragment && mutable.hashFragment !== ''\n ? // Remove leading # and decode hash to make non-latin hashes work.\n decodeURIComponent(mutable.hashFragment.slice(1))\n : state.focusAndScrollRef.hashFragment\n : // If shouldScroll is false then we should not apply scroll and focus management.\n null,\n segmentPaths: shouldScroll\n ? (mutable?.scrollableSegments ?? state.focusAndScrollRef.segmentPaths)\n : // If shouldScroll is false then we should not apply scroll and focus management.\n [],\n },\n // Apply cache.\n cache: mutable.cache ? mutable.cache : state.cache,\n // Apply patched router state.\n tree: isNotUndefined(mutable.patchedTree)\n ? mutable.patchedTree\n : state.tree,\n nextUrl,\n previousNextUrl: previousNextUrl,\n debugInfo: mutable.collectedDebugInfo ?? null,\n }\n}\n","import type { Segment } from '../../../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\n\nexport function createRouterCacheKey(\n segment: Segment,\n withoutSearchParameters: boolean = false\n) {\n // if the segment is an array, it means it's a dynamic segment\n // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.\n if (Array.isArray(segment)) {\n return `${segment[0]}|${segment[1]}|${segment[2]}`\n }\n\n // Page segments might have search parameters, ie __PAGE__?foo=bar\n // When `withoutSearchParameters` is true, we only want to return the page segment\n if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {\n return PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n","import type { FlightRouterState } from '../../../shared/lib/app-router-types'\n\nexport function isNavigatingToNewRootLayout(\n currentTree: FlightRouterState,\n nextTree: FlightRouterState\n): boolean {\n // Compare segments\n const currentTreeSegment = currentTree[0]\n const nextTreeSegment = nextTree[0]\n\n // If any segment is different before we find the root layout, the root layout has changed.\n // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js\n // First segment is 'same' for both, keep looking. (group1) changed to (group2) before the root layout was found, it must have changed.\n if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {\n // Compare dynamic param name and type but ignore the value, different values would not affect the current root layout\n // /[name] - /slug1 and /slug2, both values (slug1 & slug2) still has the same layout /[name]/layout.js\n if (\n currentTreeSegment[0] !== nextTreeSegment[0] ||\n currentTreeSegment[2] !== nextTreeSegment[2]\n ) {\n return true\n }\n } else if (currentTreeSegment !== nextTreeSegment) {\n return true\n }\n\n // Current tree root layout found\n if (currentTree[4]) {\n // If the next tree doesn't have the root layout flag, it must have changed.\n return !nextTree[4]\n }\n // Current tree didn't have its root layout here, must have changed.\n if (nextTree[4]) {\n return true\n }\n // We can't assume it's `parallelRoutes.children` here in case the root layout is `app/@something/layout.js`\n // But it's not possible to be more than one parallelRoutes before the root layout is found\n // TODO-APP: change to traverse all parallel routes\n const currentTreeChild = Object.values(currentTree[1])[0]\n const nextTreeChild = Object.values(nextTree[1])[0]\n if (!currentTreeChild || !nextTreeChild) return true\n return isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild)\n}\n","import type {\n CacheNodeSeedData,\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type {\n ChildSegmentMap,\n CacheNode,\n} from '../../../shared/lib/app-router-types'\nimport type {\n HeadData,\n LoadingModuleData,\n} from '../../../shared/lib/app-router-types'\nimport {\n DEFAULT_SEGMENT_KEY,\n NOT_FOUND_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { createRouterCacheKey } from './create-router-cache-key'\nimport { fetchServerResponse } from './fetch-server-response'\nimport { dispatchAppRouterAction } from '../use-action-queue'\nimport {\n ACTION_SERVER_PATCH,\n type ServerPatchAction,\n} from './router-reducer-types'\nimport { isNavigatingToNewRootLayout } from './is-navigating-to-new-root-layout'\nimport { DYNAMIC_STALETIME_MS } from './reducers/navigate-reducer'\nimport {\n convertServerPatchToFullTree,\n type NavigationSeed,\n} from '../segment-cache/navigation'\n\n// This is yet another tree type that is used to track pending promises that\n// need to be fulfilled once the dynamic data is received. The terminal nodes of\n// this tree represent the new Cache Node trees that were created during this\n// request. We can't use the Cache Node tree or Route State tree directly\n// because those include reused nodes, too. This tree is discarded as soon as\n// the navigation response is received.\nexport type NavigationTask = {\n status: NavigationTaskStatus\n // The router state that corresponds to the tree that this Task represents.\n route: FlightRouterState\n // The CacheNode that corresponds to the tree that this Task represents.\n node: CacheNode\n // The tree sent to the server during the dynamic request. If all the segments\n // are static, then this will be null, and no server request is required.\n // Otherwise, this is the same as `route`, except with the `refetch` marker\n // set on the top-most segment that needs to be fetched.\n dynamicRequestTree: FlightRouterState | null\n // The URL that should be used to fetch the dynamic data. This is only set\n // when the segment cannot be refetched from the current route, because it's\n // part of a \"default\" parallel slot that was reused during a navigation.\n refreshUrl: string | null\n children: Map<string, NavigationTask> | null\n}\n\nexport const enum FreshnessPolicy {\n Default,\n Hydration,\n HistoryTraversal,\n RefreshAll,\n HMRRefresh,\n}\n\nconst enum NavigationTaskStatus {\n Pending,\n Fulfilled,\n Rejected,\n}\n\n/**\n * When a NavigationTask finishes, there may or may not be data still missing,\n * necessitating a retry.\n */\nconst enum NavigationTaskExitStatus {\n /**\n * No additional navigation is required.\n */\n Done = 0,\n /**\n * Some data failed to load, presumably due to a route tree mismatch. Perform\n * a soft retry to reload the entire tree.\n */\n SoftRetry = 1,\n /**\n * Some data failed to load in an unrecoverable way, e.g. in an inactive\n * parallel route. Fall back to a hard (MPA-style) retry.\n */\n HardRetry = 2,\n}\n\nexport type NavigationRequestAccumulation = {\n scrollableSegments: Array<FlightSegmentPath> | null\n separateRefreshUrls: Set<string> | null\n}\n\nconst noop = () => {}\n\nexport function createInitialCacheNodeForHydration(\n navigatedAt: number,\n initialTree: FlightRouterState,\n seedData: CacheNodeSeedData | null,\n seedHead: HeadData\n): CacheNode {\n // Create the initial cache node tree, using the data embedded into the\n // HTML document.\n const accumulation: NavigationRequestAccumulation = {\n scrollableSegments: null,\n separateRefreshUrls: null,\n }\n const task = createCacheNodeOnNavigation(\n navigatedAt,\n initialTree,\n undefined,\n FreshnessPolicy.Hydration,\n seedData,\n seedHead,\n null,\n null,\n false,\n null,\n null,\n false,\n accumulation\n )\n\n // NOTE: We intentionally don't check if any data needs to be fetched from the\n // server. We assume the initial hydration payload is sufficient to render\n // the page.\n //\n // The completeness of the initial data is an important property that we rely\n // on as a last-ditch mechanism for recovering the app; we must always be able\n // to reload a fresh HTML document to get to a consistent state.\n //\n // In the future, there may be cases where the server intentionally sends\n // partial data and expects the client to fill in the rest, in which case this\n // logic may change. (There already is a similar case where the server sends\n // _no_ hydration data in the HTML document at all, and the client fetches it\n // separately, but that's different because we still end up hydrating with a\n // complete tree.)\n\n return task.node\n}\n\n// Creates a new Cache Node tree (i.e. copy-on-write) that represents the\n// optimistic result of a navigation, using both the current Cache Node tree and\n// data that was prefetched prior to navigation.\n//\n// At the moment we call this function, we haven't yet received the navigation\n// response from the server. It could send back something completely different\n// from the tree that was prefetched — due to rewrites, default routes, parallel\n// routes, etc.\n//\n// But in most cases, it will return the same tree that we prefetched, just with\n// the dynamic holes filled in. So we optimistically assume this will happen,\n// and accept that the real result could be arbitrarily different.\n//\n// We'll reuse anything that was already in the previous tree, since that's what\n// the server does.\n//\n// New segments (ones that don't appear in the old tree) are assigned an\n// unresolved promise. The data for these promises will be fulfilled later, when\n// the navigation response is received.\n//\n// The tree can be rendered immediately after it is created (that's why this is\n// a synchronous function). Any new trees that do not have prefetch data will\n// suspend during rendering, until the dynamic data streams in.\n//\n// Returns a Task object, which contains both the updated Cache Node and a path\n// to the pending subtrees that need to be resolved by the navigation response.\n//\n// A return value of `null` means there were no changes, and the previous tree\n// can be reused without initiating a server request.\nexport function startPPRNavigation(\n navigatedAt: number,\n oldUrl: URL,\n oldCacheNode: CacheNode | null,\n oldRouterState: FlightRouterState,\n newRouterState: FlightRouterState,\n freshness: FreshnessPolicy,\n seedData: CacheNodeSeedData | null,\n seedHead: HeadData | null,\n prefetchData: CacheNodeSeedData | null,\n prefetchHead: HeadData | null,\n isPrefetchHeadPartial: boolean,\n isSamePageNavigation: boolean,\n accumulation: NavigationRequestAccumulation\n): NavigationTask | null {\n const didFindRootLayout = false\n const parentNeedsDynamicRequest = false\n const parentRefreshUrl = null\n return updateCacheNodeOnNavigation(\n navigatedAt,\n oldUrl,\n oldCacheNode !== null ? oldCacheNode : undefined,\n oldRouterState,\n newRouterState,\n freshness,\n didFindRootLayout,\n seedData,\n seedHead,\n prefetchData,\n prefetchHead,\n isPrefetchHeadPartial,\n isSamePageNavigation,\n null,\n null,\n parentNeedsDynamicRequest,\n parentRefreshUrl,\n accumulation\n )\n}\n\nfunction updateCacheNodeOnNavigation(\n navigatedAt: number,\n oldUrl: URL,\n oldCacheNode: CacheNode | void,\n oldRouterState: FlightRouterState,\n newRouterState: FlightRouterState,\n freshness: FreshnessPolicy,\n didFindRootLayout: boolean,\n seedData: CacheNodeSeedData | null,\n seedHead: HeadData | null,\n prefetchData: CacheNodeSeedData | null,\n prefetchHead: HeadData | null,\n isPrefetchHeadPartial: boolean,\n isSamePageNavigation: boolean,\n parentSegmentPath: FlightSegmentPath | null,\n parentParallelRouteKey: string | null,\n parentNeedsDynamicRequest: boolean,\n parentRefreshUrl: string | null,\n accumulation: NavigationRequestAccumulation\n): NavigationTask | null {\n // Check if this segment matches the one in the previous route.\n const oldSegment = oldRouterState[0]\n const newSegment = newRouterState[0]\n if (!matchSegment(newSegment, oldSegment)) {\n // This segment does not match the previous route. We're now entering the\n // new part of the target route. Switch to the \"create\" path.\n if (\n // Check if the route tree changed before we reached a layout. (The\n // highest-level layout in a route tree is referred to as the \"root\"\n // layout.) This could mean that we're navigating between two different\n // root layouts. When this happens, we perform a full-page (MPA-style)\n // navigation.\n //\n // However, the algorithm for deciding where to start rendering a route\n // (i.e. the one performed in order to reach this function) is stricter\n // than the one used to detect a change in the root layout. So just\n // because we're re-rendering a segment outside of the root layout does\n // not mean we should trigger a full-page navigation.\n //\n // Specifically, we handle dynamic parameters differently: two segments\n // are considered the same even if their parameter values are different.\n //\n // Refer to isNavigatingToNewRootLayout for details.\n //\n // Note that we only have to perform this extra traversal if we didn't\n // already discover a root layout in the part of the tree that is\n // unchanged. We also only need to compare the subtree that is not\n // shared. In the common case, this branch is skipped completely.\n (!didFindRootLayout &&\n isNavigatingToNewRootLayout(oldRouterState, newRouterState)) ||\n // The global Not Found route (app/global-not-found.tsx) is a special\n // case, because it acts like a root layout, but in the router tree, it\n // is rendered in the same position as app/layout.tsx.\n //\n // Any navigation to the global Not Found route should trigger a\n // full-page navigation.\n //\n // TODO: We should probably model this by changing the key of the root\n // segment when this happens. Then the root layout check would work\n // as expected, without a special case.\n newSegment === NOT_FOUND_SEGMENT_KEY\n ) {\n return null\n }\n if (parentSegmentPath === null || parentParallelRouteKey === null) {\n // The root should never mismatch. If it does, it suggests an internal\n // Next.js error, or a malformed server response. Trigger a full-\n // page navigation.\n return null\n }\n return createCacheNodeOnNavigation(\n navigatedAt,\n newRouterState,\n oldCacheNode,\n freshness,\n seedData,\n seedHead,\n prefetchData,\n prefetchHead,\n isPrefetchHeadPartial,\n parentSegmentPath,\n parentParallelRouteKey,\n parentNeedsDynamicRequest,\n accumulation\n )\n }\n\n // TODO: The segment paths are tracked so that LayoutRouter knows which\n // segments to scroll to after a navigation. But we should just mark this\n // information on the CacheNode directly. It used to be necessary to do this\n // separately because CacheNodes were created lazily during render, not when\n // rather than when creating the route tree.\n const segmentPath =\n parentParallelRouteKey !== null && parentSegmentPath !== null\n ? parentSegmentPath.concat([parentParallelRouteKey, newSegment])\n : // NOTE: The root segment is intentionally omitted from the segment path\n []\n\n const newRouterStateChildren = newRouterState[1]\n const oldRouterStateChildren = oldRouterState[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n const prefetchDataChildren = prefetchData !== null ? prefetchData[1] : null\n\n // We're currently traversing the part of the tree that was also part of\n // the previous route. If we discover a root layout, then we don't need to\n // trigger an MPA navigation.\n const isRootLayout = newRouterState[4] === true\n const childDidFindRootLayout = didFindRootLayout || isRootLayout\n\n const oldParallelRoutes =\n oldCacheNode !== undefined ? oldCacheNode.parallelRoutes : undefined\n\n // Clone the current set of segment children, even if they aren't active in\n // the new tree.\n // TODO: We currently retain all the inactive segments indefinitely, until\n // there's an explicit refresh, or a parent layout is lazily refreshed. We\n // rely on this for popstate navigations, which update the Router State Tree\n // but do not eagerly perform a data fetch, because they expect the segment\n // data to already be in the Cache Node tree. For highly static sites that\n // are mostly read-only, this may happen only rarely, causing memory to\n // leak. We should figure out a better model for the lifetime of inactive\n // segments, so we can maintain instant back/forward navigations without\n // leaking memory indefinitely.\n let shouldDropSiblingCaches: boolean = false\n let shouldRefreshDynamicData: boolean = false\n switch (freshness) {\n case FreshnessPolicy.Default:\n case FreshnessPolicy.HistoryTraversal:\n case FreshnessPolicy.Hydration: // <- shouldn't happen during client nav\n // We should never drop dynamic data in shared layouts, except during\n // a refresh.\n shouldDropSiblingCaches = false\n shouldRefreshDynamicData = false\n break\n case FreshnessPolicy.RefreshAll:\n case FreshnessPolicy.HMRRefresh:\n shouldDropSiblingCaches = true\n shouldRefreshDynamicData = true\n break\n default:\n freshness satisfies never\n break\n }\n const newParallelRoutes = new Map(\n shouldDropSiblingCaches ? undefined : oldParallelRoutes\n )\n\n // TODO: We're not consistent about how we do this check. Some places\n // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to\n // check if there any any children, which is why I'm doing it here. We\n // should probably encode an empty children set as `null` though. Either\n // way, we should update all the checks to be consistent.\n const isLeafSegment = Object.keys(newRouterStateChildren).length === 0\n\n // Get the data for this segment. Since it was part of the previous route,\n // usually we just clone the data from the old CacheNode. However, during a\n // refresh or a revalidation, there won't be any existing CacheNode. So we\n // may need to consult the prefetch cache, like we would for a new segment.\n let newCacheNode: CacheNode\n let needsDynamicRequest: boolean\n if (\n oldCacheNode !== undefined &&\n !shouldRefreshDynamicData &&\n // During a same-page navigation, we always refetch the page segments\n !(isLeafSegment && isSamePageNavigation)\n ) {\n // Reuse the existing CacheNode\n const dropPrefetchRsc = false\n newCacheNode = reuseDynamicCacheNode(\n dropPrefetchRsc,\n oldCacheNode,\n newParallelRoutes\n )\n needsDynamicRequest = false\n } else if (seedData !== null && seedData[0] !== null) {\n // If this navigation was the result of an action, then check if the\n // server sent back data in the action response. We should favor using\n // that, rather than performing a separate request. This is both better\n // for performance and it's more likely to be consistent with any\n // writes that were just performed by the action, compared to a\n // separate request.\n const seedRsc = seedData[0]\n const seedLoading = seedData[2]\n const isSeedRscPartial = false\n const isSeedHeadPartial = seedHead === null\n newCacheNode = readCacheNodeFromSeedData(\n seedRsc,\n seedLoading,\n isSeedRscPartial,\n seedHead,\n isSeedHeadPartial,\n isLeafSegment,\n newParallelRoutes,\n navigatedAt\n )\n needsDynamicRequest = isLeafSegment && isSeedHeadPartial\n } else if (prefetchData !== null) {\n // Consult the prefetch cache.\n const prefetchRsc = prefetchData[0]\n const prefetchLoading = prefetchData[2]\n const isPrefetchRSCPartial = prefetchData[3]\n newCacheNode = readCacheNodeFromSeedData(\n prefetchRsc,\n prefetchLoading,\n isPrefetchRSCPartial,\n prefetchHead,\n isPrefetchHeadPartial,\n isLeafSegment,\n newParallelRoutes,\n navigatedAt\n )\n needsDynamicRequest =\n isPrefetchRSCPartial || (isLeafSegment && isPrefetchHeadPartial)\n } else {\n // Spawn a request to fetch new data from the server.\n newCacheNode = spawnNewCacheNode(\n newParallelRoutes,\n isLeafSegment,\n navigatedAt,\n freshness\n )\n needsDynamicRequest = true\n }\n\n // During a refresh navigation, there's a special case that happens when\n // entering a \"default\" slot. The default slot may not be part of the\n // current route; it may have been reused from an older route. If so,\n // we need to fetch its data from the old route's URL rather than current\n // route's URL. Keep track of this as we traverse the tree.\n const href = newRouterState[2]\n const refreshUrl =\n typeof href === 'string' && newRouterState[3] === 'refresh'\n ? // This segment is not present in the current route. Track its\n // refresh URL as we continue traversing the tree.\n href\n : // Inherit the refresh URL from the parent.\n parentRefreshUrl\n\n // If this segment itself needs to fetch new data from the server, then by\n // definition it is being refreshed. Track its refresh URL so we know which\n // URL to request the data from.\n if (needsDynamicRequest && refreshUrl !== null) {\n accumulateRefreshUrl(accumulation, refreshUrl)\n }\n\n // As we diff the trees, we may sometimes modify (copy-on-write, not mutate)\n // the Route Tree that was returned by the server — for example, in the case\n // of default parallel routes, we preserve the currently active segment. To\n // avoid mutating the original tree, we clone the router state children along\n // the return path.\n let patchedRouterStateChildren: {\n [parallelRouteKey: string]: FlightRouterState\n } = {}\n let taskChildren = null\n\n // Most navigations require a request to fetch additional data from the\n // server, either because the data was not already prefetched, or because the\n // target route contains dynamic data that cannot be prefetched.\n //\n // However, if the target route is fully static, and it's already completely\n // loaded into the segment cache, then we can skip the server request.\n //\n // This starts off as `false`, and is set to `true` if any of the child\n // routes requires a dynamic request.\n let childNeedsDynamicRequest = false\n // As we traverse the children, we'll construct a FlightRouterState that can\n // be sent to the server to request the dynamic data. If it turns out that\n // nothing in the subtree is dynamic (i.e. childNeedsDynamicRequest is false\n // at the end), then this will be discarded.\n // TODO: We can probably optimize the format of this data structure to only\n // include paths that are dynamic. Instead of reusing the\n // FlightRouterState type.\n let dynamicRequestTreeChildren: {\n [parallelRouteKey: string]: FlightRouterState\n } = {}\n\n for (let parallelRouteKey in newRouterStateChildren) {\n let newRouterStateChild: FlightRouterState =\n newRouterStateChildren[parallelRouteKey]\n const oldRouterStateChild: FlightRouterState | void =\n oldRouterStateChildren[parallelRouteKey]\n if (oldRouterStateChild === undefined) {\n // This should never happen, but if it does, it suggests a malformed\n // server response. Trigger a full-page navigation.\n return null\n }\n const oldSegmentMapChild =\n oldParallelRoutes !== undefined\n ? oldParallelRoutes.get(parallelRouteKey)\n : undefined\n\n let seedDataChild: CacheNodeSeedData | void | null =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n let prefetchDataChild: CacheNodeSeedData | void | null =\n prefetchDataChildren !== null\n ? prefetchDataChildren[parallelRouteKey]\n : null\n\n let newSegmentChild = newRouterStateChild[0]\n let seedHeadChild = seedHead\n let prefetchHeadChild = prefetchHead\n let isPrefetchHeadPartialChild = isPrefetchHeadPartial\n if (\n // Skip this branch during a history traversal. We restore the tree that\n // was stashed in the history entry as-is.\n freshness !== FreshnessPolicy.HistoryTraversal &&\n newSegmentChild === DEFAULT_SEGMENT_KEY\n ) {\n // This is a \"default\" segment. These are never sent by the server during\n // a soft navigation; instead, the client reuses whatever segment was\n // already active in that slot on the previous route.\n newRouterStateChild = reuseActiveSegmentInDefaultSlot(\n oldUrl,\n oldRouterStateChild\n )\n newSegmentChild = newRouterStateChild[0]\n\n // Since we're switching to a different route tree, these are no\n // longer valid, because they correspond to the outer tree.\n seedDataChild = null\n seedHeadChild = null\n prefetchDataChild = null\n prefetchHeadChild = null\n isPrefetchHeadPartialChild = false\n }\n\n const newSegmentKeyChild = createRouterCacheKey(newSegmentChild)\n const oldCacheNodeChild =\n oldSegmentMapChild !== undefined\n ? oldSegmentMapChild.get(newSegmentKeyChild)\n : undefined\n\n const taskChild = updateCacheNodeOnNavigation(\n navigatedAt,\n oldUrl,\n oldCacheNodeChild,\n oldRouterStateChild,\n newRouterStateChild,\n freshness,\n childDidFindRootLayout,\n seedDataChild ?? null,\n seedHeadChild,\n prefetchDataChild ?? null,\n prefetchHeadChild,\n isPrefetchHeadPartialChild,\n isSamePageNavigation,\n segmentPath,\n parallelRouteKey,\n parentNeedsDynamicRequest || needsDynamicRequest,\n refreshUrl,\n accumulation\n )\n\n if (taskChild === null) {\n // One of the child tasks discovered a change to the root layout.\n // Immediately unwind from this recursive traversal. This will trigger a\n // full-page navigation.\n return null\n }\n\n // Recursively propagate up the child tasks.\n if (taskChildren === null) {\n taskChildren = new Map()\n }\n taskChildren.set(parallelRouteKey, taskChild)\n const newCacheNodeChild = taskChild.node\n if (newCacheNodeChild !== null) {\n const newSegmentMapChild: ChildSegmentMap = new Map(\n shouldDropSiblingCaches ? undefined : oldSegmentMapChild\n )\n newSegmentMapChild.set(newSegmentKeyChild, newCacheNodeChild)\n newParallelRoutes.set(parallelRouteKey, newSegmentMapChild)\n }\n\n // The child tree's route state may be different from the prefetched\n // route sent by the server. We need to clone it as we traverse back up\n // the tree.\n const taskChildRoute = taskChild.route\n patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n if (dynamicRequestTreeChild !== null) {\n // Something in the child tree is dynamic.\n childNeedsDynamicRequest = true\n dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n } else {\n dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n }\n }\n\n return {\n status: needsDynamicRequest\n ? NavigationTaskStatus.Pending\n : NavigationTaskStatus.Fulfilled,\n route: patchRouterStateWithNewChildren(\n newRouterState,\n patchedRouterStateChildren\n ),\n node: newCacheNode,\n dynamicRequestTree: createDynamicRequestTree(\n newRouterState,\n dynamicRequestTreeChildren,\n needsDynamicRequest,\n childNeedsDynamicRequest,\n parentNeedsDynamicRequest\n ),\n refreshUrl,\n children: taskChildren,\n }\n}\n\nfunction createCacheNodeOnNavigation(\n navigatedAt: number,\n newRouterState: FlightRouterState,\n oldCacheNode: CacheNode | void,\n freshness: FreshnessPolicy,\n seedData: CacheNodeSeedData | null,\n seedHead: HeadData | null,\n prefetchData: CacheNodeSeedData | null,\n prefetchHead: HeadData | null,\n isPrefetchHeadPartial: boolean,\n parentSegmentPath: FlightSegmentPath | null,\n parentParallelRouteKey: string | null,\n parentNeedsDynamicRequest: boolean,\n accumulation: NavigationRequestAccumulation\n): NavigationTask {\n // Same traversal as updateCacheNodeNavigation, but simpler. We switch to this\n // path once we reach the part of the tree that was not in the previous route.\n // We don't need to diff against the old tree, we just need to create a new\n // one. We also don't need to worry about any refresh-related logic.\n //\n // For the most part, this is a subset of updateCacheNodeOnNavigation, so any\n // change that happens in this function likely needs to be applied to that\n // one, too. However there are some places where the behavior intentionally\n // diverges, which is why we keep them separate.\n\n const newSegment = newRouterState[0]\n const segmentPath =\n parentParallelRouteKey !== null && parentSegmentPath !== null\n ? parentSegmentPath.concat([parentParallelRouteKey, newSegment])\n : // NOTE: The root segment is intentionally omitted from the segment path\n []\n\n const newRouterStateChildren = newRouterState[1]\n const prefetchDataChildren = prefetchData !== null ? prefetchData[1] : null\n const seedDataChildren = seedData !== null ? seedData[1] : null\n const oldParallelRoutes =\n oldCacheNode !== undefined ? oldCacheNode.parallelRoutes : undefined\n\n let shouldDropSiblingCaches: boolean = false\n let shouldRefreshDynamicData: boolean = false\n let dropPrefetchRsc: boolean = false\n switch (freshness) {\n case FreshnessPolicy.Default:\n // We should never drop dynamic data in sibling caches except during\n // a refresh.\n shouldDropSiblingCaches = false\n\n // Only reuse the dynamic data if experimental.staleTimes.dynamic config\n // is set, and the data is not stale. (This is not a recommended API with\n // Cache Components, but it's supported for backwards compatibility. Use\n // cacheLife instead.)\n //\n // DYNAMIC_STALETIME_MS defaults to 0, but it can be increased.\n shouldRefreshDynamicData =\n oldCacheNode === undefined ||\n navigatedAt - oldCacheNode.navigatedAt >= DYNAMIC_STALETIME_MS\n\n dropPrefetchRsc = false\n break\n case FreshnessPolicy.Hydration:\n // During hydration, we assume the data sent by the server is both\n // consistent and complete.\n shouldRefreshDynamicData = false\n shouldDropSiblingCaches = false\n dropPrefetchRsc = false\n break\n case FreshnessPolicy.HistoryTraversal:\n // During back/forward navigations, we reuse the dynamic data regardless\n // of how stale it may be.\n shouldRefreshDynamicData = false\n shouldRefreshDynamicData = false\n\n // Only show prefetched data if the dynamic data is still pending. This\n // avoids a flash back to the prefetch state in a case where it's highly\n // likely to have already streamed in.\n //\n // Tehnically, what we're actually checking is whether the dynamic network\n // response was received. But since it's a streaming response, this does\n // not mean that all the dynamic data has fully streamed in. It just means\n // that _some_ of the dynamic data was received. But as a heuristic, we\n // assume that the rest dynamic data will stream in quickly, so it's still\n // better to skip the prefetch state.\n if (oldCacheNode !== undefined) {\n const oldRsc = oldCacheNode.rsc\n const oldRscDidResolve =\n !isDeferredRsc(oldRsc) || oldRsc.status !== 'pending'\n dropPrefetchRsc = oldRscDidResolve\n } else {\n dropPrefetchRsc = false\n }\n break\n case FreshnessPolicy.RefreshAll:\n case FreshnessPolicy.HMRRefresh:\n // Drop all dynamic data.\n shouldRefreshDynamicData = true\n shouldDropSiblingCaches = true\n dropPrefetchRsc = false\n break\n default:\n freshness satisfies never\n break\n }\n\n const newParallelRoutes = new Map(\n shouldDropSiblingCaches ? undefined : oldParallelRoutes\n )\n const isLeafSegment = Object.keys(newRouterStateChildren).length === 0\n\n if (isLeafSegment) {\n // The segment path of every leaf segment (i.e. page) is collected into\n // a result array. This is used by the LayoutRouter to scroll to ensure that\n // new pages are visible after a navigation.\n //\n // This only happens for new pages, not for refreshed pages.\n //\n // TODO: We should use a string to represent the segment path instead of\n // an array. We already use a string representation for the path when\n // accessing the Segment Cache, so we can use the same one.\n if (accumulation.scrollableSegments === null) {\n accumulation.scrollableSegments = []\n }\n accumulation.scrollableSegments.push(segmentPath)\n }\n\n let newCacheNode: CacheNode\n let needsDynamicRequest: boolean\n if (!shouldRefreshDynamicData && oldCacheNode !== undefined) {\n // Reuse the existing CacheNode\n newCacheNode = reuseDynamicCacheNode(\n dropPrefetchRsc,\n oldCacheNode,\n newParallelRoutes\n )\n needsDynamicRequest = false\n } else if (seedData !== null && seedData[0] !== null) {\n // If this navigation was the result of an action, then check if the\n // server sent back data in the action response. We should favor using\n // that, rather than performing a separate request. This is both better\n // for performance and it's more likely to be consistent with any\n // writes that were just performed by the action, compared to a\n // separate request.\n const seedRsc = seedData[0]\n const seedLoading = seedData[2]\n const isSeedRscPartial = false\n const isSeedHeadPartial =\n seedHead === null && freshness !== FreshnessPolicy.Hydration\n newCacheNode = readCacheNodeFromSeedData(\n seedRsc,\n seedLoading,\n isSeedRscPartial,\n seedHead,\n isSeedHeadPartial,\n isLeafSegment,\n newParallelRoutes,\n navigatedAt\n )\n needsDynamicRequest = isLeafSegment && isSeedHeadPartial\n } else if (\n freshness === FreshnessPolicy.Hydration &&\n isLeafSegment &&\n seedHead !== null\n ) {\n // This is another weird case related to \"not found\" pages and hydration.\n // There will be a head sent by the server, but no page seed data.\n // TODO: We really should get rid of all these \"not found\" specific quirks\n // and make sure the tree is always consistent.\n const seedRsc = null\n const seedLoading = null\n const isSeedRscPartial = false\n const isSeedHeadPartial = false\n newCacheNode = readCacheNodeFromSeedData(\n seedRsc,\n seedLoading,\n isSeedRscPartial,\n seedHead,\n isSeedHeadPartial,\n isLeafSegment,\n newParallelRoutes,\n navigatedAt\n )\n needsDynamicRequest = false\n } else if (freshness !== FreshnessPolicy.Hydration && prefetchData !== null) {\n // Consult the prefetch cache.\n const prefetchRsc = prefetchData[0]\n const prefetchLoading = prefetchData[2]\n const isPrefetchRSCPartial = prefetchData[3]\n newCacheNode = readCacheNodeFromSeedData(\n prefetchRsc,\n prefetchLoading,\n isPrefetchRSCPartial,\n prefetchHead,\n isPrefetchHeadPartial,\n isLeafSegment,\n newParallelRoutes,\n navigatedAt\n )\n needsDynamicRequest =\n isPrefetchRSCPartial || (isLeafSegment && isPrefetchHeadPartial)\n } else {\n // Spawn a request to fetch new data from the server.\n newCacheNode = spawnNewCacheNode(\n newParallelRoutes,\n isLeafSegment,\n navigatedAt,\n freshness\n )\n needsDynamicRequest = true\n }\n\n let patchedRouterStateChildren: {\n [parallelRouteKey: string]: FlightRouterState\n } = {}\n let taskChildren = null\n\n let childNeedsDynamicRequest = false\n let dynamicRequestTreeChildren: {\n [parallelRouteKey: string]: FlightRouterState\n } = {}\n\n for (let parallelRouteKey in newRouterStateChildren) {\n const newRouterStateChild: FlightRouterState =\n newRouterStateChildren[parallelRouteKey]\n const oldSegmentMapChild =\n oldParallelRoutes !== undefined\n ? oldParallelRoutes.get(parallelRouteKey)\n : undefined\n const seedDataChild: CacheNodeSeedData | void | null =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n const prefetchDataChild: CacheNodeSeedData | void | null =\n prefetchDataChildren !== null\n ? prefetchDataChildren[parallelRouteKey]\n : null\n\n const newSegmentChild = newRouterStateChild[0]\n const newSegmentKeyChild = createRouterCacheKey(newSegmentChild)\n\n const oldCacheNodeChild =\n oldSegmentMapChild !== undefined\n ? oldSegmentMapChild.get(newSegmentKeyChild)\n : undefined\n\n const taskChild = createCacheNodeOnNavigation(\n navigatedAt,\n newRouterStateChild,\n oldCacheNodeChild,\n freshness,\n seedDataChild ?? null,\n seedHead,\n prefetchDataChild ?? null,\n prefetchHead,\n isPrefetchHeadPartial,\n segmentPath,\n parallelRouteKey,\n parentNeedsDynamicRequest || needsDynamicRequest,\n accumulation\n )\n\n if (taskChildren === null) {\n taskChildren = new Map()\n }\n taskChildren.set(parallelRouteKey, taskChild)\n const newCacheNodeChild = taskChild.node\n if (newCacheNodeChild !== null) {\n const newSegmentMapChild: ChildSegmentMap = new Map(\n shouldDropSiblingCaches ? undefined : oldSegmentMapChild\n )\n newSegmentMapChild.set(newSegmentKeyChild, newCacheNodeChild)\n newParallelRoutes.set(parallelRouteKey, newSegmentMapChild)\n }\n\n const taskChildRoute = taskChild.route\n patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n if (dynamicRequestTreeChild !== null) {\n childNeedsDynamicRequest = true\n dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n } else {\n dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n }\n }\n\n return {\n status: needsDynamicRequest\n ? NavigationTaskStatus.Pending\n : NavigationTaskStatus.Fulfilled,\n route: patchRouterStateWithNewChildren(\n newRouterState,\n patchedRouterStateChildren\n ),\n node: newCacheNode,\n dynamicRequestTree: createDynamicRequestTree(\n newRouterState,\n dynamicRequestTreeChildren,\n needsDynamicRequest,\n childNeedsDynamicRequest,\n parentNeedsDynamicRequest\n ),\n // This route is not part of the current tree, so there's no reason to\n // track the refresh URL.\n refreshUrl: null,\n children: taskChildren,\n }\n}\n\nfunction patchRouterStateWithNewChildren(\n baseRouterState: FlightRouterState,\n newChildren: { [parallelRouteKey: string]: FlightRouterState }\n): FlightRouterState {\n const clone: FlightRouterState = [baseRouterState[0], newChildren]\n // Based on equivalent logic in apply-router-state-patch-to-tree, but should\n // confirm whether we need to copy all of these fields. Not sure the server\n // ever sends, e.g. the refetch marker.\n if (2 in baseRouterState) {\n clone[2] = baseRouterState[2]\n }\n if (3 in baseRouterState) {\n clone[3] = baseRouterState[3]\n }\n if (4 in baseRouterState) {\n clone[4] = baseRouterState[4]\n }\n return clone\n}\n\nfunction createDynamicRequestTree(\n newRouterState: FlightRouterState,\n dynamicRequestTreeChildren: Record<string, FlightRouterState>,\n needsDynamicRequest: boolean,\n childNeedsDynamicRequest: boolean,\n parentNeedsDynamicRequest: boolean\n): FlightRouterState | null {\n // Create a FlightRouterState that instructs the server how to render the\n // requested segment.\n //\n // Or, if neither this segment nor any of the children require a new data,\n // then we return `null` to skip the request.\n let dynamicRequestTree: FlightRouterState | null = null\n if (needsDynamicRequest) {\n dynamicRequestTree = patchRouterStateWithNewChildren(\n newRouterState,\n dynamicRequestTreeChildren\n )\n // The \"refetch\" marker is set on the top-most segment that requires new\n // data. We can omit it if a parent was already marked.\n if (!parentNeedsDynamicRequest) {\n dynamicRequestTree[3] = 'refetch'\n }\n } else if (childNeedsDynamicRequest) {\n // This segment does not request new data, but at least one of its\n // children does.\n dynamicRequestTree = patchRouterStateWithNewChildren(\n newRouterState,\n dynamicRequestTreeChildren\n )\n } else {\n dynamicRequestTree = null\n }\n return dynamicRequestTree\n}\n\nfunction accumulateRefreshUrl(\n accumulation: NavigationRequestAccumulation,\n refreshUrl: string\n) {\n // This is a refresh navigation, and we're inside a \"default\" slot that's\n // not part of the current route; it was reused from an older route. In\n // order to get fresh data for this reused route, we need to issue a\n // separate request using the old route's URL.\n //\n // Track these extra URLs in the accumulated result. Later, we'll construct\n // an appropriate request for each unique URL in the final set. The reason\n // we don't do it immediately here is so we can deduplicate multiple\n // instances of the same URL into a single request. See\n // listenForDynamicRequest for more details.\n const separateRefreshUrls = accumulation.separateRefreshUrls\n if (separateRefreshUrls === null) {\n accumulation.separateRefreshUrls = new Set([refreshUrl])\n } else {\n separateRefreshUrls.add(refreshUrl)\n }\n}\n\nfunction reuseActiveSegmentInDefaultSlot(\n oldUrl: URL,\n oldRouterState: FlightRouterState\n): FlightRouterState {\n // This is a \"default\" segment. These are never sent by the server during a\n // soft navigation; instead, the client reuses whatever segment was already\n // active in that slot on the previous route. This means if we later need to\n // refresh the segment, it will have to be refetched from the previous route's\n // URL. We store it in the Flight Router State.\n //\n // TODO: We also mark the segment with a \"refresh\" marker but I think we can\n // get rid of that eventually by making sure we only add URLs to page segments\n // that are reused. Then the presence of the URL alone is enough.\n let reusedRouterState\n\n const oldRefreshMarker = oldRouterState[3]\n if (oldRefreshMarker === 'refresh') {\n // This segment was already reused from an even older route. Keep its\n // existing URL and refresh marker.\n reusedRouterState = oldRouterState\n } else {\n // This segment was not previously reused, and it's not on the new route.\n // So it must have been delivered in the old route.\n reusedRouterState = patchRouterStateWithNewChildren(\n oldRouterState,\n oldRouterState[1]\n )\n reusedRouterState[2] = createHrefFromUrl(oldUrl)\n reusedRouterState[3] = 'refresh'\n }\n\n return reusedRouterState\n}\n\nfunction reuseDynamicCacheNode(\n dropPrefetchRsc: boolean,\n existingCacheNode: CacheNode,\n parallelRoutes: Map<string, ChildSegmentMap>\n): CacheNode {\n // Clone an existing CacheNode's data, with (possibly) new children.\n const cacheNode: CacheNode = {\n rsc: existingCacheNode.rsc,\n prefetchRsc: dropPrefetchRsc ? null : existingCacheNode.prefetchRsc,\n head: existingCacheNode.head,\n prefetchHead: dropPrefetchRsc ? null : existingCacheNode.prefetchHead,\n loading: existingCacheNode.loading,\n\n parallelRoutes,\n\n // Don't update the navigatedAt timestamp, since we're reusing\n // existing data.\n navigatedAt: existingCacheNode.navigatedAt,\n }\n return cacheNode\n}\n\nfunction readCacheNodeFromSeedData(\n seedRsc: React.ReactNode,\n seedLoading: LoadingModuleData | Promise<LoadingModuleData>,\n isSeedRscPartial: boolean,\n seedHead: HeadData | null,\n isSeedHeadPartial: boolean,\n isPageSegment: boolean,\n parallelRoutes: Map<string, ChildSegmentMap>,\n navigatedAt: number\n): CacheNode {\n // TODO: Currently this is threaded through the navigation logic using the\n // CacheNodeSeedData type, but in the future this will read directly from\n // the Segment Cache. See readRenderSnapshotFromCache.\n\n let rsc: React.ReactNode\n let prefetchRsc: React.ReactNode\n if (isSeedRscPartial) {\n // The prefetched data contains dynamic holes. Create a pending promise that\n // will be fulfilled when the dynamic data is received from the server.\n prefetchRsc = seedRsc\n rsc = createDeferredRsc()\n } else {\n // The prefetched data is complete. Use it directly.\n prefetchRsc = null\n rsc = seedRsc\n }\n\n // If this is a page segment, also read the head.\n let prefetchHead: HeadData | null\n let head: HeadData | null\n if (isPageSegment) {\n if (isSeedHeadPartial) {\n prefetchHead = seedHead\n head = createDeferredRsc()\n } else {\n prefetchHead = null\n head = seedHead\n }\n } else {\n prefetchHead = null\n head = null\n }\n\n const cacheNode: CacheNode = {\n rsc,\n prefetchRsc,\n head,\n prefetchHead,\n // TODO: Technically, a loading boundary could contain dynamic data. We\n // should have separate `loading` and `prefetchLoading` fields to handle\n // this, like we do for the segment data and head.\n loading: seedLoading,\n parallelRoutes,\n navigatedAt,\n }\n\n return cacheNode\n}\n\nfunction spawnNewCacheNode(\n parallelRoutes: Map<string, ChildSegmentMap>,\n isLeafSegment: boolean,\n navigatedAt: number,\n freshness: FreshnessPolicy\n): CacheNode {\n // We should never spawn network requests during hydration. We must treat the\n // initial payload as authoritative, because the initial page load is used\n // as a last-ditch mechanism for recovering the app.\n //\n // This is also an important safety check because if this leaks into the\n // server rendering path (which theoretically it never should because\n // the server payload should be consistent), the server would hang because\n // these promises would never resolve.\n //\n // TODO: There is an existing case where the global \"not found\" boundary\n // triggers this path. But it does render correctly despite that. That's an\n // unusual render path so it's not surprising, but we should look into\n // modeling it in a more consistent way. See also the /_notFound special\n // case in updateCacheNodeOnNavigation.\n const isHydration = freshness === FreshnessPolicy.Hydration\n\n const cacheNode: CacheNode = {\n rsc: !isHydration ? createDeferredRsc() : null,\n prefetchRsc: null,\n head: !isHydration && isLeafSegment ? createDeferredRsc() : null,\n prefetchHead: null,\n loading: !isHydration ? createDeferredRsc<LoadingModuleData>() : null,\n parallelRoutes,\n navigatedAt,\n }\n return cacheNode\n}\n\n// Represents whether the previuos navigation resulted in a route tree mismatch.\n// A mismatch results in a refresh of the page. If there are two successive\n// mismatches, we will fall back to an MPA navigation, to prevent a retry loop.\nlet previousNavigationDidMismatch = false\n\n// Writes a dynamic server response into the tree created by\n// updateCacheNodeOnNavigation. All pending promises that were spawned by the\n// navigation will be resolved, either with dynamic data from the server, or\n// `null` to indicate that the data is missing.\n//\n// A `null` value will trigger a lazy fetch during render, which will then patch\n// up the tree using the same mechanism as the non-PPR implementation\n// (serverPatchReducer).\n//\n// Usually, the server will respond with exactly the subset of data that we're\n// waiting for — everything below the nearest shared layout. But technically,\n// the server can return anything it wants.\n//\n// This does _not_ create a new tree; it modifies the existing one in place.\n// Which means it must follow the Suspense rules of cache safety.\nexport function spawnDynamicRequests(\n task: NavigationTask,\n primaryUrl: URL,\n nextUrl: string | null,\n freshnessPolicy: FreshnessPolicy,\n accumulation: NavigationRequestAccumulation\n): void {\n const dynamicRequestTree = task.dynamicRequestTree\n if (dynamicRequestTree === null) {\n // This navigation was fully cached. There are no dynamic requests to spawn.\n previousNavigationDidMismatch = false\n return\n }\n\n // This is intentionally not an async function to discourage the caller from\n // awaiting the result. Any subsequent async operations spawned by this\n // function should result in a separate navigation task, rather than\n // block the original one.\n //\n // In this function we spawn (but do not await) all the network requests that\n // block the navigation, and collect the promises. The next function,\n // `finishNavigationTask`, can await the promises in any order without\n // accidentally introducing a network waterfall.\n const primaryRequestPromise = fetchMissingDynamicData(\n task,\n dynamicRequestTree,\n primaryUrl,\n nextUrl,\n freshnessPolicy\n )\n\n const separateRefreshUrls = accumulation.separateRefreshUrls\n let refreshRequestPromises: Array<\n ReturnType<typeof fetchMissingDynamicData>\n > | null = null\n if (separateRefreshUrls !== null) {\n // There are multiple URLs that we need to request the data from. This\n // happens when a \"default\" parallel route slot is present in the tree, and\n // its data cannot be fetched from the current route. We need to split the\n // combined dynamic request tree into separate requests per URL.\n\n // TODO: Create a scoped dynamic request tree that omits anything that\n // is not relevant to the given URL. Without doing this, the server may\n // sometimes render more data than necessary; this is not a regression\n // compared to the pre-Segment Cache implementation, though, just an\n // optimization we can make in the future.\n\n // Construct a request tree for each additional refresh URL. This will\n // prune away everything except the parts of the tree that match the\n // given refresh URL.\n refreshRequestPromises = []\n const canonicalUrl = createHrefFromUrl(primaryUrl)\n for (const refreshUrl of separateRefreshUrls) {\n if (refreshUrl === canonicalUrl) {\n // We already initiated a request for the this URL, above. Skip it.\n // TODO: This only happens because the main URL is not tracked as\n // part of the separateRefreshURLs set. There's probably a better way\n // to structure this so this case doesn't happen.\n continue\n }\n // TODO: Create a scoped dynamic request tree that omits anything that\n // is not relevant to the given URL. Without doing this, the server may\n // sometimes render more data than necessary; this is not a regression\n // compared to the pre-Segment Cache implementation, though, just an\n // optimization we can make in the future.\n // const scopedDynamicRequestTree = splitTaskByURL(task, refreshUrl)\n const scopedDynamicRequestTree = dynamicRequestTree\n if (scopedDynamicRequestTree !== null) {\n refreshRequestPromises.push(\n fetchMissingDynamicData(\n task,\n scopedDynamicRequestTree,\n new URL(refreshUrl, location.origin),\n // TODO: Just noticed that this should actually the Next-Url at the\n // time the refresh URL was set, not the current Next-Url. Need to\n // start tracking this alongside the refresh URL. In the meantime,\n // if a refresh fails due to a mismatch, it will trigger a\n // hard refresh.\n nextUrl,\n freshnessPolicy\n )\n )\n }\n }\n }\n\n // Further async operations are moved into this separate function to\n // discourage sequential network requests.\n const voidPromise = finishNavigationTask(\n task,\n nextUrl,\n primaryRequestPromise,\n refreshRequestPromises\n )\n // `finishNavigationTask` is responsible for error handling, so we can attach\n // noop callbacks to this promise.\n voidPromise.then(noop, noop)\n}\n\nasync function finishNavigationTask(\n task: NavigationTask,\n nextUrl: string | null,\n primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n refreshRequestPromises: Array<\n ReturnType<typeof fetchMissingDynamicData>\n > | null\n): Promise<void> {\n // Wait for all the requests to finish, or for the first one to fail.\n let exitStatus = await waitForRequestsToFinish(\n primaryRequestPromise,\n refreshRequestPromises\n )\n\n // Once the all the requests have finished, check the tree for any remaining\n // pending tasks. If anything is still pending, it means the server response\n // does not match the client, and we must refresh to get back to a consistent\n // state. We can skip this step if we already detected a mismatch during the\n // first phase; it doesn't matter in that case because we're going to refresh\n // the whole tree regardless.\n if (exitStatus === NavigationTaskExitStatus.Done) {\n exitStatus = abortRemainingPendingTasks(task, null, null)\n }\n\n switch (exitStatus) {\n case NavigationTaskExitStatus.Done: {\n // The task has completely finished. There's no missing data. Exit.\n previousNavigationDidMismatch = false\n return\n }\n case NavigationTaskExitStatus.SoftRetry: {\n // Some data failed to finish loading. Trigger a soft retry.\n // TODO: As an extra precaution against soft retry loops, consider\n // tracking whether a navigation was itself triggered by a retry. If two\n // happen in a row, fall back to a hard retry.\n const isHardRetry = false\n const primaryRequestResult = await primaryRequestPromise\n dispatchRetryDueToTreeMismatch(\n isHardRetry,\n primaryRequestResult.url,\n nextUrl,\n primaryRequestResult.seed,\n task.route\n )\n return\n }\n case NavigationTaskExitStatus.HardRetry: {\n // Some data failed to finish loading in a non-recoverable way, such as a\n // network error. Trigger an MPA navigation.\n //\n // Hard navigating/refreshing is how we prevent an infinite retry loop\n // caused by a network error — when the network fails, we fall back to the\n // browser behavior for offline navigations. In the future, Next.js may\n // introduce its own custom handling of offline navigations, but that\n // doesn't exist yet.\n const isHardRetry = true\n const primaryRequestResult = await primaryRequestPromise\n dispatchRetryDueToTreeMismatch(\n isHardRetry,\n primaryRequestResult.url,\n nextUrl,\n primaryRequestResult.seed,\n task.route\n )\n return\n }\n default: {\n return exitStatus satisfies never\n }\n }\n}\n\nfunction waitForRequestsToFinish(\n primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n refreshRequestPromises: Array<\n ReturnType<typeof fetchMissingDynamicData>\n > | null\n) {\n // Custom async combinator logic. This could be replaced by Promise.any but\n // we don't assume that's available.\n //\n // Each promise resolves once the server responsds and the data is written\n // into the CacheNode tree. Resolve the combined promise once all the\n // requests finish.\n //\n // Or, resolve as soon as one of the requests fails, without waiting for the\n // others to finish.\n return new Promise<NavigationTaskExitStatus>((resolve) => {\n const onFulfill = (result: { exitStatus: NavigationTaskExitStatus }) => {\n if (result.exitStatus === NavigationTaskExitStatus.Done) {\n remainingCount--\n if (remainingCount === 0) {\n // All the requests finished successfully.\n resolve(NavigationTaskExitStatus.Done)\n }\n } else {\n // One of the requests failed. Exit with a failing status.\n // NOTE: It's possible for one of the requests to fail with SoftRetry\n // and a later one to fail with HardRetry. In this case, we choose to\n // retry immediately, rather than delay the retry until all the requests\n // finish. If it fails again, we will hard retry on the next\n // attempt, anyway.\n resolve(result.exitStatus)\n }\n }\n // onReject shouldn't ever be called because fetchMissingDynamicData's\n // entire body is wrapped in a try/catch. This is just defensive.\n const onReject = () => resolve(NavigationTaskExitStatus.HardRetry)\n\n // Attach the listeners to the promises.\n let remainingCount = 1\n primaryRequestPromise.then(onFulfill, onReject)\n if (refreshRequestPromises !== null) {\n remainingCount += refreshRequestPromises.length\n refreshRequestPromises.forEach((refreshRequestPromise) =>\n refreshRequestPromise.then(onFulfill, onReject)\n )\n }\n })\n}\n\nfunction dispatchRetryDueToTreeMismatch(\n isHardRetry: boolean,\n retryUrl: URL,\n retryNextUrl: string | null,\n seed: NavigationSeed | null,\n baseTree: FlightRouterState\n) {\n // If this is the second time in a row that a navigation resulted in a\n // mismatch, fall back to a hard (MPA) refresh.\n isHardRetry = isHardRetry || previousNavigationDidMismatch\n previousNavigationDidMismatch = true\n const retryAction: ServerPatchAction = {\n type: ACTION_SERVER_PATCH,\n previousTree: baseTree,\n url: retryUrl,\n nextUrl: retryNextUrl,\n seed,\n mpa: isHardRetry,\n }\n dispatchAppRouterAction(retryAction)\n}\n\nasync function fetchMissingDynamicData(\n task: NavigationTask,\n dynamicRequestTree: FlightRouterState,\n url: URL,\n nextUrl: string | null,\n freshnessPolicy: FreshnessPolicy\n): Promise<{\n exitStatus: NavigationTaskExitStatus\n url: URL\n seed: NavigationSeed | null\n}> {\n try {\n const result = await fetchServerResponse(url, {\n flightRouterState: dynamicRequestTree,\n nextUrl,\n isHmrRefresh: freshnessPolicy === FreshnessPolicy.HMRRefresh,\n })\n if (typeof result === 'string') {\n // fetchServerResponse will return an href to indicate that the SPA\n // navigation failed. For example, if the server triggered a hard\n // redirect, or the fetch request errored. Initiate an MPA navigation\n // to the given href.\n return {\n exitStatus: NavigationTaskExitStatus.HardRetry,\n url: new URL(result, location.origin),\n seed: null,\n }\n }\n const seed = convertServerPatchToFullTree(\n task.route,\n result.flightData,\n result.renderedSearch\n )\n const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(\n task,\n seed.tree,\n seed.data,\n seed.head,\n result.debugInfo\n )\n return {\n exitStatus: didReceiveUnknownParallelRoute\n ? NavigationTaskExitStatus.SoftRetry\n : NavigationTaskExitStatus.Done,\n url: new URL(result.canonicalUrl, location.origin),\n seed,\n }\n } catch {\n // This shouldn't happen because fetchServerResponse's entire body is\n // wrapped in a try/catch. If it does, though, it implies the server failed\n // to respond with any tree at all. So we must fall back to a hard retry.\n return {\n exitStatus: NavigationTaskExitStatus.HardRetry,\n url: url,\n seed: null,\n }\n }\n}\n\nfunction writeDynamicDataIntoNavigationTask(\n task: NavigationTask,\n serverRouterState: FlightRouterState,\n dynamicData: CacheNodeSeedData | null,\n dynamicHead: HeadData,\n debugInfo: Array<any> | null\n): boolean {\n if (task.status === NavigationTaskStatus.Pending && dynamicData !== null) {\n task.status = NavigationTaskStatus.Fulfilled\n finishPendingCacheNode(task.node, dynamicData, dynamicHead, debugInfo)\n }\n\n const taskChildren = task.children\n const serverChildren = serverRouterState[1]\n const dynamicDataChildren = dynamicData !== null ? dynamicData[1] : null\n\n // Detect whether the server sends a parallel route slot that the client\n // doesn't know about.\n let didReceiveUnknownParallelRoute = false\n\n if (taskChildren !== null) {\n for (const parallelRouteKey in serverChildren) {\n const serverRouterStateChild: FlightRouterState =\n serverChildren[parallelRouteKey]\n const dynamicDataChild: CacheNodeSeedData | null | void =\n dynamicDataChildren !== null\n ? dynamicDataChildren[parallelRouteKey]\n : null\n\n const taskChild = taskChildren.get(parallelRouteKey)\n if (taskChild === undefined) {\n // The server sent a child segment that the client doesn't know about.\n //\n // When we receive an unknown parallel route, we must consider it a\n // mismatch. This is unlike the case where the segment itself\n // mismatches, because multiple routes can be active simultaneously.\n // But a given layout should never have a mismatching set of\n // child slots.\n //\n // Theoretically, this should only happen in development during an HMR\n // refresh, because the set of parallel routes for a layout does not\n // change over the lifetime of a build/deployment. In production, we\n // should have already mismatched on either the build id or the segment\n // path. But as an extra precaution, we validate in prod, too.\n didReceiveUnknownParallelRoute = true\n } else {\n const taskSegment = taskChild.route[0]\n if (\n matchSegment(serverRouterStateChild[0], taskSegment) &&\n dynamicDataChild !== null &&\n dynamicDataChild !== undefined\n ) {\n // Found a match for this task. Keep traversing down the task tree.\n const childDidReceiveUnknownParallelRoute =\n writeDynamicDataIntoNavigationTask(\n taskChild,\n serverRouterStateChild,\n dynamicDataChild,\n dynamicHead,\n debugInfo\n )\n if (childDidReceiveUnknownParallelRoute) {\n didReceiveUnknownParallelRoute = true\n }\n }\n }\n }\n }\n\n return didReceiveUnknownParallelRoute\n}\n\nfunction finishPendingCacheNode(\n cacheNode: CacheNode,\n dynamicData: CacheNodeSeedData,\n dynamicHead: HeadData,\n debugInfo: Array<any> | null\n): void {\n // Writes a dynamic response into an existing Cache Node tree. This does _not_\n // create a new tree, it updates the existing tree in-place. So it must follow\n // the Suspense rules of cache safety — it can resolve pending promises, but\n // it cannot overwrite existing data. It can add segments to the tree (because\n // a missing segment will cause the layout router to suspend).\n // but it cannot delete them.\n //\n // We must resolve every promise in the tree, or else it will suspend\n // indefinitely. If we did not receive data for a segment, we will resolve its\n // data promise to `null` to trigger a lazy fetch during render.\n\n // Use the dynamic data from the server to fulfill the deferred RSC promise\n // on the Cache Node.\n const rsc = cacheNode.rsc\n const dynamicSegmentData = dynamicData[0]\n\n if (dynamicSegmentData === null) {\n // This is an empty CacheNode; this particular server request did not\n // render this segment. There may be a separate pending request that will,\n // though, so we won't abort the task until all pending requests finish.\n return\n }\n\n if (rsc === null) {\n // This is a lazy cache node. We can overwrite it. This is only safe\n // because we know that the LayoutRouter suspends if `rsc` is `null`.\n cacheNode.rsc = dynamicSegmentData\n } else if (isDeferredRsc(rsc)) {\n // This is a deferred RSC promise. We can fulfill it with the data we just\n // received from the server. If it was already resolved by a different\n // navigation, then this does nothing because we can't overwrite data.\n rsc.resolve(dynamicSegmentData, debugInfo)\n } else {\n // This is not a deferred RSC promise, nor is it empty, so it must have\n // been populated by a different navigation. We must not overwrite it.\n }\n\n // If we navigated without a prefetch, then `loading` will be a deferred promise too.\n // Fulfill it using the dynamic response so that we can display the loading boundary.\n const loading = cacheNode.loading\n if (isDeferredRsc(loading)) {\n const dynamicLoading = dynamicData[2]\n loading.resolve(dynamicLoading, debugInfo)\n }\n\n // Check if this is a leaf segment. If so, it will have a `head` property with\n // a pending promise that needs to be resolved with the dynamic head from\n // the server.\n const head = cacheNode.head\n if (isDeferredRsc(head)) {\n head.resolve(dynamicHead, debugInfo)\n }\n}\n\nfunction abortRemainingPendingTasks(\n task: NavigationTask,\n error: any,\n debugInfo: Array<any> | null\n): NavigationTaskExitStatus {\n let exitStatus\n if (task.status === NavigationTaskStatus.Pending) {\n // The data for this segment is still missing.\n task.status = NavigationTaskStatus.Rejected\n abortPendingCacheNode(task.node, error, debugInfo)\n\n // If the server failed to fulfill the data for this segment, it implies\n // that the route tree received from the server mismatched the tree that\n // was previously prefetched.\n //\n // In an app with fully static routes and no proxy-driven redirects or\n // rewrites, this should never happen, because the route for a URL would\n // always be the same across multiple requests. So, this implies that some\n // runtime routing condition changed, likely in a proxy, without being\n // pushed to the client.\n //\n // When this happens, we treat this the same as a refresh(). The entire\n // tree will be re-rendered from the root.\n if (task.refreshUrl === null) {\n // Trigger a \"soft\" refresh. Essentially the same as calling `refresh()`\n // in a Server Action.\n exitStatus = NavigationTaskExitStatus.SoftRetry\n } else {\n // The mismatch was discovered inside an inactive parallel route. This\n // implies the inactive parallel route is no longer reachable at the URL\n // that originally rendered it. Fall back to an MPA refresh.\n // TODO: An alternative could be to trigger a soft refresh but to _not_\n // re-use the inactive parallel routes this time. Similar to what would\n // happen if were to do a hard refrehs, but without the HTML page.\n exitStatus = NavigationTaskExitStatus.HardRetry\n }\n } else {\n // This segment finished. (An error here is treated as Done because they are\n // surfaced to the application during render.)\n exitStatus = NavigationTaskExitStatus.Done\n }\n\n const taskChildren = task.children\n if (taskChildren !== null) {\n for (const [, taskChild] of taskChildren) {\n const childExitStatus = abortRemainingPendingTasks(\n taskChild,\n error,\n debugInfo\n )\n // Propagate the exit status up the tree. The statuses are ordered by\n // their precedence.\n if (childExitStatus > exitStatus) {\n exitStatus = childExitStatus\n }\n }\n }\n\n return exitStatus\n}\n\nfunction abortPendingCacheNode(\n cacheNode: CacheNode,\n error: any,\n debugInfo: Array<any> | null\n): void {\n const rsc = cacheNode.rsc\n if (isDeferredRsc(rsc)) {\n if (error === null) {\n // This will trigger a lazy fetch during render.\n rsc.resolve(null, debugInfo)\n } else {\n // This will trigger an error during rendering.\n rsc.reject(error, debugInfo)\n }\n }\n\n const loading = cacheNode.loading\n if (isDeferredRsc(loading)) {\n loading.resolve(null, debugInfo)\n }\n\n // Check if this is a leaf segment. If so, it will have a `head` property with\n // a pending promise that needs to be resolved. If an error was provided, we\n // will not resolve it with an error, since this is rendered at the root of\n // the app. We want the segment to error, not the entire app.\n const head = cacheNode.head\n if (isDeferredRsc(head)) {\n head.resolve(null, debugInfo)\n }\n}\n\nconst DEFERRED = Symbol()\n\ntype PendingDeferredRsc<T> = Promise<T> & {\n status: 'pending'\n resolve: (value: T, debugInfo: Array<any> | null) => void\n reject: (error: any, debugInfo: Array<any> | null) => void\n tag: Symbol\n _debugInfo: Array<any>\n}\n\ntype FulfilledDeferredRsc<T> = Promise<T> & {\n status: 'fulfilled'\n value: T\n resolve: (value: T, debugInfo: Array<any> | null) => void\n reject: (error: any, debugInfo: Array<any> | null) => void\n tag: Symbol\n _debugInfo: Array<any>\n}\n\ntype RejectedDeferredRsc<T> = Promise<T> & {\n status: 'rejected'\n reason: any\n resolve: (value: T, debugInfo: Array<any> | null) => void\n reject: (error: any, debugInfo: Array<any> | null) => void\n tag: Symbol\n _debugInfo: Array<any>\n}\n\ntype DeferredRsc<T extends React.ReactNode = React.ReactNode> =\n | PendingDeferredRsc<T>\n | FulfilledDeferredRsc<T>\n | RejectedDeferredRsc<T>\n\n// This type exists to distinguish a DeferredRsc from a Flight promise. It's a\n// compromise to avoid adding an extra field on every Cache Node, which would be\n// awkward because the pre-PPR parts of codebase would need to account for it,\n// too. We can remove it once type Cache Node type is more settled.\nexport function isDeferredRsc(value: any): value is DeferredRsc {\n return value && typeof value === 'object' && value.tag === DEFERRED\n}\n\nfunction createDeferredRsc<\n T extends React.ReactNode = React.ReactNode,\n>(): PendingDeferredRsc<T> {\n // Create an unresolved promise that represents data derived from a Flight\n // response. The promise will be resolved later as soon as we start receiving\n // data from the server, i.e. as soon as the Flight client decodes and returns\n // the top-level response object.\n\n // The `_debugInfo` field contains profiling information. Promises that are\n // created by Flight already have this info added by React; for any derived\n // promise created by the router, we need to transfer the Flight debug info\n // onto the derived promise.\n //\n // The debug info represents the latency between the start of the navigation\n // and the start of rendering. (It does not represent the time it takes for\n // whole stream to finish.)\n const debugInfo: Array<any> = []\n\n let resolve: any\n let reject: any\n const pendingRsc = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n }) as PendingDeferredRsc<T>\n pendingRsc.status = 'pending'\n pendingRsc.resolve = (value: T, responseDebugInfo: Array<any> | null) => {\n if (pendingRsc.status === 'pending') {\n const fulfilledRsc: FulfilledDeferredRsc<T> = pendingRsc as any\n fulfilledRsc.status = 'fulfilled'\n fulfilledRsc.value = value\n if (responseDebugInfo !== null) {\n // Transfer the debug info to the derived promise.\n debugInfo.push.apply(debugInfo, responseDebugInfo)\n }\n resolve(value)\n }\n }\n pendingRsc.reject = (error: any, responseDebugInfo: Array<any> | null) => {\n if (pendingRsc.status === 'pending') {\n const rejectedRsc: RejectedDeferredRsc<T> = pendingRsc as any\n rejectedRsc.status = 'rejected'\n rejectedRsc.reason = error\n if (responseDebugInfo !== null) {\n // Transfer the debug info to the derived promise.\n debugInfo.push.apply(debugInfo, responseDebugInfo)\n }\n reject(error)\n }\n }\n pendingRsc.tag = DEFERRED\n pendingRsc._debugInfo = debugInfo\n\n return pendingRsc\n}\n","import type {\n CacheNodeSeedData,\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n HeadData,\n LoadingModuleData,\n} from '../../../shared/lib/app-router-types'\nimport type { NormalizedFlightData } from '../../flight-data-helpers'\nimport { fetchServerResponse } from '../router-reducer/fetch-server-response'\nimport {\n startPPRNavigation,\n spawnDynamicRequests,\n FreshnessPolicy,\n type NavigationTask,\n type NavigationRequestAccumulation,\n} from '../router-reducer/ppr-navigations'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport {\n EntryStatus,\n readRouteCacheEntry,\n readSegmentCacheEntry,\n waitForSegmentCacheEntry,\n requestOptimisticRouteCacheEntry,\n type RouteTree,\n type FulfilledRouteCacheEntry,\n} from './cache'\nimport { createCacheKey } from './cache-key'\nimport { addSearchParamsIfPageSegment } from '../../../shared/lib/segment'\nimport { NavigationResultTag } from './types'\n\ntype MPANavigationResult = {\n tag: NavigationResultTag.MPA\n data: string\n}\n\ntype SuccessfulNavigationResult = {\n tag: NavigationResultTag.Success\n data: {\n flightRouterState: FlightRouterState\n cacheNode: CacheNode\n canonicalUrl: string\n renderedSearch: string\n scrollableSegments: Array<FlightSegmentPath> | null\n shouldScroll: boolean\n hash: string\n }\n}\n\ntype AsyncNavigationResult = {\n tag: NavigationResultTag.Async\n data: Promise<MPANavigationResult | SuccessfulNavigationResult>\n}\n\nexport type NavigationResult =\n | MPANavigationResult\n | SuccessfulNavigationResult\n | AsyncNavigationResult\n\n/**\n * Navigate to a new URL, using the Segment Cache to construct a response.\n *\n * To allow for synchronous navigations whenever possible, this is not an async\n * function. It returns a promise only if there's no matching prefetch in\n * the cache. Otherwise it returns an immediate result and uses Suspense/RSC to\n * stream in any missing data.\n */\nexport function navigate(\n url: URL,\n currentUrl: URL,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n nextUrl: string | null,\n freshnessPolicy: FreshnessPolicy,\n shouldScroll: boolean,\n accumulation: { collectedDebugInfo?: Array<unknown> }\n): NavigationResult {\n const now = Date.now()\n const href = url.href\n\n // We special case navigations to the exact same URL as the current location.\n // It's a common UI pattern for apps to refresh when you click a link to the\n // current page. So when this happens, we refresh the dynamic data in the page\n // segments.\n //\n // Note that this does not apply if the any part of the hash or search query\n // has changed. This might feel a bit weird but it makes more sense when you\n // consider that the way to trigger this behavior is to click the same link\n // multiple times.\n //\n // TODO: We should probably refresh the *entire* route when this case occurs,\n // not just the page segments. Essentially treating it the same as a refresh()\n // triggered by an action, which is the more explicit way of modeling the UI\n // pattern described above.\n //\n // Also note that this only refreshes the dynamic data, not static/ cached\n // data. If the page segment is fully static and prefetched, the request is\n // skipped. (This is also how refresh() works.)\n const isSamePageNavigation = href === currentUrl.href\n\n const cacheKey = createCacheKey(href, nextUrl)\n const route = readRouteCacheEntry(now, cacheKey)\n if (route !== null && route.status === EntryStatus.Fulfilled) {\n // We have a matching prefetch.\n const snapshot = readRenderSnapshotFromCache(now, route, route.tree)\n const prefetchFlightRouterState = snapshot.flightRouterState\n const prefetchSeedData = snapshot.seedData\n const headSnapshot = readHeadSnapshotFromCache(now, route)\n const prefetchHead = headSnapshot.rsc\n const isPrefetchHeadPartial = headSnapshot.isPartial\n // TODO: The \"canonicalUrl\" stored in the cache doesn't include the hash,\n // because hash entries do not vary by hash fragment. However, the one\n // we set in the router state *does* include the hash, and it's used to\n // sync with the actual browser location. To make this less of a refactor\n // hazard, we should always track the hash separately from the rest of\n // the URL.\n const newCanonicalUrl = route.canonicalUrl + url.hash\n const renderedSearch = route.renderedSearch\n return navigateUsingPrefetchedRouteTree(\n now,\n url,\n currentUrl,\n nextUrl,\n isSamePageNavigation,\n currentCacheNode,\n currentFlightRouterState,\n prefetchFlightRouterState,\n prefetchSeedData,\n prefetchHead,\n isPrefetchHeadPartial,\n newCanonicalUrl,\n renderedSearch,\n freshnessPolicy,\n shouldScroll\n )\n }\n\n // There was no matching route tree in the cache. Let's see if we can\n // construct an \"optimistic\" route tree.\n //\n // Do not construct an optimistic route tree if there was a cache hit, but\n // the entry has a rejected status, since it may have been rejected due to a\n // rewrite or redirect based on the search params.\n //\n // TODO: There are multiple reasons a prefetch might be rejected; we should\n // track them explicitly and choose what to do here based on that.\n if (route === null || route.status !== EntryStatus.Rejected) {\n const optimisticRoute = requestOptimisticRouteCacheEntry(now, url, nextUrl)\n if (optimisticRoute !== null) {\n // We have an optimistic route tree. Proceed with the normal flow.\n const snapshot = readRenderSnapshotFromCache(\n now,\n optimisticRoute,\n optimisticRoute.tree\n )\n const prefetchFlightRouterState = snapshot.flightRouterState\n const prefetchSeedData = snapshot.seedData\n const headSnapshot = readHeadSnapshotFromCache(now, optimisticRoute)\n const prefetchHead = headSnapshot.rsc\n const isPrefetchHeadPartial = headSnapshot.isPartial\n const newCanonicalUrl = optimisticRoute.canonicalUrl + url.hash\n const newRenderedSearch = optimisticRoute.renderedSearch\n return navigateUsingPrefetchedRouteTree(\n now,\n url,\n currentUrl,\n nextUrl,\n isSamePageNavigation,\n currentCacheNode,\n currentFlightRouterState,\n prefetchFlightRouterState,\n prefetchSeedData,\n prefetchHead,\n isPrefetchHeadPartial,\n newCanonicalUrl,\n newRenderedSearch,\n freshnessPolicy,\n shouldScroll\n )\n }\n }\n\n // There's no matching prefetch for this route in the cache.\n let collectedDebugInfo = accumulation.collectedDebugInfo ?? []\n if (accumulation.collectedDebugInfo === undefined) {\n collectedDebugInfo = accumulation.collectedDebugInfo = []\n }\n return {\n tag: NavigationResultTag.Async,\n data: navigateDynamicallyWithNoPrefetch(\n now,\n url,\n currentUrl,\n nextUrl,\n currentCacheNode,\n currentFlightRouterState,\n freshnessPolicy,\n shouldScroll,\n collectedDebugInfo\n ),\n }\n}\n\nexport function navigateToSeededRoute(\n now: number,\n url: URL,\n canonicalUrl: string,\n navigationSeed: NavigationSeed,\n currentUrl: URL,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n freshnessPolicy: FreshnessPolicy,\n nextUrl: string | null,\n shouldScroll: boolean\n): SuccessfulNavigationResult | MPANavigationResult {\n // A version of navigate() that accepts the target route tree as an argument\n // rather than reading it from the prefetch cache.\n const accumulation: NavigationRequestAccumulation = {\n scrollableSegments: null,\n separateRefreshUrls: null,\n }\n const isSamePageNavigation = url.href === currentUrl.href\n const task = startPPRNavigation(\n now,\n currentUrl,\n currentCacheNode,\n currentFlightRouterState,\n navigationSeed.tree,\n freshnessPolicy,\n navigationSeed.data,\n navigationSeed.head,\n null,\n null,\n false,\n isSamePageNavigation,\n accumulation\n )\n if (task !== null) {\n spawnDynamicRequests(task, url, nextUrl, freshnessPolicy, accumulation)\n return navigationTaskToResult(\n task,\n canonicalUrl,\n navigationSeed.renderedSearch,\n accumulation.scrollableSegments,\n shouldScroll,\n url.hash\n )\n }\n // Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.\n return {\n tag: NavigationResultTag.MPA,\n data: canonicalUrl,\n }\n}\n\nfunction navigateUsingPrefetchedRouteTree(\n now: number,\n url: URL,\n currentUrl: URL,\n nextUrl: string | null,\n isSamePageNavigation: boolean,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n prefetchFlightRouterState: FlightRouterState,\n prefetchSeedData: CacheNodeSeedData | null,\n prefetchHead: HeadData | null,\n isPrefetchHeadPartial: boolean,\n canonicalUrl: string,\n renderedSearch: string,\n freshnessPolicy: FreshnessPolicy,\n shouldScroll: boolean\n): SuccessfulNavigationResult | MPANavigationResult {\n // Recursively construct a prefetch tree by reading from the Segment Cache. To\n // maintain compatibility, we output the same data structures as the old\n // prefetching implementation: FlightRouterState and CacheNodeSeedData.\n // TODO: Eventually updateCacheNodeOnNavigation (or the equivalent) should\n // read from the Segment Cache directly. It's only structured this way for now\n // so we can share code with the old prefetching implementation.\n const accumulation: NavigationRequestAccumulation = {\n scrollableSegments: null,\n separateRefreshUrls: null,\n }\n const seedData = null\n const seedHead = null\n const task = startPPRNavigation(\n now,\n currentUrl,\n currentCacheNode,\n currentFlightRouterState,\n prefetchFlightRouterState,\n freshnessPolicy,\n seedData,\n seedHead,\n prefetchSeedData,\n prefetchHead,\n isPrefetchHeadPartial,\n isSamePageNavigation,\n accumulation\n )\n if (task !== null) {\n spawnDynamicRequests(task, url, nextUrl, freshnessPolicy, accumulation)\n return navigationTaskToResult(\n task,\n canonicalUrl,\n renderedSearch,\n accumulation.scrollableSegments,\n shouldScroll,\n url.hash\n )\n }\n // Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.\n return {\n tag: NavigationResultTag.MPA,\n data: canonicalUrl,\n }\n}\n\nfunction navigationTaskToResult(\n task: NavigationTask,\n canonicalUrl: string,\n renderedSearch: string,\n scrollableSegments: Array<FlightSegmentPath> | null,\n shouldScroll: boolean,\n hash: string\n): SuccessfulNavigationResult | MPANavigationResult {\n return {\n tag: NavigationResultTag.Success,\n data: {\n flightRouterState: task.route,\n cacheNode: task.node,\n canonicalUrl,\n renderedSearch,\n scrollableSegments,\n shouldScroll,\n hash,\n },\n }\n}\n\nfunction readRenderSnapshotFromCache(\n now: number,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree\n): { flightRouterState: FlightRouterState; seedData: CacheNodeSeedData } {\n let childRouterStates: { [parallelRouteKey: string]: FlightRouterState } = {}\n let childSeedDatas: {\n [parallelRouteKey: string]: CacheNodeSeedData | null\n } = {}\n const slots = tree.slots\n if (slots !== null) {\n for (const parallelRouteKey in slots) {\n const childTree = slots[parallelRouteKey]\n const childResult = readRenderSnapshotFromCache(now, route, childTree)\n childRouterStates[parallelRouteKey] = childResult.flightRouterState\n childSeedDatas[parallelRouteKey] = childResult.seedData\n }\n }\n\n let rsc: React.ReactNode | null = null\n let loading: LoadingModuleData | Promise<LoadingModuleData> = null\n let isPartial: boolean = true\n\n const segmentEntry = readSegmentCacheEntry(now, tree.varyPath)\n if (segmentEntry !== null) {\n switch (segmentEntry.status) {\n case EntryStatus.Fulfilled: {\n // Happy path: a cache hit\n rsc = segmentEntry.rsc\n loading = segmentEntry.loading\n isPartial = segmentEntry.isPartial\n break\n }\n case EntryStatus.Pending: {\n // We haven't received data for this segment yet, but there's already\n // an in-progress request. Since it's extremely likely to arrive\n // before the dynamic data response, we might as well use it.\n const promiseForFulfilledEntry = waitForSegmentCacheEntry(segmentEntry)\n rsc = promiseForFulfilledEntry.then((entry) =>\n entry !== null ? entry.rsc : null\n )\n loading = promiseForFulfilledEntry.then((entry) =>\n entry !== null ? entry.loading : null\n )\n // Because the request is still pending, we typically don't know yet\n // whether the response will be partial. We shouldn't skip this segment\n // during the dynamic navigation request. Otherwise, we might need to\n // do yet another request to fill in the remaining data, creating\n // a waterfall.\n //\n // The one exception is if this segment is being fetched with via\n // prefetch={true} (i.e. the \"force stale\" or \"full\" strategy). If so,\n // we can assume the response will be full. This field is set to `false`\n // for such segments.\n isPartial = segmentEntry.isPartial\n break\n }\n case EntryStatus.Empty:\n case EntryStatus.Rejected:\n break\n default:\n segmentEntry satisfies never\n }\n }\n\n // The navigation implementation expects the search params to be\n // included in the segment. However, the Segment Cache tracks search\n // params separately from the rest of the segment key. So we need to\n // add them back here.\n //\n // See corresponding comment in convertFlightRouterStateToTree.\n //\n // TODO: What we should do instead is update the navigation diffing\n // logic to compare search params explicitly. This is a temporary\n // solution until more of the Segment Cache implementation has settled.\n const segment = addSearchParamsIfPageSegment(\n tree.segment,\n Object.fromEntries(new URLSearchParams(route.renderedSearch))\n )\n\n // We don't need this information in a render snapshot, so this can just be a placeholder.\n const hasRuntimePrefetch = false\n\n return {\n flightRouterState: [\n segment,\n childRouterStates,\n null,\n null,\n tree.isRootLayout,\n ],\n seedData: [rsc, childSeedDatas, loading, isPartial, hasRuntimePrefetch],\n }\n}\n\nfunction readHeadSnapshotFromCache(\n now: number,\n route: FulfilledRouteCacheEntry\n): { rsc: HeadData; isPartial: boolean } {\n // Same as readRenderSnapshotFromCache, but for the head\n let rsc: React.ReactNode | null = null\n let isPartial: boolean = true\n const segmentEntry = readSegmentCacheEntry(now, route.metadata.varyPath)\n if (segmentEntry !== null) {\n switch (segmentEntry.status) {\n case EntryStatus.Fulfilled: {\n rsc = segmentEntry.rsc\n isPartial = segmentEntry.isPartial\n break\n }\n case EntryStatus.Pending: {\n const promiseForFulfilledEntry = waitForSegmentCacheEntry(segmentEntry)\n rsc = promiseForFulfilledEntry.then((entry) =>\n entry !== null ? entry.rsc : null\n )\n isPartial = segmentEntry.isPartial\n break\n }\n case EntryStatus.Empty:\n case EntryStatus.Rejected:\n break\n default:\n segmentEntry satisfies never\n }\n }\n return { rsc, isPartial }\n}\n\n// Used to request all the dynamic data for a route, rather than just a subset,\n// e.g. during a refresh or a revalidation. Typically this gets constructed\n// during the normal flow when diffing the route tree, but for an unprefetched\n// navigation, where we don't know the structure of the target route, we use\n// this instead.\nconst DynamicRequestTreeForEntireRoute: FlightRouterState = [\n '',\n {},\n null,\n 'refetch',\n]\n\nasync function navigateDynamicallyWithNoPrefetch(\n now: number,\n url: URL,\n currentUrl: URL,\n nextUrl: string | null,\n currentCacheNode: CacheNode | null,\n currentFlightRouterState: FlightRouterState,\n freshnessPolicy: FreshnessPolicy,\n shouldScroll: boolean,\n collectedDebugInfo: Array<unknown>\n): Promise<MPANavigationResult | SuccessfulNavigationResult> {\n // Runs when a navigation happens but there's no cached prefetch we can use.\n // Don't bother to wait for a prefetch response; go straight to a full\n // navigation that contains both static and dynamic data in a single stream.\n // (This is unlike the old navigation implementation, which instead blocks\n // the dynamic request until a prefetch request is received.)\n //\n // To avoid duplication of logic, we're going to pretend that the tree\n // returned by the dynamic request is, in fact, a prefetch tree. Then we can\n // use the same server response to write the actual data into the CacheNode\n // tree. So it's the same flow as the \"happy path\" (prefetch, then\n // navigation), except we use a single server response for both stages.\n\n let dynamicRequestTree: FlightRouterState\n switch (freshnessPolicy) {\n case FreshnessPolicy.Default:\n case FreshnessPolicy.HistoryTraversal:\n dynamicRequestTree = currentFlightRouterState\n break\n case FreshnessPolicy.Hydration: // <- shouldn't happen during client nav\n case FreshnessPolicy.RefreshAll:\n case FreshnessPolicy.HMRRefresh:\n dynamicRequestTree = DynamicRequestTreeForEntireRoute\n break\n default:\n freshnessPolicy satisfies never\n dynamicRequestTree = currentFlightRouterState\n break\n }\n\n const promiseForDynamicServerResponse = fetchServerResponse(url, {\n flightRouterState: dynamicRequestTree,\n nextUrl,\n })\n const result = await promiseForDynamicServerResponse\n if (typeof result === 'string') {\n // This is an MPA navigation.\n const newUrl = result\n return {\n tag: NavigationResultTag.MPA,\n data: newUrl,\n }\n }\n\n const {\n flightData,\n canonicalUrl,\n renderedSearch,\n debugInfo: debugInfoFromResponse,\n } = result\n if (debugInfoFromResponse !== null) {\n collectedDebugInfo.push(...debugInfoFromResponse)\n }\n\n // Since the response format of dynamic requests and prefetches is slightly\n // different, we'll need to massage the data a bit. Create FlightRouterState\n // tree that simulates what we'd receive as the result of a prefetch.\n const navigationSeed = convertServerPatchToFullTree(\n currentFlightRouterState,\n flightData,\n renderedSearch\n )\n\n return navigateToSeededRoute(\n now,\n url,\n createHrefFromUrl(canonicalUrl),\n navigationSeed,\n currentUrl,\n currentCacheNode,\n currentFlightRouterState,\n freshnessPolicy,\n nextUrl,\n shouldScroll\n )\n}\n\nexport type NavigationSeed = {\n tree: FlightRouterState\n renderedSearch: string\n data: CacheNodeSeedData | null\n head: HeadData | null\n}\n\nexport function convertServerPatchToFullTree(\n currentTree: FlightRouterState,\n flightData: Array<NormalizedFlightData>,\n renderedSearch: string\n): NavigationSeed {\n // During a client navigation or prefetch, the server sends back only a patch\n // for the parts of the tree that have changed.\n //\n // This applies the patch to the base tree to create a full representation of\n // the resulting tree.\n //\n // The return type includes a full FlightRouterState tree and a full\n // CacheNodeSeedData tree. (Conceptually these are the same tree, and should\n // eventually be unified, but there's still lots of existing code that\n // operates on FlightRouterState trees alone without the CacheNodeSeedData.)\n //\n // TODO: This similar to what apply-router-state-patch-to-tree does. It\n // will eventually fully replace it. We should get rid of all the remaining\n // places where we iterate over the server patch format. This should also\n // eventually replace normalizeFlightData.\n\n let baseTree: FlightRouterState = currentTree\n let baseData: CacheNodeSeedData | null = null\n let head: HeadData | null = null\n for (const {\n segmentPath,\n tree: treePatch,\n seedData: dataPatch,\n head: headPatch,\n } of flightData) {\n const result = convertServerPatchToFullTreeImpl(\n baseTree,\n baseData,\n treePatch,\n dataPatch,\n segmentPath,\n 0\n )\n baseTree = result.tree\n baseData = result.data\n // This is the same for all patches per response, so just pick an\n // arbitrary one\n head = headPatch\n }\n\n return {\n tree: baseTree,\n data: baseData,\n renderedSearch,\n head,\n }\n}\n\nfunction convertServerPatchToFullTreeImpl(\n baseRouterState: FlightRouterState,\n baseData: CacheNodeSeedData | null,\n treePatch: FlightRouterState,\n dataPatch: CacheNodeSeedData | null,\n segmentPath: FlightSegmentPath,\n index: number\n): { tree: FlightRouterState; data: CacheNodeSeedData | null } {\n if (index === segmentPath.length) {\n // We reached the part of the tree that we need to patch.\n return {\n tree: treePatch,\n data: dataPatch,\n }\n }\n\n // segmentPath represents the parent path of subtree. It's a repeating\n // pattern of parallel route key and segment:\n //\n // [string, Segment, string, Segment, string, Segment, ...]\n //\n // This path tells us which part of the base tree to apply the tree patch.\n //\n // NOTE: We receive the FlightRouterState patch in the same request as the\n // seed data patch. Therefore we don't need to worry about diffing the segment\n // values; we can assume the server sent us a correct result.\n const updatedParallelRouteKey: string = segmentPath[index]\n // const segment: Segment = segmentPath[index + 1] <-- Not used, see note above\n\n const baseTreeChildren = baseRouterState[1]\n const baseSeedDataChildren = baseData !== null ? baseData[1] : null\n const newTreeChildren: Record<string, FlightRouterState> = {}\n const newSeedDataChildren: Record<string, CacheNodeSeedData | null> = {}\n for (const parallelRouteKey in baseTreeChildren) {\n const childBaseRouterState = baseTreeChildren[parallelRouteKey]\n const childBaseSeedData =\n baseSeedDataChildren !== null\n ? (baseSeedDataChildren[parallelRouteKey] ?? null)\n : null\n if (parallelRouteKey === updatedParallelRouteKey) {\n const result = convertServerPatchToFullTreeImpl(\n childBaseRouterState,\n childBaseSeedData,\n treePatch,\n dataPatch,\n segmentPath,\n // Advance the index by two and keep cloning until we reach\n // the end of the segment path.\n index + 2\n )\n\n newTreeChildren[parallelRouteKey] = result.tree\n newSeedDataChildren[parallelRouteKey] = result.data\n } else {\n // This child is not being patched. Copy it over as-is.\n newTreeChildren[parallelRouteKey] = childBaseRouterState\n newSeedDataChildren[parallelRouteKey] = childBaseSeedData\n }\n }\n\n let clonedTree: FlightRouterState\n let clonedSeedData: CacheNodeSeedData\n // Clone all the fields except the children.\n\n // Clone the FlightRouterState tree. Based on equivalent logic in\n // apply-router-state-patch-to-tree, but should confirm whether we need to\n // copy all of these fields. Not sure the server ever sends, e.g. the\n // refetch marker.\n clonedTree = [baseRouterState[0], newTreeChildren]\n if (2 in baseRouterState) {\n clonedTree[2] = baseRouterState[2]\n }\n if (3 in baseRouterState) {\n clonedTree[3] = baseRouterState[3]\n }\n if (4 in baseRouterState) {\n clonedTree[4] = baseRouterState[4]\n }\n\n // Clone the CacheNodeSeedData tree.\n const isEmptySeedDataPartial = true\n clonedSeedData = [\n null,\n newSeedDataChildren,\n null,\n isEmptySeedDataPartial,\n false,\n ]\n\n return {\n tree: clonedTree,\n data: clonedSeedData,\n }\n}\n","import type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../../shared/lib/app-router-types'\nimport { createHrefFromUrl } from '../create-href-from-url'\nimport type {\n Mutable,\n NavigateAction,\n ReadonlyReducerState,\n ReducerState,\n} from '../router-reducer-types'\nimport { handleMutable } from '../handle-mutable'\n\nimport {\n navigate as navigateUsingSegmentCache,\n type NavigationResult,\n} from '../../segment-cache/navigation'\nimport { NavigationResultTag } from '../../segment-cache/types'\nimport { getStaleTimeMs } from '../../segment-cache/cache'\nimport { FreshnessPolicy } from '../ppr-navigations'\n\n// These values are set by `define-env-plugin` (based on `nextConfig.experimental.staleTimes`)\n// and default to 5 minutes (static) / 0 seconds (dynamic)\nexport const DYNAMIC_STALETIME_MS =\n Number(process.env.__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME) * 1000\n\nexport const STATIC_STALETIME_MS = getStaleTimeMs(\n Number(process.env.__NEXT_CLIENT_ROUTER_STATIC_STALETIME)\n)\n\nexport function handleExternalUrl(\n state: ReadonlyReducerState,\n mutable: Mutable,\n url: string,\n pendingPush: boolean\n) {\n mutable.mpaNavigation = true\n mutable.canonicalUrl = url\n mutable.pendingPush = pendingPush\n mutable.scrollableSegments = undefined\n\n return handleMutable(state, mutable)\n}\n\nexport function generateSegmentsFromPatch(\n flightRouterPatch: FlightRouterState\n): FlightSegmentPath[] {\n const segments: FlightSegmentPath[] = []\n const [segment, parallelRoutes] = flightRouterPatch\n\n if (Object.keys(parallelRoutes).length === 0) {\n return [[segment]]\n }\n\n for (const [parallelRouteKey, parallelRoute] of Object.entries(\n parallelRoutes\n )) {\n for (const childSegment of generateSegmentsFromPatch(parallelRoute)) {\n // If the segment is empty, it means we are at the root of the tree\n if (segment === '') {\n segments.push([parallelRouteKey, ...childSegment])\n } else {\n segments.push([segment, parallelRouteKey, ...childSegment])\n }\n }\n }\n\n return segments\n}\n\nexport function handleNavigationResult(\n url: URL,\n state: ReadonlyReducerState,\n mutable: Mutable,\n pendingPush: boolean,\n result: NavigationResult\n): ReducerState {\n switch (result.tag) {\n case NavigationResultTag.MPA: {\n // Perform an MPA navigation.\n const newUrl = result.data\n return handleExternalUrl(state, mutable, newUrl, pendingPush)\n }\n case NavigationResultTag.Success: {\n // Received a new result.\n mutable.cache = result.data.cacheNode\n mutable.patchedTree = result.data.flightRouterState\n mutable.renderedSearch = result.data.renderedSearch\n mutable.canonicalUrl = result.data.canonicalUrl\n // TODO: During a refresh, we don't set the `scrollableSegments`. There's\n // some confusing and subtle logic in `handleMutable` that decides what\n // to do when `shouldScroll` is set but `scrollableSegments` is not. I'm\n // not convinced it's totally coherent but the tests assert on this\n // particular behavior so I've ported the logic as-is from the previous\n // router implementation, for now.\n mutable.scrollableSegments = result.data.scrollableSegments ?? undefined\n mutable.shouldScroll = result.data.shouldScroll\n mutable.hashFragment = result.data.hash\n\n // Check if the only thing that changed was the hash fragment.\n const oldUrl = new URL(state.canonicalUrl, url)\n const onlyHashChange =\n // We don't need to compare the origins, because client-driven\n // navigations are always same-origin.\n url.pathname === oldUrl.pathname &&\n url.search === oldUrl.search &&\n url.hash !== oldUrl.hash\n if (onlyHashChange) {\n // The only updated part of the URL is the hash.\n mutable.onlyHashChange = true\n mutable.shouldScroll = result.data.shouldScroll\n mutable.hashFragment = url.hash\n // Setting this to an empty array triggers a scroll for all new and\n // updated segments. See `ScrollAndFocusHandler` for more details.\n mutable.scrollableSegments = []\n }\n\n return handleMutable(state, mutable)\n }\n case NavigationResultTag.Async: {\n return result.data.then(\n (asyncResult) =>\n handleNavigationResult(url, state, mutable, pendingPush, asyncResult),\n // If the navigation failed, return the current state.\n // TODO: This matches the current behavior but we need to do something\n // better here if the network fails.\n () => {\n return state\n }\n )\n }\n default: {\n result satisfies never\n return state\n }\n }\n}\n\nexport function navigateReducer(\n state: ReadonlyReducerState,\n action: NavigateAction\n): ReducerState {\n const { url, isExternalUrl, navigateType, shouldScroll } = action\n const mutable: Mutable = {}\n const href = createHrefFromUrl(url)\n const pendingPush = navigateType === 'push'\n\n mutable.preserveCustomHistoryState = false\n mutable.pendingPush = pendingPush\n\n if (isExternalUrl) {\n return handleExternalUrl(state, mutable, url.toString(), pendingPush)\n }\n\n // Handles case where `<meta http-equiv=\"refresh\">` tag is present,\n // which will trigger an MPA navigation.\n if (document.getElementById('__next-page-redirect')) {\n return handleExternalUrl(state, mutable, href, pendingPush)\n }\n\n // Temporary glue code between the router reducer and the new navigation\n // implementation. Eventually we'll rewrite the router reducer to a\n // state machine.\n const currentUrl = new URL(state.canonicalUrl, location.origin)\n const result = navigateUsingSegmentCache(\n url,\n currentUrl,\n state.cache,\n state.tree,\n state.nextUrl,\n FreshnessPolicy.Default,\n shouldScroll,\n mutable\n )\n return handleNavigationResult(url, state, mutable, pendingPush, result)\n}\n","export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n","import type {\n TreePrefetch,\n RootTreePrefetch,\n SegmentPrefetch,\n} from '../../../server/app-render/collect-segment-data'\nimport type { LoadingModuleData } from '../../../shared/lib/app-router-types'\nimport type {\n CacheNodeSeedData,\n Segment as FlightRouterStateSegment,\n} from '../../../shared/lib/app-router-types'\nimport { HasLoadingBoundary } from '../../../shared/lib/app-router-types'\nimport {\n NEXT_DID_POSTPONE_HEADER,\n NEXT_ROUTER_PREFETCH_HEADER,\n NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n NEXT_ROUTER_STALE_TIME_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_URL,\n RSC_CONTENT_TYPE_HEADER,\n RSC_HEADER,\n} from '../app-router-headers'\nimport {\n createFetch,\n createFromNextReadableStream,\n type RSCResponse,\n type RequestHeaders,\n} from '../router-reducer/fetch-server-response'\nimport {\n pingPrefetchTask,\n isPrefetchTaskDirty,\n type PrefetchTask,\n type PrefetchSubtaskResult,\n startRevalidationCooldown,\n} from './scheduler'\nimport {\n type RouteVaryPath,\n type SegmentVaryPath,\n type PartialSegmentVaryPath,\n getRouteVaryPath,\n getFulfilledRouteVaryPath,\n getSegmentVaryPathForRequest,\n appendLayoutVaryPath,\n finalizeLayoutVaryPath,\n finalizePageVaryPath,\n clonePageVaryPathWithNewSearchParams,\n type PageVaryPath,\n finalizeMetadataVaryPath,\n} from './vary-path'\nimport { getAppBuildId } from '../../app-build-id'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport type { NormalizedSearch, RouteCacheKey } from './cache-key'\n// TODO: Rename this module to avoid confusion with other types of cache keys\nimport { createCacheKey as createPrefetchRequestKey } from './cache-key'\nimport {\n doesStaticSegmentAppearInURL,\n getCacheKeyForDynamicParam,\n getRenderedPathname,\n getRenderedSearch,\n parseDynamicParamFromURLPart,\n} from '../../route-params'\nimport {\n createCacheMap,\n getFromCacheMap,\n setInCacheMap,\n setSizeInCacheMap,\n deleteFromCacheMap,\n isValueExpired,\n type CacheMap,\n type UnknownMapEntry,\n} from './cache-map'\nimport {\n appendSegmentRequestKeyPart,\n convertSegmentPathToStaticExportFilename,\n createSegmentRequestKeyPart,\n HEAD_REQUEST_KEY,\n ROOT_SEGMENT_REQUEST_KEY,\n type SegmentRequestKey,\n} from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport type {\n FlightRouterState,\n NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\nimport {\n normalizeFlightData,\n prepareFlightRouterStateForRequest,\n} from '../../flight-data-helpers'\nimport { STATIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport { pingVisibleLinks } from '../links'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\nimport { FetchStrategy } from './types'\nimport { createPromiseWithResolvers } from '../../../shared/lib/promise-with-resolvers'\n\n/**\n * Ensures a minimum stale time of 30s to avoid issues where the server sends a too\n * short-lived stale time, which would prevent anything from being prefetched.\n */\nexport function getStaleTimeMs(staleTimeSeconds: number): number {\n return Math.max(staleTimeSeconds, 30) * 1000\n}\n\n// A note on async/await when working in the prefetch cache:\n//\n// Most async operations in the prefetch cache should *not* use async/await,\n// Instead, spawn a subtask that writes the results to a cache entry, and attach\n// a \"ping\" listener to notify the prefetch queue to try again.\n//\n// The reason is we need to be able to access the segment cache and traverse its\n// data structures synchronously. For example, if there's a synchronous update\n// we can take an immediate snapshot of the cache to produce something we can\n// render. Limiting the use of async/await also makes it easier to avoid race\n// conditions, which is especially important because is cache is mutable.\n//\n// Another reason is that while we're performing async work, it's possible for\n// existing entries to become stale, or for Link prefetches to be removed from\n// the queue. For optimal scheduling, we need to be able to \"cancel\" subtasks\n// that are no longer needed. So, when a segment is received from the server, we\n// restart from the root of the tree that's being prefetched, to confirm all the\n// parent segments are still cached. If the segment is no longer reachable from\n// the root, then it's effectively canceled. This is similar to the design of\n// Rust Futures, or React Suspense.\n\ntype RouteTreeShared = {\n requestKey: SegmentRequestKey\n // TODO: Remove the `segment` field, now that it can be reconstructed\n // from `param`.\n segment: FlightRouterStateSegment\n slots: null | {\n [parallelRouteKey: string]: RouteTree\n }\n isRootLayout: boolean\n\n // If this is a dynamic route, indicates whether there is a loading boundary\n // somewhere in the tree. If not, we can skip the prefetch for the data,\n // because we know it would be an empty response. (For a static/PPR route,\n // this value is disregarded, because in that model `loading.tsx` is treated\n // like any other Suspense boundary.)\n hasLoadingBoundary: HasLoadingBoundary\n\n // Indicates whether this route has a runtime prefetch that we can request.\n // This is determined by the server; it's not purely a user configuration\n // because the server may determine that a route is fully static and doesn't\n // need runtime prefetching regardless of the configuration.\n hasRuntimePrefetch: boolean\n}\n\ntype LayoutRouteTree = RouteTreeShared & {\n isPage: false\n varyPath: SegmentVaryPath\n}\n\ntype PageRouteTree = RouteTreeShared & {\n isPage: true\n varyPath: PageVaryPath\n}\n\nexport type RouteTree = LayoutRouteTree | PageRouteTree\n\ntype RouteCacheEntryShared = {\n // This is false only if we're certain the route cannot be intercepted. It's\n // true in all other cases, including on initialization when we haven't yet\n // received a response from the server.\n couldBeIntercepted: boolean\n\n // Map-related fields.\n ref: UnknownMapEntry | null\n size: number\n staleAt: number\n version: number\n}\n\n/**\n * Tracks the status of a cache entry as it progresses from no data (Empty),\n * waiting for server data (Pending), and finished (either Fulfilled or\n * Rejected depending on the response from the server.\n */\nexport const enum EntryStatus {\n Empty = 0,\n Pending = 1,\n Fulfilled = 2,\n Rejected = 3,\n}\n\ntype PendingRouteCacheEntry = RouteCacheEntryShared & {\n status: EntryStatus.Empty | EntryStatus.Pending\n blockedTasks: Set<PrefetchTask> | null\n canonicalUrl: null\n renderedSearch: null\n tree: null\n metadata: null\n isPPREnabled: false\n}\n\ntype RejectedRouteCacheEntry = RouteCacheEntryShared & {\n status: EntryStatus.Rejected\n blockedTasks: Set<PrefetchTask> | null\n canonicalUrl: null\n renderedSearch: null\n tree: null\n metadata: null\n isPPREnabled: boolean\n}\n\nexport type FulfilledRouteCacheEntry = RouteCacheEntryShared & {\n status: EntryStatus.Fulfilled\n blockedTasks: null\n canonicalUrl: string\n renderedSearch: NormalizedSearch\n tree: RouteTree\n metadata: RouteTree\n isPPREnabled: boolean\n}\n\nexport type RouteCacheEntry =\n | PendingRouteCacheEntry\n | FulfilledRouteCacheEntry\n | RejectedRouteCacheEntry\n\ntype SegmentCacheEntryShared = {\n fetchStrategy: FetchStrategy\n\n // Map-related fields.\n ref: UnknownMapEntry | null\n size: number\n staleAt: number\n version: number\n}\n\nexport type EmptySegmentCacheEntry = SegmentCacheEntryShared & {\n status: EntryStatus.Empty\n rsc: null\n loading: null\n isPartial: true\n promise: null\n}\n\nexport type PendingSegmentCacheEntry = SegmentCacheEntryShared & {\n status: EntryStatus.Pending\n rsc: null\n loading: null\n isPartial: boolean\n promise: null | PromiseWithResolvers<FulfilledSegmentCacheEntry | null>\n}\n\ntype RejectedSegmentCacheEntry = SegmentCacheEntryShared & {\n status: EntryStatus.Rejected\n rsc: null\n loading: null\n isPartial: true\n promise: null\n}\n\nexport type FulfilledSegmentCacheEntry = SegmentCacheEntryShared & {\n status: EntryStatus.Fulfilled\n rsc: React.ReactNode | null\n loading: LoadingModuleData | Promise<LoadingModuleData>\n isPartial: boolean\n promise: null\n}\n\nexport type SegmentCacheEntry =\n | EmptySegmentCacheEntry\n | PendingSegmentCacheEntry\n | RejectedSegmentCacheEntry\n | FulfilledSegmentCacheEntry\n\nexport type NonEmptySegmentCacheEntry = Exclude<\n SegmentCacheEntry,\n EmptySegmentCacheEntry\n>\n\nconst isOutputExportMode =\n process.env.NODE_ENV === 'production' &&\n process.env.__NEXT_CONFIG_OUTPUT === 'export'\n\nconst MetadataOnlyRequestTree: FlightRouterState = [\n '',\n {},\n null,\n 'metadata-only',\n]\n\nlet routeCacheMap: CacheMap<RouteCacheEntry> = createCacheMap()\nlet segmentCacheMap: CacheMap<SegmentCacheEntry> = createCacheMap()\n\n// All invalidation listeners for the whole cache are tracked in single set.\n// Since we don't yet support tag or path-based invalidation, there's no point\n// tracking them any more granularly than this. Once we add granular\n// invalidation, that may change, though generally the model is to just notify\n// the listeners and allow the caller to poll the prefetch cache with a new\n// prefetch task if desired.\nlet invalidationListeners: Set<PrefetchTask> | null = null\n\n// Incrementing counter used to track cache invalidations.\nlet currentCacheVersion = 0\n\nexport function getCurrentCacheVersion(): number {\n return currentCacheVersion\n}\n\n/**\n * Used to clear the client prefetch cache when a server action calls\n * revalidatePath or revalidateTag. Eventually we will support only clearing the\n * segments that were actually affected, but there's more work to be done on the\n * server before the client is able to do this correctly.\n */\nexport function revalidateEntireCache(\n nextUrl: string | null,\n tree: FlightRouterState\n) {\n // Increment the current cache version. This does not eagerly evict anything\n // from the cache, but because all the entries are versioned, and we check\n // the version when reading from the cache, this effectively causes all\n // entries to be evicted lazily. We do it lazily because in the future,\n // actions like revalidateTag or refresh will not evict the entire cache,\n // but rather some subset of the entries.\n currentCacheVersion++\n\n // Start a cooldown before re-prefetching to allow CDN cache propagation.\n startRevalidationCooldown()\n\n // Prefetch all the currently visible links again, to re-fill the cache.\n pingVisibleLinks(nextUrl, tree)\n\n // Similarly, notify all invalidation listeners (i.e. those passed to\n // `router.prefetch(onInvalidate)`), so they can trigger a new prefetch\n // if needed.\n pingInvalidationListeners(nextUrl, tree)\n}\n\nfunction attachInvalidationListener(task: PrefetchTask): void {\n // This function is called whenever a prefetch task reads a cache entry. If\n // the task has an onInvalidate function associated with it — i.e. the one\n // optionally passed to router.prefetch(onInvalidate) — then we attach that\n // listener to the every cache entry that the task reads. Then, if an entry\n // is invalidated, we call the function.\n if (task.onInvalidate !== null) {\n if (invalidationListeners === null) {\n invalidationListeners = new Set([task])\n } else {\n invalidationListeners.add(task)\n }\n }\n}\n\nfunction notifyInvalidationListener(task: PrefetchTask): void {\n const onInvalidate = task.onInvalidate\n if (onInvalidate !== null) {\n // Clear the callback from the task object to guarantee it's not called more\n // than once.\n task.onInvalidate = null\n\n // This is a user-space function, so we must wrap in try/catch.\n try {\n onInvalidate()\n } catch (error) {\n if (typeof reportError === 'function') {\n reportError(error)\n } else {\n console.error(error)\n }\n }\n }\n}\n\nexport function pingInvalidationListeners(\n nextUrl: string | null,\n tree: FlightRouterState\n): void {\n // The rough equivalent of pingVisibleLinks, but for onInvalidate callbacks.\n // This is called when the Next-Url or the base tree changes, since those\n // may affect the result of a prefetch task. It's also called after a\n // cache invalidation.\n if (invalidationListeners !== null) {\n const tasks = invalidationListeners\n invalidationListeners = null\n for (const task of tasks) {\n if (isPrefetchTaskDirty(task, nextUrl, tree)) {\n notifyInvalidationListener(task)\n }\n }\n }\n}\n\nexport function readRouteCacheEntry(\n now: number,\n key: RouteCacheKey\n): RouteCacheEntry | null {\n const varyPath: RouteVaryPath = getRouteVaryPath(\n key.pathname,\n key.search,\n key.nextUrl\n )\n const isRevalidation = false\n return getFromCacheMap(\n now,\n getCurrentCacheVersion(),\n routeCacheMap,\n varyPath,\n isRevalidation\n )\n}\n\nexport function readSegmentCacheEntry(\n now: number,\n varyPath: SegmentVaryPath\n): SegmentCacheEntry | null {\n const isRevalidation = false\n return getFromCacheMap(\n now,\n getCurrentCacheVersion(),\n segmentCacheMap,\n varyPath,\n isRevalidation\n )\n}\n\nfunction readRevalidatingSegmentCacheEntry(\n now: number,\n varyPath: SegmentVaryPath\n): SegmentCacheEntry | null {\n const isRevalidation = true\n return getFromCacheMap(\n now,\n getCurrentCacheVersion(),\n segmentCacheMap,\n varyPath,\n isRevalidation\n )\n}\n\nexport function waitForSegmentCacheEntry(\n pendingEntry: PendingSegmentCacheEntry\n): Promise<FulfilledSegmentCacheEntry | null> {\n // Because the entry is pending, there's already a in-progress request.\n // Attach a promise to the entry that will resolve when the server responds.\n let promiseWithResolvers = pendingEntry.promise\n if (promiseWithResolvers === null) {\n promiseWithResolvers = pendingEntry.promise =\n createPromiseWithResolvers<FulfilledSegmentCacheEntry | null>()\n } else {\n // There's already a promise we can use\n }\n return promiseWithResolvers.promise\n}\n\n/**\n * Checks if an entry for a route exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateRouteCacheEntry(\n now: number,\n task: PrefetchTask,\n key: RouteCacheKey\n): RouteCacheEntry {\n attachInvalidationListener(task)\n\n const existingEntry = readRouteCacheEntry(now, key)\n if (existingEntry !== null) {\n return existingEntry\n }\n // Create a pending entry and add it to the cache.\n const pendingEntry: PendingRouteCacheEntry = {\n canonicalUrl: null,\n status: EntryStatus.Empty,\n blockedTasks: null,\n tree: null,\n metadata: null,\n // This is initialized to true because we don't know yet whether the route\n // could be intercepted. It's only set to false once we receive a response\n // from the server.\n couldBeIntercepted: true,\n // Similarly, we don't yet know if the route supports PPR.\n isPPREnabled: false,\n renderedSearch: null,\n\n // Map-related fields\n ref: null,\n size: 0,\n // Since this is an empty entry, there's no reason to ever evict it. It will\n // be updated when the data is populated.\n staleAt: Infinity,\n version: getCurrentCacheVersion(),\n }\n const varyPath: RouteVaryPath = getRouteVaryPath(\n key.pathname,\n key.search,\n key.nextUrl\n )\n const isRevalidation = false\n setInCacheMap(routeCacheMap, varyPath, pendingEntry, isRevalidation)\n return pendingEntry\n}\n\nexport function requestOptimisticRouteCacheEntry(\n now: number,\n requestedUrl: URL,\n nextUrl: string | null\n): FulfilledRouteCacheEntry | null {\n // This function is called during a navigation when there was no matching\n // route tree in the prefetch cache. Before de-opting to a blocking,\n // unprefetched navigation, we will first attempt to construct an \"optimistic\"\n // route tree by checking the cache for similar routes.\n //\n // Check if there's a route with the same pathname, but with different\n // search params. We can then base our optimistic route tree on this entry.\n //\n // Conceptually, we are simulating what would happen if we did perform a\n // prefetch the requested URL, under the assumption that the server will\n // not redirect or rewrite the request in a different manner than the\n // base route tree. This assumption might not hold, in which case we'll have\n // to recover when we perform the dynamic navigation request. However, this\n // is what would happen if a route were dynamically rewritten/redirected\n // in between the prefetch and the navigation. So the logic needs to exist\n // to handle this case regardless.\n\n // Look for a route with the same pathname, but with an empty search string.\n // TODO: There's nothing inherently special about the empty search string;\n // it's chosen somewhat arbitrarily, with the rationale that it's the most\n // likely one to exist. But we should update this to match _any_ search\n // string. The plan is to generalize this logic alongside other improvements\n // related to \"fallback\" cache entries.\n const requestedSearch = requestedUrl.search as NormalizedSearch\n if (requestedSearch === '') {\n // The caller would have already checked if a route with an empty search\n // string is in the cache. So we can bail out here.\n return null\n }\n const urlWithoutSearchParams = new URL(requestedUrl)\n urlWithoutSearchParams.search = ''\n const routeWithNoSearchParams = readRouteCacheEntry(\n now,\n createPrefetchRequestKey(urlWithoutSearchParams.href, nextUrl)\n )\n\n if (\n routeWithNoSearchParams === null ||\n routeWithNoSearchParams.status !== EntryStatus.Fulfilled\n ) {\n // Bail out of constructing an optimistic route tree. This will result in\n // a blocking, unprefetched navigation.\n return null\n }\n\n // Now we have a base route tree we can \"patch\" with our optimistic values.\n\n // Optimistically assume that redirects for the requested pathname do\n // not vary on the search string. Therefore, if the base route was\n // redirected to a different search string, then the optimistic route\n // should be redirected to the same search string. Otherwise, we use\n // the requested search string.\n const canonicalUrlForRouteWithNoSearchParams = new URL(\n routeWithNoSearchParams.canonicalUrl,\n requestedUrl.origin\n )\n const optimisticCanonicalSearch =\n canonicalUrlForRouteWithNoSearchParams.search !== ''\n ? // Base route was redirected. Reuse the same redirected search string.\n canonicalUrlForRouteWithNoSearchParams.search\n : requestedSearch\n\n // Similarly, optimistically assume that rewrites for the requested\n // pathname do not vary on the search string. Therefore, if the base\n // route was rewritten to a different search string, then the optimistic\n // route should be rewritten to the same search string. Otherwise, we use\n // the requested search string.\n const optimisticRenderedSearch =\n routeWithNoSearchParams.renderedSearch !== ''\n ? // Base route was rewritten. Reuse the same rewritten search string.\n routeWithNoSearchParams.renderedSearch\n : requestedSearch\n\n const optimisticUrl = new URL(\n routeWithNoSearchParams.canonicalUrl,\n location.origin\n )\n optimisticUrl.search = optimisticCanonicalSearch\n const optimisticCanonicalUrl = createHrefFromUrl(optimisticUrl)\n\n const optimisticRouteTree = createOptimisticRouteTree(\n routeWithNoSearchParams.tree,\n optimisticRenderedSearch\n )\n const optimisticMetadataTree = createOptimisticRouteTree(\n routeWithNoSearchParams.metadata,\n optimisticRenderedSearch\n )\n\n // Clone the base route tree, and override the relevant fields with our\n // optimistic values.\n const optimisticEntry: FulfilledRouteCacheEntry = {\n canonicalUrl: optimisticCanonicalUrl,\n\n status: EntryStatus.Fulfilled,\n // This isn't cloned because it's instance-specific\n blockedTasks: null,\n tree: optimisticRouteTree,\n metadata: optimisticMetadataTree,\n couldBeIntercepted: routeWithNoSearchParams.couldBeIntercepted,\n isPPREnabled: routeWithNoSearchParams.isPPREnabled,\n\n // Override the rendered search with the optimistic value.\n renderedSearch: optimisticRenderedSearch,\n\n // Map-related fields\n ref: null,\n size: 0,\n staleAt: routeWithNoSearchParams.staleAt,\n version: routeWithNoSearchParams.version,\n }\n\n // Do not insert this entry into the cache. It only exists so we can\n // perform the current navigation. Just return it to the caller.\n return optimisticEntry\n}\n\nfunction createOptimisticRouteTree(\n tree: RouteTree,\n newRenderedSearch: NormalizedSearch\n): RouteTree {\n // Create a new route tree that identical to the original one except for\n // the rendered search string, which is contained in the vary path.\n\n let clonedSlots: Record<string, RouteTree> | null = null\n const originalSlots = tree.slots\n if (originalSlots !== null) {\n clonedSlots = {}\n for (const parallelRouteKey in originalSlots) {\n const childTree = originalSlots[parallelRouteKey]\n clonedSlots[parallelRouteKey] = createOptimisticRouteTree(\n childTree,\n newRenderedSearch\n )\n }\n }\n\n // We only need to clone the vary path if the route is a page.\n if (tree.isPage) {\n return {\n requestKey: tree.requestKey,\n segment: tree.segment,\n varyPath: clonePageVaryPathWithNewSearchParams(\n tree.varyPath,\n newRenderedSearch\n ),\n isPage: true,\n slots: clonedSlots,\n isRootLayout: tree.isRootLayout,\n hasLoadingBoundary: tree.hasLoadingBoundary,\n hasRuntimePrefetch: tree.hasRuntimePrefetch,\n }\n }\n\n return {\n requestKey: tree.requestKey,\n segment: tree.segment,\n varyPath: tree.varyPath,\n isPage: false,\n slots: clonedSlots,\n isRootLayout: tree.isRootLayout,\n hasLoadingBoundary: tree.hasLoadingBoundary,\n hasRuntimePrefetch: tree.hasRuntimePrefetch,\n }\n}\n\n/**\n * Checks if an entry for a segment exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateSegmentCacheEntry(\n now: number,\n fetchStrategy: FetchStrategy,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree\n): SegmentCacheEntry {\n const existingEntry = readSegmentCacheEntry(now, tree.varyPath)\n if (existingEntry !== null) {\n return existingEntry\n }\n // Create a pending entry and add it to the cache.\n const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt)\n const isRevalidation = false\n setInCacheMap(\n segmentCacheMap,\n varyPathForRequest,\n pendingEntry,\n isRevalidation\n )\n return pendingEntry\n}\n\nexport function readOrCreateRevalidatingSegmentEntry(\n now: number,\n fetchStrategy: FetchStrategy,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree\n): SegmentCacheEntry {\n // This function is called when we've already confirmed that a particular\n // segment is cached, but we want to perform another request anyway in case it\n // returns more complete and/or fresher data than we already have. The logic\n // for deciding whether to replace the existing entry is handled elsewhere;\n // this function just handles retrieving a cache entry that we can use to\n // track the revalidation.\n //\n // The reason revalidations are stored in the cache is because we need to be\n // able to dedupe multiple revalidation requests. The reason they have to be\n // handled specially is because we shouldn't overwrite a \"normal\" entry if\n // one exists at the same keypath. So, for each internal cache location, there\n // is a special \"revalidation\" slot that is used solely for this purpose.\n //\n // You can think of it as if all the revalidation entries were stored in a\n // separate cache map from the canonical entries, and then transfered to the\n // canonical cache map once the request is complete — this isn't how it's\n // actually implemented, since it's more efficient to store them in the same\n // data structure as the normal entries, but that's how it's modeled\n // conceptually.\n\n // TODO: Once we implement Fallback behavior for params, where an entry is\n // re-keyed based on response information, we'll need to account for the\n // possibility that the keypath of the previous entry is more generic than\n // the keypath of the revalidating entry. In other words, the server could\n // return a less generic entry upon revalidation. For now, though, this isn't\n // a concern because the keypath is based solely on the prefetch strategy,\n // not on data contained in the response.\n const existingEntry = readRevalidatingSegmentCacheEntry(now, tree.varyPath)\n if (existingEntry !== null) {\n return existingEntry\n }\n // Create a pending entry and add it to the cache.\n const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt)\n const isRevalidation = true\n setInCacheMap(\n segmentCacheMap,\n varyPathForRequest,\n pendingEntry,\n isRevalidation\n )\n return pendingEntry\n}\n\nexport function overwriteRevalidatingSegmentCacheEntry(\n fetchStrategy: FetchStrategy,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree\n) {\n // This function is called when we've already decided to replace an existing\n // revalidation entry. Create a new entry and write it into the cache,\n // overwriting the previous value.\n const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt)\n const isRevalidation = true\n setInCacheMap(\n segmentCacheMap,\n varyPathForRequest,\n pendingEntry,\n isRevalidation\n )\n return pendingEntry\n}\n\nexport function upsertSegmentEntry(\n now: number,\n varyPath: SegmentVaryPath,\n candidateEntry: SegmentCacheEntry\n): SegmentCacheEntry | null {\n // We have a new entry that has not yet been inserted into the cache. Before\n // we do so, we need to confirm whether it takes precedence over the existing\n // entry (if one exists).\n // TODO: We should not upsert an entry if its key was invalidated in the time\n // since the request was made. We can do that by passing the \"owner\" entry to\n // this function and confirming it's the same as `existingEntry`.\n\n if (isValueExpired(now, getCurrentCacheVersion(), candidateEntry)) {\n // The entry is expired. We cannot upsert it.\n return null\n }\n\n const existingEntry = readSegmentCacheEntry(now, varyPath)\n if (existingEntry !== null) {\n // Don't replace a more specific segment with a less-specific one. A case where this\n // might happen is if the existing segment was fetched via\n // `<Link prefetch={true}>`.\n if (\n // We fetched the new segment using a different, less specific fetch strategy\n // than the segment we already have in the cache, so it can't have more content.\n (candidateEntry.fetchStrategy !== existingEntry.fetchStrategy &&\n !canNewFetchStrategyProvideMoreContent(\n existingEntry.fetchStrategy,\n candidateEntry.fetchStrategy\n )) ||\n // The existing entry isn't partial, but the new one is.\n // (TODO: can this be true if `candidateEntry.fetchStrategy >= existingEntry.fetchStrategy`?)\n (!existingEntry.isPartial && candidateEntry.isPartial)\n ) {\n // We're going to leave revalidating entry in the cache so that it doesn't\n // get revalidated again unnecessarily. Downgrade the Fulfilled entry to\n // Rejected and null out the data so it can be garbage collected. We leave\n // `staleAt` intact to prevent subsequent revalidation attempts only until\n // the entry expires.\n const rejectedEntry: RejectedSegmentCacheEntry = candidateEntry as any\n rejectedEntry.status = EntryStatus.Rejected\n rejectedEntry.loading = null\n rejectedEntry.rsc = null\n return null\n }\n\n // Evict the existing entry from the cache.\n deleteFromCacheMap(existingEntry)\n }\n\n const isRevalidation = false\n setInCacheMap(segmentCacheMap, varyPath, candidateEntry, isRevalidation)\n return candidateEntry\n}\n\nexport function createDetachedSegmentCacheEntry(\n staleAt: number\n): EmptySegmentCacheEntry {\n const emptyEntry: EmptySegmentCacheEntry = {\n status: EntryStatus.Empty,\n // Default to assuming the fetch strategy will be PPR. This will be updated\n // when a fetch is actually initiated.\n fetchStrategy: FetchStrategy.PPR,\n rsc: null,\n loading: null,\n isPartial: true,\n promise: null,\n\n // Map-related fields\n ref: null,\n size: 0,\n staleAt,\n version: 0,\n }\n return emptyEntry\n}\n\nexport function upgradeToPendingSegment(\n emptyEntry: EmptySegmentCacheEntry,\n fetchStrategy: FetchStrategy\n): PendingSegmentCacheEntry {\n const pendingEntry: PendingSegmentCacheEntry = emptyEntry as any\n pendingEntry.status = EntryStatus.Pending\n pendingEntry.fetchStrategy = fetchStrategy\n\n if (fetchStrategy === FetchStrategy.Full) {\n // We can assume the response will contain the full segment data. Set this\n // to false so we know it's OK to omit this segment from any navigation\n // requests that may happen while the data is still pending.\n pendingEntry.isPartial = false\n }\n\n // Set the version here, since this is right before the request is initiated.\n // The next time the global cache version is incremented, the entry will\n // effectively be evicted. This happens before initiating the request, rather\n // than when receiving the response, because it's guaranteed to happen\n // before the data is read on the server.\n pendingEntry.version = getCurrentCacheVersion()\n return pendingEntry\n}\n\nfunction pingBlockedTasks(entry: {\n blockedTasks: Set<PrefetchTask> | null\n}): void {\n const blockedTasks = entry.blockedTasks\n if (blockedTasks !== null) {\n for (const task of blockedTasks) {\n pingPrefetchTask(task)\n }\n entry.blockedTasks = null\n }\n}\n\nfunction fulfillRouteCacheEntry(\n entry: RouteCacheEntry,\n tree: RouteTree,\n metadataVaryPath: PageVaryPath,\n staleAt: number,\n couldBeIntercepted: boolean,\n canonicalUrl: string,\n renderedSearch: NormalizedSearch,\n isPPREnabled: boolean\n): FulfilledRouteCacheEntry {\n // The Head is not actually part of the route tree, but other than that, it's\n // fetched and cached like a segment. Some functions expect a RouteTree\n // object, so rather than fork the logic in all those places, we use this\n // \"fake\" one.\n const metadata: RouteTree = {\n requestKey: HEAD_REQUEST_KEY,\n segment: HEAD_REQUEST_KEY,\n varyPath: metadataVaryPath,\n // The metadata isn't really a \"page\" (though it isn't really a \"segment\"\n // either) but for the purposes of how this field is used, it behaves like\n // one. If this logic ever gets more complex we can change this to an enum.\n isPage: true,\n slots: null,\n isRootLayout: false,\n hasLoadingBoundary: HasLoadingBoundary.SubtreeHasNoLoadingBoundary,\n hasRuntimePrefetch: false,\n }\n const fulfilledEntry: FulfilledRouteCacheEntry = entry as any\n fulfilledEntry.status = EntryStatus.Fulfilled\n fulfilledEntry.tree = tree\n fulfilledEntry.metadata = metadata\n fulfilledEntry.staleAt = staleAt\n fulfilledEntry.couldBeIntercepted = couldBeIntercepted\n fulfilledEntry.canonicalUrl = canonicalUrl\n fulfilledEntry.renderedSearch = renderedSearch\n fulfilledEntry.isPPREnabled = isPPREnabled\n pingBlockedTasks(entry)\n return fulfilledEntry\n}\n\nfunction fulfillSegmentCacheEntry(\n segmentCacheEntry: PendingSegmentCacheEntry,\n rsc: React.ReactNode,\n loading: LoadingModuleData | Promise<LoadingModuleData>,\n staleAt: number,\n isPartial: boolean\n): FulfilledSegmentCacheEntry {\n const fulfilledEntry: FulfilledSegmentCacheEntry = segmentCacheEntry as any\n fulfilledEntry.status = EntryStatus.Fulfilled\n fulfilledEntry.rsc = rsc\n fulfilledEntry.loading = loading\n fulfilledEntry.staleAt = staleAt\n fulfilledEntry.isPartial = isPartial\n // Resolve any listeners that were waiting for this data.\n if (segmentCacheEntry.promise !== null) {\n segmentCacheEntry.promise.resolve(fulfilledEntry)\n // Free the promise for garbage collection.\n fulfilledEntry.promise = null\n }\n return fulfilledEntry\n}\n\nfunction rejectRouteCacheEntry(\n entry: PendingRouteCacheEntry,\n staleAt: number\n): void {\n const rejectedEntry: RejectedRouteCacheEntry = entry as any\n rejectedEntry.status = EntryStatus.Rejected\n rejectedEntry.staleAt = staleAt\n pingBlockedTasks(entry)\n}\n\nfunction rejectSegmentCacheEntry(\n entry: PendingSegmentCacheEntry,\n staleAt: number\n): void {\n const rejectedEntry: RejectedSegmentCacheEntry = entry as any\n rejectedEntry.status = EntryStatus.Rejected\n rejectedEntry.staleAt = staleAt\n if (entry.promise !== null) {\n // NOTE: We don't currently propagate the reason the prefetch was canceled\n // but we could by accepting a `reason` argument.\n entry.promise.resolve(null)\n entry.promise = null\n }\n}\n\ntype RouteTreeAccumulator = {\n metadataVaryPath: PageVaryPath | null\n}\n\nfunction convertRootTreePrefetchToRouteTree(\n rootTree: RootTreePrefetch,\n renderedPathname: string,\n renderedSearch: NormalizedSearch,\n acc: RouteTreeAccumulator\n) {\n // Remove trailing and leading slashes\n const pathnameParts = renderedPathname.split('/').filter((p) => p !== '')\n const index = 0\n const rootSegment = ROOT_SEGMENT_REQUEST_KEY\n return convertTreePrefetchToRouteTree(\n rootTree.tree,\n rootSegment,\n null,\n ROOT_SEGMENT_REQUEST_KEY,\n pathnameParts,\n index,\n renderedSearch,\n acc\n )\n}\n\nfunction convertTreePrefetchToRouteTree(\n prefetch: TreePrefetch,\n segment: FlightRouterStateSegment,\n partialVaryPath: PartialSegmentVaryPath | null,\n requestKey: SegmentRequestKey,\n pathnameParts: Array<string>,\n pathnamePartsIndex: number,\n renderedSearch: NormalizedSearch,\n acc: RouteTreeAccumulator\n): RouteTree {\n // Converts the route tree sent by the server into the format used by the\n // cache. The cached version of the tree includes additional fields, such as a\n // cache key for each segment. Since this is frequently accessed, we compute\n // it once instead of on every access. This same cache key is also used to\n // request the segment from the server.\n\n let slots: { [parallelRouteKey: string]: RouteTree } | null = null\n let isPage: boolean\n let varyPath: SegmentVaryPath\n const prefetchSlots = prefetch.slots\n if (prefetchSlots !== null) {\n isPage = false\n varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n\n slots = {}\n for (let parallelRouteKey in prefetchSlots) {\n const childPrefetch = prefetchSlots[parallelRouteKey]\n const childParamName = childPrefetch.name\n const childParamType = childPrefetch.paramType\n const childServerSentParamKey = childPrefetch.paramKey\n\n let childDoesAppearInURL: boolean\n let childSegment: FlightRouterStateSegment\n let childPartialVaryPath: PartialSegmentVaryPath | null\n if (childParamType !== null) {\n // This segment is parameterized. Get the param from the pathname.\n const childParamValue = parseDynamicParamFromURLPart(\n childParamType,\n pathnameParts,\n pathnamePartsIndex\n )\n\n // Assign a cache key to the segment, based on the param value. In the\n // pre-Segment Cache implementation, the server computes this and sends\n // it in the body of the response. In the Segment Cache implementation,\n // the server sends an empty string and we fill it in here.\n\n // TODO: We're intentionally not adding the search param to page\n // segments here; it's tracked separately and added back during a read.\n // This would clearer if we waited to construct the segment until it's\n // read from the cache, since that's effectively what we're\n // doing anyway.\n const childParamKey =\n // The server omits this field from the prefetch response when\n // cacheComponents is enabled.\n childServerSentParamKey !== null\n ? childServerSentParamKey\n : // If no param key was sent, use the value parsed on the client.\n getCacheKeyForDynamicParam(\n childParamValue,\n '' as NormalizedSearch\n )\n\n childPartialVaryPath = appendLayoutVaryPath(\n partialVaryPath,\n childParamKey\n )\n childSegment = [childParamName, childParamKey, childParamType]\n childDoesAppearInURL = true\n } else {\n // This segment does not have a param. Inherit the partial vary path of\n // the parent.\n childPartialVaryPath = partialVaryPath\n childSegment = childParamName\n childDoesAppearInURL = doesStaticSegmentAppearInURL(childParamName)\n }\n\n // Only increment the index if the segment appears in the URL. If it's a\n // \"virtual\" segment, like a route group, it remains the same.\n const childPathnamePartsIndex = childDoesAppearInURL\n ? pathnamePartsIndex + 1\n : pathnamePartsIndex\n\n const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n childRequestKeyPart\n )\n slots[parallelRouteKey] = convertTreePrefetchToRouteTree(\n childPrefetch,\n childSegment,\n childPartialVaryPath,\n childRequestKey,\n pathnameParts,\n childPathnamePartsIndex,\n renderedSearch,\n acc\n )\n }\n } else {\n if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n // This is a page segment.\n isPage = true\n varyPath = finalizePageVaryPath(\n requestKey,\n renderedSearch,\n partialVaryPath\n )\n // The metadata \"segment\" is not part the route tree, but it has the same\n // conceptual params as a page segment. Write the vary path into the\n // accumulator object. If there are multiple parallel pages, we use the\n // first one. Which page we choose is arbitrary as long as it's\n // consistently the same one every time every time. See\n // finalizeMetadataVaryPath for more details.\n if (acc.metadataVaryPath === null) {\n acc.metadataVaryPath = finalizeMetadataVaryPath(\n requestKey,\n renderedSearch,\n partialVaryPath\n )\n }\n } else {\n // This is a layout segment.\n isPage = false\n varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n }\n }\n\n return {\n requestKey,\n segment,\n varyPath,\n // TODO: Cheating the type system here a bit because TypeScript can't tell\n // that the type of isPage and varyPath are consistent. The fix would be to\n // create separate constructors and call the appropriate one from each of\n // the branches above. Just seems a bit overkill only for one field so I'll\n // leave it as-is for now. If isPage were wrong it would break the behavior\n // and we'd catch it quickly, anyway.\n isPage: isPage as boolean as any,\n slots,\n isRootLayout: prefetch.isRootLayout,\n // This field is only relevant to dynamic routes. For a PPR/static route,\n // there's always some partial loading state we can fetch.\n hasLoadingBoundary: HasLoadingBoundary.SegmentHasLoadingBoundary,\n hasRuntimePrefetch: prefetch.hasRuntimePrefetch,\n }\n}\n\nfunction convertRootFlightRouterStateToRouteTree(\n flightRouterState: FlightRouterState,\n renderedSearch: NormalizedSearch,\n acc: RouteTreeAccumulator\n): RouteTree {\n return convertFlightRouterStateToRouteTree(\n flightRouterState,\n ROOT_SEGMENT_REQUEST_KEY,\n null,\n renderedSearch,\n acc\n )\n}\n\nfunction convertFlightRouterStateToRouteTree(\n flightRouterState: FlightRouterState,\n requestKey: SegmentRequestKey,\n parentPartialVaryPath: PartialSegmentVaryPath | null,\n renderedSearch: NormalizedSearch,\n acc: RouteTreeAccumulator\n): RouteTree {\n const originalSegment = flightRouterState[0]\n\n let segment: FlightRouterStateSegment\n let partialVaryPath: PartialSegmentVaryPath | null\n let isPage: boolean\n let varyPath: SegmentVaryPath\n if (Array.isArray(originalSegment)) {\n isPage = false\n const paramCacheKey = originalSegment[1]\n partialVaryPath = appendLayoutVaryPath(parentPartialVaryPath, paramCacheKey)\n varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n segment = originalSegment\n } else {\n // This segment does not have a param. Inherit the partial vary path of\n // the parent.\n partialVaryPath = parentPartialVaryPath\n if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n // This is a page segment.\n isPage = true\n\n // The navigation implementation expects the search params to be included\n // in the segment. However, in the case of a static response, the search\n // params are omitted. So the client needs to add them back in when reading\n // from the Segment Cache.\n //\n // For consistency, we'll do this for dynamic responses, too.\n //\n // TODO: We should move search params out of FlightRouterState and handle\n // them entirely on the client, similar to our plan for dynamic params.\n segment = PAGE_SEGMENT_KEY\n varyPath = finalizePageVaryPath(\n requestKey,\n renderedSearch,\n partialVaryPath\n )\n // The metadata \"segment\" is not part the route tree, but it has the same\n // conceptual params as a page segment. Write the vary path into the\n // accumulator object. If there are multiple parallel pages, we use the\n // first one. Which page we choose is arbitrary as long as it's\n // consistently the same one every time every time. See\n // finalizeMetadataVaryPath for more details.\n if (acc.metadataVaryPath === null) {\n acc.metadataVaryPath = finalizeMetadataVaryPath(\n requestKey,\n renderedSearch,\n partialVaryPath\n )\n }\n } else {\n // This is a layout segment.\n isPage = false\n segment = originalSegment\n varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n }\n }\n\n let slots: { [parallelRouteKey: string]: RouteTree } | null = null\n\n const parallelRoutes = flightRouterState[1]\n for (let parallelRouteKey in parallelRoutes) {\n const childRouterState = parallelRoutes[parallelRouteKey]\n const childSegment = childRouterState[0]\n // TODO: Eventually, the param values will not be included in the response\n // from the server. We'll instead fill them in on the client by parsing\n // the URL. This is where we'll do that.\n const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n childRequestKeyPart\n )\n const childTree = convertFlightRouterStateToRouteTree(\n childRouterState,\n childRequestKey,\n partialVaryPath,\n renderedSearch,\n acc\n )\n if (slots === null) {\n slots = {\n [parallelRouteKey]: childTree,\n }\n } else {\n slots[parallelRouteKey] = childTree\n }\n }\n\n return {\n requestKey,\n segment,\n varyPath,\n // TODO: Cheating the type system here a bit because TypeScript can't tell\n // that the type of isPage and varyPath are consistent. The fix would be to\n // create separate constructors and call the appropriate one from each of\n // the branches above. Just seems a bit overkill only for one field so I'll\n // leave it as-is for now. If isPage were wrong it would break the behavior\n // and we'd catch it quickly, anyway.\n isPage: isPage as boolean as any,\n slots,\n isRootLayout: flightRouterState[4] === true,\n hasLoadingBoundary:\n flightRouterState[5] !== undefined\n ? flightRouterState[5]\n : HasLoadingBoundary.SubtreeHasNoLoadingBoundary,\n\n // Non-static tree responses are only used by apps that haven't adopted\n // Cache Components. So this is always false.\n hasRuntimePrefetch: false,\n }\n}\n\nexport function convertRouteTreeToFlightRouterState(\n routeTree: RouteTree\n): FlightRouterState {\n const parallelRoutes: Record<string, FlightRouterState> = {}\n if (routeTree.slots !== null) {\n for (const parallelRouteKey in routeTree.slots) {\n parallelRoutes[parallelRouteKey] = convertRouteTreeToFlightRouterState(\n routeTree.slots[parallelRouteKey]\n )\n }\n }\n const flightRouterState: FlightRouterState = [\n routeTree.segment,\n parallelRoutes,\n null,\n null,\n routeTree.isRootLayout,\n ]\n return flightRouterState\n}\n\nexport async function fetchRouteOnCacheMiss(\n entry: PendingRouteCacheEntry,\n task: PrefetchTask,\n key: RouteCacheKey\n): Promise<PrefetchSubtaskResult<null> | null> {\n // This function is allowed to use async/await because it contains the actual\n // fetch that gets issued on a cache miss. Notice it writes the result to the\n // cache entry directly, rather than return data that is then written by\n // the caller.\n const pathname = key.pathname\n const search = key.search\n const nextUrl = key.nextUrl\n const segmentPath = '/_tree' as SegmentRequestKey\n\n const headers: RequestHeaders = {\n [RSC_HEADER]: '1',\n [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: segmentPath,\n }\n if (nextUrl !== null) {\n headers[NEXT_URL] = nextUrl\n }\n\n try {\n const url = new URL(pathname + search, location.origin)\n let response\n let urlAfterRedirects\n if (isOutputExportMode) {\n // In output: \"export\" mode, we can't use headers to request a particular\n // segment. Instead, we encode the extra request information into the URL.\n // This is not part of the \"public\" interface of the app; it's an internal\n // Next.js implementation detail that the app developer should not need to\n // concern themselves with.\n //\n // For example, to request a segment:\n //\n // Path passed to <Link>: /path/to/page\n // Path passed to fetch: /path/to/page/__next-segments/_tree\n //\n // (This is not the exact protocol, just an illustration.)\n //\n // Before we do that, though, we need to account for redirects. Even in\n // output: \"export\" mode, a proxy might redirect the page to a different\n // location, but we shouldn't assume or expect that they also redirect all\n // the segment files, too.\n //\n // To check whether the page is redirected, previously we perform a range\n // request of 64 bytes of the HTML document to check if the target page\n // is part of this app (by checking if build id matches). Only if the target\n // page is part of this app do we determine the final canonical URL.\n //\n // However, as mentioned in https://github.com/vercel/next.js/pull/85903,\n // some popular static hosting providers (like Cloudflare Pages or Render.com)\n // do not support range requests, in the worst case, the entire HTML instead\n // of 64 bytes could be returned, which is wasteful.\n //\n // So instead, we drops the check for build id here, and simply perform\n // a HEAD request to rejects 1xx/4xx/5xx responses, and then determine the\n // final URL after redirects.\n //\n // NOTE: We could embed the route tree into the HTML document, to avoid\n // a second request. We're not doing that currently because it would make\n // the HTML document larger and affect normal page loads.\n const headResponse = await fetch(url, {\n method: 'HEAD',\n })\n if (headResponse.status < 200 || headResponse.status >= 400) {\n // The target page responded w/o a successful status code\n // Could be a WAF serving a 403, or a 5xx from a backend\n //\n // Note that we can't use headResponse.ok here, because\n // Response#ok returns `false` with 3xx responses.\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n\n urlAfterRedirects = headResponse.redirected\n ? new URL(headResponse.url)\n : url\n\n response = await fetchPrefetchResponse(\n addSegmentPathToUrlInOutputExportMode(urlAfterRedirects, segmentPath),\n headers\n )\n } else {\n // \"Server\" mode. We can use request headers instead of the pathname.\n // TODO: The eventual plan is to get rid of our custom request headers and\n // encode everything into the URL, using a similar strategy to the\n // \"output: export\" block above.\n response = await fetchPrefetchResponse(url, headers)\n urlAfterRedirects =\n response !== null && response.redirected ? new URL(response.url) : url\n }\n\n if (\n !response ||\n !response.ok ||\n // 204 is a Cache miss. Though theoretically this shouldn't happen when\n // PPR is enabled, because we always respond to route tree requests, even\n // if it needs to be blockingly generated on demand.\n response.status === 204 ||\n !response.body\n ) {\n // Server responded with an error, or with a miss. We should still cache\n // the response, but we can try again after 10 seconds.\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n\n // TODO: The canonical URL is the href without the origin. I think\n // historically the reason for this is because the initial canonical URL\n // gets passed as a prop to the top-level React component, which means it\n // needs to be computed during SSR. If it were to include the origin, it\n // would need to always be same as location.origin on the client, to prevent\n // a hydration mismatch. To sidestep this complexity, we omit the origin.\n //\n // However, since this is neither a native URL object nor a fully qualified\n // URL string, we need to be careful about how we use it. To prevent subtle\n // mistakes, we should create a special type for it, instead of just string.\n // Or, we should just use a (readonly) URL object instead. The type of the\n // prop that we pass to seed the initial state does not need to be the same\n // type as the state itself.\n const canonicalUrl = createHrefFromUrl(urlAfterRedirects)\n\n // Check whether the response varies based on the Next-Url header.\n const varyHeader = response.headers.get('vary')\n const couldBeIntercepted =\n varyHeader !== null && varyHeader.includes(NEXT_URL)\n\n // Track when the network connection closes.\n const closed = createPromiseWithResolvers<void>()\n\n // This checks whether the response was served from the per-segment cache,\n // rather than the old prefetching flow. If it fails, it implies that PPR\n // is disabled on this route.\n const routeIsPPREnabled =\n response.headers.get(NEXT_DID_POSTPONE_HEADER) === '2' ||\n // In output: \"export\" mode, we can't rely on response headers. But if we\n // receive a well-formed response, we can assume it's a static response,\n // because all data is static in this mode.\n isOutputExportMode\n\n if (routeIsPPREnabled) {\n const prefetchStream = createPrefetchResponseStream(\n response.body,\n closed.resolve,\n function onResponseSizeUpdate(size) {\n setSizeInCacheMap(entry, size)\n }\n )\n const serverData = await createFromNextReadableStream<RootTreePrefetch>(\n prefetchStream,\n headers\n )\n if (serverData.buildId !== getAppBuildId()) {\n // The server build does not match the client. Treat as a 404. During\n // an actual navigation, the router will trigger an MPA navigation.\n // TODO: Consider moving the build ID to a response header so we can check\n // it before decoding the response, and so there's one way of checking\n // across all response types.\n // TODO: We should cache the fact that this is an MPA navigation.\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n\n // Get the params that were used to render the target page. These may\n // be different from the params in the request URL, if the page\n // was rewritten.\n const renderedPathname = getRenderedPathname(response)\n const renderedSearch = getRenderedSearch(response)\n\n // Convert the server-sent data into the RouteTree format used by the\n // client cache.\n //\n // During this traversal, we accumulate additional data into this\n // \"accumulator\" object.\n const acc: RouteTreeAccumulator = { metadataVaryPath: null }\n const routeTree = convertRootTreePrefetchToRouteTree(\n serverData,\n renderedPathname,\n renderedSearch,\n acc\n )\n const metadataVaryPath = acc.metadataVaryPath\n if (metadataVaryPath === null) {\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n\n const staleTimeMs = getStaleTimeMs(serverData.staleTime)\n fulfillRouteCacheEntry(\n entry,\n routeTree,\n metadataVaryPath,\n Date.now() + staleTimeMs,\n couldBeIntercepted,\n canonicalUrl,\n renderedSearch,\n routeIsPPREnabled\n )\n } else {\n // PPR is not enabled for this route. The server responds with a\n // different format (FlightRouterState) that we need to convert.\n // TODO: We will unify the responses eventually. I'm keeping the types\n // separate for now because FlightRouterState has so many\n // overloaded concerns.\n const prefetchStream = createPrefetchResponseStream(\n response.body,\n closed.resolve,\n function onResponseSizeUpdate(size) {\n setSizeInCacheMap(entry, size)\n }\n )\n const serverData =\n await createFromNextReadableStream<NavigationFlightResponse>(\n prefetchStream,\n headers\n )\n if (serverData.b !== getAppBuildId()) {\n // The server build does not match the client. Treat as a 404. During\n // an actual navigation, the router will trigger an MPA navigation.\n // TODO: Consider moving the build ID to a response header so we can check\n // it before decoding the response, and so there's one way of checking\n // across all response types.\n // TODO: We should cache the fact that this is an MPA navigation.\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n\n writeDynamicTreeResponseIntoCache(\n Date.now(),\n task,\n // The non-PPR response format is what we'd get if we prefetched these segments\n // using the LoadingBoundary fetch strategy, so mark their cache entries accordingly.\n FetchStrategy.LoadingBoundary,\n response as RSCResponse<NavigationFlightResponse>,\n serverData,\n entry,\n couldBeIntercepted,\n canonicalUrl,\n routeIsPPREnabled\n )\n }\n\n if (!couldBeIntercepted) {\n // This route will never be intercepted. So we can use this entry for all\n // requests to this route, regardless of the Next-Url header. This works\n // because when reading the cache we always check for a valid\n // non-intercepted entry first.\n\n // Re-key the entry. The `set` implementation handles removing it from\n // its previous position in the cache. We don't need to do anything to\n // update the LRU, because the entry is already in it.\n // TODO: Treat this as an upsert — should check if an entry already\n // exists at the new keypath, and if so, whether we should keep that\n // one instead.\n const fulfilledVaryPath: RouteVaryPath = getFulfilledRouteVaryPath(\n pathname,\n search,\n nextUrl,\n couldBeIntercepted\n )\n const isRevalidation = false\n setInCacheMap(routeCacheMap, fulfilledVaryPath, entry, isRevalidation)\n }\n // Return a promise that resolves when the network connection closes, so\n // the scheduler can track the number of concurrent network connections.\n return { value: null, closed: closed.promise }\n } catch (error) {\n // Either the connection itself failed, or something bad happened while\n // decoding the response.\n rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n return null\n }\n}\n\nexport async function fetchSegmentOnCacheMiss(\n route: FulfilledRouteCacheEntry,\n segmentCacheEntry: PendingSegmentCacheEntry,\n routeKey: RouteCacheKey,\n tree: RouteTree\n): Promise<PrefetchSubtaskResult<FulfilledSegmentCacheEntry> | null> {\n // This function is allowed to use async/await because it contains the actual\n // fetch that gets issued on a cache miss. Notice it writes the result to the\n // cache entry directly, rather than return data that is then written by\n // the caller.\n //\n // Segment fetches are non-blocking so we don't need to ping the scheduler\n // on completion.\n\n // Use the canonical URL to request the segment, not the original URL. These\n // are usually the same, but the canonical URL will be different if the route\n // tree response was redirected. To avoid an extra waterfall on every segment\n // request, we pass the redirected URL instead of the original one.\n const url = new URL(route.canonicalUrl, location.origin)\n const nextUrl = routeKey.nextUrl\n\n const requestKey = tree.requestKey\n const normalizedRequestKey =\n requestKey === ROOT_SEGMENT_REQUEST_KEY\n ? // The root segment is a special case. To simplify the server-side\n // handling of these requests, we encode the root segment path as\n // `_index` instead of as an empty string. This should be treated as\n // an implementation detail and not as a stable part of the protocol.\n // It just needs to match the equivalent logic that happens when\n // prerendering the responses. It should not leak outside of Next.js.\n ('/_index' as SegmentRequestKey)\n : requestKey\n\n const headers: RequestHeaders = {\n [RSC_HEADER]: '1',\n [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: normalizedRequestKey,\n }\n if (nextUrl !== null) {\n headers[NEXT_URL] = nextUrl\n }\n\n const requestUrl = isOutputExportMode\n ? // In output: \"export\" mode, we need to add the segment path to the URL.\n addSegmentPathToUrlInOutputExportMode(url, normalizedRequestKey)\n : url\n try {\n const response = await fetchPrefetchResponse(requestUrl, headers)\n if (\n !response ||\n !response.ok ||\n response.status === 204 || // Cache miss\n // This checks whether the response was served from the per-segment cache,\n // rather than the old prefetching flow. If it fails, it implies that PPR\n // is disabled on this route. Theoretically this should never happen\n // because we only issue requests for segments once we've verified that\n // the route supports PPR.\n (response.headers.get(NEXT_DID_POSTPONE_HEADER) !== '2' &&\n // In output: \"export\" mode, we can't rely on response headers. But if\n // we receive a well-formed response, we can assume it's a static\n // response, because all data is static in this mode.\n !isOutputExportMode) ||\n !response.body\n ) {\n // Server responded with an error, or with a miss. We should still cache\n // the response, but we can try again after 10 seconds.\n rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n return null\n }\n\n // Track when the network connection closes.\n const closed = createPromiseWithResolvers<void>()\n\n // Wrap the original stream in a new stream that never closes. That way the\n // Flight client doesn't error if there's a hanging promise.\n const prefetchStream = createPrefetchResponseStream(\n response.body,\n closed.resolve,\n function onResponseSizeUpdate(size) {\n setSizeInCacheMap(segmentCacheEntry, size)\n }\n )\n const serverData = await (createFromNextReadableStream(\n prefetchStream,\n headers\n ) as Promise<SegmentPrefetch>)\n if (serverData.buildId !== getAppBuildId()) {\n // The server build does not match the client. Treat as a 404. During\n // an actual navigation, the router will trigger an MPA navigation.\n // TODO: Consider moving the build ID to a response header so we can check\n // it before decoding the response, and so there's one way of checking\n // across all response types.\n rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n return null\n }\n return {\n value: fulfillSegmentCacheEntry(\n segmentCacheEntry,\n serverData.rsc,\n serverData.loading,\n // TODO: The server does not currently provide per-segment stale time.\n // So we use the stale time of the route.\n route.staleAt,\n serverData.isPartial\n ),\n // Return a promise that resolves when the network connection closes, so\n // the scheduler can track the number of concurrent network connections.\n closed: closed.promise,\n }\n } catch (error) {\n // Either the connection itself failed, or something bad happened while\n // decoding the response.\n rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n return null\n }\n}\n\nexport async function fetchSegmentPrefetchesUsingDynamicRequest(\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n fetchStrategy:\n | FetchStrategy.LoadingBoundary\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full,\n dynamicRequestTree: FlightRouterState,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): Promise<PrefetchSubtaskResult<null> | null> {\n const key = task.key\n const url = new URL(route.canonicalUrl, location.origin)\n const nextUrl = key.nextUrl\n\n if (\n spawnedEntries.size === 1 &&\n spawnedEntries.has(route.metadata.requestKey)\n ) {\n // The only thing pending is the head. Instruct the server to\n // skip over everything else.\n dynamicRequestTree = MetadataOnlyRequestTree\n }\n\n const headers: RequestHeaders = {\n [RSC_HEADER]: '1',\n [NEXT_ROUTER_STATE_TREE_HEADER]:\n prepareFlightRouterStateForRequest(dynamicRequestTree),\n }\n if (nextUrl !== null) {\n headers[NEXT_URL] = nextUrl\n }\n switch (fetchStrategy) {\n case FetchStrategy.Full: {\n // We omit the prefetch header from a full prefetch because it's essentially\n // just a navigation request that happens ahead of time — it should include\n // all the same data in the response.\n break\n }\n case FetchStrategy.PPRRuntime: {\n headers[NEXT_ROUTER_PREFETCH_HEADER] = '2'\n break\n }\n case FetchStrategy.LoadingBoundary: {\n headers[NEXT_ROUTER_PREFETCH_HEADER] = '1'\n break\n }\n default: {\n fetchStrategy satisfies never\n }\n }\n\n try {\n const response = await fetchPrefetchResponse(url, headers)\n if (!response || !response.ok || !response.body) {\n // Server responded with an error, or with a miss. We should still cache\n // the response, but we can try again after 10 seconds.\n rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n return null\n }\n\n const renderedSearch = getRenderedSearch(response)\n if (renderedSearch !== route.renderedSearch) {\n // The search params that were used to render the target page are\n // different from the search params in the request URL. This only happens\n // when there's a dynamic rewrite in between the tree prefetch and the\n // data prefetch.\n // TODO: For now, since this is an edge case, we reject the prefetch, but\n // the proper way to handle this is to evict the stale route tree entry\n // then fill the cache with the new response.\n rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n return null\n }\n\n // Track when the network connection closes.\n const closed = createPromiseWithResolvers<void>()\n\n let fulfilledEntries: Array<FulfilledSegmentCacheEntry> | null = null\n const prefetchStream = createPrefetchResponseStream(\n response.body,\n closed.resolve,\n function onResponseSizeUpdate(totalBytesReceivedSoFar) {\n // When processing a dynamic response, we don't know how large each\n // individual segment is, so approximate by assiging each segment\n // the average of the total response size.\n if (fulfilledEntries === null) {\n // Haven't received enough data yet to know which segments\n // were included.\n return\n }\n const averageSize = totalBytesReceivedSoFar / fulfilledEntries.length\n for (const entry of fulfilledEntries) {\n setSizeInCacheMap(entry, averageSize)\n }\n }\n )\n const serverData = await (createFromNextReadableStream(\n prefetchStream,\n headers\n ) as Promise<NavigationFlightResponse>)\n\n const isResponsePartial =\n fetchStrategy === FetchStrategy.PPRRuntime\n ? // A runtime prefetch may have holes.\n serverData.rp?.[0] === true\n : // Full and LoadingBoundary prefetches cannot have holes.\n // (even if we did set the prefetch header, we only use this codepath for non-PPR-enabled routes)\n false\n\n // Aside from writing the data into the cache, this function also returns\n // the entries that were fulfilled, so we can streamingly update their sizes\n // in the LRU as more data comes in.\n fulfilledEntries = writeDynamicRenderResponseIntoCache(\n Date.now(),\n task,\n fetchStrategy,\n response as RSCResponse<NavigationFlightResponse>,\n serverData,\n isResponsePartial,\n route,\n spawnedEntries\n )\n\n // Return a promise that resolves when the network connection closes, so\n // the scheduler can track the number of concurrent network connections.\n return { value: null, closed: closed.promise }\n } catch (error) {\n rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n return null\n }\n}\n\nfunction writeDynamicTreeResponseIntoCache(\n now: number,\n task: PrefetchTask,\n fetchStrategy:\n | FetchStrategy.LoadingBoundary\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full,\n response: RSCResponse<NavigationFlightResponse>,\n serverData: NavigationFlightResponse,\n entry: PendingRouteCacheEntry,\n couldBeIntercepted: boolean,\n canonicalUrl: string,\n routeIsPPREnabled: boolean\n) {\n // Get the URL that was used to render the target page. This may be different\n // from the URL in the request URL, if the page was rewritten.\n const renderedSearch = getRenderedSearch(response)\n\n const normalizedFlightDataResult = normalizeFlightData(serverData.f)\n if (\n // A string result means navigating to this route will result in an\n // MPA navigation.\n typeof normalizedFlightDataResult === 'string' ||\n normalizedFlightDataResult.length !== 1\n ) {\n rejectRouteCacheEntry(entry, now + 10 * 1000)\n return\n }\n const flightData = normalizedFlightDataResult[0]\n if (!flightData.isRootRender) {\n // Unexpected response format.\n rejectRouteCacheEntry(entry, now + 10 * 1000)\n return\n }\n\n const flightRouterState = flightData.tree\n // For runtime prefetches, stale time is in the payload at rp[1].\n // For other responses, fall back to the header.\n const staleTimeSeconds =\n typeof serverData.rp?.[1] === 'number'\n ? serverData.rp[1]\n : parseInt(response.headers.get(NEXT_ROUTER_STALE_TIME_HEADER) ?? '', 10)\n const staleTimeMs = !isNaN(staleTimeSeconds)\n ? getStaleTimeMs(staleTimeSeconds)\n : STATIC_STALETIME_MS\n\n // If the response contains dynamic holes, then we must conservatively assume\n // that any individual segment might contain dynamic holes, and also the\n // head. If it did not contain dynamic holes, then we can assume every segment\n // and the head is completely static.\n const isResponsePartial =\n response.headers.get(NEXT_DID_POSTPONE_HEADER) === '1'\n\n // Convert the server-sent data into the RouteTree format used by the\n // client cache.\n //\n // During this traversal, we accumulate additional data into this\n // \"accumulator\" object.\n const acc: RouteTreeAccumulator = { metadataVaryPath: null }\n const routeTree = convertRootFlightRouterStateToRouteTree(\n flightRouterState,\n renderedSearch,\n acc\n )\n const metadataVaryPath = acc.metadataVaryPath\n if (metadataVaryPath === null) {\n rejectRouteCacheEntry(entry, now + 10 * 1000)\n return\n }\n\n const fulfilledEntry = fulfillRouteCacheEntry(\n entry,\n routeTree,\n metadataVaryPath,\n now + staleTimeMs,\n couldBeIntercepted,\n canonicalUrl,\n renderedSearch,\n routeIsPPREnabled\n )\n\n // If the server sent segment data as part of the response, we should write\n // it into the cache to prevent a second, redundant prefetch request.\n //\n // TODO: When `clientSegmentCache` is enabled, the server does not include\n // segment data when responding to a route tree prefetch request. However,\n // when `clientSegmentCache` is set to \"client-only\", and PPR is enabled (or\n // the page is fully static), the normal check is bypassed and the server\n // responds with the full page. This is a temporary situation until we can\n // remove the \"client-only\" option. Then, we can delete this function call.\n writeDynamicRenderResponseIntoCache(\n now,\n task,\n fetchStrategy,\n response,\n serverData,\n isResponsePartial,\n fulfilledEntry,\n null\n )\n}\n\nfunction rejectSegmentEntriesIfStillPending(\n entries: Map<SegmentRequestKey, SegmentCacheEntry>,\n staleAt: number\n): Array<FulfilledSegmentCacheEntry> {\n const fulfilledEntries = []\n for (const entry of entries.values()) {\n if (entry.status === EntryStatus.Pending) {\n rejectSegmentCacheEntry(entry, staleAt)\n } else if (entry.status === EntryStatus.Fulfilled) {\n fulfilledEntries.push(entry)\n }\n }\n return fulfilledEntries\n}\n\nfunction writeDynamicRenderResponseIntoCache(\n now: number,\n task: PrefetchTask,\n fetchStrategy:\n | FetchStrategy.LoadingBoundary\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full,\n response: RSCResponse<NavigationFlightResponse>,\n serverData: NavigationFlightResponse,\n isResponsePartial: boolean,\n route: FulfilledRouteCacheEntry,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry> | null\n): Array<FulfilledSegmentCacheEntry> | null {\n if (serverData.b !== getAppBuildId()) {\n // The server build does not match the client. Treat as a 404. During\n // an actual navigation, the router will trigger an MPA navigation.\n // TODO: Consider moving the build ID to a response header so we can check\n // it before decoding the response, and so there's one way of checking\n // across all response types.\n if (spawnedEntries !== null) {\n rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n }\n return null\n }\n\n const flightDatas = normalizeFlightData(serverData.f)\n if (typeof flightDatas === 'string') {\n // This means navigating to this route will result in an MPA navigation.\n // TODO: We should cache this, too, so that the MPA navigation is immediate.\n return null\n }\n\n // For runtime prefetches, stale time is in the payload at rp[1].\n // For other responses, fall back to the header.\n const staleTimeSeconds =\n typeof serverData.rp?.[1] === 'number'\n ? serverData.rp[1]\n : parseInt(response.headers.get(NEXT_ROUTER_STALE_TIME_HEADER) ?? '', 10)\n const staleTimeMs = !isNaN(staleTimeSeconds)\n ? getStaleTimeMs(staleTimeSeconds)\n : STATIC_STALETIME_MS\n const staleAt = now + staleTimeMs\n\n for (const flightData of flightDatas) {\n const seedData = flightData.seedData\n if (seedData !== null) {\n // The data sent by the server represents only a subtree of the app. We\n // need to find the part of the task tree that matches the response.\n //\n // segmentPath represents the parent path of subtree. It's a repeating\n // pattern of parallel route key and segment:\n //\n // [string, Segment, string, Segment, string, Segment, ...]\n const segmentPath = flightData.segmentPath\n let tree = route.tree\n for (let i = 0; i < segmentPath.length; i += 2) {\n const parallelRouteKey: string = segmentPath[i]\n if (tree?.slots?.[parallelRouteKey] !== undefined) {\n tree = tree.slots[parallelRouteKey]\n } else {\n if (spawnedEntries !== null) {\n rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n }\n return null\n }\n }\n\n writeSeedDataIntoCache(\n now,\n task,\n fetchStrategy,\n route,\n tree,\n staleAt,\n seedData,\n isResponsePartial,\n spawnedEntries\n )\n }\n\n const head = flightData.head\n if (head !== null) {\n fulfillEntrySpawnedByRuntimePrefetch(\n now,\n fetchStrategy,\n route,\n head,\n null,\n flightData.isHeadPartial,\n staleAt,\n route.metadata,\n spawnedEntries\n )\n }\n }\n // Any entry that's still pending was intentionally not rendered by the\n // server, because it was inside the loading boundary. Mark them as rejected\n // so we know not to fetch them again.\n // TODO: If PPR is enabled on some routes but not others, then it's possible\n // that a different page is able to do a per-segment prefetch of one of the\n // segments we're marking as rejected here. We should mark on the segment\n // somehow that the reason for the rejection is because of a non-PPR prefetch.\n // That way a per-segment prefetch knows to disregard the rejection.\n if (spawnedEntries !== null) {\n const fulfilledEntries = rejectSegmentEntriesIfStillPending(\n spawnedEntries,\n now + 10 * 1000\n )\n return fulfilledEntries\n }\n return null\n}\n\nfunction writeSeedDataIntoCache(\n now: number,\n task: PrefetchTask,\n fetchStrategy:\n | FetchStrategy.LoadingBoundary\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree,\n staleAt: number,\n seedData: CacheNodeSeedData,\n isResponsePartial: boolean,\n entriesOwnedByCurrentTask: Map<\n SegmentRequestKey,\n PendingSegmentCacheEntry\n > | null\n) {\n // This function is used to write the result of a runtime server request\n // (CacheNodeSeedData) into the prefetch cache.\n const rsc = seedData[0]\n const loading = seedData[2]\n const isPartial = rsc === null || isResponsePartial\n fulfillEntrySpawnedByRuntimePrefetch(\n now,\n fetchStrategy,\n route,\n rsc,\n loading,\n isPartial,\n staleAt,\n tree,\n entriesOwnedByCurrentTask\n )\n\n // Recursively write the child data into the cache.\n const slots = tree.slots\n if (slots !== null) {\n const seedDataChildren = seedData[1]\n for (const parallelRouteKey in slots) {\n const childTree = slots[parallelRouteKey]\n const childSeedData: CacheNodeSeedData | null | void =\n seedDataChildren[parallelRouteKey]\n if (childSeedData !== null && childSeedData !== undefined) {\n writeSeedDataIntoCache(\n now,\n task,\n fetchStrategy,\n route,\n childTree,\n staleAt,\n childSeedData,\n isResponsePartial,\n entriesOwnedByCurrentTask\n )\n }\n }\n }\n}\n\nfunction fulfillEntrySpawnedByRuntimePrefetch(\n now: number,\n fetchStrategy:\n | FetchStrategy.LoadingBoundary\n | FetchStrategy.PPRRuntime\n | FetchStrategy.Full,\n route: FulfilledRouteCacheEntry,\n rsc: React.ReactNode,\n loading: LoadingModuleData | Promise<LoadingModuleData>,\n isPartial: boolean,\n staleAt: number,\n tree: RouteTree,\n entriesOwnedByCurrentTask: Map<\n SegmentRequestKey,\n PendingSegmentCacheEntry\n > | null\n) {\n // We should only write into cache entries that are owned by us. Or create\n // a new one and write into that. We must never write over an entry that was\n // created by a different task, because that causes data races.\n const ownedEntry =\n entriesOwnedByCurrentTask !== null\n ? entriesOwnedByCurrentTask.get(tree.requestKey)\n : undefined\n if (ownedEntry !== undefined) {\n fulfillSegmentCacheEntry(ownedEntry, rsc, loading, staleAt, isPartial)\n } else {\n // There's no matching entry. Attempt to create a new one.\n const possiblyNewEntry = readOrCreateSegmentCacheEntry(\n now,\n fetchStrategy,\n route,\n tree\n )\n if (possiblyNewEntry.status === EntryStatus.Empty) {\n // Confirmed this is a new entry. We can fulfill it.\n const newEntry = possiblyNewEntry\n fulfillSegmentCacheEntry(\n upgradeToPendingSegment(newEntry, fetchStrategy),\n rsc,\n loading,\n staleAt,\n isPartial\n )\n } else {\n // There was already an entry in the cache. But we may be able to\n // replace it with the new one from the server.\n const newEntry = fulfillSegmentCacheEntry(\n upgradeToPendingSegment(\n createDetachedSegmentCacheEntry(staleAt),\n fetchStrategy\n ),\n rsc,\n loading,\n staleAt,\n isPartial\n )\n upsertSegmentEntry(\n now,\n getSegmentVaryPathForRequest(fetchStrategy, tree),\n newEntry\n )\n }\n }\n}\n\nasync function fetchPrefetchResponse<T>(\n url: URL,\n headers: RequestHeaders\n): Promise<RSCResponse<T> | null> {\n const fetchPriority = 'low'\n // When issuing a prefetch request, don't immediately decode the response; we\n // use the lower level `createFromResponse` API instead because we need to do\n // some extra processing of the response stream. See\n // `createPrefetchResponseStream` for more details.\n const shouldImmediatelyDecode = false\n const response = await createFetch<T>(\n url,\n headers,\n fetchPriority,\n shouldImmediatelyDecode\n )\n if (!response.ok) {\n return null\n }\n\n // Check the content type\n if (isOutputExportMode) {\n // In output: \"export\" mode, we relaxed about the content type, since it's\n // not Next.js that's serving the response. If the status is OK, assume the\n // response is valid. If it's not a valid response, the Flight client won't\n // be able to decode it, and we'll treat it as a miss.\n } else {\n const contentType = response.headers.get('content-type')\n const isFlightResponse =\n contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n if (!isFlightResponse) {\n return null\n }\n }\n return response\n}\n\nfunction createPrefetchResponseStream(\n originalFlightStream: ReadableStream<Uint8Array>,\n onStreamClose: () => void,\n onResponseSizeUpdate: (size: number) => void\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n //\n // While processing the original stream, we also incrementally update the size\n // of the cache entry in the LRU.\n let totalByteLength = 0\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n\n // Incrementally update the size of the cache entry in the LRU.\n // NOTE: Since prefetch responses are delivered in a single chunk,\n // it's not really necessary to do this streamingly, but I'm doing it\n // anyway in case this changes in the future.\n totalByteLength += value.byteLength\n onResponseSizeUpdate(totalByteLength)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream. We do notify the caller, though.\n onStreamClose()\n return\n }\n },\n })\n}\n\nfunction addSegmentPathToUrlInOutputExportMode(\n url: URL,\n segmentPath: SegmentRequestKey\n): URL {\n if (isOutputExportMode) {\n // In output: \"export\" mode, we cannot use a header to encode the segment\n // path. Instead, we append it to the end of the pathname.\n const staticUrl = new URL(url)\n const routeDir = staticUrl.pathname.endsWith('/')\n ? staticUrl.pathname.slice(0, -1)\n : staticUrl.pathname\n const staticExportFilename =\n convertSegmentPathToStaticExportFilename(segmentPath)\n staticUrl.pathname = `${routeDir}/${staticExportFilename}`\n return staticUrl\n }\n return url\n}\n\n/**\n * Checks whether the new fetch strategy is likely to provide more content than the old one.\n *\n * Generally, when an app uses dynamic data, a \"more specific\" fetch strategy is expected to provide more content:\n * - `LoadingBoundary` only provides static layouts\n * - `PPR` can provide shells for each segment (even for segments that use dynamic data)\n * - `PPRRuntime` can additionally include content that uses searchParams, params, or cookies\n * - `Full` includes all the content, even if it uses dynamic data\n *\n * However, it's possible that a more specific fetch strategy *won't* give us more content if:\n * - a segment is fully static\n * (then, `PPR`/`PPRRuntime`/`Full` will all yield equivalent results)\n * - providing searchParams/params/cookies doesn't reveal any more content, e.g. because of an `await connection()`\n * (then, `PPR` and `PPRRuntime` will yield equivalent results, only `Full` will give us more)\n * Because of this, when comparing two segments, we should also check if the existing segment is partial.\n * If it's not partial, then there's no need to prefetch it again, even using a \"more specific\" strategy.\n * There's currently no way to know if `PPRRuntime` will yield more data that `PPR`, so we have to assume it will.\n *\n * Also note that, in practice, we don't expect to be comparing `LoadingBoundary` to `PPR`/`PPRRuntime`,\n * because a non-PPR-enabled route wouldn't ever use the latter strategies. It might however use `Full`.\n */\nexport function canNewFetchStrategyProvideMoreContent(\n currentStrategy: FetchStrategy,\n newStrategy: FetchStrategy\n): boolean {\n return currentStrategy < newStrategy\n}\n","import type {\n FlightRouterState,\n Segment as FlightRouterStateSegment,\n Segment,\n} from '../../../shared/lib/app-router-types'\nimport { HasLoadingBoundary } from '../../../shared/lib/app-router-types'\nimport { matchSegment } from '../match-segments'\nimport {\n readOrCreateRouteCacheEntry,\n readOrCreateSegmentCacheEntry,\n fetchRouteOnCacheMiss,\n fetchSegmentOnCacheMiss,\n EntryStatus,\n type FulfilledRouteCacheEntry,\n type RouteCacheEntry,\n type SegmentCacheEntry,\n type RouteTree,\n fetchSegmentPrefetchesUsingDynamicRequest,\n type PendingSegmentCacheEntry,\n convertRouteTreeToFlightRouterState,\n readOrCreateRevalidatingSegmentEntry,\n upsertSegmentEntry,\n type FulfilledSegmentCacheEntry,\n upgradeToPendingSegment,\n waitForSegmentCacheEntry,\n overwriteRevalidatingSegmentCacheEntry,\n canNewFetchStrategyProvideMoreContent,\n} from './cache'\nimport { getSegmentVaryPathForRequest, type SegmentVaryPath } from './vary-path'\nimport type { RouteCacheKey } from './cache-key'\nimport { createCacheKey } from './cache-key'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n PrefetchPriority,\n} from './types'\nimport { getCurrentCacheVersion } from './cache'\nimport {\n addSearchParamsIfPageSegment,\n PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport type { SegmentRequestKey } from '../../../shared/lib/segment-cache/segment-value-encoding'\n\nconst scheduleMicrotask =\n typeof queueMicrotask === 'function'\n ? queueMicrotask\n : (fn: () => unknown) =>\n Promise.resolve()\n .then(fn)\n .catch((error) =>\n setTimeout(() => {\n throw error\n })\n )\n\nexport type PrefetchTask = {\n key: RouteCacheKey\n\n /**\n * The FlightRouterState at the time the task was initiated. This is needed\n * when falling back to the non-PPR behavior, which only prefetches up to\n * the first loading boundary.\n */\n treeAtTimeOfPrefetch: FlightRouterState\n\n /**\n * The cache version at the time the task was initiated. This is used to\n * determine if the cache was invalidated since the task was initiated.\n */\n cacheVersion: number\n\n /**\n * Whether to prefetch dynamic data, in addition to static data. This is\n * used by `<Link prefetch={true}>`.\n *\n * Note that a task with `FetchStrategy.PPR` might need to use\n * `FetchStrategy.LoadingBoundary` instead if we find out that a route\n * does not support PPR after doing the initial route prefetch.\n */\n fetchStrategy: PrefetchTaskFetchStrategy\n\n /**\n * sortId is an incrementing counter\n *\n * Newer prefetches are prioritized over older ones, so that as new links\n * enter the viewport, they are not starved by older links that are no\n * longer relevant. In the future, we can add additional prioritization\n * heuristics, like removing prefetches once a link leaves the viewport.\n *\n * The sortId is assigned when the prefetch is initiated, and reassigned if\n * the same task is prefetched again (effectively bumping it to the top of\n * the queue).\n *\n * TODO: We can add additional fields here to indicate what kind of prefetch\n * it is. For example, was it initiated by a link? Or was it an imperative\n * call? If it was initiated by a link, we can remove it from the queue when\n * the link leaves the viewport, but if it was an imperative call, then we\n * should keep it in the queue until it's fulfilled.\n *\n * We can also add priority levels. For example, hovering over a link could\n * increase the priority of its prefetch.\n */\n sortId: number\n\n /**\n * The priority of the task. Like sortId, this affects the task's position in\n * the queue, so it must never be updated without resifting the heap.\n */\n priority: PrefetchPriority\n\n /**\n * The phase of the task. Tasks are split into multiple phases so that their\n * priority can be adjusted based on what kind of work they're doing.\n * Concretely, prefetching the route tree is higher priority than prefetching\n * segment data.\n */\n phase: PrefetchPhase\n\n /**\n * These fields are temporary state for tracking the currently running task.\n * They are reset after each iteration of the task queue.\n */\n hasBackgroundWork: boolean\n spawnedRuntimePrefetches: Set<SegmentRequestKey> | null\n\n /**\n * True if the prefetch was cancelled.\n */\n isCanceled: boolean\n\n /**\n * The callback passed to `router.prefetch`, if given.\n */\n onInvalidate: null | (() => void)\n\n /**\n * The index of the task in the heap's backing array. Used to efficiently\n * change the priority of a task by re-sifting it, which requires knowing\n * where it is in the array. This is only used internally by the heap\n * algorithm. The naive alternative is indexOf every time a task is queued,\n * which has O(n) complexity.\n *\n * We also use this field to check whether a task is currently in the queue.\n */\n _heapIndex: number\n}\n\nconst enum PrefetchTaskExitStatus {\n /**\n * The task yielded because there are too many requests in progress.\n */\n InProgress,\n\n /**\n * The task is blocked. It needs more data before it can proceed.\n *\n * Currently the only reason this happens is we're still waiting to receive a\n * route tree from the server, because we can't start prefetching the segments\n * until we know what to prefetch.\n */\n Blocked,\n\n /**\n * There's nothing left to prefetch.\n */\n Done,\n}\n\n/**\n * Prefetch tasks are processed in two phases: first the route tree is fetched,\n * then the segments. We use this to priortize tasks that have not yet fetched\n * the route tree.\n */\nconst enum PrefetchPhase {\n RouteTree = 1,\n Segments = 0,\n}\n\nexport type PrefetchSubtaskResult<T> = {\n /**\n * A promise that resolves when the network connection is closed.\n */\n closed: Promise<void>\n value: T\n}\n\nconst taskHeap: Array<PrefetchTask> = []\n\nlet inProgressRequests = 0\n\nlet sortIdCounter = 0\nlet didScheduleMicrotask = false\n\n// The most recently hovered (or touched, etc) link, i.e. the most recent task\n// scheduled at Intent priority. There's only ever a single task at Intent\n// priority at a time. We reserve special network bandwidth for this task only.\nlet mostRecentlyHoveredLink: PrefetchTask | null = null\n\n// CDN cache propagation delay after revalidation (in milliseconds)\nconst REVALIDATION_COOLDOWN_MS = 300\n\n// Timeout handle for the revalidation cooldown. When non-null, prefetch\n// requests are blocked to allow CDN cache propagation.\nlet revalidationCooldownTimeoutHandle: ReturnType<typeof setTimeout> | null =\n null\n\n/**\n * Called by the cache when revalidation occurs. Starts a cooldown period\n * during which prefetch requests are blocked to allow CDN cache propagation.\n */\nexport function startRevalidationCooldown(): void {\n // Clear any existing timeout in case multiple revalidations happen\n // in quick succession.\n if (revalidationCooldownTimeoutHandle !== null) {\n clearTimeout(revalidationCooldownTimeoutHandle)\n }\n\n // Schedule the cooldown to expire after the delay.\n revalidationCooldownTimeoutHandle = setTimeout(() => {\n revalidationCooldownTimeoutHandle = null\n // Retry the prefetch queue now that the cooldown has expired.\n ensureWorkIsScheduled()\n }, REVALIDATION_COOLDOWN_MS)\n}\n\nexport type IncludeDynamicData = null | 'full' | 'dynamic'\n\n/**\n * Initiates a prefetch task for the given URL. If a prefetch for the same URL\n * is already in progress, this will bump it to the top of the queue.\n *\n * This is not a user-facing function. By the time this is called, the href is\n * expected to be validated and normalized.\n *\n * @param key The RouteCacheKey to prefetch.\n * @param treeAtTimeOfPrefetch The app's current FlightRouterState\n * @param fetchStrategy Whether to prefetch dynamic data, in addition to\n * static data. This is used by `<Link prefetch={true}>`.\n */\nexport function schedulePrefetchTask(\n key: RouteCacheKey,\n treeAtTimeOfPrefetch: FlightRouterState,\n fetchStrategy: PrefetchTaskFetchStrategy,\n priority: PrefetchPriority,\n onInvalidate: null | (() => void)\n): PrefetchTask {\n // Spawn a new prefetch task\n const task: PrefetchTask = {\n key,\n treeAtTimeOfPrefetch,\n cacheVersion: getCurrentCacheVersion(),\n priority,\n phase: PrefetchPhase.RouteTree,\n hasBackgroundWork: false,\n spawnedRuntimePrefetches: null,\n fetchStrategy,\n sortId: sortIdCounter++,\n isCanceled: false,\n onInvalidate,\n _heapIndex: -1,\n }\n\n trackMostRecentlyHoveredLink(task)\n\n heapPush(taskHeap, task)\n\n // Schedule an async task to process the queue.\n //\n // The main reason we process the queue in an async task is for batching.\n // It's common for a single JS task/event to trigger multiple prefetches.\n // By deferring to a microtask, we only process the queue once per JS task.\n // If they have different priorities, it also ensures they are processed in\n // the optimal order.\n ensureWorkIsScheduled()\n\n return task\n}\n\nexport function cancelPrefetchTask(task: PrefetchTask): void {\n // Remove the prefetch task from the queue. If the task already completed,\n // then this is a no-op.\n //\n // We must also explicitly mark the task as canceled so that a blocked task\n // does not get added back to the queue when it's pinged by the network.\n task.isCanceled = true\n heapDelete(taskHeap, task)\n}\n\nexport function reschedulePrefetchTask(\n task: PrefetchTask,\n treeAtTimeOfPrefetch: FlightRouterState,\n fetchStrategy: PrefetchTaskFetchStrategy,\n priority: PrefetchPriority\n): void {\n // Bump the prefetch task to the top of the queue, as if it were a fresh\n // task. This is essentially the same as canceling the task and scheduling\n // a new one, except it reuses the original object.\n //\n // The primary use case is to increase the priority of a Link-initated\n // prefetch on hover.\n\n // Un-cancel the task, in case it was previously canceled.\n task.isCanceled = false\n task.phase = PrefetchPhase.RouteTree\n\n // Assign a new sort ID to move it ahead of all other tasks at the same\n // priority level. (Higher sort IDs are processed first.)\n task.sortId = sortIdCounter++\n task.priority =\n // If this task is the most recently hovered link, maintain its\n // Intent priority, even if the rescheduled priority is lower.\n task === mostRecentlyHoveredLink ? PrefetchPriority.Intent : priority\n\n task.treeAtTimeOfPrefetch = treeAtTimeOfPrefetch\n task.fetchStrategy = fetchStrategy\n\n trackMostRecentlyHoveredLink(task)\n\n if (task._heapIndex !== -1) {\n // The task is already in the queue.\n heapResift(taskHeap, task)\n } else {\n heapPush(taskHeap, task)\n }\n ensureWorkIsScheduled()\n}\n\nexport function isPrefetchTaskDirty(\n task: PrefetchTask,\n nextUrl: string | null,\n tree: FlightRouterState\n): boolean {\n // This is used to quickly bail out of a prefetch task if the result is\n // guaranteed to not have changed since the task was initiated. This is\n // strictly an optimization — theoretically, if it always returned true, no\n // behavior should change because a full prefetch task will effectively\n // perform the same checks.\n const currentCacheVersion = getCurrentCacheVersion()\n return (\n task.cacheVersion !== currentCacheVersion ||\n task.treeAtTimeOfPrefetch !== tree ||\n task.key.nextUrl !== nextUrl\n )\n}\n\nfunction trackMostRecentlyHoveredLink(task: PrefetchTask) {\n // Track the mostly recently hovered link, i.e. the most recently scheduled\n // task at Intent priority. There must only be one such task at a time.\n if (\n task.priority === PrefetchPriority.Intent &&\n task !== mostRecentlyHoveredLink\n ) {\n if (mostRecentlyHoveredLink !== null) {\n // Bump the previously hovered link's priority down to Default.\n if (mostRecentlyHoveredLink.priority !== PrefetchPriority.Background) {\n mostRecentlyHoveredLink.priority = PrefetchPriority.Default\n heapResift(taskHeap, mostRecentlyHoveredLink)\n }\n }\n mostRecentlyHoveredLink = task\n }\n}\n\nfunction ensureWorkIsScheduled() {\n if (didScheduleMicrotask) {\n // Already scheduled a task to process the queue\n return\n }\n didScheduleMicrotask = true\n scheduleMicrotask(processQueueInMicrotask)\n}\n\n/**\n * Checks if we've exceeded the maximum number of concurrent prefetch requests,\n * to avoid saturating the browser's internal network queue. This is a\n * cooperative limit — prefetch tasks should check this before issuing\n * new requests.\n *\n * Also checks if we're within the revalidation cooldown window, during which\n * prefetch requests are delayed to allow CDN cache propagation.\n */\nfunction hasNetworkBandwidth(task: PrefetchTask): boolean {\n // Check if we're within the revalidation cooldown window\n if (revalidationCooldownTimeoutHandle !== null) {\n // We're within the cooldown window. Return false to prevent prefetching.\n // When the cooldown expires, the timeout will call ensureWorkIsScheduled()\n // to retry the queue.\n return false\n }\n\n // TODO: Also check if there's an in-progress navigation. We should never\n // add prefetch requests to the network queue if an actual navigation is\n // taking place, to ensure there's sufficient bandwidth for render-blocking\n // data and resources.\n\n // TODO: Consider reserving some amount of bandwidth for static prefetches.\n\n if (task.priority === PrefetchPriority.Intent) {\n // The most recently hovered link is allowed to exceed the default limit.\n //\n // The goal is to always have enough bandwidth to start a new prefetch\n // request when hovering over a link.\n //\n // However, because we don't abort in-progress requests, it's still possible\n // we'll run out of bandwidth. When links are hovered in quick succession,\n // there could be multiple hover requests running simultaneously.\n return inProgressRequests < 12\n }\n\n // The default limit is lower than the limit for a hovered link.\n return inProgressRequests < 4\n}\n\nfunction spawnPrefetchSubtask<T>(\n prefetchSubtask: Promise<PrefetchSubtaskResult<T> | null>\n): Promise<T | null> {\n // When the scheduler spawns an async task, we don't await its result.\n // Instead, the async task writes its result directly into the cache, then\n // pings the scheduler to continue.\n //\n // We process server responses streamingly, so the prefetch subtask will\n // likely resolve before we're finished receiving all the data. The subtask\n // result includes a promise that resolves once the network connection is\n // closed. The scheduler uses this to control network bandwidth by tracking\n // and limiting the number of concurrent requests.\n inProgressRequests++\n return prefetchSubtask.then((result) => {\n if (result === null) {\n // The prefetch task errored before it could start processing the\n // network stream. Assume the connection is closed.\n onPrefetchConnectionClosed()\n return null\n }\n // Wait for the connection to close before freeing up more bandwidth.\n result.closed.then(onPrefetchConnectionClosed)\n return result.value\n })\n}\n\nfunction onPrefetchConnectionClosed(): void {\n inProgressRequests--\n\n // Notify the scheduler that we have more bandwidth, and can continue\n // processing tasks.\n ensureWorkIsScheduled()\n}\n\n/**\n * Notify the scheduler that we've received new data for an in-progress\n * prefetch. The corresponding task will be added back to the queue (unless the\n * task has been canceled in the meantime).\n */\nexport function pingPrefetchTask(task: PrefetchTask) {\n // \"Ping\" a prefetch that's already in progress to notify it of new data.\n if (\n // Check if prefetch was canceled.\n task.isCanceled ||\n // Check if prefetch is already queued.\n task._heapIndex !== -1\n ) {\n return\n }\n // Add the task back to the queue.\n heapPush(taskHeap, task)\n ensureWorkIsScheduled()\n}\n\nfunction processQueueInMicrotask() {\n didScheduleMicrotask = false\n\n // We aim to minimize how often we read the current time. Since nearly all\n // functions in the prefetch scheduler are synchronous, we can read the time\n // once and pass it as an argument wherever it's needed.\n const now = Date.now()\n\n // Process the task queue until we run out of network bandwidth.\n let task = heapPeek(taskHeap)\n while (task !== null && hasNetworkBandwidth(task)) {\n task.cacheVersion = getCurrentCacheVersion()\n\n const exitStatus = pingRoute(now, task)\n\n // These fields are only valid for a single attempt. Reset them after each\n // iteration of the task queue.\n const hasBackgroundWork = task.hasBackgroundWork\n task.hasBackgroundWork = false\n task.spawnedRuntimePrefetches = null\n\n switch (exitStatus) {\n case PrefetchTaskExitStatus.InProgress:\n // The task yielded because there are too many requests in progress.\n // Stop processing tasks until we have more bandwidth.\n return\n case PrefetchTaskExitStatus.Blocked:\n // The task is blocked. It needs more data before it can proceed.\n // Keep the task out of the queue until the server responds.\n heapPop(taskHeap)\n // Continue to the next task\n task = heapPeek(taskHeap)\n continue\n case PrefetchTaskExitStatus.Done:\n if (task.phase === PrefetchPhase.RouteTree) {\n // Finished prefetching the route tree. Proceed to prefetching\n // the segments.\n task.phase = PrefetchPhase.Segments\n heapResift(taskHeap, task)\n } else if (hasBackgroundWork) {\n // The task spawned additional background work. Reschedule the task\n // at background priority.\n task.priority = PrefetchPriority.Background\n heapResift(taskHeap, task)\n } else {\n // The prefetch is complete. Continue to the next task.\n heapPop(taskHeap)\n }\n task = heapPeek(taskHeap)\n continue\n default:\n exitStatus satisfies never\n }\n }\n}\n\n/**\n * Check this during a prefetch task to determine if background work can be\n * performed. If so, it evaluates to `true`. Otherwise, it returns `false`,\n * while also scheduling a background task to run later. Usage:\n *\n * @example\n * if (background(task)) {\n * // Perform background-pri work\n * }\n */\nfunction background(task: PrefetchTask): boolean {\n if (task.priority === PrefetchPriority.Background) {\n return true\n }\n task.hasBackgroundWork = true\n return false\n}\n\nfunction pingRoute(now: number, task: PrefetchTask): PrefetchTaskExitStatus {\n const key = task.key\n const route = readOrCreateRouteCacheEntry(now, task, key)\n const exitStatus = pingRootRouteTree(now, task, route)\n\n if (exitStatus !== PrefetchTaskExitStatus.InProgress && key.search !== '') {\n // If the URL has a non-empty search string, also prefetch the pathname\n // without the search string. We use the searchless route tree as a base for\n // optimistic routing; see requestOptimisticRouteCacheEntry for details.\n //\n // Note that we don't need to prefetch any of the segment data. Just the\n // route tree.\n //\n // TODO: This is a temporary solution; the plan is to replace this by adding\n // a wildcard lookup method to the TupleMap implementation. This is\n // non-trivial to implement because it needs to account for things like\n // fallback route entries, hence this temporary workaround.\n const url = new URL(key.pathname, location.origin)\n const keyWithoutSearch = createCacheKey(url.href, key.nextUrl)\n const routeWithoutSearch = readOrCreateRouteCacheEntry(\n now,\n task,\n keyWithoutSearch\n )\n switch (routeWithoutSearch.status) {\n case EntryStatus.Empty: {\n if (background(task)) {\n routeWithoutSearch.status = EntryStatus.Pending\n spawnPrefetchSubtask(\n fetchRouteOnCacheMiss(routeWithoutSearch, task, keyWithoutSearch)\n )\n }\n break\n }\n case EntryStatus.Pending:\n case EntryStatus.Fulfilled:\n case EntryStatus.Rejected: {\n // Either the route tree is already cached, or there's already a\n // request in progress. Since we don't need to fetch any segment data\n // for this route, there's nothing left to do.\n break\n }\n default:\n routeWithoutSearch satisfies never\n }\n }\n\n return exitStatus\n}\n\nfunction pingRootRouteTree(\n now: number,\n task: PrefetchTask,\n route: RouteCacheEntry\n): PrefetchTaskExitStatus {\n switch (route.status) {\n case EntryStatus.Empty: {\n // Route is not yet cached, and there's no request already in progress.\n // Spawn a task to request the route, load it into the cache, and ping\n // the task to continue.\n\n // TODO: There are multiple strategies in the <Link> API for prefetching\n // a route. Currently we've only implemented the main one: per-segment,\n // static-data only.\n //\n // There's also `<Link prefetch={true}>`\n // which prefetch both static *and* dynamic data.\n // Similarly, we need to fallback to the old, per-page\n // behavior if PPR is disabled for a route (via the incremental opt-in).\n //\n // Those cases will be handled here.\n spawnPrefetchSubtask(fetchRouteOnCacheMiss(route, task, task.key))\n\n // If the request takes longer than a minute, a subsequent request should\n // retry instead of waiting for this one. When the response is received,\n // this value will be replaced by a new value based on the stale time sent\n // from the server.\n // TODO: We should probably also manually abort the fetch task, to reclaim\n // server bandwidth.\n route.staleAt = now + 60 * 1000\n\n // Upgrade to Pending so we know there's already a request in progress\n route.status = EntryStatus.Pending\n\n // Intentional fallthrough to the Pending branch\n }\n case EntryStatus.Pending: {\n // Still pending. We can't start prefetching the segments until the route\n // tree has loaded. Add the task to the set of blocked tasks so that it\n // is notified when the route tree is ready.\n const blockedTasks = route.blockedTasks\n if (blockedTasks === null) {\n route.blockedTasks = new Set([task])\n } else {\n blockedTasks.add(task)\n }\n return PrefetchTaskExitStatus.Blocked\n }\n case EntryStatus.Rejected: {\n // Route tree failed to load. Treat as a 404.\n return PrefetchTaskExitStatus.Done\n }\n case EntryStatus.Fulfilled: {\n if (task.phase !== PrefetchPhase.Segments) {\n // Do not prefetch segment data until we've entered the segment phase.\n return PrefetchTaskExitStatus.Done\n }\n // Recursively fill in the segment tree.\n if (!hasNetworkBandwidth(task)) {\n // Stop prefetching segments until there's more bandwidth.\n return PrefetchTaskExitStatus.InProgress\n }\n const tree = route.tree\n\n // A task's fetch strategy gets set to `PPR` for any \"auto\" prefetch.\n // If it turned out that the route isn't PPR-enabled, we need to use `LoadingBoundary` instead.\n // We don't need to do this for runtime prefetches, because those are only available in\n // `cacheComponents`, where every route is PPR.\n const fetchStrategy =\n task.fetchStrategy === FetchStrategy.PPR\n ? route.isPPREnabled\n ? FetchStrategy.PPR\n : FetchStrategy.LoadingBoundary\n : task.fetchStrategy\n\n switch (fetchStrategy) {\n case FetchStrategy.PPR: {\n // For Cache Components pages, each segment may be prefetched\n // statically or using a runtime request, based on various\n // configurations and heuristics. We'll do this in two passes: first\n // traverse the tree and perform all the static prefetches.\n //\n // Then, if there are any segments that need a runtime request,\n // do another pass to perform a runtime prefetch.\n pingStaticHead(now, task, route)\n const exitStatus = pingSharedPartOfCacheComponentsTree(\n now,\n task,\n route,\n task.treeAtTimeOfPrefetch,\n tree\n )\n if (exitStatus === PrefetchTaskExitStatus.InProgress) {\n // Child yielded without finishing.\n return PrefetchTaskExitStatus.InProgress\n }\n const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches\n if (spawnedRuntimePrefetches !== null) {\n // During the first pass, we discovered segments that require a\n // runtime prefetch. Do a second pass to construct a request tree.\n const spawnedEntries = new Map<\n SegmentRequestKey,\n PendingSegmentCacheEntry\n >()\n pingRuntimeHead(\n now,\n task,\n route,\n spawnedEntries,\n FetchStrategy.PPRRuntime\n )\n const requestTree = pingRuntimePrefetches(\n now,\n task,\n route,\n tree,\n spawnedRuntimePrefetches,\n spawnedEntries\n )\n let needsDynamicRequest = spawnedEntries.size > 0\n if (needsDynamicRequest) {\n // Perform a dynamic prefetch request and populate the cache with\n // the result.\n spawnPrefetchSubtask(\n fetchSegmentPrefetchesUsingDynamicRequest(\n task,\n route,\n FetchStrategy.PPRRuntime,\n requestTree,\n spawnedEntries\n )\n )\n }\n }\n return PrefetchTaskExitStatus.Done\n }\n case FetchStrategy.Full:\n case FetchStrategy.PPRRuntime:\n case FetchStrategy.LoadingBoundary: {\n // Prefetch multiple segments using a single dynamic request.\n // TODO: We can consolidate this branch with previous one by modeling\n // it as if the first segment in the new tree has runtime prefetching\n // enabled. Will do this as a follow-up refactor. Might want to remove\n // the special metatdata case below first. In the meantime, it's not\n // really that much duplication, just would be nice to remove one of\n // these codepaths.\n const spawnedEntries = new Map<\n SegmentRequestKey,\n PendingSegmentCacheEntry\n >()\n pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy)\n const dynamicRequestTree = diffRouteTreeAgainstCurrent(\n now,\n task,\n route,\n task.treeAtTimeOfPrefetch,\n tree,\n spawnedEntries,\n fetchStrategy\n )\n let needsDynamicRequest = spawnedEntries.size > 0\n if (needsDynamicRequest) {\n spawnPrefetchSubtask(\n fetchSegmentPrefetchesUsingDynamicRequest(\n task,\n route,\n fetchStrategy,\n dynamicRequestTree,\n spawnedEntries\n )\n )\n }\n return PrefetchTaskExitStatus.Done\n }\n default:\n fetchStrategy satisfies never\n }\n break\n }\n default: {\n route satisfies never\n }\n }\n return PrefetchTaskExitStatus.Done\n}\n\nfunction pingStaticHead(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry\n): void {\n // The Head data for a page (metadata, viewport) is not really a route\n // segment, in the sense that it doesn't appear in the route tree. But we\n // store it in the cache as if it were, using a special key.\n pingStaticSegmentData(\n now,\n task,\n route,\n readOrCreateSegmentCacheEntry(\n now,\n FetchStrategy.PPR,\n route,\n route.metadata\n ),\n task.key,\n route.metadata\n )\n}\n\nfunction pingRuntimeHead(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n fetchStrategy:\n | FetchStrategy.Full\n | FetchStrategy.PPRRuntime\n | FetchStrategy.LoadingBoundary\n): void {\n pingRouteTreeAndIncludeDynamicData(\n now,\n task,\n route,\n route.metadata,\n false,\n spawnedEntries,\n // When prefetching the head, there's no difference between Full\n // and LoadingBoundary\n fetchStrategy === FetchStrategy.LoadingBoundary\n ? FetchStrategy.Full\n : fetchStrategy\n )\n}\n\n// TODO: Rename dynamic -> runtime throughout this module\n\nfunction pingSharedPartOfCacheComponentsTree(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n oldTree: FlightRouterState,\n newTree: RouteTree\n): PrefetchTaskExitStatus {\n // When Cache Components is enabled (or PPR, or a fully static route when PPR\n // is disabled; those cases are treated equivalently to Cache Components), we\n // start by prefetching each segment individually. Once we reach the \"new\"\n // part of the tree — the part that doesn't exist on the current page — we\n // may choose to switch to a runtime prefetch instead, based on the\n // information sent by the server in the route tree.\n //\n // The traversal starts in the \"shared\" part of the tree. Once we reach the\n // \"new\" part of the tree, we switch to a different traversal,\n // pingNewPartOfCacheComponentsTree.\n\n // Prefetch this segment's static data.\n const segment = readOrCreateSegmentCacheEntry(\n now,\n task.fetchStrategy,\n route,\n newTree\n )\n pingStaticSegmentData(now, task, route, segment, task.key, newTree)\n\n // Recursively ping the children.\n const oldTreeChildren = oldTree[1]\n const newTreeChildren = newTree.slots\n if (newTreeChildren !== null) {\n for (const parallelRouteKey in newTreeChildren) {\n if (!hasNetworkBandwidth(task)) {\n // Stop prefetching segments until there's more bandwidth.\n return PrefetchTaskExitStatus.InProgress\n }\n const newTreeChild = newTreeChildren[parallelRouteKey]\n const newTreeChildSegment = newTreeChild.segment\n const oldTreeChild: FlightRouterState | void =\n oldTreeChildren[parallelRouteKey]\n const oldTreeChildSegment: FlightRouterStateSegment | void =\n oldTreeChild?.[0]\n let childExitStatus\n if (\n oldTreeChildSegment !== undefined &&\n doesCurrentSegmentMatchCachedSegment(\n route,\n newTreeChildSegment,\n oldTreeChildSegment\n )\n ) {\n // We're still in the \"shared\" part of the tree.\n childExitStatus = pingSharedPartOfCacheComponentsTree(\n now,\n task,\n route,\n oldTreeChild,\n newTreeChild\n )\n } else {\n // We've entered the \"new\" part of the tree. Switch\n // traversal functions.\n childExitStatus = pingNewPartOfCacheComponentsTree(\n now,\n task,\n route,\n newTreeChild\n )\n }\n if (childExitStatus === PrefetchTaskExitStatus.InProgress) {\n // Child yielded without finishing.\n return PrefetchTaskExitStatus.InProgress\n }\n }\n }\n\n return PrefetchTaskExitStatus.Done\n}\n\nfunction pingNewPartOfCacheComponentsTree(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree\n): PrefetchTaskExitStatus.InProgress | PrefetchTaskExitStatus.Done {\n // We're now prefetching in the \"new\" part of the tree, the part that doesn't\n // exist on the current page. (In other words, we're deeper than the\n // shared layouts.) Segments in here default to being prefetched statically.\n // However, if the server instructs us to, we may switch to a runtime\n // prefetch instead. Traverse the tree and check at each segment.\n if (tree.hasRuntimePrefetch) {\n // This route has a runtime prefetch response. Since we're below the shared\n // layout, everything from this point should be prefetched using a single,\n // combined runtime request, rather than using per-segment static requests.\n // This is true even if some of the child segments are known to be fully\n // static — once we've decided to perform a runtime prefetch, we might as\n // well respond with the static segments in the same roundtrip. (That's how\n // regular navigations work, too.) We'll still skip over segments that are\n // already cached, though.\n //\n // It's the server's responsibility to set a reasonable value of\n // `hasRuntimePrefetch`. Currently it's user-defined, but eventually, the\n // server may send a value of `false` even if the user opts in, if it\n // determines during build that the route is always fully static. There are\n // more optimizations we can do once we implement fallback param\n // tracking, too.\n //\n // Use the task object to collect the segments that need a runtime prefetch.\n // This will signal to the outer task queue that a second traversal is\n // required to construct a request tree.\n if (task.spawnedRuntimePrefetches === null) {\n task.spawnedRuntimePrefetches = new Set([tree.requestKey])\n } else {\n task.spawnedRuntimePrefetches.add(tree.requestKey)\n }\n // Then exit the traversal without prefetching anything further.\n return PrefetchTaskExitStatus.Done\n }\n\n // This segment should not be runtime prefetched. Prefetch its static data.\n const segment = readOrCreateSegmentCacheEntry(\n now,\n task.fetchStrategy,\n route,\n tree\n )\n pingStaticSegmentData(now, task, route, segment, task.key, tree)\n if (tree.slots !== null) {\n if (!hasNetworkBandwidth(task)) {\n // Stop prefetching segments until there's more bandwidth.\n return PrefetchTaskExitStatus.InProgress\n }\n // Recursively ping the children.\n for (const parallelRouteKey in tree.slots) {\n const childTree = tree.slots[parallelRouteKey]\n const childExitStatus = pingNewPartOfCacheComponentsTree(\n now,\n task,\n route,\n childTree\n )\n if (childExitStatus === PrefetchTaskExitStatus.InProgress) {\n // Child yielded without finishing.\n return PrefetchTaskExitStatus.InProgress\n }\n }\n }\n // This segment and all its children have finished prefetching.\n return PrefetchTaskExitStatus.Done\n}\n\nfunction diffRouteTreeAgainstCurrent(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n oldTree: FlightRouterState,\n newTree: RouteTree,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n fetchStrategy:\n | FetchStrategy.Full\n | FetchStrategy.PPRRuntime\n | FetchStrategy.LoadingBoundary\n): FlightRouterState {\n // This is a single recursive traversal that does multiple things:\n // - Finds the parts of the target route (newTree) that are not part of\n // of the current page (oldTree) by diffing them, using the same algorithm\n // as a real navigation.\n // - Constructs a request tree (FlightRouterState) that describes which\n // segments need to be prefetched and which ones are already cached.\n // - Creates a set of pending cache entries for the segments that need to\n // be prefetched, so that a subsequent prefetch task does not request the\n // same segments again.\n const oldTreeChildren = oldTree[1]\n const newTreeChildren = newTree.slots\n let requestTreeChildren: Record<string, FlightRouterState> = {}\n if (newTreeChildren !== null) {\n for (const parallelRouteKey in newTreeChildren) {\n const newTreeChild = newTreeChildren[parallelRouteKey]\n const newTreeChildSegment = newTreeChild.segment\n const oldTreeChild: FlightRouterState | void =\n oldTreeChildren[parallelRouteKey]\n const oldTreeChildSegment: FlightRouterStateSegment | void =\n oldTreeChild?.[0]\n if (\n oldTreeChildSegment !== undefined &&\n doesCurrentSegmentMatchCachedSegment(\n route,\n newTreeChildSegment,\n oldTreeChildSegment\n )\n ) {\n // This segment is already part of the current route. Keep traversing.\n const requestTreeChild = diffRouteTreeAgainstCurrent(\n now,\n task,\n route,\n oldTreeChild,\n newTreeChild,\n spawnedEntries,\n fetchStrategy\n )\n requestTreeChildren[parallelRouteKey] = requestTreeChild\n } else {\n // This segment is not part of the current route. We're entering a\n // part of the tree that we need to prefetch (unless everything is\n // already cached).\n switch (fetchStrategy) {\n case FetchStrategy.LoadingBoundary: {\n // When PPR is disabled, we can't prefetch per segment. We must\n // fallback to the old prefetch behavior and send a dynamic request.\n // Only routes that include a loading boundary can be prefetched in\n // this way.\n //\n // This is simlar to a \"full\" prefetch, but we're much more\n // conservative about which segments to include in the request.\n //\n // The server will only render up to the first loading boundary\n // inside new part of the tree. If there's no loading boundary\n // anywhere in the tree, the server will never return any data, so\n // we can skip the request.\n const subtreeHasLoadingBoundary =\n newTreeChild.hasLoadingBoundary !==\n HasLoadingBoundary.SubtreeHasNoLoadingBoundary\n const requestTreeChild = subtreeHasLoadingBoundary\n ? pingPPRDisabledRouteTreeUpToLoadingBoundary(\n now,\n task,\n route,\n newTreeChild,\n null,\n spawnedEntries\n )\n : // There's no loading boundary within this tree. Bail out.\n convertRouteTreeToFlightRouterState(newTreeChild)\n requestTreeChildren[parallelRouteKey] = requestTreeChild\n break\n }\n case FetchStrategy.PPRRuntime: {\n // This is a runtime prefetch. Fetch all cacheable data in the tree,\n // not just the static PPR shell.\n const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n now,\n task,\n route,\n newTreeChild,\n false,\n spawnedEntries,\n fetchStrategy\n )\n requestTreeChildren[parallelRouteKey] = requestTreeChild\n break\n }\n case FetchStrategy.Full: {\n // This is a \"full\" prefetch. Fetch all the data in the tree, both\n // static and dynamic. We issue roughly the same request that we\n // would during a real navigation. The goal is that once the\n // navigation occurs, the router should not have to fetch any\n // additional data.\n //\n // Although the response will include dynamic data, opting into a\n // Full prefetch — via <Link prefetch={true}> — implicitly\n // instructs the cache to treat the response as \"static\", or non-\n // dynamic, since the whole point is to cache it for\n // future navigations.\n //\n // Construct a tree (currently a FlightRouterState) that represents\n // which segments need to be prefetched and which ones are already\n // cached. If the tree is empty, then we can exit. Otherwise, we'll\n // send the request tree to the server and use the response to\n // populate the segment cache.\n const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n now,\n task,\n route,\n newTreeChild,\n false,\n spawnedEntries,\n fetchStrategy\n )\n requestTreeChildren[parallelRouteKey] = requestTreeChild\n break\n }\n default:\n fetchStrategy satisfies never\n }\n }\n }\n }\n const requestTree: FlightRouterState = [\n newTree.segment,\n requestTreeChildren,\n null,\n null,\n newTree.isRootLayout,\n ]\n return requestTree\n}\n\nfunction pingPPRDisabledRouteTreeUpToLoadingBoundary(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree,\n refetchMarkerContext: 'refetch' | 'inside-shared-layout' | null,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): FlightRouterState {\n // This function is similar to pingRouteTreeAndIncludeDynamicData, except the\n // server is only going to return a minimal loading state — it will stop\n // rendering at the first loading boundary. Whereas a Full prefetch is\n // intentionally aggressive and tries to pretfetch all the data that will be\n // needed for a navigation, a LoadingBoundary prefetch is much more\n // conservative. For example, it will omit from the request tree any segment\n // that is already cached, regardles of whether it's partial or full. By\n // contrast, a Full prefetch will refetch partial segments.\n\n // \"inside-shared-layout\" tells the server where to start looking for a\n // loading boundary.\n let refetchMarker: 'refetch' | 'inside-shared-layout' | null =\n refetchMarkerContext === null ? 'inside-shared-layout' : null\n\n const segment = readOrCreateSegmentCacheEntry(\n now,\n task.fetchStrategy,\n route,\n tree\n )\n switch (segment.status) {\n case EntryStatus.Empty: {\n // This segment is not cached. Add a refetch marker so the server knows\n // to start rendering here.\n // TODO: Instead of a \"refetch\" marker, we could just omit this subtree's\n // FlightRouterState from the request tree. I think this would probably\n // already work even without any updates to the server. For consistency,\n // though, I'll send the full tree and we'll look into this later as part\n // of a larger redesign of the request protocol.\n\n // Add the pending cache entry to the result map.\n spawnedEntries.set(\n tree.requestKey,\n upgradeToPendingSegment(\n segment,\n // Set the fetch strategy to LoadingBoundary to indicate that the server\n // might not include it in the pending response. If another route is able\n // to issue a per-segment request, we'll do that in the background.\n FetchStrategy.LoadingBoundary\n )\n )\n if (refetchMarkerContext !== 'refetch') {\n refetchMarker = refetchMarkerContext = 'refetch'\n } else {\n // There's already a parent with a refetch marker, so we don't need\n // to add another one.\n }\n break\n }\n case EntryStatus.Fulfilled: {\n // The segment is already cached.\n const segmentHasLoadingBoundary =\n tree.hasLoadingBoundary === HasLoadingBoundary.SegmentHasLoadingBoundary\n if (segmentHasLoadingBoundary) {\n // This segment has a loading boundary, which means the server won't\n // render its children. So there's nothing left to prefetch along this\n // path. We can bail out.\n return convertRouteTreeToFlightRouterState(tree)\n }\n // NOTE: If the cached segment were fetched using PPR, then it might be\n // partial. We could get a more complete version of the segment by\n // including it in this non-PPR request.\n //\n // We're intentionally choosing not to, though, because it's generally\n // better to avoid doing a full prefetch whenever possible.\n break\n }\n case EntryStatus.Pending: {\n // There's another prefetch currently in progress. Don't add the refetch\n // marker yet, so the server knows it can skip rendering this segment.\n break\n }\n case EntryStatus.Rejected: {\n // The segment failed to load. We shouldn't issue another request until\n // the stale time has elapsed.\n break\n }\n default:\n segment satisfies never\n }\n const requestTreeChildren: Record<string, FlightRouterState> = {}\n if (tree.slots !== null) {\n for (const parallelRouteKey in tree.slots) {\n const childTree = tree.slots[parallelRouteKey]\n requestTreeChildren[parallelRouteKey] =\n pingPPRDisabledRouteTreeUpToLoadingBoundary(\n now,\n task,\n route,\n childTree,\n refetchMarkerContext,\n spawnedEntries\n )\n }\n }\n const requestTree: FlightRouterState = [\n tree.segment,\n requestTreeChildren,\n null,\n refetchMarker,\n tree.isRootLayout,\n ]\n return requestTree\n}\n\nfunction pingRouteTreeAndIncludeDynamicData(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree,\n isInsideRefetchingParent: boolean,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n fetchStrategy: FetchStrategy.Full | FetchStrategy.PPRRuntime\n): FlightRouterState {\n // The tree we're constructing is the same shape as the tree we're navigating\n // to. But even though this is a \"new\" tree, some of the individual segments\n // may be cached as a result of other route prefetches.\n //\n // So we need to find the first uncached segment along each path add an\n // explicit \"refetch\" marker so the server knows where to start rendering.\n // Once the server starts rendering along a path, it keeps rendering the\n // entire subtree.\n const segment = readOrCreateSegmentCacheEntry(\n now,\n // Note that `fetchStrategy` might be different from `task.fetchStrategy`,\n // and we have to use the former here.\n // We can have a task with `FetchStrategy.PPR` where some of its segments are configured to\n // always use runtime prefetching (via `export const prefetch`), and those should check for\n // entries that include search params.\n fetchStrategy,\n route,\n tree\n )\n\n let spawnedSegment: PendingSegmentCacheEntry | null = null\n\n switch (segment.status) {\n case EntryStatus.Empty: {\n // This segment is not cached. Include it in the request.\n spawnedSegment = upgradeToPendingSegment(segment, fetchStrategy)\n break\n }\n case EntryStatus.Fulfilled: {\n // The segment is already cached.\n if (\n segment.isPartial &&\n canNewFetchStrategyProvideMoreContent(\n segment.fetchStrategy,\n fetchStrategy\n )\n ) {\n // The cached segment contains dynamic holes, and was prefetched using a less specific strategy than the current one.\n // This means we're in one of these cases:\n // - we have a static prefetch, and we're doing a runtime prefetch\n // - we have a static or runtime prefetch, and we're doing a Full prefetch (or a navigation).\n // In either case, we need to include it in the request to get a more specific (or full) version.\n spawnedSegment = pingFullSegmentRevalidation(\n now,\n route,\n tree,\n fetchStrategy\n )\n }\n break\n }\n case EntryStatus.Pending:\n case EntryStatus.Rejected: {\n // There's either another prefetch currently in progress, or the previous\n // attempt failed. If the new strategy can provide more content, fetch it again.\n if (\n canNewFetchStrategyProvideMoreContent(\n segment.fetchStrategy,\n fetchStrategy\n )\n ) {\n spawnedSegment = pingFullSegmentRevalidation(\n now,\n route,\n tree,\n fetchStrategy\n )\n }\n break\n }\n default:\n segment satisfies never\n }\n const requestTreeChildren: Record<string, FlightRouterState> = {}\n if (tree.slots !== null) {\n for (const parallelRouteKey in tree.slots) {\n const childTree = tree.slots[parallelRouteKey]\n requestTreeChildren[parallelRouteKey] =\n pingRouteTreeAndIncludeDynamicData(\n now,\n task,\n route,\n childTree,\n isInsideRefetchingParent || spawnedSegment !== null,\n spawnedEntries,\n fetchStrategy\n )\n }\n }\n\n if (spawnedSegment !== null) {\n // Add the pending entry to the result map.\n spawnedEntries.set(tree.requestKey, spawnedSegment)\n }\n\n // Don't bother to add a refetch marker if one is already present in a parent.\n const refetchMarker =\n !isInsideRefetchingParent && spawnedSegment !== null ? 'refetch' : null\n\n const requestTree: FlightRouterState = [\n tree.segment,\n requestTreeChildren,\n null,\n refetchMarker,\n tree.isRootLayout,\n ]\n return requestTree\n}\n\nfunction pingRuntimePrefetches(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree,\n spawnedRuntimePrefetches: Set<SegmentRequestKey>,\n spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): FlightRouterState {\n // Construct a request tree (FlightRouterState) for a runtime prefetch. If\n // a segment is part of the runtime prefetch, the tree is constructed by\n // diffing against what's already in the prefetch cache. Otherwise, we send\n // a regular FlightRouterState with no special markers.\n //\n // See pingRouteTreeAndIncludeDynamicData for details.\n if (spawnedRuntimePrefetches.has(tree.requestKey)) {\n // This segment needs a runtime prefetch.\n return pingRouteTreeAndIncludeDynamicData(\n now,\n task,\n route,\n tree,\n false,\n spawnedEntries,\n FetchStrategy.PPRRuntime\n )\n }\n let requestTreeChildren: Record<string, FlightRouterState> = {}\n const slots = tree.slots\n if (slots !== null) {\n for (const parallelRouteKey in slots) {\n const childTree = slots[parallelRouteKey]\n requestTreeChildren[parallelRouteKey] = pingRuntimePrefetches(\n now,\n task,\n route,\n childTree,\n spawnedRuntimePrefetches,\n spawnedEntries\n )\n }\n }\n\n // This segment is not part of the runtime prefetch. Clone the base tree.\n const requestTree: FlightRouterState = [\n tree.segment,\n requestTreeChildren,\n null,\n null,\n ]\n return requestTree\n}\n\nfunction pingStaticSegmentData(\n now: number,\n task: PrefetchTask,\n route: FulfilledRouteCacheEntry,\n segment: SegmentCacheEntry,\n routeKey: RouteCacheKey,\n tree: RouteTree\n): void {\n switch (segment.status) {\n case EntryStatus.Empty:\n // Upgrade to Pending so we know there's already a request in progress\n spawnPrefetchSubtask(\n fetchSegmentOnCacheMiss(\n route,\n upgradeToPendingSegment(segment, FetchStrategy.PPR),\n routeKey,\n tree\n )\n )\n break\n case EntryStatus.Pending: {\n // There's already a request in progress. Depending on what kind of\n // request it is, we may want to revalidate it.\n switch (segment.fetchStrategy) {\n case FetchStrategy.PPR:\n case FetchStrategy.PPRRuntime:\n case FetchStrategy.Full:\n // There's already a request in progress. Don't do anything.\n break\n case FetchStrategy.LoadingBoundary:\n // There's a pending request, but because it's using the old\n // prefetching strategy, we can't be sure if it will be fulfilled by\n // the response — it might be inside the loading boundary. Perform\n // a revalidation, but because it's speculative, wait to do it at\n // background priority.\n if (background(task)) {\n // TODO: Instead of speculatively revalidating, consider including\n // `hasLoading` in the route tree prefetch response.\n pingPPRSegmentRevalidation(now, route, routeKey, tree)\n }\n break\n default:\n segment.fetchStrategy satisfies never\n }\n break\n }\n case EntryStatus.Rejected: {\n // The existing entry in the cache was rejected. Depending on how it\n // was originally fetched, we may or may not want to revalidate it.\n switch (segment.fetchStrategy) {\n case FetchStrategy.PPR:\n case FetchStrategy.PPRRuntime:\n case FetchStrategy.Full:\n // The previous attempt to fetch this entry failed. Don't attempt to\n // fetch it again until the entry expires.\n break\n case FetchStrategy.LoadingBoundary:\n // There's a rejected entry, but it was fetched using the loading\n // boundary strategy. So the reason it wasn't returned by the server\n // might just be because it was inside a loading boundary. Or because\n // there was a dynamic rewrite. Revalidate it using the per-\n // segment strategy.\n //\n // Because a rejected segment will definitely prevent the segment (and\n // all of its children) from rendering, we perform this revalidation\n // immediately instead of deferring it to a background task.\n pingPPRSegmentRevalidation(now, route, routeKey, tree)\n break\n default:\n segment.fetchStrategy satisfies never\n }\n break\n }\n case EntryStatus.Fulfilled:\n // Segment is already cached. There's nothing left to prefetch.\n break\n default:\n segment satisfies never\n }\n\n // Segments do not have dependent tasks, so once the prefetch is initiated,\n // there's nothing else for us to do (except write the server data into the\n // entry, which is handled by `fetchSegmentOnCacheMiss`).\n}\n\nfunction pingPPRSegmentRevalidation(\n now: number,\n route: FulfilledRouteCacheEntry,\n routeKey: RouteCacheKey,\n tree: RouteTree\n): void {\n const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(\n now,\n FetchStrategy.PPR,\n route,\n tree\n )\n switch (revalidatingSegment.status) {\n case EntryStatus.Empty:\n // Spawn a prefetch request and upsert the segment into the cache\n // upon completion.\n upsertSegmentOnCompletion(\n spawnPrefetchSubtask(\n fetchSegmentOnCacheMiss(\n route,\n upgradeToPendingSegment(revalidatingSegment, FetchStrategy.PPR),\n routeKey,\n tree\n )\n ),\n getSegmentVaryPathForRequest(FetchStrategy.PPR, tree)\n )\n break\n case EntryStatus.Pending:\n // There's already a revalidation in progress.\n break\n case EntryStatus.Fulfilled:\n case EntryStatus.Rejected:\n // A previous revalidation attempt finished, but we chose not to replace\n // the existing entry in the cache. Don't try again until or unless the\n // revalidation entry expires.\n break\n default:\n revalidatingSegment satisfies never\n }\n}\n\nfunction pingFullSegmentRevalidation(\n now: number,\n route: FulfilledRouteCacheEntry,\n tree: RouteTree,\n fetchStrategy: FetchStrategy.Full | FetchStrategy.PPRRuntime\n): PendingSegmentCacheEntry | null {\n const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(\n now,\n fetchStrategy,\n route,\n tree\n )\n if (revalidatingSegment.status === EntryStatus.Empty) {\n // During a Full/PPRRuntime prefetch, a single dynamic request is made for all the\n // segments that we need. So we don't initiate a request here directly. By\n // returning a pending entry from this function, it signals to the caller\n // that this segment should be included in the request that's sent to\n // the server.\n const pendingSegment = upgradeToPendingSegment(\n revalidatingSegment,\n fetchStrategy\n )\n upsertSegmentOnCompletion(\n waitForSegmentCacheEntry(pendingSegment),\n getSegmentVaryPathForRequest(fetchStrategy, tree)\n )\n return pendingSegment\n } else {\n // There's already a revalidation in progress.\n const nonEmptyRevalidatingSegment = revalidatingSegment\n if (\n canNewFetchStrategyProvideMoreContent(\n nonEmptyRevalidatingSegment.fetchStrategy,\n fetchStrategy\n )\n ) {\n // The existing revalidation was fetched using a less specific strategy.\n // Reset it and start a new revalidation.\n const emptySegment = overwriteRevalidatingSegmentCacheEntry(\n fetchStrategy,\n route,\n tree\n )\n const pendingSegment = upgradeToPendingSegment(\n emptySegment,\n fetchStrategy\n )\n upsertSegmentOnCompletion(\n waitForSegmentCacheEntry(pendingSegment),\n getSegmentVaryPathForRequest(fetchStrategy, tree)\n )\n return pendingSegment\n }\n switch (nonEmptyRevalidatingSegment.status) {\n case EntryStatus.Pending:\n // There's already an in-progress prefetch that includes this segment.\n return null\n case EntryStatus.Fulfilled:\n case EntryStatus.Rejected:\n // A previous revalidation attempt finished, but we chose not to replace\n // the existing entry in the cache. Don't try again until or unless the\n // revalidation entry expires.\n return null\n default:\n nonEmptyRevalidatingSegment satisfies never\n return null\n }\n }\n}\n\nconst noop = () => {}\n\nfunction upsertSegmentOnCompletion(\n promise: Promise<FulfilledSegmentCacheEntry | null>,\n varyPath: SegmentVaryPath\n) {\n // Wait for a segment to finish loading, then upsert it into the cache\n promise.then((fulfilled) => {\n if (fulfilled !== null) {\n // Received new data. Attempt to replace the existing entry in the cache.\n upsertSegmentEntry(Date.now(), varyPath, fulfilled)\n }\n }, noop)\n}\n\nfunction doesCurrentSegmentMatchCachedSegment(\n route: FulfilledRouteCacheEntry,\n currentSegment: Segment,\n cachedSegment: Segment\n): boolean {\n if (cachedSegment === PAGE_SEGMENT_KEY) {\n // In the FlightRouterState stored by the router, the page segment has the\n // rendered search params appended to the name of the segment. In the\n // prefetch cache, however, this is stored separately. So, when comparing\n // the router's current FlightRouterState to the cached FlightRouterState,\n // we need to make sure we compare both parts of the segment.\n // TODO: This is not modeled clearly. We use the same type,\n // FlightRouterState, for both the CacheNode tree _and_ the prefetch cache\n // _and_ the server response format, when conceptually those are three\n // different things and treated in different ways. We should encode more of\n // this information into the type design so mistakes are less likely.\n return (\n currentSegment ===\n addSearchParamsIfPageSegment(\n PAGE_SEGMENT_KEY,\n Object.fromEntries(new URLSearchParams(route.renderedSearch))\n )\n )\n }\n // Non-page segments are compared using the same function as the server\n return matchSegment(cachedSegment, currentSegment)\n}\n\n// -----------------------------------------------------------------------------\n// The remainder of the module is a MinHeap implementation. Try not to put any\n// logic below here unless it's related to the heap algorithm. We can extract\n// this to a separate module if/when we need multiple kinds of heaps.\n// -----------------------------------------------------------------------------\n\nfunction compareQueuePriority(a: PrefetchTask, b: PrefetchTask) {\n // Since the queue is a MinHeap, this should return a positive number if b is\n // higher priority than a, and a negative number if a is higher priority\n // than b.\n\n // `priority` is an integer, where higher numbers are higher priority.\n const priorityDiff = b.priority - a.priority\n if (priorityDiff !== 0) {\n return priorityDiff\n }\n\n // If the priority is the same, check which phase the prefetch is in — is it\n // prefetching the route tree, or the segments? Route trees are prioritized.\n const phaseDiff = b.phase - a.phase\n if (phaseDiff !== 0) {\n return phaseDiff\n }\n\n // Finally, check the insertion order. `sortId` is an incrementing counter\n // assigned to prefetches. We want to process the newest prefetches first.\n return b.sortId - a.sortId\n}\n\nfunction heapPush(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n const index = heap.length\n heap.push(node)\n node._heapIndex = index\n heapSiftUp(heap, node, index)\n}\n\nfunction heapPeek(heap: Array<PrefetchTask>): PrefetchTask | null {\n return heap.length === 0 ? null : heap[0]\n}\n\nfunction heapPop(heap: Array<PrefetchTask>): PrefetchTask | null {\n if (heap.length === 0) {\n return null\n }\n const first = heap[0]\n first._heapIndex = -1\n const last = heap.pop() as PrefetchTask\n if (last !== first) {\n heap[0] = last\n last._heapIndex = 0\n heapSiftDown(heap, last, 0)\n }\n return first\n}\n\nfunction heapDelete(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n const index = node._heapIndex\n if (index !== -1) {\n node._heapIndex = -1\n if (heap.length !== 0) {\n const last = heap.pop() as PrefetchTask\n if (last !== node) {\n heap[index] = last\n last._heapIndex = index\n heapSiftDown(heap, last, index)\n }\n }\n }\n}\n\nfunction heapResift(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n const index = node._heapIndex\n if (index !== -1) {\n if (index === 0) {\n heapSiftDown(heap, node, 0)\n } else {\n const parentIndex = (index - 1) >>> 1\n const parent = heap[parentIndex]\n if (compareQueuePriority(parent, node) > 0) {\n // The parent is larger. Sift up.\n heapSiftUp(heap, node, index)\n } else {\n // The parent is smaller (or equal). Sift down.\n heapSiftDown(heap, node, index)\n }\n }\n }\n}\n\nfunction heapSiftUp(\n heap: Array<PrefetchTask>,\n node: PrefetchTask,\n i: number\n): void {\n let index = i\n while (index > 0) {\n const parentIndex = (index - 1) >>> 1\n const parent = heap[parentIndex]\n if (compareQueuePriority(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node\n node._heapIndex = parentIndex\n heap[index] = parent\n parent._heapIndex = index\n\n index = parentIndex\n } else {\n // The parent is smaller. Exit.\n return\n }\n }\n}\n\nfunction heapSiftDown(\n heap: Array<PrefetchTask>,\n node: PrefetchTask,\n i: number\n): void {\n let index = i\n const length = heap.length\n const halfLength = length >>> 1\n while (index < halfLength) {\n const leftIndex = (index + 1) * 2 - 1\n const left = heap[leftIndex]\n const rightIndex = leftIndex + 1\n const right = heap[rightIndex]\n\n // If the left or right node is smaller, swap with the smaller of those.\n if (compareQueuePriority(left, node) < 0) {\n if (rightIndex < length && compareQueuePriority(right, left) < 0) {\n heap[index] = right\n right._heapIndex = index\n heap[rightIndex] = node\n node._heapIndex = rightIndex\n\n index = rightIndex\n } else {\n heap[index] = left\n left._heapIndex = index\n heap[leftIndex] = node\n node._heapIndex = leftIndex\n\n index = leftIndex\n }\n } else if (rightIndex < length && compareQueuePriority(right, node) < 0) {\n heap[index] = right\n right._heapIndex = index\n heap[rightIndex] = node\n node._heapIndex = rightIndex\n\n index = rightIndex\n } else {\n // Neither child is smaller. Exit.\n return\n }\n }\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n PrefetchPriority,\n} from './segment-cache/types'\nimport { createCacheKey } from './segment-cache/cache-key'\nimport {\n type PrefetchTask,\n schedulePrefetchTask as scheduleSegmentPrefetchTask,\n cancelPrefetchTask,\n reschedulePrefetchTask,\n isPrefetchTaskDirty,\n} from './segment-cache/scheduler'\nimport { startTransition } from 'react'\n\ntype LinkElement = HTMLAnchorElement | SVGAElement\n\ntype Element = LinkElement | HTMLFormElement\n\n// Properties that are shared between Link and Form instances. We use the same\n// shape for both to prevent a polymorphic de-opt in the VM.\ntype LinkOrFormInstanceShared = {\n router: AppRouterInstance\n fetchStrategy: PrefetchTaskFetchStrategy\n\n isVisible: boolean\n\n // The most recently initiated prefetch task. It may or may not have\n // already completed. The same prefetch task object can be reused across\n // multiple prefetches of the same link.\n prefetchTask: PrefetchTask | null\n}\n\nexport type FormInstance = LinkOrFormInstanceShared & {\n prefetchHref: string\n setOptimisticLinkStatus: null\n}\n\ntype PrefetchableLinkInstance = LinkOrFormInstanceShared & {\n prefetchHref: string\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {\n prefetchHref: null\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype PrefetchableInstance = PrefetchableLinkInstance | FormInstance\n\nexport type LinkInstance =\n | PrefetchableLinkInstance\n | NonPrefetchableLinkInstance\n\n// Tracks the most recently navigated link instance. When null, indicates\n// the current navigation was not initiated by a link click.\nlet linkForMostRecentNavigation: LinkInstance | null = null\n\n// Status object indicating link is pending\nexport const PENDING_LINK_STATUS = { pending: true }\n\n// Status object indicating link is idle\nexport const IDLE_LINK_STATUS = { pending: false }\n\n// Updates the loading state when navigating between links\n// - Resets the previous link's loading state\n// - Sets the new link's loading state\n// - Updates tracking of current navigation\nexport function setLinkForCurrentNavigation(link: LinkInstance | null) {\n startTransition(() => {\n linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS)\n link?.setOptimisticLinkStatus(PENDING_LINK_STATUS)\n linkForMostRecentNavigation = link\n })\n}\n\n// Unmounts the current link instance from navigation tracking\nexport function unmountLinkForCurrentNavigation(link: LinkInstance) {\n if (linkForMostRecentNavigation === link) {\n linkForMostRecentNavigation = null\n }\n}\n\n// Use a WeakMap to associate a Link instance with its DOM element. This is\n// used by the IntersectionObserver to track the link's visibility.\nconst prefetchable:\n | WeakMap<Element, PrefetchableInstance>\n | Map<Element, PrefetchableInstance> =\n typeof WeakMap === 'function' ? new WeakMap() : new Map()\n\n// A Set of the currently visible links. We re-prefetch visible links after a\n// cache invalidation, or when the current URL changes. It's a separate data\n// structure from the WeakMap above because only the visible links need to\n// be enumerated.\nconst prefetchableAndVisible: Set<PrefetchableInstance> = new Set()\n\n// A single IntersectionObserver instance shared by all <Link> components.\nconst observer: IntersectionObserver | null =\n typeof IntersectionObserver === 'function'\n ? new IntersectionObserver(handleIntersect, {\n rootMargin: '200px',\n })\n : null\n\nfunction observeVisibility(element: Element, instance: PrefetchableInstance) {\n const existingInstance = prefetchable.get(element)\n if (existingInstance !== undefined) {\n // This shouldn't happen because each <Link> component should have its own\n // anchor tag instance, but it's defensive coding to avoid a memory leak in\n // case there's a logical error somewhere else.\n unmountPrefetchableInstance(element)\n }\n // Only track prefetchable links that have a valid prefetch URL\n prefetchable.set(element, instance)\n if (observer !== null) {\n observer.observe(element)\n }\n}\n\nfunction coercePrefetchableUrl(href: string): URL | null {\n if (typeof window !== 'undefined') {\n const { createPrefetchURL } =\n require('./app-router-utils') as typeof import('./app-router-utils')\n\n try {\n return createPrefetchURL(href)\n } catch {\n // createPrefetchURL sometimes throws an error if an invalid URL is\n // provided, though I'm not sure if it's actually necessary.\n // TODO: Consider removing the throw from the inner function, or change it\n // to reportError. Or maybe the error isn't even necessary for automatic\n // prefetches, just navigations.\n const reportErrorFn =\n typeof reportError === 'function' ? reportError : console.error\n reportErrorFn(\n `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n )\n return null\n }\n } else {\n return null\n }\n}\n\nexport function mountLinkInstance(\n element: LinkElement,\n href: string,\n router: AppRouterInstance,\n fetchStrategy: PrefetchTaskFetchStrategy,\n prefetchEnabled: boolean,\n setOptimisticLinkStatus: (status: { pending: boolean }) => void\n): LinkInstance {\n if (prefetchEnabled) {\n const prefetchURL = coercePrefetchableUrl(href)\n if (prefetchURL !== null) {\n const instance: PrefetchableLinkInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: prefetchURL.href,\n setOptimisticLinkStatus,\n }\n // We only observe the link's visibility if it's prefetchable. For\n // example, this excludes links to external URLs.\n observeVisibility(element, instance)\n return instance\n }\n }\n // If the link is not prefetchable, we still create an instance so we can\n // track its optimistic state (i.e. useLinkStatus).\n const instance: NonPrefetchableLinkInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: null,\n setOptimisticLinkStatus,\n }\n return instance\n}\n\nexport function mountFormInstance(\n element: HTMLFormElement,\n href: string,\n router: AppRouterInstance,\n fetchStrategy: PrefetchTaskFetchStrategy\n): void {\n const prefetchURL = coercePrefetchableUrl(href)\n if (prefetchURL === null) {\n // This href is not prefetchable, so we don't track it.\n // TODO: We currently observe/unobserve a form every time its href changes.\n // For Links, this isn't a big deal because the href doesn't usually change,\n // but for forms it's extremely common. We should optimize this.\n return\n }\n const instance: FormInstance = {\n router,\n fetchStrategy,\n isVisible: false,\n prefetchTask: null,\n prefetchHref: prefetchURL.href,\n setOptimisticLinkStatus: null,\n }\n observeVisibility(element, instance)\n}\n\nexport function unmountPrefetchableInstance(element: Element) {\n const instance = prefetchable.get(element)\n if (instance !== undefined) {\n prefetchable.delete(element)\n prefetchableAndVisible.delete(instance)\n const prefetchTask = instance.prefetchTask\n if (prefetchTask !== null) {\n cancelPrefetchTask(prefetchTask)\n }\n }\n if (observer !== null) {\n observer.unobserve(element)\n }\n}\n\nfunction handleIntersect(entries: Array<IntersectionObserverEntry>) {\n for (const entry of entries) {\n // Some extremely old browsers or polyfills don't reliably support\n // isIntersecting so we check intersectionRatio instead. (Do we care? Not\n // really. But whatever this is fine.)\n const isVisible = entry.intersectionRatio > 0\n onLinkVisibilityChanged(entry.target as HTMLAnchorElement, isVisible)\n }\n}\n\nexport function onLinkVisibilityChanged(element: Element, isVisible: boolean) {\n if (process.env.NODE_ENV !== 'production') {\n // Prefetching on viewport is disabled in development for performance\n // reasons, because it requires compiling the target page.\n // TODO: Investigate re-enabling this.\n return\n }\n\n const instance = prefetchable.get(element)\n if (instance === undefined) {\n return\n }\n\n instance.isVisible = isVisible\n if (isVisible) {\n prefetchableAndVisible.add(instance)\n } else {\n prefetchableAndVisible.delete(instance)\n }\n rescheduleLinkPrefetch(instance, PrefetchPriority.Default)\n}\n\nexport function onNavigationIntent(\n element: HTMLAnchorElement | SVGAElement,\n unstable_upgradeToDynamicPrefetch: boolean\n) {\n const instance = prefetchable.get(element)\n if (instance === undefined) {\n return\n }\n // Prefetch the link on hover/touchstart.\n if (instance !== undefined) {\n if (\n process.env.__NEXT_DYNAMIC_ON_HOVER &&\n unstable_upgradeToDynamicPrefetch\n ) {\n // Switch to a full prefetch\n instance.fetchStrategy = FetchStrategy.Full\n }\n rescheduleLinkPrefetch(instance, PrefetchPriority.Intent)\n }\n}\n\nfunction rescheduleLinkPrefetch(\n instance: PrefetchableInstance,\n priority: PrefetchPriority.Default | PrefetchPriority.Intent\n) {\n // Ensures that app-router-instance is not compiled in the server bundle\n if (typeof window !== 'undefined') {\n const existingPrefetchTask = instance.prefetchTask\n\n if (!instance.isVisible) {\n // Cancel any in-progress prefetch task. (If it already finished then this\n // is a no-op.)\n if (existingPrefetchTask !== null) {\n cancelPrefetchTask(existingPrefetchTask)\n }\n // We don't need to reset the prefetchTask to null upon cancellation; an\n // old task object can be rescheduled with reschedulePrefetchTask. This is a\n // micro-optimization but also makes the code simpler (don't need to\n // worry about whether an old task object is stale).\n return\n }\n\n const { getCurrentAppRouterState } =\n require('./app-router-instance') as typeof import('./app-router-instance')\n\n const appRouterState = getCurrentAppRouterState()\n if (appRouterState !== null) {\n const treeAtTimeOfPrefetch = appRouterState.tree\n if (existingPrefetchTask === null) {\n // Initiate a prefetch task.\n const nextUrl = appRouterState.nextUrl\n const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n instance.prefetchTask = scheduleSegmentPrefetchTask(\n cacheKey,\n treeAtTimeOfPrefetch,\n instance.fetchStrategy,\n priority,\n null\n )\n } else {\n // We already have an old task object that we can reschedule. This is\n // effectively the same as canceling the old task and creating a new one.\n reschedulePrefetchTask(\n existingPrefetchTask,\n treeAtTimeOfPrefetch,\n instance.fetchStrategy,\n priority\n )\n }\n }\n }\n}\n\nexport function pingVisibleLinks(\n nextUrl: string | null,\n tree: FlightRouterState\n) {\n // For each currently visible link, cancel the existing prefetch task (if it\n // exists) and schedule a new one. This is effectively the same as if all the\n // visible links left and then re-entered the viewport.\n //\n // This is called when the Next-Url or the base tree changes, since those\n // may affect the result of a prefetch task. It's also called after a\n // cache invalidation.\n for (const instance of prefetchableAndVisible) {\n const task = instance.prefetchTask\n if (task !== null && !isPrefetchTaskDirty(task, nextUrl, tree)) {\n // The cache has not been invalidated, and none of the inputs have\n // changed. Bail out.\n continue\n }\n // Something changed. Cancel the existing prefetch task and schedule a\n // new one.\n if (task !== null) {\n cancelPrefetchTask(task)\n }\n const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n instance.prefetchTask = scheduleSegmentPrefetchTask(\n cacheKey,\n tree,\n instance.fetchStrategy,\n PrefetchPriority.Default,\n null\n )\n }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n return pathHasPrefix(path, basePath)\n}\n","import { isAbsoluteUrl, getLocationOrigin } from '../../utils'\nimport { hasBasePath } from '../../../../client/has-base-path'\n\n/**\n * Detects whether a given url is routable by the Next.js router (browser only).\n */\nexport function isLocalURL(url: string): boolean {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!isAbsoluteUrl(url)) return true\n try {\n // absolute urls can be local if they are on the same origin\n const locationOrigin = getLocationOrigin()\n const resolved = new URL(url, locationOrigin)\n return resolved.origin === locationOrigin && hasBasePath(resolved.pathname)\n } catch (_) {\n return false\n }\n}\n","let errorOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const errors = new Set<string>()\n errorOnce = (msg: string) => {\n if (!errors.has(msg)) {\n console.error(msg)\n }\n errors.add(msg)\n }\n}\n\nexport { errorOnce }\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import \"./styles.css\";\n\nconst AnimatedBackground = () => {\n return (\n <div className=\"fixed inset-0 -z-10 overflow-hidden bg-black\">\n {/* Radial gradient spotlights with smooth random floating */}\n <div className=\"orb1 absolute top-0 left-0 w-[800px] h-[800px] bg-blue-600 rounded-full blur-[150px]\" />\n <div className=\"orb2 absolute top-1/3 right-0 w-[700px] h-[700px] bg-purple-600 rounded-full blur-[150px]\" />\n <div className=\"orb3 absolute bottom-0 left-1/2 w-[750px] h-[750px] bg-pink-600 rounded-full blur-[150px]\" />\n\n {/* Grid pattern overlay */}\n <div className=\"absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.03)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.03)_1px,transparent_1px)] bg-[size:64px_64px]\" />\n </div>\n );\n};\n\nexport default AnimatedBackground;\n","import Link from \"next/link\";\nimport { HOME_PAGE_PATH } from \"@/utils/data\";\nimport { AppNameProps } from \"./types\";\n\nconst AppName = ({ style }: AppNameProps) => {\n return (\n <Link href={HOME_PAGE_PATH} className=\"cursor-pointer\">\n <h1\n className=\"font-extrabold bg-gradient-to-r from-blue-500 to-indigo-500 bg-clip-text text-transparent font-googleSansFlex hover:from-blue-400 hover:to-indigo-400 transition-all\"\n style={style}\n >\n FAPI\n </h1>\n </Link>\n );\n};\n\nexport default AppName;\n","import { Fapi } from \"@/types/fapi\";\n\nexport const FAPI_STORAGE_FOLDER_NAME = \".fapi-storage\";\nexport const DYNAMIC_STORAGE_PATH = (port: string) =>\n `fapi-endpoints-${port}.json`;\nexport const FAPI: Fapi = {\n SUPPORTED_HTTP_METHODS: {\n GET: \"GET\",\n PUT: \"PUT\",\n POST: \"POST\",\n DELETE: \"DELETE\",\n },\n SUPPORTED_HTTP_RESPONSE_STATUS_CODE: {\n OK_200: {\n code: 200,\n label: \"200 - OK\",\n },\n CREATED_201: {\n code: 201,\n label: \"201 - Created\",\n },\n BAD_REQUEST_400: {\n code: 400,\n label: \"400 - Bad Request\",\n },\n UNAUTHORIZED_401: {\n code: 401,\n label: \"401 - Unauthorized\",\n },\n FORBIDDEN_403: {\n code: 403,\n label: \"403 - Forbidden\",\n },\n NOT_FOUND_404: {\n code: 404,\n label: \"404 - Not Found\",\n },\n METHOD_NOT_ALLOWED_405: {\n code: 405,\n label: \"405 - Method Not Allowed\",\n },\n INTERNAL_SERVER_ERROR_500: {\n code: 500,\n label: \"500 - Internal Server Error\",\n },\n SERVICE_UNAVAILABLE_503: {\n code: 503,\n label: \"503 - Service Unavailable\",\n },\n },\n SUPPORTED_RESPONSE_DELAYS: {\n NO_DELAY: {\n label: \"0 sec\",\n value: 0,\n },\n TWO_SECONDS: {\n label: \"2 sec\",\n value: 2000,\n },\n FIVE_SECONDS: {\n label: \"5 sec\",\n value: 5000,\n },\n TEN_SECONDS: {\n label: \"10 sec\",\n value: 10000,\n },\n TWENTY_SECONDS: {\n label: \"20 sec\",\n value: 20000,\n },\n SIXTY_SECONDS: {\n label: \"60 sec\",\n value: 60000,\n },\n },\n};\n\nexport const STATUS_COLORS = {\n SUCCESS: \"#4CAF50\",\n ERROR: \"#f44336\",\n};\n\nexport const FAPI_REGEX = {\n ENDPOINT_PATH: /^[/a-zA-Z0-9-_]+(?:[?&=a-zA-Z0-9-_,'\"% ])*$/,\n PROJECT_NAME: /^[a-zA-Z0-9 ]*$/,\n};\n\nexport const UPDATE_PROJECT_NAME_API_PATH = \"/api/update-project-name\";\n\nexport const FAPI_EXPORT_FILENAME_PREFIX = \"FAPI-Endpoints\";\n\n// FAPI Limits (Backend/business constraints)\nexport const FAPI_LIMITS = {\n MAX_ENDPOINTS: 1000, // Total limit for endpoints (applies to both file import and total count)\n MAX_FILE_SIZE_MB: 5,\n MAX_FILE_SIZE_BYTES: 5 * 1024 * 1024, // 5MB in bytes\n} as const;\n\n// UI Limits (Frontend/presentation constraints)\nexport const UI_LIMITS = {\n PROJECT_NAME_MAX_LENGTH: 50,\n UI_CONTAINER_MAX_WIDTH: \"1440px\",\n} as const;\n\n// Import Strategies\nexport const IMPORT_STRATEGY = {\n MERGE: \"merge\",\n REPLACE: \"replace\",\n} as const;\n\nexport type ImportStrategy =\n (typeof IMPORT_STRATEGY)[keyof typeof IMPORT_STRATEGY];\n","export const CREATE_API_ENDPOINT_API_PATH = \"/api/create-endpoint\";\nexport const DELETE_API_ENDPOINT_API_PATH = \"/api/delete-endpoint\";\nexport const UPDATE_ENDPOINT_API_PATH = \"/api/update-endpoint\";\nexport const FAPI_HEALTH_CHECK_API_PATH = \"/api/fapi-health-check\";\nexport const GET_ENDPOINTS_API_PATH = \"/api/get-endpoints\";\nexport const IMPORT_ENDPOINTS_API_PATH = \"/api/import-endpoints\";\n","export const HOME_PAGE_PATH = \"/home\";\nexport const FAPI_SIMULATOR_PAGE_PATH = \"/fapi-simulator\";\n","import { memo } from \"react\";\nimport { BADGE_COLORS } from \"./data\";\nimport { BadgeProps } from \"./types\";\n\nconst Badge = ({ method }: BadgeProps) => {\n const color = BADGE_COLORS[method];\n\n return (\n <span\n className={`inline-flex items-center justify-center px-2 py-1 text-base font-medium rounded-md font-googleSansCode ${color.background} ${color.text}`}\n >\n {method}\n </span>\n );\n};\n\nexport default memo(Badge);\n","import { HttpMethods } from \"@/types/fapi\";\n\ntype BadgeColors = {\n [key in HttpMethods]: {\n background: string;\n text: string;\n };\n};\nexport const BADGE_COLORS: BadgeColors = {\n GET: {\n background: \"bg-emerald-500/25\",\n text: \"text-emerald-500\",\n },\n POST: {\n background: \"bg-blue-500/25\",\n text: \"text-blue-500\",\n },\n PUT: {\n background: \"bg-amber-500/25\",\n text: \"text-amber-500\",\n },\n DELETE: {\n background: \"bg-red-500/25\",\n text: \"text-red-500\",\n },\n};\n","export const BUTTON_STYLES = {\n disabled: \"bg-gray-700 text-gray-500 cursor-not-allowed border-2 border-gray-700\",\n primary: \"bg-blue-600 text-white hover:bg-black hover:text-blue-600 border-2 border-blue-600 hover:border-black cursor-pointer\",\n secondary: \"bg-transparent border-2 border-gray-600 text-gray-300 hover:bg-gray-800 hover:border-gray-500 hover:text-white cursor-pointer\",\n danger: \"bg-red-600 text-white hover:bg-red-700 border-2 border-red-600 hover:border-red-700 cursor-pointer\",\n};\n\nexport const GRADIENT_COLORS = {\n from: \"#0EA5E9\",\n via: \"#8B5CF6\",\n to: \"#EC4899\",\n};\n","import { ButtonProps } from \"./types\";\nimport { BUTTON_STYLES } from \"./data\";\n\nexport const getButtonClasses = (\n variant: ButtonProps[\"variant\"],\n disabled?: boolean\n): string => {\n if (disabled) {\n return BUTTON_STYLES.disabled;\n }\n\n switch (variant) {\n case \"primary\":\n return BUTTON_STYLES.primary;\n case \"secondary\":\n return BUTTON_STYLES.secondary;\n case \"danger\":\n return BUTTON_STYLES.danger;\n default:\n return \"\";\n }\n};\n","import { ButtonProps } from \"./types\";\nimport { getButtonClasses } from \"./utils\";\n\nconst Button = ({\n name,\n onClick,\n disabled,\n variant = \"primary\",\n}: ButtonProps) => {\n\n const isPrimary = variant === \"primary\";\n\n return (\n <div className=\"relative group w-full sm:w-auto\">\n {/* Glow effects - only for primary variant and when not disabled */}\n {!disabled && isPrimary && (\n <>\n <div className=\"absolute -inset-6 bg-gradient-to-r from-[#0EA5E9] via-[#8B5CF6] to-[#EC4899] rounded-3xl opacity-0 group-hover:opacity-5 blur-2xl transition-all duration-500 group-hover:duration-200 ease-out -z-10\"></div>\n\n {/* Middle glow - medium spread */}\n <div className=\"absolute -inset-4 bg-gradient-to-r from-[#0EA5E9] via-[#8B5CF6] to-[#EC4899] rounded-2xl opacity-0 group-hover:opacity-15 blur-xl transition-all duration-500 group-hover:duration-200 ease-out -z-10\"></div>\n\n {/* Inner glow - close to button */}\n <div className=\"absolute -inset-[3px] bg-gradient-to-r from-[#0EA5E9] via-[#8B5CF6] to-[#EC4899] rounded-xl opacity-0 group-hover:opacity-30 blur-sm transition-all duration-500 group-hover:duration-200 ease-out -z-10\"></div>\n\n {/* Sharp border */}\n <div className=\"absolute -inset-[1px] bg-gradient-to-r from-[#0EA5E9] via-[#8B5CF6] to-[#EC4899] rounded-lg opacity-0 group-hover:opacity-80 transition-all duration-500 group-hover:duration-200 ease-out\"></div>\n </>\n )}\n\n <button\n onClick={onClick}\n disabled={disabled}\n className={`relative w-full sm:w-auto font-googleSansFlex font-normal px-6 py-3 text-base rounded-lg transition-all duration-500 ease-out text-center flex justify-center items-center ${getButtonClasses(variant, disabled)}`}\n >\n {name}\n </button>\n </div>\n );\n};\n\nexport default Button;\n","export const CARD_SIZES = {\n width: {\n sm: \"w-64\",\n md: \"w-80\",\n lg: \"w-96\",\n xl: \"w-[32rem]\",\n full: \"w-full\",\n },\n height: {\n sm: \"h-32\",\n md: \"h-48\",\n lg: \"h-64\",\n xl: \"h-80\",\n full: \"h-full\",\n },\n};\n","import { CardProps } from \"./types\";\n\nexport const getBorderClasses = (\n borderGradient: CardProps[\"borderGradient\"]\n): string => {\n if (borderGradient === \"hover\") {\n return \"bg-gray-800 group-hover:bg-gradient-to-r group-hover:from-[#0EA5E9] group-hover:via-[#8B5CF6] group-hover:to-[#EC4899] transition-all duration-300 ease-in-out\";\n }\n if (borderGradient === true) {\n return \"bg-gradient-to-r from-[#0EA5E9] via-[#8B5CF6] to-[#EC4899]\";\n }\n return \"bg-gray-800\";\n};\n","import { CARD_SIZES } from \"./data\";\nimport { CardProps } from \"./types\";\nimport { getBorderClasses } from \"./utils\";\n\nconst Card = ({\n children,\n className = \"\",\n width = \"md\",\n height = \"md\",\n borderGradient = \"hover\",\n}: CardProps) => {\n\n return (\n <div className=\"group relative inline-block transition-all duration-300 hover:scale-[1.02]\">\n {/* Animated gradient glow on hover */}\n <div className=\"absolute -inset-1 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 rounded-lg blur opacity-0 group-hover:opacity-30 transition duration-500\"></div>\n\n <div className={`relative rounded-lg p-[1px] ${getBorderClasses(borderGradient)} transition-all duration-300 hover:shadow-[0_0_30px_rgba(139,92,246,0.3)]`}>\n <div\n className={`relative rounded-lg bg-black p-4 ${CARD_SIZES.width[width]} ${CARD_SIZES.height[height]} ${className}`}\n >\n {children}\n </div>\n </div>\n </div>\n );\n};\n\nexport default Card;\n","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useForkRef from '@mui/utils/useForkRef';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport exactProp from '@mui/utils/exactProp';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getActiveElement from \"../utils/getActiveElement.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://issues.chromium.org/issues/41283952\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * @ignore - internal component.\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n const handleRef = useForkRef(getReactElementRef(children), rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const activeElement = getActiveElement(doc);\n if (!rootRef.current.contains(activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const activeElement = getActiveElement(doc);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // activeElement refers to the origin.\n if (activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n const activeEl = getActiveElement(doc);\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(activeEl)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && activeEl !== sentinelStart.current && activeEl !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (activeEl !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (activeEl === sentinelStart.current || activeEl === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n const isShiftTab = Boolean(lastKeydown.current?.shiftKey && lastKeydown.current?.key === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // for example https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n const activeEl = getActiveElement(doc);\n if (activeEl && activeEl.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport default FocusTrap;","/**\n * Gets the actual active element, traversing through shadow roots if necessary.\n *\n * When an element inside a shadow root has focus, `document.activeElement` returns\n * the shadow host element. This function recursively traverses shadow roots to find\n * the actual focused element.\n *\n * @param root - The document or shadow root to start the search from.\n * @returns The actual focused element, or null if no element has focus.\n *\n * @example\n * // In a shadow DOM context\n * const activeElement = getActiveElement(document);\n * // Returns the actual focused element inside the shadow root\n *\n * @example\n * // Starting from a specific document\n * const activeElement = getActiveElement(ownerDocument(element));\n */\nexport default function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}","import getActiveElement from '@mui/utils/getActiveElement';\nexport default getActiveElement;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { reflow, getTransitionProps } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const enableStrictModeCompat = true;\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout,\n ...other,\n children: (state, {\n ownerState,\n ...restChildProps\n }) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...restChildProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport Fade from \"../Fade/index.js\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent',\n variants: [{\n props: {\n invisible: true\n },\n style: {\n backgroundColor: 'transparent'\n }\n }]\n});\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n invisible = false,\n open,\n components = {},\n componentsProps = {},\n slotProps = {},\n slots = {},\n TransitionComponent: TransitionComponentProp,\n transitionDuration,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n invisible\n };\n const classes = useUtilityClasses(ownerState);\n const backwardCompatibleSlots = {\n transition: TransitionComponentProp,\n root: components.Root,\n ...slots\n };\n const backwardCompatibleSlotProps = {\n ...componentsProps,\n ...slotProps\n };\n const externalForwardedProps = {\n component,\n slots: backwardCompatibleSlots,\n slotProps: backwardCompatibleSlotProps\n };\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: BackdropRoot,\n externalForwardedProps,\n className: clsx(classes.root, className),\n ownerState\n });\n const [TransitionSlot, transitionProps] = useSlot('transition', {\n elementType: Fade,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsx(TransitionSlot, {\n in: open,\n timeout: transitionDuration,\n ...other,\n ...transitionProps,\n children: /*#__PURE__*/_jsx(RootSlot, {\n \"aria-hidden\": true,\n ...rootProps,\n classes: classes,\n ref: ref,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport FocusTrap from \"../Unstable_TrapFocus/index.js\";\nimport Portal from \"../Portal/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Backdrop from \"../Backdrop/index.js\";\nimport useModal from \"./useModal.js\";\nimport { getModalUtilityClass } from \"./modalClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.open && ownerState.exited,\n style: {\n visibility: 'hidden'\n }\n }]\n})));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop'\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n classes: classesProp,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onClose,\n onTransitionEnter,\n onTransitionExited,\n open,\n slotProps = {},\n slots = {},\n // eslint-disable-next-line react/prop-types\n theme,\n ...other\n } = props;\n const propsWithDefaults = {\n ...props,\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal({\n ...propsWithDefaults,\n rootRef: ref\n });\n const ownerState = {\n ...propsWithDefaults,\n exited\n };\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const externalForwardedProps = {\n slots: {\n root: components.Root,\n backdrop: components.Backdrop,\n ...slots\n },\n slotProps: {\n ...componentsProps,\n ...slotProps\n }\n };\n const [RootSlot, rootProps] = useSlot('root', {\n ref,\n elementType: ModalRoot,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other,\n component\n },\n getSlotProps: getRootProps,\n ownerState,\n className: clsx(className, classes?.root, !ownerState.open && ownerState.exited && classes?.hidden)\n });\n const [BackdropSlot, backdropProps] = useSlot('backdrop', {\n ref: BackdropProps?.ref,\n elementType: BackdropComponent,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps({\n ...otherHandlers,\n onClick: event => {\n if (otherHandlers?.onClick) {\n otherHandlers.onClick(event);\n }\n }\n });\n },\n className: clsx(BackdropProps?.className, classes?.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, {\n ...backdropProps\n }) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Backdrop: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","'use client';\n\nimport * as React from 'react';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport createChainedFunction from '@mui/utils/createChainedFunction';\nimport extractEventHandlers from '@mui/utils/extractEventHandlers';\nimport { ModalManager, ariaHidden } from \"./ModalManager.js\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\nconst noop = () => {};\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst manager = new ModalManager();\nfunction useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = () => manager.isTopModal(getModal());\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n otherHandlers.onKeyDown?.(event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n otherHandlers.onClick?.(event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = {\n ...propsEventHandlers,\n ...otherHandlers\n };\n return {\n /*\n * Marking an element with the role presentation indicates to assistive technology\n * that this element should be ignored; it exists to support the web application and\n * is not meant for humans to interact with directly.\n * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md\n */\n role: 'presentation',\n ...externalEventHandlers,\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n };\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return {\n 'aria-hidden': true,\n ...externalEventHandlers,\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n };\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children?.props.onEnter ?? noop),\n onExited: createChainedFunction(handleExited, children?.props.onExited ?? noop)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}\nexport default useModal;","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(win = window) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = win.document.documentElement.clientWidth;\n return win.innerWidth - documentWidth;\n}","import ownerWindow from '@mui/utils/ownerWindow';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport getScrollbarSize from '@mui/utils/getScrollbarSize';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, hide) {\n if (hide) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, hide) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = !blacklist.includes(element);\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, hide);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerWindow(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = parent?.nodeName === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","/**\n * Type guard to check if the object has a \"main\" property of type string.\n *\n * @param obj - the object to check\n * @returns boolean\n */\nfunction hasCorrectMainProperty(obj) {\n return typeof obj.main === 'string';\n}\n/**\n * Checks if the object conforms to the SimplePaletteColorOptions type.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param obj - The object to check\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns boolean\n */\nfunction checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {\n if (!hasCorrectMainProperty(obj)) {\n return false;\n }\n for (const value of additionalPropertiesToCheck) {\n if (!obj.hasOwnProperty(value) || typeof obj[value] !== 'string') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Creates a filter function used to filter simple palette color options.\n * The minimum requirement is that the object has a \"main\" property of type string, this is always checked.\n * Optionally, you can pass additional properties to check.\n *\n * @param additionalPropertiesToCheck - Array containing \"light\", \"dark\", and/or \"contrastText\"\n * @returns ([, value]: [any, PaletteColorOptions]) => boolean\n */\nexport default function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {\n return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);\n}","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root'\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native <a /> element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);\n const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);\n const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);\n const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);\n const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n }, disableTouchRipple);\n const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);\n const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);\n const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);\n const handleBlur = useRippleHandler(ripple, 'stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && focusVisible && !event.defaultPrevented) {\n ripple.stop(event, () => {\n ripple.pulsate(event);\n });\n }\n if (onKeyUp) {\n onKeyUp(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {\n onClick(event);\n }\n });\n let ComponentProp = component;\n if (ComponentProp === 'button' && (other.href || other.to)) {\n ComponentProp = LinkComponent;\n }\n const buttonProps = {};\n if (ComponentProp === 'button') {\n const hasFormAttributes = !!other.formAction;\n // ButtonBase was defaulting to type=\"button\" when no type prop was provided, which prevented form submission and broke formAction functionality.\n // The fix checks for form-related attributes and skips the default type to allow the browser's natural submit behavior (type=\"submit\").\n buttonProps.type = type === undefined && !hasFormAttributes ? 'button' : type;\n buttonProps.disabled = disabled;\n } else {\n if (!other.href && !other.to) {\n buttonProps.role = 'button';\n }\n if (disabled) {\n buttonProps['aria-disabled'] = disabled;\n }\n }\n const handleRef = useForkRef(ref, buttonRef);\n const ownerState = {\n ...props,\n centerRipple,\n component,\n disabled,\n disableRipple,\n disableTouchRipple,\n focusRipple,\n tabIndex,\n focusVisible\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(ButtonBaseRoot, {\n as: ComponentProp,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n onBlur: handleBlur,\n onClick: onClick,\n onContextMenu: handleContextMenu,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex,\n type: type,\n ...buttonProps,\n ...other,\n children: [children, enableTouchRipple ? /*#__PURE__*/_jsx(TouchRipple, {\n ref: handleRippleRef,\n center: centerRipple,\n ...TouchRippleProps\n }) : null]\n });\n});\nfunction useRippleHandler(ripple, rippleAction, eventCallback, skipRippleAction = false) {\n return useEventCallback(event => {\n if (eventCallback) {\n eventCallback(event);\n }\n if (!skipRippleAction) {\n ripple[rippleAction](event);\n }\n return true;\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ButtonBase.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: refType,\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n formAction: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n /**\n * @ignore\n */\n href: PropTypes /* @typescript-to-proptypes-ignore */.any,\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent: PropTypes.elementType,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * @ignore\n */\n onContextMenu: PropTypes.func,\n /**\n * @ignore\n */\n onDragLeave: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n /**\n * @ignore\n */\n onMouseUp: PropTypes.func,\n /**\n * @ignore\n */\n onTouchEnd: PropTypes.func,\n /**\n * @ignore\n */\n onTouchMove: PropTypes.func,\n /**\n * @ignore\n */\n onTouchStart: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n /**\n * A ref that points to the `TouchRipple` element.\n */\n touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n pulsate: PropTypes.func.isRequired,\n start: PropTypes.func.isRequired,\n stop: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])\n} : void 0;\nexport default ButtonBase;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touch devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { unstable_useId as useId } from \"../utils/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport CircularProgress from \"../CircularProgress/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport iconButtonClasses, { getIconButtonUtilityClass } from \"./iconButtonClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size,\n loading\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],\n loadingIndicator: ['loadingIndicator'],\n loadingWrapper: ['loadingWrapper']\n };\n return composeClasses(slots, getIconButtonUtilityClass, classes);\n};\nconst IconButtonRoot = styled(ButtonBase, {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.loading && styles.loading, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n color: (theme.vars || theme).palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: props => !props.disableRipple,\n style: {\n '--IconButton-hoverBg': theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity),\n '&:hover': {\n backgroundColor: 'var(--IconButton-hoverBg)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }, {\n props: {\n edge: 'start'\n },\n style: {\n marginLeft: -12\n }\n }, {\n props: {\n edge: 'start',\n size: 'small'\n },\n style: {\n marginLeft: -3\n }\n }, {\n props: {\n edge: 'end'\n },\n style: {\n marginRight: -12\n }\n }, {\n props: {\n edge: 'end',\n size: 'small'\n },\n style: {\n marginRight: -3\n }\n }]\n})), memoTheme(({\n theme\n}) => ({\n variants: [{\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit'\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n '--IconButton-hoverBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n })), {\n props: {\n size: 'small'\n },\n style: {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n }\n }, {\n props: {\n size: 'large'\n },\n style: {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n }\n }],\n [`&.${iconButtonClasses.disabled}`]: {\n backgroundColor: 'transparent',\n color: (theme.vars || theme).palette.action.disabled\n },\n [`&.${iconButtonClasses.loading}`]: {\n color: 'transparent'\n }\n})));\nconst IconButtonLoadingIndicator = styled('span', {\n name: 'MuiIconButton',\n slot: 'LoadingIndicator'\n})(({\n theme\n}) => ({\n display: 'none',\n position: 'absolute',\n visibility: 'visible',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n color: (theme.vars || theme).palette.action.disabled,\n variants: [{\n props: {\n loading: true\n },\n style: {\n display: 'flex'\n }\n }]\n}));\n\n/**\n * Refer to the [Icons](/material-ui/icons/) section of the documentation\n * regarding the available icon options.\n */\nconst IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiIconButton'\n });\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n size = 'medium',\n id: idProp,\n loading = null,\n loadingIndicator: loadingIndicatorProp,\n ...other\n } = props;\n const loadingId = useId(idProp);\n const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": loadingId,\n color: \"inherit\",\n size: 16\n });\n const ownerState = {\n ...props,\n edge,\n color,\n disabled,\n disableFocusRipple,\n loading,\n loadingIndicator,\n size\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(IconButtonRoot, {\n id: loading ? loadingId : idProp,\n className: clsx(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled || loading,\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: [typeof loading === 'boolean' &&\n /*#__PURE__*/\n // use plain HTML span to minimize the runtime overhead\n _jsx(\"span\", {\n className: classes.loadingWrapper,\n style: {\n display: 'contents'\n },\n children: /*#__PURE__*/_jsx(IconButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loading && loadingIndicator\n })\n }), children]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The icon to display.\n */\n children: chainPropTypes(PropTypes.node, props => {\n const found = React.Children.toArray(props.children).some(child => /*#__PURE__*/React.isValidElement(child) && child.props.onClick);\n if (found) {\n return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\\n'));\n }\n return null;\n }),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * @ignore\n */\n id: PropTypes.string,\n /**\n * If `true`, the loading indicator is visible and the button is disabled.\n * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).\n * @default null\n */\n loading: PropTypes.bool,\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default, it renders a `CircularProgress` that is labeled by the button itself.\n * @default <CircularProgress color=\"inherit\" size={16} />\n */\n loadingIndicator: PropTypes.node,\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default IconButton;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SIZE = 44;\nconst circularRotateKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\nconst circularDashKeyframe = keyframes`\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: -126px;\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`\n animation: ${circularRotateKeyframe} 1.4s linear infinite;\n ` : null;\nconst dashAnimation = typeof circularDashKeyframe !== 'string' ? css`\n animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;\n ` : null;\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color,\n disableShrink\n } = ownerState;\n const slots = {\n root: ['root', variant, `color${capitalize(color)}`],\n svg: ['svg'],\n track: ['track'],\n circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, classes);\n};\nconst CircularProgressRoot = styled('span', {\n name: 'MuiCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n }))]\n})));\nconst CircularProgressSVG = styled('svg', {\n name: 'MuiCircularProgress',\n slot: 'Svg'\n})({\n display: 'block' // Keeps the progress centered\n});\nconst CircularProgressCircle = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Circle',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: dashAnimation || {\n // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }]\n})));\nconst CircularProgressTrack = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Track'\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n opacity: (theme.vars || theme).palette.action.activatedOpacity\n})));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCircularProgress'\n });\n const {\n className,\n color = 'primary',\n disableShrink = false,\n enableTrackSlot = false,\n size = 40,\n style,\n thickness = 3.6,\n value = 0,\n variant = 'indeterminate',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n disableShrink,\n size,\n thickness,\n value,\n variant,\n enableTrackSlot\n };\n const classes = useUtilityClasses(ownerState);\n const circleStyle = {};\n const rootStyle = {};\n const rootProps = {};\n if (variant === 'determinate') {\n const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;\n rootStyle.transform = 'rotate(-90deg)';\n }\n return /*#__PURE__*/_jsx(CircularProgressRoot, {\n className: clsx(classes.root, className),\n style: {\n width: size,\n height: size,\n ...rootStyle,\n ...style\n },\n ownerState: ownerState,\n ref: ref,\n role: \"progressbar\",\n ...rootProps,\n ...other,\n children: /*#__PURE__*/_jsxs(CircularProgressSVG, {\n className: classes.svg,\n ownerState: ownerState,\n viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,\n children: [enableTrackSlot ? /*#__PURE__*/_jsx(CircularProgressTrack, {\n className: classes.track,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness,\n \"aria-hidden\": \"true\"\n }) : null, /*#__PURE__*/_jsx(CircularProgressCircle, {\n className: classes.circle,\n style: circleStyle,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n * @default false\n */\n disableShrink: chainPropTypes(PropTypes.bool, props => {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n return null;\n }),\n /**\n * If `true`, a track circle slot is mounted to show a subtle background for the progress.\n * The `size` and `thickness` apply to the track slot to be consistent with the progress circle.\n * @default false\n */\n enableTrackSlot: PropTypes.bool,\n /**\n * The size of the component.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, for example '3rem'.\n * @default 40\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The thickness of the circle.\n * @default 3.6\n */\n thickness: PropTypes.number,\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n * @default 0\n */\n value: PropTypes.number,\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['determinate', 'indeterminate'])\n} : void 0;\nexport default CircularProgress;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'track', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);\nexport default circularProgressClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getIconButtonUtilityClass(slot) {\n return generateUtilityClass('MuiIconButton', slot);\n}\nconst iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'loading', 'loadingIndicator', 'loadingWrapper']);\nexport default iconButtonClasses;","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) =>\n string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n\n/**\n * Is empty string\n *\n * @param {unknown} value\n * @returns {boolean} Whether the value is an empty string\n */\nexport const isEmptyString = (value: unknown): boolean => value === '';\n\n/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: Record<string, any>) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n};\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className,\n ),\n ...props,\n }),\n );\n\n Component.displayName = toPascalCase(iconName);\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses, hasA11yProp } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) =>\n createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...(!children && !hasA11yProp(rest) && { 'aria-hidden': 'true' }),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n ),\n);\n\nexport default Icon;\n","import { Modal as MuiModal, IconButton, Backdrop } from \"@mui/material\";\nimport { X as CloseIcon } from \"lucide-react\";\nimport { ModalProps } from \"./types\";\nimport { MODAL_SIZES, BASE_STYLE } from \"./data\";\n\nconst Modal = ({\n isModalOpen,\n onClose,\n children,\n size = \"md\",\n title,\n footer,\n showCloseButton = true,\n contentStyle = BASE_STYLE,\n}: ModalProps) => {\n return (\n <MuiModal\n open={isModalOpen}\n onClose={onClose}\n slots={{ backdrop: Backdrop }}\n slotProps={{\n backdrop: {\n className: \"backdrop-blur-sm bg-black/30\",\n },\n }}\n >\n <div\n className={`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-gray-900 p-6 rounded-xl border border-gray-800 outline-none font-googleSansFlex overflow-y-auto shadow-2xl ${MODAL_SIZES[size]}`}\n >\n {/* Header Section */}\n <div className=\"flex justify-between items-center px-6 py-4\">\n <h2 className=\"text-xl font-semibold text-gray-50\">{title}</h2>\n {/* Close Button */}\n {showCloseButton && (\n <IconButton\n onClick={onClose}\n className=\"text-gray-400 hover:text-gray-200\"\n size=\"small\"\n >\n <CloseIcon size={20} />\n </IconButton>\n )}\n </div>\n\n {/* Main Content */}\n\n <div className={`relative ${contentStyle.height}`}>{children}</div>\n\n {/* Footer Section */}\n {footer && (\n <div className=\"mt-6 flex justify-start space-x-4\">{footer}</div>\n )}\n </div>\n </MuiModal>\n );\n};\n\nexport default Modal;\n","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _defineProperty(e, r, t) {\n return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: true,\n configurable: true,\n writable: true\n }) : e[r] = t, e;\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = true,\n o = false;\n try {\n if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = true, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), true).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = _objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r);\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _slicedToArray as slicedToArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n","var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'\n }\n};\n\nexport { config as default };\n","function curry(fn) {\n return function curried() {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport { curry as default };\n","function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport { isObject as default };\n","var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport { compose as default };\n","// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\n\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport { CANCELATION_MESSAGE, makeCancelable as default };\n","export const getButtonVariant = (\n variant?: string\n): \"primary\" | \"secondary\" | \"danger\" => {\n if (variant === \"secondary\") return \"secondary\";\n if (variant === \"danger\") return \"danger\";\n return \"primary\";\n};\n","export const MODAL_SIZES = {\n sm: \"w-[400px]\",\n md: \"w-[600px]\",\n lg: \"w-[800px]\",\n xl: \"w-[1000px]\",\n fullscreen: \"w-[95vw] h-[90vh]\",\n};\n\nexport const BASE_STYLE = {\n height: \"h-[calc(90vh-120px)]\",\n};\n","export const MODERN_IDE_THEME_OPTIONS = {\n base: \"vs-dark\" as const,\n inherit: true,\n rules: [\n { token: \"string\", foreground: \"#5DE4C7\" },\n { token: \"number\", foreground: \"#FF875F\" },\n { token: \"boolean\", foreground: \"#FF5F87\" },\n { token: \"delimiter\", foreground: \"#87AFFF\" },\n { token: \"keyword\", foreground: \"#BD93F9\" },\n ],\n colors: {\n \"editor.background\": \"#0D1117\",\n \"editor.lineHighlightBackground\": \"#1B2028\",\n \"editor.lineHighlightBorder\": \"#2A2F3A\",\n \"editorLineNumber.foreground\": \"#3B4048\",\n \"editorLineNumber.activeForeground\": \"#528BFF\",\n \"editor.selectionBackground\": \"#2C313C\",\n \"editor.selectionHighlightBackground\": \"#2C313C80\",\n \"editor.wordHighlightBackground\": \"#34394750\",\n \"editorGutter.background\": \"#0D1117\",\n \"minimap.background\": \"#0D1117\",\n \"minimap.selectionHighlight\": \"#528BFF55\",\n },\n};\n\nexport const EDITOR_OPTIONS = {\n fontSize: 16,\n lineHeight: 1.6,\n padding: { top: 12, bottom: 12 },\n minimap: {\n enabled: true,\n scale: 2,\n renderCharacters: true,\n },\n scrollBeyondLastLine: false,\n lineNumbers: \"on\" as const,\n roundedSelection: false,\n wordWrap: \"on\" as const,\n automaticLayout: true,\n fontFamily: \"var(--font-google-sans-code), Consolas, 'Courier New', monospace\",\n fontLigatures: true,\n scrollbar: {\n verticalScrollbarSize: 6,\n horizontalScrollbarSize: 6,\n vertical: \"visible\" as const,\n horizontal: \"visible\" as const,\n verticalHasArrows: false,\n horizontalHasArrows: false,\n useShadows: true,\n },\n cursorBlinking: \"smooth\" as const,\n cursorSmoothCaretAnimation: \"on\" as const,\n cursorWidth: 2,\n};\n\nexport const EDITOR_THEME_NAME = \"modernIDETheme\";\nexport const EDITOR_DEFAULT_LANGUAGE = \"json\";\n","import _t from\"@monaco-editor/loader\";import{memo as Te}from\"react\";import ke,{useState as re,useRef as S,useCallback as oe,useEffect as ne}from\"react\";import Se from\"@monaco-editor/loader\";import{memo as ye}from\"react\";import K from\"react\";var le={wrapper:{display:\"flex\",position:\"relative\",textAlign:\"initial\"},fullWidth:{width:\"100%\"},hide:{display:\"none\"}},v=le;import me from\"react\";var ae={container:{display:\"flex\",height:\"100%\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"}},Y=ae;function Me({children:e}){return me.createElement(\"div\",{style:Y.container},e)}var Z=Me;var $=Z;function Ee({width:e,height:r,isEditorReady:n,loading:t,_ref:a,className:m,wrapperProps:E}){return K.createElement(\"section\",{style:{...v.wrapper,width:e,height:r},...E},!n&&K.createElement($,null,t),K.createElement(\"div\",{ref:a,style:{...v.fullWidth,...!n&&v.hide},className:m}))}var ee=Ee;var H=ye(ee);import{useEffect as xe}from\"react\";function Ce(e){xe(e,[])}var k=Ce;import{useEffect as ge,useRef as Re}from\"react\";function he(e,r,n=!0){let t=Re(!0);ge(t.current||!n?()=>{t.current=!1}:e,r)}var l=he;function D(){}function h(e,r,n,t){return De(e,t)||be(e,r,n,t)}function De(e,r){return e.editor.getModel(te(e,r))}function be(e,r,n,t){return e.editor.createModel(r,n,t?te(e,t):void 0)}function te(e,r){return e.Uri.parse(r)}function Oe({original:e,modified:r,language:n,originalLanguage:t,modifiedLanguage:a,originalModelPath:m,modifiedModelPath:E,keepCurrentOriginalModel:g=!1,keepCurrentModifiedModel:N=!1,theme:x=\"light\",loading:P=\"Loading...\",options:y={},height:V=\"100%\",width:z=\"100%\",className:F,wrapperProps:j={},beforeMount:A=D,onMount:q=D}){let[M,O]=re(!1),[T,s]=re(!0),u=S(null),c=S(null),w=S(null),d=S(q),o=S(A),b=S(!1);k(()=>{let i=Se.init();return i.then(f=>(c.current=f)&&s(!1)).catch(f=>f?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",f)),()=>u.current?I():i.cancel()}),l(()=>{if(u.current&&c.current){let i=u.current.getOriginalEditor(),f=h(c.current,e||\"\",t||n||\"text\",m||\"\");f!==i.getModel()&&i.setModel(f)}},[m],M),l(()=>{if(u.current&&c.current){let i=u.current.getModifiedEditor(),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");f!==i.getModel()&&i.setModel(f)}},[E],M),l(()=>{let i=u.current.getModifiedEditor();i.getOption(c.current.editor.EditorOption.readOnly)?i.setValue(r||\"\"):r!==i.getValue()&&(i.executeEdits(\"\",[{range:i.getModel().getFullModelRange(),text:r||\"\",forceMoveMarkers:!0}]),i.pushUndoStop())},[r],M),l(()=>{u.current?.getModel()?.original.setValue(e||\"\")},[e],M),l(()=>{let{original:i,modified:f}=u.current.getModel();c.current.editor.setModelLanguage(i,t||n||\"text\"),c.current.editor.setModelLanguage(f,a||n||\"text\")},[n,t,a],M),l(()=>{c.current?.editor.setTheme(x)},[x],M),l(()=>{u.current?.updateOptions(y)},[y],M);let L=oe(()=>{if(!c.current)return;o.current(c.current);let i=h(c.current,e||\"\",t||n||\"text\",m||\"\"),f=h(c.current,r||\"\",a||n||\"text\",E||\"\");u.current?.setModel({original:i,modified:f})},[n,r,a,e,t,m,E]),U=oe(()=>{!b.current&&w.current&&(u.current=c.current.editor.createDiffEditor(w.current,{automaticLayout:!0,...y}),L(),c.current?.editor.setTheme(x),O(!0),b.current=!0)},[y,x,L]);ne(()=>{M&&d.current(u.current,c.current)},[M]),ne(()=>{!T&&!M&&U()},[T,M,U]);function I(){let i=u.current?.getModel();g||i?.original?.dispose(),N||i?.modified?.dispose(),u.current?.dispose()}return ke.createElement(H,{width:z,height:V,isEditorReady:M,loading:P,_ref:w,className:F,wrapperProps:j})}var ie=Oe;var we=Te(ie);import{useState as Ie}from\"react\";import ce from\"@monaco-editor/loader\";function Pe(){let[e,r]=Ie(ce.__getMonacoInstance());return k(()=>{let n;return e||(n=ce.init(),n.then(t=>{r(t)})),()=>n?.cancel()}),e}var Le=Pe;import{memo as ze}from\"react\";import We,{useState as ue,useEffect as W,useRef as C,useCallback as _e}from\"react\";import Ne from\"@monaco-editor/loader\";import{useEffect as Ue,useRef as ve}from\"react\";function He(e){let r=ve();return Ue(()=>{r.current=e},[e]),r.current}var se=He;var _=new Map;function Ve({defaultValue:e,defaultLanguage:r,defaultPath:n,value:t,language:a,path:m,theme:E=\"light\",line:g,loading:N=\"Loading...\",options:x={},overrideServices:P={},saveViewState:y=!0,keepCurrentModel:V=!1,width:z=\"100%\",height:F=\"100%\",className:j,wrapperProps:A={},beforeMount:q=D,onMount:M=D,onChange:O,onValidate:T=D}){let[s,u]=ue(!1),[c,w]=ue(!0),d=C(null),o=C(null),b=C(null),L=C(M),U=C(q),I=C(),i=C(t),f=se(m),Q=C(!1),B=C(!1);k(()=>{let p=Ne.init();return p.then(R=>(d.current=R)&&w(!1)).catch(R=>R?.type!==\"cancelation\"&&console.error(\"Monaco initialization: error:\",R)),()=>o.current?pe():p.cancel()}),l(()=>{let p=h(d.current,e||t||\"\",r||a||\"\",m||n||\"\");p!==o.current?.getModel()&&(y&&_.set(f,o.current?.saveViewState()),o.current?.setModel(p),y&&o.current?.restoreViewState(_.get(m)))},[m],s),l(()=>{o.current?.updateOptions(x)},[x],s),l(()=>{!o.current||t===void 0||(o.current.getOption(d.current.editor.EditorOption.readOnly)?o.current.setValue(t):t!==o.current.getValue()&&(B.current=!0,o.current.executeEdits(\"\",[{range:o.current.getModel().getFullModelRange(),text:t,forceMoveMarkers:!0}]),o.current.pushUndoStop(),B.current=!1))},[t],s),l(()=>{let p=o.current?.getModel();p&&a&&d.current?.editor.setModelLanguage(p,a)},[a],s),l(()=>{g!==void 0&&o.current?.revealLine(g)},[g],s),l(()=>{d.current?.editor.setTheme(E)},[E],s);let X=_e(()=>{if(!(!b.current||!d.current)&&!Q.current){U.current(d.current);let p=m||n,R=h(d.current,t||e||\"\",r||a||\"\",p||\"\");o.current=d.current?.editor.create(b.current,{model:R,automaticLayout:!0,...x},P),y&&o.current.restoreViewState(_.get(p)),d.current.editor.setTheme(E),g!==void 0&&o.current.revealLine(g),u(!0),Q.current=!0}},[e,r,n,t,a,m,x,P,y,E,g]);W(()=>{s&&L.current(o.current,d.current)},[s]),W(()=>{!c&&!s&&X()},[c,s,X]),i.current=t,W(()=>{s&&O&&(I.current?.dispose(),I.current=o.current?.onDidChangeModelContent(p=>{B.current||O(o.current.getValue(),p)}))},[s,O]),W(()=>{if(s){let p=d.current.editor.onDidChangeMarkers(R=>{let G=o.current.getModel()?.uri;if(G&&R.find(J=>J.path===G.path)){let J=d.current.editor.getModelMarkers({resource:G});T?.(J)}});return()=>{p?.dispose()}}return()=>{}},[s,T]);function pe(){I.current?.dispose(),V?y&&_.set(m,o.current.saveViewState()):o.current.getModel()?.dispose(),o.current.dispose()}return We.createElement(H,{width:z,height:F,isEditorReady:s,loading:N,_ref:b,className:j,wrapperProps:A})}var fe=Ve;var de=ze(fe);var Ft=de;export{we as DiffEditor,de as Editor,Ft as default,_t as loader,Le as useMonaco};\n//# sourceMappingURL=index.mjs.map","import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport { merge as default };\n","import React from \"react\";\nimport Modal from \"@/lib/modal\";\nimport Button from \"@/lib/button\";\nimport { ConfirmationModalProps } from \"./types\";\nimport { getButtonVariant } from \"./utils\";\n\nconst ConfirmationModal: React.FC<ConfirmationModalProps> = ({\n isOpen,\n title,\n message,\n buttons,\n onClose,\n size = \"md\",\n}) => {\n\n return (\n <Modal\n isModalOpen={isOpen}\n onClose={onClose || (() => {})}\n title={title}\n size={size}\n showCloseButton={true}\n contentStyle={{ height: \"h-auto\" }}\n >\n <div className=\"px-6 pb-6\">\n {/* Message */}\n <div className=\"text-gray-300 mb-8 leading-relaxed whitespace-pre-line break-words overflow-wrap-anywhere\">\n {message}\n </div>\n\n {/* Dynamic Action Buttons */}\n <div className=\"flex gap-3 justify-end\">\n {buttons.map((button, index) => (\n <div key={index}>\n <Button\n name={button.label}\n onClick={button.onClick}\n variant={getButtonVariant(button.variant)}\n disabled={button.disabled}\n />\n </div>\n ))}\n </div>\n </div>\n </Modal>\n );\n};\n\nexport default ConfirmationModal;\n","import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n return config;\n}\n\n/**\n * logs deprecation message\n */\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport { validators as default, errorHandler, errorMessages };\n","import { memo } from \"react\";\nimport { CircularProgress } from \"@mui/material\";\nimport { LoadingOverlayProps } from \"./types\";\n\nconst LoadingOverlay = ({ overlayMessage }: LoadingOverlayProps) => {\n return (\n <div className=\"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center rounded-xl z-50\">\n <div className=\"flex flex-col items-center space-y-4\">\n <CircularProgress size={48} />\n <p className=\"text-white font-googleSansFlex\">{overlayMessage}</p>\n </div>\n </div>\n );\n};\n\nexport default memo(LoadingOverlay);\n","import { slicedToArray as _slicedToArray, objectWithoutProperties as _objectWithoutProperties } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\nvar _excluded = [\"monaco\"];\n\n/** the local state of the module */\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n }),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\nfunction config(globalConfig) {\n var _validators$config = validators.config(globalConfig),\n monaco = _validators$config.monaco,\n config = _objectWithoutProperties(_validators$config, _excluded);\n setState(function (state) {\n return {\n config: merge(state.config, config),\n monaco: monaco\n };\n });\n}\n\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\nfunction init() {\n var state = getState(function (_ref) {\n var monaco = _ref.monaco,\n isInitialized = _ref.isInitialized,\n resolve = _ref.resolve;\n return {\n monaco: monaco,\n isInitialized: isInitialized,\n resolve: resolve\n };\n });\n if (!state.isInitialized) {\n setState({\n isInitialized: true\n });\n if (state.monaco) {\n state.resolve(state.monaco);\n return makeCancelable(wrapperPromise);\n }\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n state.resolve(window.monaco);\n return makeCancelable(wrapperPromise);\n }\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n }\n return makeCancelable(wrapperPromise);\n}\n\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n loaderScript.onload = function () {\n return configureLoader();\n };\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n\n/**\n * configures the monaco loader\n */\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n require.config(state.config);\n require(['vs/editor/editor.main'], function (loaded) {\n var monaco = loaded.m /* for 0.53 & 0.54 */ || loaded /* for other versions */;\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n\n/**\n * store monaco instance in local state\n */\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport { loader as default };\n","import { Editor as MonacoEditor } from \"@monaco-editor/react\";\nimport { EditorProps } from \"./types\";\nimport {\n MODERN_IDE_THEME_OPTIONS,\n EDITOR_OPTIONS,\n EDITOR_THEME_NAME,\n EDITOR_DEFAULT_LANGUAGE,\n} from \"./data\";\n\nconst Editor = ({ value, onChange }: EditorProps) => {\n\n return (\n <div className=\"relative h-full\">\n <div\n className=\"absolute inset-0 rounded-lg p-[1px] bg-gradient-to-r from-[#3B82F6] via-[#528BFF] to-[#5DE4C7] opacity-50\"\n style={{ pointerEvents: \"none\" }}\n />\n\n {/* Main editor container */}\n <div className=\"relative h-full rounded-lg overflow-hidden bg-[#0D1117]\">\n <MonacoEditor\n defaultLanguage={EDITOR_DEFAULT_LANGUAGE}\n theme={EDITOR_THEME_NAME}\n beforeMount={(monaco) => {\n try {\n monaco.editor.defineTheme(\n EDITOR_THEME_NAME,\n MODERN_IDE_THEME_OPTIONS\n );\n } catch (error) {\n console.error(\"Error defining theme:\", error);\n console.log(\"Falling back to default vs-dark theme\");\n }\n }}\n value={value}\n onChange={onChange}\n height=\"100%\"\n options={EDITOR_OPTIONS}\n onMount={(editor, monaco) => {\n editor.layout();\n }}\n />\n </div>\n </div>\n );\n};\n\nexport default Editor;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n];\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon('x', __iconNode);\n\nexport default X;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z',\n key: 'oel41y',\n },\n ],\n];\n\n/**\n * @component @name Shield\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/shield\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Shield = createLucideIcon('shield', __iconNode);\n\nexport default Shield;\n","import React from \"react\";\nimport { Shield } from \"lucide-react\";\n\nconst PrivacyBanner: React.FC = () => {\n return (\n <div className=\"bg-gradient-to-r from-emerald-950/40 to-green-950/40 border border-emerald-500/30 rounded-lg p-3 flex items-center gap-3\">\n <div className=\"flex-shrink-0 mt-0.5\">\n <div className=\"w-8 h-8 bg-emerald-500/20 rounded-full flex items-center justify-center\">\n <Shield className=\"text-emerald-400\" size={16} />\n </div>\n </div>\n <div className=\"flex-1\">\n <p className=\"text-base font-semibold text-emerald-300 mb-1\">\n 100% Local & Private\n </p>\n <p className=\"text-sm text-gray-200 leading-relaxed\">\n FAPI data never leaves your machine unless you explicitly choose to\n export and share it.\n </p>\n </div>\n </div>\n );\n};\n\nexport default PrivacyBanner;\n","'use client';\n\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useTimeout from '@mui/utils/useTimeout';\nimport extractEventHandlers from '@mui/utils/extractEventHandlers';\nfunction useSnackbar(parameters = {}) {\n const {\n autoHideDuration = null,\n disableWindowBlurListener = false,\n onClose,\n open,\n resumeHideDuration\n } = parameters;\n const timerAutoHide = useTimeout();\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (!nativeEvent.defaultPrevented) {\n if (nativeEvent.key === 'Escape') {\n // not calling `preventDefault` since we don't know if people may ignore this event e.g. a permanently open snackbar\n onClose?.(nativeEvent, 'escapeKeyDown');\n }\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [open, onClose]);\n const handleClose = useEventCallback((event, reason) => {\n onClose?.(event, reason);\n });\n const setAutoHideTimer = useEventCallback(autoHideDurationParam => {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n timerAutoHide.start(autoHideDurationParam, () => {\n handleClose(null, 'timeout');\n });\n });\n React.useEffect(() => {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n return timerAutoHide.clear;\n }, [open, autoHideDuration, setAutoHideTimer, timerAutoHide]);\n const handleClickAway = event => {\n onClose?.(event, 'clickaway');\n };\n\n // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n const handlePause = timerAutoHide.clear;\n\n // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n const handleResume = React.useCallback(() => {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n const createHandleBlur = otherHandlers => event => {\n const onBlurCallback = otherHandlers.onBlur;\n onBlurCallback?.(event);\n handleResume();\n };\n const createHandleFocus = otherHandlers => event => {\n const onFocusCallback = otherHandlers.onFocus;\n onFocusCallback?.(event);\n handlePause();\n };\n const createMouseEnter = otherHandlers => event => {\n const onMouseEnterCallback = otherHandlers.onMouseEnter;\n onMouseEnterCallback?.(event);\n handlePause();\n };\n const createMouseLeave = otherHandlers => event => {\n const onMouseLeaveCallback = otherHandlers.onMouseLeave;\n onMouseLeaveCallback?.(event);\n handleResume();\n };\n React.useEffect(() => {\n // TODO: window global should be refactored here\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return () => {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n return undefined;\n }, [disableWindowBlurListener, open, handleResume, handlePause]);\n const getRootProps = (externalProps = {}) => {\n const externalEventHandlers = {\n ...extractEventHandlers(parameters),\n ...extractEventHandlers(externalProps)\n };\n return {\n // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.\n // See https://github.com/mui/material-ui/issues/29080\n role: 'presentation',\n ...externalProps,\n ...externalEventHandlers,\n onBlur: createHandleBlur(externalEventHandlers),\n onFocus: createHandleFocus(externalEventHandlers),\n onMouseEnter: createMouseEnter(externalEventHandlers),\n onMouseLeave: createMouseLeave(externalEventHandlers)\n };\n };\n return {\n getRootProps,\n onClickAway: handleClickAway\n };\n}\nexport default useSnackbar;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport exactProp from '@mui/utils/exactProp';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\n\n// TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase<EventName> : never` once generatePropTypes runs with TS 4.1\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\nfunction clickedRootScrollbar(event, doc) {\n return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n *\n * Demos:\n *\n * - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n *\n * API:\n *\n * - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)\n */\nfunction ClickAwayListener(props) {\n const {\n children,\n disableReactTree = false,\n mouseEvent = 'onClick',\n onClickAway,\n touchEvent = 'onTouchEnd'\n } = props;\n const movedRef = React.useRef(false);\n const nodeRef = React.useRef(null);\n const activatedRef = React.useRef(false);\n const syntheticEventRef = React.useRef(false);\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n const handleRef = useForkRef(getReactElementRef(children), nodeRef);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n const handleClickAway = useEventCallback(event => {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false;\n const doc = ownerDocument(nodeRef.current);\n\n // 1. IE11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n if (!activatedRef.current || !nodeRef.current || 'clientX' in event && clickedRootScrollbar(event, doc)) {\n return;\n }\n\n // Do not act if user performed touchmove\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n let insideDOM;\n\n // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n if (event.composedPath) {\n insideDOM = event.composedPath().includes(nodeRef.current);\n } else {\n insideDOM = !doc.documentElement.contains(\n // @ts-expect-error returns `false` as intended when not dispatched from a Node\n event.target) || nodeRef.current.contains(\n // @ts-expect-error returns `false` as intended when not dispatched from a Node\n event.target);\n }\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n });\n\n // Keep track of mouse/touch events that bubbled up through the portal.\n const createHandleSynthetic = handlerName => event => {\n syntheticEventRef.current = true;\n const childrenPropsHandler = children.props[handlerName];\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const childrenProps = {\n ref: handleRef\n };\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n React.useEffect(() => {\n if (touchEvent !== false) {\n const mappedTouchEvent = mapEventPropToEvent(touchEvent);\n const doc = ownerDocument(nodeRef.current);\n const handleTouchMove = () => {\n movedRef.current = true;\n };\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return () => {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n return undefined;\n }, [handleClickAway, touchEvent]);\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n React.useEffect(() => {\n if (mouseEvent !== false) {\n const mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n const doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return () => {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.cloneElement(children, childrenProps);\n}\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n * @default false\n */\n disableReactTree: PropTypes.bool,\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n * @default 'onClick'\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', 'onPointerDown', 'onPointerUp', false]),\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n * @default 'onTouchEnd'\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\nexport { ClickAwayListener };","// Barrel export for all library components\n// This file provides a single entry point for importing UI components\n\n// Components\nexport { default as AnimatedBackground } from \"./animatedBackground\";\nexport { default as AppName } from \"./appName\";\nexport { default as Badge } from \"./badge\";\nexport { default as Button } from \"./button\";\nexport { default as Card } from \"./card\";\nexport { default as ConfirmationModal } from \"./confirmationModal\";\nexport { default as Editor } from \"./editor\";\nexport { default as LoadingOverlay } from \"./loadingOverlay\";\nexport { default as Modal } from \"./modal\";\nexport { default as PrivacyBanner } from \"./privacyBanner\";\nexport { default as Snackbar } from \"./snackbar\";\n\n// Types\nexport type { AppNameProps } from \"./appName/types\";\nexport type { BadgeProps } from \"./badge/types\";\nexport type { ButtonProps } from \"./button/types\";\nexport type { CardProps } from \"./card/types\";\nexport type { ConfirmationModalProps, ConfirmationButton } from \"./confirmationModal/types\";\nexport type { EditorProps } from \"./editor/types\";\nexport type { LoadingOverlayProps } from \"./loadingOverlay/types\";\nexport type { ModalProps } from \"./modal/types\";\nexport type { SnackbarProps } from \"./snackbar/types\";\n\n// Data/Constants (if needed externally)\nexport { BADGE_COLORS } from \"./badge/data\";\nexport { CARD_SIZES } from \"./card/data\";\nexport { MODAL_SIZES, BASE_STYLE } from \"./modal/data\";\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSnackbar from \"./useSnackbar.js\";\nimport ClickAwayListener from \"../ClickAwayListener/index.js\";\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport SnackbarContent from \"../SnackbarContent/index.js\";\nimport { getSnackbarUtilityClass } from \"./snackbarClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n anchorOrigin\n } = ownerState;\n const slots = {\n root: ['root', `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`]\n };\n return composeClasses(slots, getSnackbarUtilityClass, classes);\n};\nconst SnackbarRoot = styled('div', {\n name: 'MuiSnackbar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'top',\n style: {\n top: 8,\n [theme.breakpoints.up('sm')]: {\n top: 24\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical !== 'top',\n style: {\n bottom: 8,\n [theme.breakpoints.up('sm')]: {\n bottom: 24\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.horizontal === 'left',\n style: {\n justifyContent: 'flex-start',\n [theme.breakpoints.up('sm')]: {\n left: 24,\n right: 'auto'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.horizontal === 'right',\n style: {\n justifyContent: 'flex-end',\n [theme.breakpoints.up('sm')]: {\n right: 24,\n left: 'auto'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.horizontal === 'center',\n style: {\n [theme.breakpoints.up('sm')]: {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n }\n }\n }]\n})));\nconst Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSnackbar'\n });\n const theme = useTheme();\n const defaultTransitionDuration = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n action,\n anchorOrigin: {\n vertical,\n horizontal\n } = {\n vertical: 'bottom',\n horizontal: 'left'\n },\n autoHideDuration = null,\n children,\n className,\n ClickAwayListenerProps: ClickAwayListenerPropsProp,\n ContentProps: ContentPropsProp,\n disableWindowBlurListener = false,\n message,\n onBlur,\n onClose,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n open,\n resumeHideDuration,\n slots = {},\n slotProps = {},\n TransitionComponent: TransitionComponentProp,\n transitionDuration = defaultTransitionDuration,\n TransitionProps: {\n onEnter,\n onExited,\n ...TransitionPropsProp\n } = {},\n ...other\n } = props;\n const ownerState = {\n ...props,\n anchorOrigin: {\n vertical,\n horizontal\n },\n autoHideDuration,\n disableWindowBlurListener,\n TransitionComponent: TransitionComponentProp,\n transitionDuration\n };\n const classes = useUtilityClasses(ownerState);\n const {\n getRootProps,\n onClickAway\n } = useSnackbar(ownerState);\n const [exited, setExited] = React.useState(true);\n const handleExited = node => {\n setExited(true);\n if (onExited) {\n onExited(node);\n }\n };\n const handleEnter = (node, isAppearing) => {\n setExited(false);\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n };\n const externalForwardedProps = {\n slots: {\n transition: TransitionComponentProp,\n ...slots\n },\n slotProps: {\n content: ContentPropsProp,\n clickAwayListener: ClickAwayListenerPropsProp,\n transition: TransitionPropsProp,\n ...slotProps\n }\n };\n const [Root, rootProps] = useSlot('root', {\n ref,\n className: [classes.root, className],\n elementType: SnackbarRoot,\n getSlotProps: getRootProps,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other\n },\n ownerState\n });\n const [ClickAwaySlot, {\n ownerState: clickAwayOwnerStateProp,\n ...clickAwayListenerProps\n }] = useSlot('clickAwayListener', {\n elementType: ClickAwayListener,\n externalForwardedProps,\n getSlotProps: handlers => ({\n onClickAway: (...params) => {\n const event = params[0];\n handlers.onClickAway?.(...params);\n if (event?.defaultMuiPrevented) {\n return;\n }\n onClickAway(...params);\n }\n }),\n ownerState\n });\n const [ContentSlot, contentSlotProps] = useSlot('content', {\n elementType: SnackbarContent,\n shouldForwardComponentProp: true,\n externalForwardedProps,\n additionalProps: {\n message,\n action\n },\n ownerState\n });\n const [TransitionSlot, transitionProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n getSlotProps: handlers => ({\n onEnter: (...params) => {\n handlers.onEnter?.(...params);\n handleEnter(...params);\n },\n onExited: (...params) => {\n handlers.onExited?.(...params);\n handleExited(...params);\n }\n }),\n additionalProps: {\n appear: true,\n in: open,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n },\n ownerState\n });\n\n // So we only render active snackbars.\n if (!open && exited) {\n return null;\n }\n return /*#__PURE__*/_jsx(ClickAwaySlot, {\n ...clickAwayListenerProps,\n ...(slots.clickAwayListener && {\n ownerState: clickAwayOwnerStateProp\n }),\n children: /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: /*#__PURE__*/_jsx(TransitionSlot, {\n ...transitionProps,\n children: children || /*#__PURE__*/_jsx(ContentSlot, {\n ...contentSlotProps\n })\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Snackbar.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n /**\n * The anchor of the `Snackbar`.\n * On smaller screens, the component grows to occupy all the available width,\n * the horizontal alignment is ignored.\n * @default { vertical: 'bottom', horizontal: 'left' }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n * @default null\n */\n autoHideDuration: PropTypes.number,\n /**\n * Replace the `SnackbarContent` component.\n */\n children: PropTypes.element,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Props applied to the `ClickAwayListener` element.\n * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n ClickAwayListenerProps: PropTypes.object,\n /**\n * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.\n * @deprecated Use `slotProps.content` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n ContentProps: PropTypes.object,\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n * @default false\n */\n disableWindowBlurListener: PropTypes.bool,\n /**\n * When displaying multiple consecutive snackbars using a single parent-rendered\n * `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.\n * For instance, use `<Snackbar key={message} />`. Otherwise, messages might update\n * in place, and features like `autoHideDuration` could be affected.\n */\n key: () => null,\n /**\n * The message to display.\n */\n message: PropTypes.node,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`, or `\"escapeKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * @ignore\n */\n onMouseEnter: PropTypes.func,\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: PropTypes.number,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n clickAwayListener: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n clickAwayListener: PropTypes.elementType,\n content: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Snackbar;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { emphasize } from '@mui/system/colorManipulator';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Paper from \"../Paper/index.js\";\nimport { getSnackbarContentUtilityClass } from \"./snackbarContentClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n action: ['action'],\n message: ['message']\n };\n return composeClasses(slots, getSnackbarContentUtilityClass, classes);\n};\nconst SnackbarContentRoot = styled(Paper, {\n name: 'MuiSnackbarContent',\n slot: 'Root'\n})(memoTheme(({\n theme\n}) => {\n const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;\n return {\n ...theme.typography.body2,\n color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(emphasize(theme.palette.background.default, emphasis)),\n backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : emphasize(theme.palette.background.default, emphasis),\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n padding: '6px 16px',\n flexGrow: 1,\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 288\n }\n };\n}));\nconst SnackbarContentMessage = styled('div', {\n name: 'MuiSnackbarContent',\n slot: 'Message'\n})({\n padding: '8px 0'\n});\nconst SnackbarContentAction = styled('div', {\n name: 'MuiSnackbarContent',\n slot: 'Action'\n})({\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8\n});\nconst SnackbarContent = /*#__PURE__*/React.forwardRef(function SnackbarContent(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSnackbarContent'\n });\n const {\n action,\n className,\n message,\n role = 'alert',\n ...other\n } = props;\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SnackbarContentRoot, {\n role: role,\n elevation: 6,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other,\n children: [/*#__PURE__*/_jsx(SnackbarContentMessage, {\n className: classes.message,\n ownerState: ownerState,\n children: message\n }), action ? /*#__PURE__*/_jsx(SnackbarContentAction, {\n className: classes.action,\n ownerState: ownerState,\n children: action\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SnackbarContent.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The message to display.\n */\n message: PropTypes.node,\n /**\n * The ARIA role attribute of the element.\n * @default 'alert'\n */\n role: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default SnackbarContent;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport getOverlayAlpha from \"../styles/getOverlayAlpha.js\";\nimport { getPaperUtilityClass } from \"./paperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow'),\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.square,\n style: {\n borderRadius: theme.shape.borderRadius\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: {\n variant: 'elevation'\n },\n style: {\n boxShadow: 'var(--Paper-shadow)',\n backgroundImage: 'var(--Paper-overlay)'\n }\n }]\n})));\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const theme = useTheme();\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation',\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n elevation,\n square,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n style: {\n ...(variant === 'elevation' && {\n '--Paper-shadow': (theme.vars || theme).shadows[elevation],\n ...(theme.vars && {\n '--Paper-overlay': theme.vars.overlays?.[elevation]\n }),\n ...(!theme.vars && theme.palette.mode === 'dark' && {\n '--Paper-overlay': `linear-gradient(${alpha('#fff', getOverlayAlpha(elevation))}, ${alpha('#fff', getOverlayAlpha(elevation))})`\n })\n }),\n ...other.style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSnackbarContentUtilityClass(slot) {\n return generateUtilityClass('MuiSnackbarContent', slot);\n}\nconst snackbarContentClasses = generateUtilityClasses('MuiSnackbarContent', ['root', 'message', 'action']);\nexport default snackbarContentClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSnackbarUtilityClass(slot) {\n return generateUtilityClass('MuiSnackbar', slot);\n}\nconst snackbarClasses = generateUtilityClasses('MuiSnackbar', ['root', 'anchorOriginTopCenter', 'anchorOriginBottomCenter', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft']);\nexport default snackbarClasses;","import React from \"react\";\nimport { X as CloseIcon } from \"lucide-react\";\n\nexport const getSnackbarMessage = (\n message: string,\n onClose: () => void\n): React.ReactElement => {\n return (\n <div className=\"flex items-center justify-between w-full\">\n <span>{message}</span>\n <button\n onClick={onClose}\n className=\"ml-4 p-1 hover:bg-white/10 rounded-full transition-colors\"\n >\n <CloseIcon size={16} />\n </button>\n </div>\n );\n};\n","export const SNACKBAR_STYLES = {\n minWidth: \"auto\",\n maxWidth: \"400px\",\n borderRadius: \"8px\",\n padding: \"12px 24px\",\n fontSize: \"18px\",\n fontFamily: \"var(--font-google-sans-flex)\",\n};\n\nexport const SNACKBAR_ANCHOR_ORIGIN = {\n vertical: \"top\" as const,\n horizontal: \"right\" as const,\n};\n","import { SnackbarProps } from \"./types\";\nimport { Snackbar as MuiSnackbar } from \"@mui/material\";\nimport { getSnackbarMessage } from \"./utils\";\nimport { SNACKBAR_STYLES, SNACKBAR_ANCHOR_ORIGIN } from \"./data\";\n\nconst Snackbar = ({\n isOpen,\n onClose,\n message,\n autoHideDuration = 6000,\n backgroundColor = \"#fff\",\n}: SnackbarProps) => {\n return (\n <MuiSnackbar\n open={isOpen}\n autoHideDuration={autoHideDuration}\n onClose={onClose}\n message={getSnackbarMessage(message, onClose)}\n anchorOrigin={SNACKBAR_ANCHOR_ORIGIN}\n sx={{\n \"& .MuiSnackbarContent-root\": {\n minWidth: SNACKBAR_STYLES.minWidth,\n maxWidth: SNACKBAR_STYLES.maxWidth,\n },\n }}\n ContentProps={{\n sx: {\n backgroundColor,\n borderRadius: SNACKBAR_STYLES.borderRadius,\n padding: SNACKBAR_STYLES.padding,\n fontSize: SNACKBAR_STYLES.fontSize,\n fontFamily: SNACKBAR_STYLES.fontFamily,\n },\n }}\n />\n );\n};\n\nexport default Snackbar;\n","import { FapiEndpointBase } from \"@/types/fapi\";\n\nexport const CREATE_FAPI_ENDPOINT_INITIAL_DATA: FapiEndpointBase = {\n path: \"\",\n method: \"GET\",\n responseCode: 200,\n responseDelay: 0,\n response: JSON.stringify({}, null, 2),\n};\n","import { useCallback, useState } from \"react\";\nimport { FapiEndpointBase, HttpMethods } from \"@/types/fapi\";\nimport { CREATE_FAPI_ENDPOINT_INITIAL_DATA } from \"../data\";\nimport { FAPI_REGEX } from \"@/utils/data\";\nimport { FormErrors, FormTouched } from \"../types\";\nimport { validateJSON } from \"@/utils/functions\";\n\ninterface UseEndpointFormProps {\n mode: \"create\" | \"edit\";\n editData?: {\n method: HttpMethods;\n path: string;\n responseCode: number;\n responseDelay: number;\n response: string;\n };\n}\n\nexport const useEndpointForm = ({ mode, editData }: UseEndpointFormProps) => {\n const isEditMode = mode === \"edit\";\n\n // Initialize form data based on mode\n const getInitialFormData = useCallback((): FapiEndpointBase => {\n if (isEditMode && editData) {\n return {\n path: editData.path,\n method: editData.method as HttpMethods,\n responseCode: editData.responseCode,\n responseDelay: editData.responseDelay,\n response: JSON.stringify(editData.response, null, 2),\n };\n }\n return CREATE_FAPI_ENDPOINT_INITIAL_DATA;\n }, [isEditMode, editData]);\n\n const [formData, setFormData] = useState<FapiEndpointBase>(() =>\n getInitialFormData()\n );\n\n const [formErrors, setFormErrors] = useState<FormErrors>({});\n const [formTouched, setFormTouched] = useState<FormTouched>({});\n\n // Path validation\n const validatePath = useCallback((path: string): string | undefined => {\n if (!path.trim()) return \"Endpoint path is required\";\n if (!path.startsWith(\"/\")) return \"Endpoint path must start with /\";\n if (path.length < 2) return \"Endpoint path must have at least 2 characters\";\n if (!FAPI_REGEX.ENDPOINT_PATH.test(path))\n return \"Invalid characters in path. Allowed: letters, numbers, and the following special characters: / - _ ? & = , ' \\\" % space\";\n return undefined;\n }, []);\n\n // Check if any changes have been made in edit mode\n const hasChanges = useCallback((): boolean => {\n if (!isEditMode || !editData) return true; // In create mode, always allow submission\n\n // Compare current form data with original edit data\n const responseChanged =\n formData.response !== JSON.stringify(editData.response, null, 2);\n const responseCodeChanged = formData.responseCode !== editData.responseCode;\n const responseDelayChanged =\n formData.responseDelay !== editData.responseDelay;\n\n return responseChanged || responseCodeChanged || responseDelayChanged;\n }, [isEditMode, editData, formData]);\n\n // Check if the button should be disabled\n const isButtonDisabled = useCallback(\n (isSubmitting: boolean): boolean => {\n // Always disable during submission\n if (isSubmitting) return true;\n\n // Check if JSON is valid\n const jsonValidation = validateJSON(formData.response);\n if (!jsonValidation.isValid) return true;\n\n // In create mode, check if path is valid\n if (!isEditMode) {\n const pathError = validatePath(formData.path);\n if (pathError) return true;\n }\n\n // In edit mode, check if there are changes\n if (isEditMode && !hasChanges()) return true;\n\n return false;\n },\n [formData.response, formData.path, isEditMode, hasChanges, validatePath]\n );\n\n // Get the tooltip message explaining why button is disabled\n const getButtonDisabledTooltip = useCallback(\n (isSubmitting: boolean): string => {\n if (isSubmitting) return \"\";\n\n const jsonValidation = validateJSON(formData.response);\n if (!jsonValidation.isValid) {\n return `Invalid JSON: ${jsonValidation.error}`;\n }\n\n if (!isEditMode) {\n const pathError = validatePath(formData.path);\n if (pathError) return pathError;\n }\n\n if (isEditMode && !hasChanges()) {\n return \"No changes to save\";\n }\n\n return \"\";\n },\n [formData.response, formData.path, isEditMode, hasChanges, validatePath]\n );\n\n // Validate the form\n const validateForm = useCallback((): boolean => {\n const pathError = validatePath(formData.path);\n setFormErrors((prev) => ({ ...prev, path: pathError }));\n return !pathError;\n }, [formData.path, validatePath]);\n\n // Field change handlers\n const handlePathChange = useCallback(\n (value: string) => {\n setFormData((prev) => ({ ...prev, path: value }));\n if (formTouched.path) {\n setFormErrors((prev) => ({\n ...prev,\n path: validatePath(value),\n }));\n }\n },\n [formTouched.path, validatePath]\n );\n\n const handlePathBlur = useCallback(() => {\n setFormTouched((prev) => ({ ...prev, path: true }));\n setFormErrors((prev) => ({\n ...prev,\n path: validatePath(formData.path),\n }));\n }, [formData.path, validatePath]);\n\n const handleMethodChange = useCallback((method: HttpMethods) => {\n setFormData((prev) => ({ ...prev, method }));\n }, []);\n\n const handleResponseCodeChange = useCallback((responseCode: number) => {\n setFormData((prev) => ({ ...prev, responseCode }));\n }, []);\n\n const handleResponseDelayChange = useCallback((responseDelay: number) => {\n setFormData((prev) => ({ ...prev, responseDelay }));\n }, []);\n\n const handleResponseChange = useCallback((value: string | undefined) => {\n setFormData((prev) => ({\n ...prev,\n response: value || JSON.stringify({}, null, 2),\n }));\n }, []);\n\n // Reset form state\n const resetForm = useCallback(() => {\n setFormData(getInitialFormData());\n setFormErrors({});\n setFormTouched({});\n }, [getInitialFormData]);\n\n return {\n formData,\n formErrors,\n formTouched,\n isButtonDisabled,\n getButtonDisabledTooltip,\n validateForm,\n handlePathChange,\n handlePathBlur,\n handleMethodChange,\n handleResponseCodeChange,\n handleResponseDelayChange,\n handleResponseChange,\n resetForm,\n };\n};\n","import { CREATE_API_ENDPOINT_API_PATH } from \"@/utils/data\";\nimport { easing } from \"./../../../node_modules/@mui/material/styles/createTransitions.d\";\nimport { FapiEndpoint, FapiEndpointBase } from \"@/types/fapi\";\n\nexport const createEndpoint = async (\n endpoint: FapiEndpointBase\n): Promise<{ success: boolean; error?: string; endpoint?: FapiEndpoint }> => {\n try {\n const createEndpointResponse = await fetch(CREATE_API_ENDPOINT_API_PATH, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n ...endpoint,\n response: JSON.parse(endpoint.response),\n }),\n });\n\n const data = await createEndpointResponse.json();\n\n if (!createEndpointResponse.ok) {\n return {\n success: false,\n error: data.error || \"Failed to create endpoint\",\n };\n }\n\n return {\n success: true,\n endpoint: data.endpoint,\n };\n } catch (error) {\n console.log(\"Error creating endpoint:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { UPDATE_ENDPOINT_API_PATH } from \"@/utils/data\";\nimport { HttpMethods } from \"@/types/fapi\";\n\nexport interface UpdateFapiEndpointParams {\n method: HttpMethods;\n path: string;\n response?: string;\n responseCode?: number;\n responseDelay?: number;\n}\n\nexport const updateFapiEndpoint = async (\n params: UpdateFapiEndpointParams\n): Promise<{ success: boolean; error?: string }> => {\n try {\n const updateEndpointResponse = await fetch(UPDATE_ENDPOINT_API_PATH, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(params),\n });\n\n const data = await updateEndpointResponse.json();\n\n if (!updateEndpointResponse.ok) {\n return {\n success: false,\n error: data.error || \"Failed to update endpoint\",\n };\n }\n\n return {\n success: true,\n };\n } catch (error) {\n console.log(\"Error updating endpoint:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { DELETE_API_ENDPOINT_API_PATH } from \"@/utils/data\";\nimport { HttpMethods } from \"@/types/fapi\";\n\nexport const deleteEndpoint = async (\n method: HttpMethods,\n path: string\n): Promise<{ success: boolean; error?: string }> => {\n try {\n const deleteEndpointResponse = await fetch(DELETE_API_ENDPOINT_API_PATH, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n method,\n path,\n }),\n });\n\n const data = await deleteEndpointResponse.json();\n\n if (!deleteEndpointResponse.ok) {\n return {\n success: false,\n error: data.error || \"Failed to delete endpoint\",\n };\n }\n\n return {\n success: true,\n };\n } catch (error) {\n console.log(\"Error deleting endpoint:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { GET_ENDPOINTS_API_PATH } from \"@/utils/data\";\nimport { EndpointKey, FapiEndpoint } from \"@/types/fapi\";\nimport { EndpointDetails } from \"@/store/types/endpoints\";\n\nexport const loadEndpoints = async (): Promise<{\n success: boolean;\n endpoints?: Record<EndpointKey, EndpointDetails>;\n projectName?: string;\n error?: string;\n}> => {\n try {\n const response = await fetch(GET_ENDPOINTS_API_PATH, {\n method: \"GET\",\n cache: \"no-store\",\n });\n\n const data = await response.json();\n\n if (!response.ok) {\n return {\n success: false,\n error: data.error || \"Failed to load endpoints\",\n };\n }\n\n // Transform FapiEndpoint to EndpointDetails (match Redux state shape)\n const transformedEndpoints: Record<EndpointKey, EndpointDetails> = {};\n\n Object.entries(data.endpoints as Record<EndpointKey, FapiEndpoint>).forEach(\n ([key, endpoint]) => {\n transformedEndpoints[key as EndpointKey] = {\n responseCode: endpoint.responseCode,\n responseDelay: endpoint.responseDelay,\n response: typeof endpoint.response === 'string'\n ? JSON.parse(endpoint.response)\n : endpoint.response,\n };\n }\n );\n\n return {\n success: true,\n endpoints: transformedEndpoints,\n projectName: data.metadata?.projectName || \"\",\n };\n } catch (error) {\n console.error(\"Error loading endpoints:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { ValidationResult } from \"./types\";\nimport { FAPI_LIMITS } from \"@/utils/data\";\n\n/**\n * Validates file extension\n */\nexport const validateFileExtension = (file: File): ValidationResult => {\n if (!file.name.endsWith(\".json\")) {\n return {\n isValid: false,\n error: \"Only JSON files are supported\",\n };\n }\n return { isValid: true };\n};\n\n/**\n * Validates file size\n */\nexport const validateFileSize = (file: File): ValidationResult => {\n if (file.size > FAPI_LIMITS.MAX_FILE_SIZE_BYTES) {\n return {\n isValid: false,\n error: `File size exceeds ${FAPI_LIMITS.MAX_FILE_SIZE_MB}MB limit`,\n };\n }\n return { isValid: true };\n};\n\n/**\n * Validates file at basic level (extension + size)\n */\nexport const validateFile = (file: File): ValidationResult => {\n const extensionCheck = validateFileExtension(file);\n if (!extensionCheck.isValid) return extensionCheck;\n\n const sizeCheck = validateFileSize(file);\n if (!sizeCheck.isValid) return sizeCheck;\n\n return { isValid: true };\n};\n","import { HttpMethods } from \"@/types/fapi\";\nimport { FAPI } from \"@/utils/data\";\nimport { EndpointValidationResult } from \"./types\";\n\n/**\n * Validates if HTTP method is supported\n */\nexport const isValidHttpMethod = (method: string): boolean => {\n const validMethods = Object.values(FAPI.SUPPORTED_HTTP_METHODS);\n return validMethods.includes(method as HttpMethods);\n};\n\n/**\n * Validates if response code is supported\n */\nexport const isValidResponseCode = (code: number): boolean => {\n const validCodes = Object.values(FAPI.SUPPORTED_HTTP_RESPONSE_STATUS_CODE).map(\n (status) => status.code\n );\n return validCodes.includes(code);\n};\n\n/**\n * Validates if response delay is supported\n */\nexport const isValidResponseDelay = (delay: number): boolean => {\n const validDelays = Object.values(FAPI.SUPPORTED_RESPONSE_DELAYS).map(\n (d) => d.value\n );\n return validDelays.includes(delay);\n};\n\n/**\n * Validates endpoint key format (e.g., \"GET /users\")\n * Must be exactly 2 parts: METHOD and /path\n */\nexport const isValidEndpointKey = (key: string): boolean => {\n const parts = key.split(\" \");\n\n // Must be exactly 2 parts\n if (parts.length !== 2) return false;\n\n const [method, path] = parts;\n\n return isValidHttpMethod(method) && path.startsWith(\"/\");\n};\n\n/**\n * Validates a single endpoint's structure and values\n */\nexport const validateEndpoint = (\n key: string,\n details: any\n): EndpointValidationResult => {\n // Validate key format\n if (!isValidEndpointKey(key)) {\n return {\n isValid: false,\n error: `Invalid endpoint key format: \"${key}\". Expected format: \"METHOD /path\" (exactly 2 parts separated by space)`,\n invalidKey: key,\n };\n }\n\n // Validate details is an object\n if (!details || typeof details !== \"object\" || Array.isArray(details)) {\n return {\n isValid: false,\n error: `Invalid endpoint details for \"${key}\" - must be an object`,\n invalidKey: key,\n };\n }\n\n // Validate required fields exist\n if (!(\"responseCode\" in details)) {\n return {\n isValid: false,\n error: `Missing 'responseCode' for endpoint \"${key}\"`,\n invalidKey: key,\n };\n }\n\n if (!(\"responseDelay\" in details)) {\n return {\n isValid: false,\n error: `Missing 'responseDelay' for endpoint \"${key}\"`,\n invalidKey: key,\n };\n }\n\n if (!(\"response\" in details)) {\n return {\n isValid: false,\n error: `Missing 'response' for endpoint \"${key}\"`,\n invalidKey: key,\n };\n }\n\n // Validate field types\n if (typeof details.responseCode !== \"number\") {\n return {\n isValid: false,\n error: `Invalid 'responseCode' for endpoint \"${key}\" - must be a number`,\n invalidKey: key,\n };\n }\n\n if (typeof details.responseDelay !== \"number\") {\n return {\n isValid: false,\n error: `Invalid 'responseDelay' for endpoint \"${key}\" - must be a number`,\n invalidKey: key,\n };\n }\n\n // Response can be either a string or an object (will be stringified later)\n if (typeof details.response !== \"object\" && typeof details.response !== \"string\") {\n return {\n isValid: false,\n error: `Invalid 'response' for endpoint \"${key}\" - must be an object or string`,\n invalidKey: key,\n };\n }\n\n if (details.response === null) {\n return {\n isValid: false,\n error: `Invalid 'response' for endpoint \"${key}\" - cannot be null`,\n invalidKey: key,\n };\n }\n\n // Validate responseCode is supported\n if (!isValidResponseCode(details.responseCode)) {\n const supportedCodes = Object.values(\n FAPI.SUPPORTED_HTTP_RESPONSE_STATUS_CODE\n )\n .map((s) => s.code)\n .join(\", \");\n return {\n isValid: false,\n error: `Unsupported response code ${details.responseCode} for endpoint \"${key}\". Supported codes: ${supportedCodes}`,\n invalidKey: key,\n };\n }\n\n // Validate responseDelay is supported\n if (!isValidResponseDelay(details.responseDelay)) {\n const supportedDelays = Object.values(FAPI.SUPPORTED_RESPONSE_DELAYS)\n .map((d) => `${d.value}ms`)\n .join(\", \");\n return {\n isValid: false,\n error: `Unsupported response delay ${details.responseDelay}ms for endpoint \"${key}\". Supported delays: ${supportedDelays}`,\n invalidKey: key,\n };\n }\n\n return { isValid: true };\n};\n","import { ValidationResult } from \"./types\";\nimport { validateEndpoint } from \"./endpointValidator\";\nimport { FAPI_LIMITS } from \"@/utils/data\";\n\n/**\n * Validates the structure of import data\n */\nexport const validateImportStructure = (data: any): ValidationResult => {\n // Validate root structure\n if (!data || typeof data !== \"object\") {\n return {\n isValid: false,\n error: \"Invalid file format - must be a JSON object\",\n };\n }\n\n // Validate version field (if present)\n if (data.version && typeof data.version !== \"string\") {\n return {\n isValid: false,\n error: \"Invalid file format - version must be a string\",\n };\n }\n\n // Validate endpoints field\n if (!data.endpoints || typeof data.endpoints !== \"object\") {\n return {\n isValid: false,\n error: \"Invalid file format - missing or invalid 'endpoints' field\",\n };\n }\n\n // Validate endpoints is not an array\n if (Array.isArray(data.endpoints)) {\n return {\n isValid: false,\n error: \"Invalid file format - 'endpoints' must be an object, not an array\",\n };\n }\n\n return { isValid: true };\n};\n\n/**\n * Validates endpoint count in import file\n */\nexport const validateEndpointCount = (\n endpointEntries: [string, any][]\n): ValidationResult => {\n // Check if there are any endpoints\n if (endpointEntries.length === 0) {\n return {\n isValid: false,\n error: \"No endpoints found in the file\",\n };\n }\n\n // Validate maximum number of endpoints per file\n if (endpointEntries.length > FAPI_LIMITS.MAX_ENDPOINTS) {\n return {\n isValid: false,\n error: `This file contains ${endpointEntries.length} endpoints. Maximum ${FAPI_LIMITS.MAX_ENDPOINTS} endpoints allowed per file.`,\n };\n }\n\n return { isValid: true };\n};\n\n/**\n * Validates all endpoints in the import data\n */\nexport const validateAllEndpoints = (\n endpointEntries: [string, any][]\n): ValidationResult => {\n for (const [key, details] of endpointEntries) {\n const result = validateEndpoint(key, details);\n if (!result.isValid) {\n return result;\n }\n }\n\n return { isValid: true };\n};\n\n/**\n * Validates total endpoint count after import\n */\nexport const validateTotalEndpointCount = (\n currentCount: number,\n importingCount: number,\n isReplaceMode: boolean\n): ValidationResult => {\n const finalCount = isReplaceMode ? importingCount : currentCount + importingCount;\n\n if (finalCount > FAPI_LIMITS.MAX_ENDPOINTS) {\n return {\n isValid: false,\n error: `Cannot import: Would result in ${finalCount} endpoints (maximum: ${FAPI_LIMITS.MAX_ENDPOINTS}). Current: ${currentCount}, Importing: ${importingCount}.`,\n };\n }\n\n return { isValid: true };\n};\n\n/**\n * Master validation function for import data\n */\nexport const validateImportData = (\n data: any,\n currentEndpointCount: number,\n isReplaceMode: boolean\n): ValidationResult => {\n // Validate structure\n const structureCheck = validateImportStructure(data);\n if (!structureCheck.isValid) return structureCheck;\n\n const endpointEntries = Object.entries(data.endpoints);\n\n // Validate endpoint count in file\n const countCheck = validateEndpointCount(endpointEntries);\n if (!countCheck.isValid) return countCheck;\n\n // Validate all endpoints\n const endpointsCheck = validateAllEndpoints(endpointEntries);\n if (!endpointsCheck.isValid) return endpointsCheck;\n\n // Validate total count after import\n const totalCountCheck = validateTotalEndpointCount(\n currentEndpointCount,\n endpointEntries.length,\n isReplaceMode\n );\n if (!totalCountCheck.isValid) return totalCountCheck;\n\n return { isValid: true };\n};\n","import { IMPORT_ENDPOINTS_API_PATH } from \"@/utils/data\";\nimport { EndpointKey } from \"@/types/fapi\";\nimport type { EndpointDetails } from \"@/store\";\nimport { ExportData } from \"./exportEndpoints\";\nimport { validateFile, validateImportData } from \"@/utils/validators\";\nimport { IMPORT_STRATEGY, ImportStrategy } from \"@/utils/data\";\n\nexport interface ImportResult {\n success: boolean;\n error?: string;\n addedCount?: number;\n skippedCount?: number;\n totalEndpoints?: number;\n message?: string;\n}\n\nexport const importEndpoints = async (\n file: File,\n strategy: ImportStrategy = IMPORT_STRATEGY.MERGE,\n currentEndpointCount: number\n): Promise<ImportResult> => {\n try {\n // Validate file (extension and size)\n const fileValidation = validateFile(file);\n if (!fileValidation.isValid) {\n return {\n success: false,\n error: fileValidation.error,\n };\n }\n\n // Read file\n const text = await file.text();\n\n // Parse JSON\n let data: any;\n try {\n data = JSON.parse(text);\n } catch {\n return {\n success: false,\n error: \"Invalid JSON file - unable to parse\",\n };\n }\n\n // Comprehensive validation using validators\n const isReplaceMode = strategy === IMPORT_STRATEGY.REPLACE;\n const validation = validateImportData(data, currentEndpointCount, isReplaceMode);\n\n if (!validation.isValid) {\n return {\n success: false,\n error: validation.error,\n };\n }\n\n // All validations passed, send to API\n const response = await fetch(IMPORT_ENDPOINTS_API_PATH, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n endpoints: data.endpoints,\n strategy,\n }),\n });\n\n const result = await response.json();\n\n if (!response.ok) {\n return {\n success: false,\n error: result.error || \"Failed to import endpoints\",\n };\n }\n\n return {\n success: true,\n addedCount: result.addedCount,\n skippedCount: result.skippedCount,\n totalEndpoints: result.totalEndpoints,\n message: result.message,\n };\n } catch (error) {\n console.error(\"Error importing endpoints:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { EndpointKey } from \"@/types/fapi\";\nimport type { EndpointDetails } from \"@/store\";\nimport { FAPI_EXPORT_FILENAME_PREFIX } from \"@/utils/data\";\n\nexport interface ExportData {\n version: string;\n exportedAt: string;\n endpoints: Record<EndpointKey, EndpointDetails>;\n}\n\nexport const exportEndpoints = (\n endpoints: Record<EndpointKey, EndpointDetails>,\n projectName?: string\n): void => {\n const exportData: ExportData = {\n version: \"1.0\",\n exportedAt: new Date().toISOString(),\n endpoints,\n };\n\n const jsonString = JSON.stringify(exportData, null, 2);\n const blob = new Blob([jsonString], { type: \"application/json\" });\n const url = URL.createObjectURL(blob);\n\n // Generate filename with project name if provided\n const now = new Date();\n const dateStr = now.toISOString().split('T')[0]; // YYYY-MM-DD\n const hours = now.getHours().toString().padStart(2, '0');\n const minutes = now.getMinutes().toString().padStart(2, '0');\n const seconds = now.getSeconds().toString().padStart(2, '0');\n const timeStr = `${hours}${minutes}${seconds}`; // HHmmss\n\n let filename = `${FAPI_EXPORT_FILENAME_PREFIX}-`;\n\n if (projectName && projectName.trim()) {\n // Replace spaces with underscores\n const sanitizedProjectName = projectName.trim().replace(/\\s+/g, '_');\n filename += `${sanitizedProjectName}-`;\n }\n\n filename += `${dateStr}-${timeStr}.json`;\n\n // Create temporary download link\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n\n // Cleanup\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n};\n","import { UPDATE_PROJECT_NAME_API_PATH } from \"@/utils/data\";\n\nexport const updateProjectName = async (\n projectName: string\n): Promise<{\n success: boolean;\n projectName?: string;\n error?: string;\n}> => {\n try {\n const response = await fetch(UPDATE_PROJECT_NAME_API_PATH, {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ projectName }),\n });\n\n const data = await response.json();\n\n if (!response.ok) {\n return {\n success: false,\n error: data.error || \"Failed to update project name\",\n };\n }\n\n return {\n success: true,\n projectName: data.projectName,\n };\n } catch (error) {\n console.error(\"Error updating project name:\", error);\n return {\n success: false,\n error: error instanceof Error ? error.message : \"Unknown error occurred\",\n };\n }\n};\n","import { EndpointKey, HttpMethods } from \"@/types/fapi\";\n\nexport const createEndpointKey = (\n method: HttpMethods,\n path: string\n): EndpointKey => {\n return `${method} ${path}` as EndpointKey;\n};\n","export const validateJSON = (\n jsonString: string\n): { isValid: boolean; error?: string } => {\n try {\n JSON.parse(jsonString);\n return { isValid: true };\n } catch (error) {\n return {\n isValid: false,\n error: error instanceof Error ? error.message : \"Invalid JSON format\",\n };\n }\n};\n","import { useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { EndpointKey, FapiEndpointBase } from \"@/types/fapi\";\nimport { STATUS_COLORS } from \"@/utils/data\";\nimport { validateJSON, createEndpoint, updateFapiEndpoint, createEndpointKey } from \"@/utils/functions\";\nimport { setHasFapiEndpoints, addEndpoint, updateEndpoint } from \"@/store\";\nimport { SnackbarState } from \"../types\";\n\ninterface UseEndpointSubmitProps {\n mode: \"create\" | \"edit\";\n validateForm: () => boolean;\n onClose: () => void;\n}\n\nexport const useEndpointSubmit = ({\n mode,\n validateForm,\n onClose,\n}: UseEndpointSubmitProps) => {\n const dispatch = useDispatch();\n const isEditMode = mode === \"edit\";\n\n const [isSubmittingEndpointDetails, setIsSubmittingEndpointDetails] =\n useState<boolean>(false);\n\n const [snackbar, setSnackbar] = useState<SnackbarState>({\n isOpen: false,\n message: \"\",\n backgroundColor: \"\",\n });\n\n const handleCloseSnackbar = () => {\n setSnackbar((prev) => ({ ...prev, isOpen: false }));\n };\n\n const handleSubmitFapiDetails = async (formData: FapiEndpointBase) => {\n /* Validate JSON Response */\n const jsonValidation = validateJSON(formData.response);\n\n if (!jsonValidation.isValid) {\n setSnackbar({\n isOpen: true,\n message: `Invalid JSON in response: ${jsonValidation.error}`,\n backgroundColor: STATUS_COLORS.ERROR,\n });\n\n return;\n }\n\n /* Validating all fields before submission (skip path validation in edit mode) */\n if (!isEditMode) {\n const isFormValid = validateForm();\n\n if (!isFormValid) {\n setSnackbar({\n isOpen: true,\n message: \"Please fix the validation errors before submitting\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n\n return;\n }\n }\n\n /* Try form submission */\n try {\n setIsSubmittingEndpointDetails(true);\n\n if (isEditMode) {\n // Update existing endpoint\n const parsedResponse = JSON.parse(formData.response);\n const result = await updateFapiEndpoint({\n method: formData.method,\n path: formData.path,\n response: parsedResponse,\n responseCode: formData.responseCode,\n responseDelay: formData.responseDelay,\n });\n\n if (result.success) {\n setSnackbar({\n isOpen: true,\n message: \"FAPI endpoint updated successfully\",\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n\n // Update Redux store\n dispatch(\n updateEndpoint({\n key: createEndpointKey(formData.method, formData.path),\n details: {\n response: parsedResponse,\n responseCode: formData.responseCode,\n responseDelay: formData.responseDelay,\n },\n })\n );\n\n onClose();\n } else {\n setSnackbar({\n isOpen: true,\n message: result.error || \"Failed to update endpoint\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n }\n } else {\n // Create new endpoint\n const result = await createEndpoint(formData);\n dispatch(setHasFapiEndpoints(true));\n\n if (result.success) {\n setSnackbar({\n isOpen: true,\n message: \"FAPI endpoint created successfully\",\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n try {\n dispatch(\n addEndpoint({\n key: `${result?.endpoint?.method} ${result?.endpoint?.path}` as EndpointKey,\n details: {\n responseCode: result?.endpoint?.responseCode as number,\n responseDelay: result?.endpoint?.responseDelay as number,\n response: (result?.endpoint?.response || \"\") as string,\n },\n })\n );\n } catch (err) {\n console.log(\"Error saving details to redux\");\n } finally {\n onClose();\n }\n } else {\n setSnackbar({\n isOpen: true,\n message: result.error || \"Failed to create endpoint\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n console.log(\"Failed to create endpoint:\", result.error);\n }\n }\n } catch (error) {\n console.log(\"Error submitting form:\", error);\n setSnackbar({\n isOpen: true,\n message: \"An unexpected error occurred\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n } finally {\n setIsSubmittingEndpointDetails(false);\n }\n };\n\n return {\n isSubmittingEndpointDetails,\n snackbar,\n handleCloseSnackbar,\n handleSubmitFapiDetails,\n };\n};\n","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n}\n\n// Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\nexport function isFilled(obj, SSR = false) {\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n}\n\n// Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(\n // For server components `muiName` is available in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;\n}","import isMuiElement from '@mui/utils/isMuiElement';\nexport default isMuiElement;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst FormControlContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n FormControlContext.displayName = 'FormControlContext';\n}\nexport default FormControlContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormControlUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);\nexport default formControlClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { isFilled, isAdornedStart } from \"../InputBase/utils.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport isMuiElement from \"../utils/isMuiElement.js\";\nimport FormControlContext from \"./FormControlContext.js\";\nimport { getFormControlUtilityClasses } from \"./formControlClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n margin,\n fullWidth\n } = ownerState;\n const slots = {\n root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']\n };\n return composeClasses(slots, getFormControlUtilityClasses, classes);\n};\nconst FormControlRoot = styled('div', {\n name: 'MuiFormControl',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];\n }\n})({\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top',\n // Fix alignment issue on Safari.\n variants: [{\n props: {\n margin: 'normal'\n },\n style: {\n marginTop: 16,\n marginBottom: 8\n }\n }, {\n props: {\n margin: 'dense'\n },\n style: {\n marginTop: 8,\n marginBottom: 4\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n});\n\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/material-ui/react-text-field/#components).\n *\n * ```jsx\n * <FormControl>\n * <InputLabel htmlFor=\"my-input\">Email address</InputLabel>\n * <Input id=\"my-input\" aria-describedby=\"my-helper-text\" />\n * <FormHelperText id=\"my-helper-text\">We'll never share your email.</FormHelperText>\n * </FormControl>\n * ```\n *\n * ⚠️ Only one `InputBase` can be used within a FormControl because it creates visual inconsistencies.\n * For instance, only one input can be focused at the same time, the state shouldn't be shared.\n */\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormControl'\n });\n const {\n children,\n className,\n color = 'primary',\n component = 'div',\n disabled = false,\n error = false,\n focused: visuallyFocused,\n fullWidth = false,\n hiddenLabel = false,\n margin = 'none',\n required = false,\n size = 'medium',\n variant = 'outlined',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n error,\n fullWidth,\n hiddenLabel,\n margin,\n required,\n size,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const [adornedStart, setAdornedStart] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialAdornedStart = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n const input = isMuiElement(child, ['Select']) ? child.props.input : child;\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n return initialAdornedStart;\n });\n const [filled, setFilled] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialFilled = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {\n initialFilled = true;\n }\n });\n }\n return initialFilled;\n });\n const [focusedState, setFocused] = React.useState(false);\n if (disabled && focusedState) {\n setFocused(false);\n }\n const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;\n let registerEffect;\n const registeredInput = React.useRef(false);\n if (process.env.NODE_ENV !== 'production') {\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\\n'));\n }\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n const onFilled = React.useCallback(() => {\n setFilled(true);\n }, []);\n const onEmpty = React.useCallback(() => {\n setFilled(false);\n }, []);\n const childContext = React.useMemo(() => {\n return {\n adornedStart,\n setAdornedStart,\n color,\n disabled,\n error,\n filled,\n focused,\n fullWidth,\n hiddenLabel,\n size,\n onBlur: () => {\n setFocused(false);\n },\n onFocus: () => {\n setFocused(true);\n },\n onEmpty,\n onFilled,\n registerEffect,\n required,\n variant\n };\n }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, onEmpty, onFilled, required, size, variant]);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(FormControlRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the component will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormControl;","export default function formControlState({\n props,\n states,\n muiFormControl\n}) {\n return states.reduce((acc, state) => {\n acc[state] = props[state];\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n return acc;\n }, {});\n}","'use client';\n\nimport * as React from 'react';\nimport FormControlContext from \"./FormControlContext.js\";\nexport default function useFormControl() {\n return React.useContext(FormControlContext);\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport formLabelClasses, { getFormLabelUtilityClasses } from \"./formLabelClasses.js\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n focused,\n disabled,\n error,\n filled,\n required\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', filled && 'filled', focused && 'focused', required && 'required'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormLabelUtilityClasses, classes);\n};\nexport const FormLabelRoot = styled('label', {\n name: 'MuiFormLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n ...theme.typography.body1,\n lineHeight: '1.4375em',\n padding: 0,\n position: 'relative',\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${formLabelClasses.focused}`]: {\n color: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n props: {},\n style: {\n [`&.${formLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n }\n }]\n})));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormLabel',\n slot: 'Asterisk'\n})(memoTheme(({\n theme\n}) => ({\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n})));\nconst FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormLabel'\n });\n const {\n children,\n className,\n color,\n component = 'label',\n disabled,\n error,\n filled,\n focused,\n required,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n component,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(FormLabelRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: [children, fcs.required && /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: PropTypes.bool,\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default FormLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormLabel', slot);\n}\nconst formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);\nexport default formLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport clsx from 'clsx';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport FormLabel, { formLabelClasses } from \"../FormLabel/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getInputLabelUtilityClasses } from \"./inputLabelClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n formControl,\n size,\n shrink,\n disableAnimation,\n variant,\n required\n } = ownerState;\n const slots = {\n root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${capitalize(size)}`, variant],\n asterisk: [required && 'asterisk']\n };\n const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the FormLabel\n ...composedClasses\n };\n};\nconst InputLabelRoot = styled(FormLabel, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInputLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formLabelClasses.asterisk}`]: styles.asterisk\n }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'block',\n transformOrigin: 'top left',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.formControl,\n style: {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 20px) scale(1)'\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n // Compensation for the `Input.inputSizeSmall` style.\n transform: 'translate(0, 17px) scale(1)'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.shrink,\n style: {\n transform: 'translate(0, -1.5px) scale(0.75)',\n transformOrigin: 'top left',\n maxWidth: '133%'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disableAnimation,\n style: {\n transition: theme.transitions.create(['color', 'transform', 'max-width'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'filled',\n size: 'small'\n },\n style: {\n transform: 'translate(12px, 13px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'filled' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n transform: 'translate(12px, 7px) scale(0.75)',\n maxWidth: 'calc(133% - 24px)'\n }\n }, {\n props: ({\n variant,\n ownerState,\n size\n }) => variant === 'filled' && ownerState.shrink && size === 'small',\n style: {\n transform: 'translate(12px, 4px) scale(0.75)'\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'outlined',\n size: 'small'\n },\n style: {\n transform: 'translate(14px, 9px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'outlined' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n // Theoretically, we should have (8+5)*2/0.75 = 34px\n // but it feels a better when it bleeds a bit on the left, so 32px.\n maxWidth: 'calc(133% - 32px)',\n transform: 'translate(14px, -9px) scale(0.75)'\n }\n }]\n})));\nconst InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiInputLabel',\n props: inProps\n });\n const {\n disableAnimation = false,\n margin,\n shrink: shrinkProp,\n variant,\n className,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n let shrink = shrinkProp;\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['size', 'variant', 'required', 'focused']\n });\n const ownerState = {\n ...props,\n disableAnimation,\n formControl: muiFormControl,\n shrink,\n size: fcs.size,\n variant: fcs.variant,\n required: fcs.required,\n focused: fcs.focused\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(InputLabelRoot, {\n \"data-shrink\": shrink,\n ref: ref,\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the transition animation is disabled.\n * @default false\n */\n disableAnimation: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` of this label is focused.\n */\n focused: PropTypes.bool,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n /**\n * if `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * If `true`, the label is shrunk.\n */\n shrink: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiInputLabel', slot);\n}\nconst inputLabelClasses = generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);\nexport default inputLabelClasses;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { dividerClasses } from \"../Divider/index.js\";\nimport { listItemIconClasses } from \"../ListItemIcon/index.js\";\nimport { listItemTextClasses } from \"../ListItemText/index.js\";\nimport menuItemClasses, { getMenuItemUtilityClass } from \"./menuItemClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = composeClasses(slots, getMenuItemUtilityClass, classes);\n return {\n ...classes,\n ...composedClasses\n };\n};\nconst MenuItemRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.body1,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: (theme.vars || theme).palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${menuItemClasses.selected}`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.selectedOpacity),\n [`&.${menuItemClasses.focusVisible}`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.focusOpacity}`)\n }\n },\n [`&.${menuItemClasses.selected}:hover`]: {\n backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, `${(theme.vars || theme).palette.action.selectedOpacity} + ${(theme.vars || theme).palette.action.hoverOpacity}`),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.selectedOpacity)\n }\n },\n [`&.${menuItemClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette.action.focus\n },\n [`&.${menuItemClasses.disabled}`]: {\n opacity: (theme.vars || theme).palette.action.disabledOpacity\n },\n [`& + .${dividerClasses.root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${dividerClasses.inset}`]: {\n marginLeft: 52\n },\n [`& .${listItemTextClasses.root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${listItemTextClasses.inset}`]: {\n paddingLeft: 36\n },\n [`& .${listItemIconClasses.root}`]: {\n minWidth: 36\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableGutters,\n style: {\n paddingLeft: 16,\n paddingRight: 16\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.divider,\n style: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,\n backgroundClip: 'padding-box'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.dense,\n style: {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.dense,\n style: {\n minHeight: 32,\n // https://m2.material.io/components/menus#specs > Dense\n paddingTop: 4,\n paddingBottom: 4,\n ...theme.typography.body2,\n [`& .${listItemIconClasses.root} svg`]: {\n fontSize: '1.25rem'\n }\n }\n }]\n})));\nconst MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiMenuItem'\n });\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp,\n className,\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const childContext = React.useMemo(() => ({\n dense: dense || context.dense || false,\n disableGutters\n }), [context.dense, dense, disableGutters]);\n const menuItemRef = React.useRef(null);\n useEnhancedEffect(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('MUI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const ownerState = {\n ...props,\n dense: childContext.dense,\n divider,\n disableGutters\n };\n const classes = useUtilityClasses(props);\n const handleRef = useForkRef(menuItemRef, ref);\n let tabIndex;\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(MenuItemRoot, {\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n classes: classes\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * @ignore\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n role: PropTypes.string,\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number\n} : void 0;\nexport default MenuItem;","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport default useEnhancedEffect;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemIconUtilityClass(slot) {\n return generateUtilityClass('MuiListItemIcon', slot);\n}\nconst listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);\nexport default listItemIconClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemTextUtilityClass(slot) {\n return generateUtilityClass('MuiListItemText', slot);\n}\nconst listItemTextClasses = generateUtilityClasses('MuiListItemText', ['root', 'multiline', 'dense', 'inset', 'primary', 'secondary']);\nexport default listItemTextClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuItemUtilityClass(slot) {\n return generateUtilityClass('MuiMenuItem', slot);\n}\nconst menuItemClasses = generateUtilityClasses('MuiMenuItem', ['root', 'focusVisible', 'dense', 'disabled', 'divider', 'gutters', 'selected']);\nexport default menuItemClasses;","import ownerDocument from '@mui/utils/ownerDocument';\nexport default ownerDocument;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport MenuList from \"../MenuList/index.js\";\nimport Popover, { PopoverPaper } from \"../Popover/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getMenuUtilityClass } from \"./menuClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root'\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper'\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List'\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering,\n ...TransitionProps\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const isRtl = useRtl();\n const ownerState = {\n ...props,\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, {\n direction: isRtl ? 'rtl' : 'ltr'\n });\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const externalForwardedProps = {\n slots,\n slotProps: {\n list: MenuListProps,\n transition: TransitionProps,\n paper: PaperProps,\n ...slotProps\n }\n };\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const [PaperSlot, paperSlotProps] = useSlot('paper', {\n className: classes.paper,\n elementType: MenuPaper,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n ownerState\n });\n const [ListSlot, listSlotProps] = useSlot('list', {\n className: clsx(classes.list, MenuListProps.className),\n elementType: MenuMenuList,\n shouldForwardComponentProp: true,\n externalForwardedProps,\n getSlotProps: handlers => ({\n ...handlers,\n onKeyDown: event => {\n handleListKeyDown(event);\n handlers.onKeyDown?.(event);\n }\n }),\n ownerState\n });\n const resolvedTransitionProps = typeof externalForwardedProps.slotProps.transition === 'function' ? externalForwardedProps.slotProps.transition(ownerState) : externalForwardedProps.slotProps.transition;\n return /*#__PURE__*/_jsx(MenuRoot, {\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n root: slots.root,\n paper: PaperSlot,\n backdrop: slots.backdrop,\n ...(slots.transition && {\n // TODO: pass `slots.transition` directly once `TransitionComponent` is removed from Popover\n transition: slots.transition\n })\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps,\n backdrop: typeof slotProps.backdrop === 'function' ? slotProps.backdrop(ownerState) : slotProps.backdrop,\n transition: {\n ...resolvedTransitionProps,\n onEntering: (...args) => {\n handleEntering(...args);\n resolvedTransitionProps?.onEntering?.(...args);\n }\n }\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n ownerState: ownerState,\n ...other,\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(ListSlot, {\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant,\n ...listSlotProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](https://mui.com/material-ui/api/menu-list/) element.\n * @deprecated use the `slotProps.list` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](https://mui.com/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n list: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n list: PropTypes.elementType,\n paper: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport List from \"../List/index.js\";\nimport getActiveElement from \"../utils/getActiveElement.js\";\nimport getScrollbarSize from \"../utils/getScrollbarSize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { ownerWindow } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.startsWith(textCriteria.keys.join(''));\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu',\n ...other\n } = props;\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, {\n direction\n }) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerWindow(containerElement))}px`;\n listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;\n if (isModifierKeyPressed) {\n if (onKeyDown) {\n onKeyDown(event);\n }\n return;\n }\n\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = getActiveElement(ownerDocument(list));\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, {\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1,\n ...other,\n children: items\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"./ListContext.js\";\nimport { getListUtilityClass } from \"./listClasses.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.subheader,\n style: {\n paddingTop: 0\n }\n }]\n});\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader,\n ...other\n } = props;\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = {\n ...props,\n component,\n dense,\n disablePadding\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other,\n children: [subheader, children]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","import getScrollbarSize from '@mui/utils/getScrollbarSize';\nexport default getScrollbarSize;","import ownerWindow from '@mui/utils/ownerWindow';\nexport default ownerWindow;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport isHostComponent from '@mui/utils/isHostComponent';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport debounce from \"../utils/debounce.js\";\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport ownerWindow from \"../utils/ownerWindow.js\";\nimport Grow from \"../Grow/index.js\";\nimport Modal from \"../Modal/index.js\";\nimport PaperBase from \"../Paper/index.js\";\nimport { getPopoverUtilityClass } from \"./popoverClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root'\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper'\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n // TODO: remove in v7\n slots = {},\n slotProps = {},\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent,\n // TODO: remove in v7\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps = {},\n // TODO: remove in v7\n disableScrollLock = false,\n ...other\n } = props;\n const paperRef = React.useRef();\n const ownerState = {\n ...props,\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n };\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference=\"anchorPosition\" />.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.setProperty('top', positioning.top);\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = () => {\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n const externalForwardedProps = {\n slots: {\n transition: TransitionComponent,\n ...slots\n },\n slotProps: {\n transition: TransitionProps,\n paper: PaperPropsProp,\n ...slotProps\n }\n };\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState,\n getSlotProps: handlers => ({\n ...handlers,\n onEntering: (element, isAppearing) => {\n handlers.onEntering?.(element, isAppearing);\n handleEntering();\n },\n onExited: element => {\n handlers.onExited?.(element);\n handleExited();\n }\n }),\n additionalProps: {\n appear: true,\n in: open\n }\n });\n if (transitionDurationProp === 'auto' && !TransitionSlot.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const [RootSlot, {\n slots: rootSlotsProp,\n slotProps: rootSlotPropsProp,\n ...rootProps\n }] = useSlot('root', {\n ref,\n elementType: PopoverRoot,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other\n },\n shouldForwardComponentProp: true,\n additionalProps: {\n slots: {\n backdrop: slots.backdrop\n },\n slotProps: {\n backdrop: mergeSlotProps(typeof slotProps.backdrop === 'function' ? slotProps.backdrop(ownerState) : slotProps.backdrop, {\n invisible: true\n })\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n });\n const [PaperSlot, paperProps] = useSlot('paper', {\n ref: paperRef,\n className: classes.paper,\n elementType: PopoverPaper,\n externalForwardedProps,\n shouldForwardComponentProp: true,\n additionalProps: {\n elevation,\n style: isPositioned ? undefined : {\n opacity: 0\n }\n },\n ownerState\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootProps,\n ...(!isHostComponent(RootSlot) && {\n slots: rootSlotsProp,\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }),\n children: /*#__PURE__*/_jsx(TransitionSlot, {\n ...transitionSlotProps,\n timeout: transitionDuration,\n children: /*#__PURE__*/_jsx(PaperSlot, {\n ...paperProps,\n children: children\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](https://mui.com/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n BackdropProps: PropTypes.object,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overridden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n paper: PropTypes.elementType,\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","import debounce from '@mui/utils/debounce';\nexport default debounce;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","import clsx from 'clsx';\n\n// Brought from [Base UI](https://github.com/mui/base-ui/blob/master/packages/react/src/merge-props/mergeProps.ts#L119)\n// Use it directly from Base UI once it's a package dependency.\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const thirdCharCode = key.charCodeAt(2);\n return key[0] === 'o' && key[1] === 'n' && thirdCharCode >= 65 /* A */ && thirdCharCode <= 90 /* Z */ && typeof value === 'function';\n}\nexport default function mergeSlotProps(externalSlotProps, defaultSlotProps) {\n if (!externalSlotProps) {\n return defaultSlotProps;\n }\n function extractHandlers(externalSlotPropsValue, defaultSlotPropsValue) {\n const handlers = {};\n Object.keys(defaultSlotPropsValue).forEach(key => {\n if (isEventHandler(key, defaultSlotPropsValue[key]) && typeof externalSlotPropsValue[key] === 'function') {\n // only compose the handlers if both default and external slot props match the event handler\n handlers[key] = (...args) => {\n externalSlotPropsValue[key](...args);\n defaultSlotPropsValue[key](...args);\n };\n }\n });\n return handlers;\n }\n if (typeof externalSlotProps === 'function' || typeof defaultSlotProps === 'function') {\n return ownerState => {\n const defaultSlotPropsValue = typeof defaultSlotProps === 'function' ? defaultSlotProps(ownerState) : defaultSlotProps;\n const externalSlotPropsValue = typeof externalSlotProps === 'function' ? externalSlotProps({\n ...ownerState,\n ...defaultSlotPropsValue\n }) : externalSlotProps;\n const className = clsx(ownerState?.className, defaultSlotPropsValue?.className, externalSlotPropsValue?.className);\n const handlers = extractHandlers(externalSlotPropsValue, defaultSlotPropsValue);\n return {\n ...defaultSlotPropsValue,\n ...externalSlotPropsValue,\n ...handlers,\n ...(!!className && {\n className\n }),\n ...(defaultSlotPropsValue?.style && externalSlotPropsValue?.style && {\n style: {\n ...defaultSlotPropsValue.style,\n ...externalSlotPropsValue.style\n }\n }),\n ...(defaultSlotPropsValue?.sx && externalSlotPropsValue?.sx && {\n sx: [...(Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx]), ...(Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx])]\n })\n };\n };\n }\n const typedDefaultSlotProps = defaultSlotProps;\n const handlers = extractHandlers(externalSlotProps, typedDefaultSlotProps);\n const className = clsx(typedDefaultSlotProps?.className, externalSlotProps?.className);\n return {\n ...defaultSlotProps,\n ...externalSlotProps,\n ...handlers,\n ...(!!className && {\n className\n }),\n ...(typedDefaultSlotProps?.style && externalSlotProps?.style && {\n style: {\n ...typedDefaultSlotProps.style,\n ...externalSlotProps.style\n }\n }),\n ...(typedDefaultSlotProps?.sx && externalSlotProps?.sx && {\n sx: [...(Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx]), ...(Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx])]\n })\n };\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport nativeSelectClasses, { getNativeSelectUtilityClasses } from \"./nativeSelectClasses.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n multiple,\n open,\n error\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']\n };\n return composeClasses(slots, getNativeSelectUtilityClasses, classes);\n};\nexport const StyledSelectSelect = styled('select', {\n name: 'MuiNativeSelect'\n})(({\n theme\n}) => ({\n // Reset\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n // Reset\n borderRadius: 0,\n cursor: 'pointer',\n '&:focus': {\n // Reset Chrome style\n borderRadius: 0\n },\n [`&.${nativeSelectClasses.disabled}`]: {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: (theme.vars || theme).palette.background.paper\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.variant !== 'filled' && ownerState.variant !== 'outlined',\n style: {\n // Bump specificity to allow extending custom inputs\n '&&&': {\n paddingRight: 24,\n minWidth: 16 // So it doesn't collapse.\n }\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n '&&&': {\n paddingRight: 32\n }\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n borderRadius: (theme.vars || theme).shape.borderRadius,\n '&:focus': {\n borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style\n },\n '&&&': {\n paddingRight: 32\n }\n }\n }]\n}));\nconst NativeSelectSelect = styled(StyledSelectSelect, {\n name: 'MuiNativeSelect',\n slot: 'Select',\n shouldForwardProp: rootShouldForwardProp,\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.select, styles[ownerState.variant], ownerState.error && styles.error, {\n [`&.${nativeSelectClasses.multiple}`]: styles.multiple\n }];\n }\n})({});\nexport const StyledSelectIcon = styled('svg', {\n name: 'MuiNativeSelect'\n})(({\n theme\n}) => ({\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n // Center vertically, height is 1em\n top: 'calc(50% - .5em)',\n // Don't block pointer events on the select under the icon.\n pointerEvents: 'none',\n color: (theme.vars || theme).palette.action.active,\n [`&.${nativeSelectClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.open,\n style: {\n transform: 'rotate(180deg)'\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n right: 7\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n right: 7\n }\n }]\n}));\nconst NativeSelectIcon = styled(StyledSelectIcon, {\n name: 'MuiNativeSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})({});\n\n/**\n * @ignore - internal component.\n */\nconst NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {\n const {\n className,\n disabled,\n error,\n IconComponent,\n inputRef,\n variant = 'standard',\n ...other\n } = props;\n const ownerState = {\n ...props,\n disabled,\n variant,\n error\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(NativeSelectSelect, {\n ownerState: ownerState,\n className: clsx(classes.select, className),\n disabled: disabled,\n ref: inputRef || ref,\n ...other\n }), props.multiple ? null : /*#__PURE__*/_jsx(NativeSelectIcon, {\n as: IconComponent,\n ownerState: ownerState,\n className: classes.icon\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the `select input` will indicate an error.\n */\n error: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n /**\n * Use that prop to pass a ref to the native select element.\n * @deprecated\n */\n inputRef: refType,\n /**\n * @ignore\n */\n multiple: PropTypes.bool,\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The input value.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default NativeSelectInput;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getNativeSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiNativeSelect', slot);\n}\nconst nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);\nexport default nativeSelectClasses;","import {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n TextField,\n} from \"@mui/material\";\nimport { HttpMethods } from \"@/types/fapi\";\nimport { FAPI } from \"@/utils/data\";\nimport { EndpointFormFieldsProps } from \"./types\";\n\nconst EndpointFormFields = ({\n formData,\n formErrors,\n formTouched,\n isEditMode,\n onPathChange,\n onPathBlur,\n onMethodChange,\n onResponseCodeChange,\n onResponseDelayChange,\n}: EndpointFormFieldsProps) => {\n return (\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 lg:gap-6 mb-4\">\n {/* FAPI Endpoint Path */}\n <TextField\n fullWidth\n label=\"FAPI Endpoint Path\"\n placeholder={`/api/endpoint/paths?query=\"params\"`}\n value={formData.path}\n onChange={(e) => onPathChange(e.target.value)}\n onBlur={onPathBlur}\n error={Boolean(formTouched.path && formErrors.path)}\n helperText={formTouched.path && formErrors.path}\n disabled={isEditMode}\n sx={{\n \"& .MuiInputBase-input\": {\n fontFamily: \"var(--font-google-sans-code)\",\n },\n }}\n ></TextField>\n\n {/* HTTP Method */}\n <FormControl fullWidth disabled={isEditMode}>\n <InputLabel>HTTP Method</InputLabel>\n <Select\n value={formData.method}\n label=\"HTTP Method\"\n onChange={(e) => onMethodChange(e.target.value as HttpMethods)}\n >\n {Object.values(FAPI.SUPPORTED_HTTP_METHODS).map(\n (method: HttpMethods) => (\n <MenuItem key={method} value={method}>\n {method}\n </MenuItem>\n )\n )}\n </Select>\n </FormControl>\n\n {/* HTTP Response Code */}\n <FormControl fullWidth>\n <InputLabel>HTTP Response Status Code</InputLabel>\n <Select\n value={formData.responseCode}\n label=\"HTTP Response Status Code\"\n onChange={(e) => onResponseCodeChange(Number(e.target.value))}\n >\n {Object.values(FAPI.SUPPORTED_HTTP_RESPONSE_STATUS_CODE).map(\n (responseCode) => (\n <MenuItem key={responseCode.code} value={responseCode.code}>\n {responseCode.label}\n </MenuItem>\n )\n )}\n </Select>\n </FormControl>\n\n {/* Response Delay */}\n <FormControl fullWidth>\n <InputLabel>Response Delay</InputLabel>\n <Select\n value={formData.responseDelay}\n label=\"Response Delay\"\n onChange={(e) => onResponseDelayChange(Number(e.target.value))}\n >\n {Object.values(FAPI.SUPPORTED_RESPONSE_DELAYS).map((delay) => (\n <MenuItem key={delay.value} value={delay.value}>\n {delay.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </div>\n );\n};\n\nexport default EndpointFormFields;\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport deepmerge from '@mui/utils/deepmerge';\nimport composeClasses from '@mui/utils/composeClasses';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport SelectInput from \"./SelectInput.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport ArrowDropDownIcon from \"../internal/svg-icons/ArrowDropDown.js\";\nimport Input from \"../Input/index.js\";\nimport NativeSelectInput from \"../NativeSelect/NativeSelectInput.js\";\nimport FilledInput from \"../FilledInput/index.js\";\nimport OutlinedInput from \"../OutlinedInput/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { getSelectUtilityClasses } from \"./selectClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n const composedClasses = composeClasses(slots, getSelectUtilityClasses, classes);\n return {\n ...classes,\n ...composedClasses\n };\n};\nconst styledRootConfig = {\n name: 'MuiSelect',\n slot: 'Root',\n shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'variant'\n};\nconst StyledInput = styled(Input, styledRootConfig)('');\nconst StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');\nconst StyledFilledInput = styled(FilledInput, styledRootConfig)('');\nconst Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiSelect',\n props: inProps\n });\n const {\n autoWidth = false,\n children,\n classes: classesProp = {},\n className,\n defaultOpen = false,\n displayEmpty = false,\n IconComponent = ArrowDropDownIcon,\n id,\n input,\n inputProps,\n label,\n labelId,\n MenuProps,\n multiple = false,\n native = false,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps,\n variant: variantProp = 'outlined',\n ...other\n } = props;\n const inputComponent = native ? NativeSelectInput : SelectInput;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant', 'error']\n });\n const variant = fcs.variant || variantProp;\n const ownerState = {\n ...props,\n variant,\n classes: classesProp\n };\n const classes = useUtilityClasses(ownerState);\n const {\n root,\n ...restOfClasses\n } = classes;\n const InputComponent = input || {\n standard: /*#__PURE__*/_jsx(StyledInput, {\n ownerState: ownerState\n }),\n outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {\n label: label,\n ownerState: ownerState\n }),\n filled: /*#__PURE__*/_jsx(StyledFilledInput, {\n ownerState: ownerState\n })\n }[variant];\n const inputComponentRef = useForkRef(ref, getReactElementRef(InputComponent));\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: /*#__PURE__*/React.cloneElement(InputComponent, {\n // Most of the logic is implemented in `SelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent,\n inputProps: {\n children,\n error: fcs.error,\n IconComponent,\n variant,\n type: undefined,\n // We render a select. We can ignore the type provided by the `Input`.\n multiple,\n ...(native ? {\n id\n } : {\n autoWidth,\n defaultOpen,\n displayEmpty,\n labelId,\n MenuProps,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps: {\n id,\n ...SelectDisplayProps\n }\n }),\n ...inputProps,\n classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses,\n ...(input ? input.props.inputProps : {})\n },\n ...((multiple && native || displayEmpty) && variant === 'outlined' ? {\n notched: true\n } : {}),\n ref: inputComponentRef,\n className: clsx(InputComponent.props.className, className, classes.root),\n // If a custom input is provided via 'input' prop, do not allow 'variant' to be propagated to it's root element. See https://github.com/mui/material-ui/issues/33894.\n ...(!input && {\n variant\n }),\n ...other\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n * @default false\n */\n autoWidth: PropTypes.bool,\n /**\n * The option elements to populate the select with.\n * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n *\n * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n * @default {}\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).\n * You can only use it when the `native` prop is `false` (default).\n * @default false\n */\n defaultOpen: PropTypes.bool,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, a value is displayed even if no items are selected.\n *\n * In order to display a meaningful value, a function can be passed to the `renderValue` prop which\n * returns the value to be displayed when no items are selected.\n *\n * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.\n * The label should either be hidden or forced to a shrunk state.\n * @default false\n */\n displayEmpty: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n * @default ArrowDropDownIcon\n */\n IconComponent: PropTypes.elementType,\n /**\n * The `id` of the wrapper element or the `select` element when `native`.\n */\n id: PropTypes.string,\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: PropTypes.element,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * When `native` is `true`, the attributes are applied on the `select` element.\n */\n inputProps: PropTypes.object,\n /**\n * See [OutlinedInput#label](https://mui.com/material-ui/api/outlined-input/#props)\n */\n label: PropTypes.node,\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n /**\n * Props applied to the [`Menu`](https://mui.com/material-ui/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n * @default false\n */\n multiple: PropTypes.bool,\n /**\n * If `true`, the component uses a native `select` element.\n * @default false\n */\n native: PropTypes.bool,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {SelectChangeEvent<Value>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.\n * @param {object} [child] The react element that was selected when `native` is `false` (default).\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be opened.\n * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n * You can only use it when the `native` prop is `false` (default).\n */\n open: PropTypes.bool,\n /**\n * Render the selected value.\n * You can only use it when the `native` prop is `false` (default).\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The `input` value. Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n *\n * If the value is an object it must have reference equality with the option in order to be selected.\n * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n */\n value: PropTypes.oneOfType([PropTypes.oneOf(['']), PropTypes.any]),\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nSelect.muiName = 'Select';\nexport default Select;","'use client';\n\nimport _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nvar _span;\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport refType from '@mui/utils/refType';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Menu from \"../Menu/Menu.js\";\nimport { StyledSelectSelect, StyledSelectIcon } from \"../NativeSelect/NativeSelectInput.js\";\nimport { isFilled } from \"../InputBase/utils.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport slotShouldForwardProp from \"../styles/slotShouldForwardProp.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport selectClasses, { getSelectUtilityClasses } from \"./selectClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SelectSelect = styled(StyledSelectSelect, {\n name: 'MuiSelect',\n slot: 'Select',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [\n // Win specificity over the input base\n {\n [`&.${selectClasses.select}`]: styles.select\n }, {\n [`&.${selectClasses.select}`]: styles[ownerState.variant]\n }, {\n [`&.${selectClasses.error}`]: styles.error\n }, {\n [`&.${selectClasses.multiple}`]: styles.multiple\n }];\n }\n})({\n // Win specificity over the input base\n [`&.${selectClasses.select}`]: {\n height: 'auto',\n // Resets for multiple select with chips\n minHeight: '1.4375em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n }\n});\nconst SelectIcon = styled(StyledSelectIcon, {\n name: 'MuiSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})({});\nconst SelectNativeInput = styled('input', {\n shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'classes',\n name: 'MuiSelect',\n slot: 'NativeInput'\n})({\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%',\n boxSizing: 'border-box'\n});\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n }\n\n // The value could be a number, the DOM will stringify it anyway.\n return String(a) === String(b);\n}\nfunction isEmpty(display) {\n return display == null || typeof display === 'string' && !display.trim();\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n multiple,\n open,\n error\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled'],\n nativeInput: ['nativeInput']\n };\n return composeClasses(slots, getSelectUtilityClasses, classes);\n};\n\n/**\n * @ignore - internal component.\n */\nconst SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n autoFocus,\n autoWidth,\n children,\n className,\n defaultOpen,\n defaultValue,\n disabled,\n displayEmpty,\n error = false,\n IconComponent,\n inputRef: inputRefProp,\n labelId,\n MenuProps = {},\n multiple,\n name,\n onBlur,\n onChange,\n onClose,\n onFocus,\n // eslint-disable-next-line react/prop-types\n onKeyDown,\n // eslint-disable-next-line react/prop-types\n onMouseDown,\n onOpen,\n open: openProp,\n readOnly,\n renderValue,\n required,\n SelectDisplayProps = {},\n tabIndex: tabIndexProp,\n // catching `type` from Input which makes no sense for SelectInput\n type,\n value: valueProp,\n variant = 'standard',\n ...other\n } = props;\n const [value, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Select'\n });\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select'\n });\n const inputRef = React.useRef(null);\n const displayRef = React.useRef(null);\n const [displayNode, setDisplayNode] = React.useState(null);\n const {\n current: isOpenControlled\n } = React.useRef(openProp != null);\n const [menuMinWidthState, setMenuMinWidthState] = React.useState();\n const handleRef = useForkRef(ref, inputRefProp);\n const handleDisplayRef = React.useCallback(node => {\n displayRef.current = node;\n if (node) {\n setDisplayNode(node);\n }\n }, []);\n const anchorElement = displayNode?.parentNode;\n React.useImperativeHandle(handleRef, () => ({\n focus: () => {\n displayRef.current.focus();\n },\n node: inputRef.current,\n value\n }), [value]);\n\n // Resize menu on `defaultOpen` automatic toggle.\n React.useEffect(() => {\n if (defaultOpen && openState && displayNode && !isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);\n displayRef.current.focus();\n }\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [displayNode, autoWidth]);\n // `isOpenControlled` is ignored because the component should never switch between controlled and uncontrolled modes.\n // `defaultOpen` and `openState` are ignored to avoid unnecessary callbacks.\n React.useEffect(() => {\n if (autoFocus) {\n displayRef.current.focus();\n }\n }, [autoFocus]);\n React.useEffect(() => {\n if (!labelId) {\n return undefined;\n }\n const label = ownerDocument(displayRef.current).getElementById(labelId);\n if (label) {\n const handler = () => {\n if (getSelection().isCollapsed) {\n displayRef.current.focus();\n }\n };\n label.addEventListener('click', handler);\n return () => {\n label.removeEventListener('click', handler);\n };\n }\n return undefined;\n }, [labelId]);\n const update = (open, event) => {\n if (open) {\n if (onOpen) {\n onOpen(event);\n }\n } else if (onClose) {\n onClose(event);\n }\n if (!isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);\n setOpenState(open);\n }\n };\n const handleMouseDown = event => {\n onMouseDown?.(event);\n // Ignore everything but left-click\n if (event.button !== 0) {\n return;\n }\n // Hijack the default focus behavior.\n event.preventDefault();\n displayRef.current.focus();\n update(true, event);\n };\n const handleClose = event => {\n update(false, event);\n };\n const childrenArray = React.Children.toArray(children);\n\n // Support autofill.\n const handleChange = event => {\n const child = childrenArray.find(childItem => childItem.props.value === event.target.value);\n if (child === undefined) {\n return;\n }\n setValueState(child.props.value);\n if (onChange) {\n onChange(event, child);\n }\n };\n const handleItemClick = child => event => {\n let newValue;\n\n // We use the tabindex attribute to signal the available options.\n if (!event.currentTarget.hasAttribute('tabindex')) {\n return;\n }\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n const itemIndex = value.indexOf(child.props.value);\n if (itemIndex === -1) {\n newValue.push(child.props.value);\n } else {\n newValue.splice(itemIndex, 1);\n }\n } else {\n newValue = child.props.value;\n }\n if (child.props.onClick) {\n child.props.onClick(event);\n }\n if (value !== newValue) {\n setValueState(newValue);\n if (onChange) {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value: newValue,\n name\n }\n });\n onChange(clonedEvent, child);\n }\n }\n if (!multiple) {\n update(false, event);\n }\n };\n const handleKeyDown = event => {\n if (!readOnly) {\n const validKeys = [' ', 'ArrowUp', 'ArrowDown',\n // The native select doesn't respond to enter on macOS, but it's recommended by\n // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/\n 'Enter'];\n if (validKeys.includes(event.key)) {\n event.preventDefault();\n update(true, event);\n }\n onKeyDown?.(event);\n }\n };\n const open = displayNode !== null && openState;\n const handleBlur = event => {\n // if open event.stopImmediatePropagation\n if (!open && onBlur) {\n // Preact support, target is read only property on a native event.\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onBlur(event);\n }\n };\n delete other['aria-invalid'];\n let display;\n let displaySingle;\n const displayMultiple = [];\n let computeDisplay = false;\n let foundMatch = false;\n\n // No need to display any value if the field is empty.\n if (isFilled({\n value\n }) || displayEmpty) {\n if (renderValue) {\n display = renderValue(value);\n } else {\n computeDisplay = true;\n }\n }\n const items = childrenArray.map(child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Select component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n let selected;\n if (multiple) {\n if (!Array.isArray(value)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: The `value` prop must be an array ' + 'when using the `Select` component with `multiple`.' : _formatErrorMessage(2));\n }\n selected = value.some(v => areEqualValues(v, child.props.value));\n if (selected && computeDisplay) {\n displayMultiple.push(child.props.children);\n }\n } else {\n selected = areEqualValues(value, child.props.value);\n if (selected && computeDisplay) {\n displaySingle = child.props.children;\n }\n }\n if (selected) {\n foundMatch = true;\n }\n return /*#__PURE__*/React.cloneElement(child, {\n 'aria-selected': selected ? 'true' : 'false',\n onClick: handleItemClick(child),\n onKeyUp: event => {\n if (event.key === ' ') {\n // otherwise our MenuItems dispatches a click event\n // it's not behavior of the native <option> and causes\n // the select to close immediately since we open on space keydown\n event.preventDefault();\n }\n if (child.props.onKeyUp) {\n child.props.onKeyUp(event);\n }\n },\n role: 'option',\n selected,\n value: undefined,\n // The value is most likely not a valid HTML attribute.\n 'data-value': child.props.value // Instead, we provide it as a data attribute.\n });\n });\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!foundMatch && !multiple && value !== '') {\n const values = childrenArray.map(child => child.props.value);\n console.warn([`MUI: You have provided an out-of-range value \\`${value}\\` for the select ${name ? `(name=\"${name}\") ` : ''}component.`, \"Consider providing a value that matches one of the available options or ''.\", `The available values are ${values.filter(x => x != null).map(x => `\\`${x}\\``).join(', ') || '\"\"'}.`].join('\\n'));\n }\n }, [foundMatch, childrenArray, multiple, name, value]);\n }\n if (computeDisplay) {\n if (multiple) {\n if (displayMultiple.length === 0) {\n display = null;\n } else {\n display = displayMultiple.reduce((output, child, index) => {\n output.push(child);\n if (index < displayMultiple.length - 1) {\n output.push(', ');\n }\n return output;\n }, []);\n }\n } else {\n display = displaySingle;\n }\n }\n\n // Avoid performing a layout computation in the render method.\n let menuMinWidth = menuMinWidthState;\n if (!autoWidth && isOpenControlled && displayNode) {\n menuMinWidth = anchorElement.clientWidth;\n }\n let tabIndex;\n if (typeof tabIndexProp !== 'undefined') {\n tabIndex = tabIndexProp;\n } else {\n tabIndex = disabled ? null : 0;\n }\n const buttonId = SelectDisplayProps.id || (name ? `mui-component-select-${name}` : undefined);\n const ownerState = {\n ...props,\n variant,\n value,\n open,\n error\n };\n const classes = useUtilityClasses(ownerState);\n const paperProps = {\n ...MenuProps.PaperProps,\n ...(typeof MenuProps.slotProps?.paper === 'function' ? MenuProps.slotProps.paper(ownerState) : MenuProps.slotProps?.paper)\n };\n const listProps = {\n ...MenuProps.MenuListProps,\n ...(typeof MenuProps.slotProps?.list === 'function' ? MenuProps.slotProps.list(ownerState) : MenuProps.slotProps?.list)\n };\n const listboxId = useId();\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(SelectSelect, {\n as: \"div\",\n ref: handleDisplayRef,\n tabIndex: tabIndex,\n role: \"combobox\",\n \"aria-controls\": open ? listboxId : undefined,\n \"aria-disabled\": disabled ? 'true' : undefined,\n \"aria-expanded\": open ? 'true' : 'false',\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": [labelId, buttonId].filter(Boolean).join(' ') || undefined,\n \"aria-describedby\": ariaDescribedby,\n \"aria-required\": required ? 'true' : undefined,\n \"aria-invalid\": error ? 'true' : undefined,\n onKeyDown: handleKeyDown,\n onMouseDown: disabled || readOnly ? null : handleMouseDown,\n onBlur: handleBlur,\n onFocus: onFocus,\n ...SelectDisplayProps,\n ownerState: ownerState,\n className: clsx(SelectDisplayProps.className, classes.select, className)\n // The id is required for proper a11y\n ,\n id: buttonId,\n children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n \"aria-hidden\": true,\n children: \"\\u200B\"\n })) : display\n }), /*#__PURE__*/_jsx(SelectNativeInput, {\n \"aria-invalid\": error,\n value: Array.isArray(value) ? value.join(',') : value,\n name: name,\n ref: inputRef,\n \"aria-hidden\": true,\n onChange: handleChange,\n tabIndex: -1,\n disabled: disabled,\n className: classes.nativeInput,\n autoFocus: autoFocus,\n required: required,\n ...other,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(SelectIcon, {\n as: IconComponent,\n className: classes.icon,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(Menu, {\n id: `menu-${name || ''}`,\n anchorEl: anchorElement,\n open: open,\n onClose: handleClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'center'\n },\n transformOrigin: {\n vertical: 'top',\n horizontal: 'center'\n },\n ...MenuProps,\n slotProps: {\n ...MenuProps.slotProps,\n list: {\n 'aria-labelledby': labelId,\n role: 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined,\n disableListWrap: true,\n id: listboxId,\n ...listProps\n },\n paper: {\n ...paperProps,\n style: {\n minWidth: menuMinWidth,\n ...(paperProps != null ? paperProps.style : null)\n }\n }\n },\n children: items\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SelectInput.propTypes = {\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n /**\n * @ignore\n */\n 'aria-label': PropTypes.string,\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: PropTypes.bool,\n /**\n * The option elements to populate the select with.\n * Can be some `<MenuItem>` elements.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is toggled on mount. Use when the component open state is not controlled.\n * You can only use it when the `native` prop is `false` (default).\n */\n defaultOpen: PropTypes.bool,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the selected item is displayed even if its value is empty.\n */\n displayEmpty: PropTypes.bool,\n /**\n * If `true`, the `select input` will indicate an error.\n */\n error: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n /**\n * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`\n * Equivalent to `ref`\n */\n inputRef: refType,\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n /**\n * Props applied to the [`Menu`](/material-ui/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: PropTypes.bool,\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * @ignore\n */\n readOnly: PropTypes.bool,\n /**\n * Render the selected value.\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n /**\n * If `true`, the component is required.\n */\n required: PropTypes.bool,\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n type: PropTypes.any,\n /**\n * The input value.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default SelectInput;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiSelect', slot);\n}\nconst selectClasses = generateUtilityClasses('MuiSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);\nexport default selectClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the <svg> will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));\n}","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","'use client';\n\nimport _formatErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nvar _InputGlobalStyles;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isHostComponent from '@mui/utils/isHostComponent';\nimport TextareaAutosize from \"../TextareaAutosize/index.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport FormControlContext from \"../FormControl/FormControlContext.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled, globalCss } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { isFilled } from \"./utils.js\";\nimport inputBaseClasses, { getInputBaseUtilityClass } from \"./inputBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${capitalize(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nexport const inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n readOnly,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']\n };\n return composeClasses(slots, getInputBaseUtilityClass, classes);\n};\nexport const InputBaseRoot = styled('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.body1,\n color: (theme.vars || theme).palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${inputBaseClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled,\n cursor: 'default'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '4px 0 5px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n paddingTop: 1\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.fullWidth,\n style: {\n width: '100%'\n }\n }]\n})));\nexport const InputBaseInput = styled('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n ...(theme.vars ? {\n opacity: theme.vars.opacity.inputPlaceholder\n } : {\n opacity: light ? 0.42 : 0.5\n }),\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = theme.vars ? {\n opacity: theme.vars.opacity.inputPlaceholder\n } : {\n opacity: light ? 0.42 : 0.5\n };\n return {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n },\n [`&.${inputBaseClasses.disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: (theme.vars || theme).palette.text.disabled // Fix opacity Safari bug\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInjectingGlobalStyles,\n style: {\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 1\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }\n }, {\n props: {\n type: 'search'\n },\n style: {\n MozAppearance: 'textfield' // Improve type search style.\n }\n }]\n };\n}));\nconst InputGlobalStyles = globalCss({\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n});\n\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\nconst InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInputBase'\n });\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n color,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n disableInjectingGlobalStyles,\n endAdornment,\n error,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n margin,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n size,\n slotProps = {},\n slots = {},\n startAdornment,\n type = 'text',\n value: valueProp,\n ...other\n } = props;\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef();\n const handleInputRefWarning = React.useCallback(instance => {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);\n const [focused, setFocused] = React.useState(false);\n const muiFormControl = useFormControl();\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n return undefined;\n }, [muiFormControl]);\n }\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused;\n\n // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n React.useEffect(() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = React.useCallback(obj => {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n const handleFocus = event => {\n if (onFocus) {\n onFocus(event);\n }\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: Expected valid input target. ' + 'Did you use a custom `inputComponent` and forget to forward refs? ' + 'See https://mui.com/r/input-component-ref-interface for more info.' : _formatErrorMessage(1));\n }\n checkDirty({\n value: element.value\n });\n }\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n }\n\n // Perform in the willUpdate\n if (onChange) {\n onChange(event, ...args);\n }\n };\n\n // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n React.useEffect(() => {\n checkDirty(inputRef.current);\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n if (onClick) {\n onClick(event);\n }\n };\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (process.env.NODE_ENV !== 'production') {\n if (minRows || maxRows) {\n console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n inputProps = {\n type: undefined,\n minRows: rows,\n maxRows: rows,\n ...inputProps\n };\n } else {\n inputProps = {\n type: undefined,\n maxRows,\n minRows,\n ...inputProps\n };\n }\n InputComponent = TextareaAutosize;\n }\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n React.useEffect(() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n };\n const classes = useUtilityClasses(ownerState);\n const Root = slots.root || components.Root || InputBaseRoot;\n const rootProps = slotProps.root || componentsProps.root || {};\n const Input = slots.input || components.Input || InputBaseInput;\n inputProps = {\n ...inputProps,\n ...(slotProps.input ?? componentsProps.input)\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (// For Emotion/Styled-components, InputGlobalStyles will be a function\n // For Pigment CSS, this has no effect because the InputGlobalStyles will be null.\n _InputGlobalStyles || (_InputGlobalStyles = /*#__PURE__*/_jsx(InputGlobalStyles, {}))), /*#__PURE__*/_jsxs(Root, {\n ...rootProps,\n ref: ref,\n onClick: handleClick,\n ...other,\n ...(!isHostComponent(Root) && {\n ownerState: {\n ...ownerState,\n ...rootProps.ownerState\n }\n }),\n className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),\n children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(Input, {\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type,\n ...inputProps,\n ...(!isHostComponent(Input) && {\n as: InputComponent,\n ownerState: {\n ...ownerState,\n ...inputProps.ownerState\n }\n }),\n ref: handleInputRef,\n className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n })\n }), endAdornment, renderSuffix ? renderSuffix({\n ...fcs,\n startAdornment\n }) : null]\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.\n * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.\n * @default false\n */\n disableInjectingGlobalStyles: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: elementTypeAcceptingRef,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the `input` doesn't satisfy its constraints.\n */\n onInvalid: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The size of the component.\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default InputBase;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '@mui/utils/debounce';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport ownerWindow from '@mui/utils/ownerWindow';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getStyleValue(value) {\n return parseInt(value, 10) || 0;\n}\nconst styles = {\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\nfunction isEmpty(obj) {\n return isObjectEmpty(obj) || obj.outerHeightStyle === 0 && !obj.overflowing;\n}\n\n/**\n *\n * Demos:\n *\n * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)\n *\n * API:\n *\n * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)\n */\nconst TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {\n const {\n onChange,\n maxRows,\n minRows = 1,\n style,\n value,\n ...other\n } = props;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const textareaRef = React.useRef(null);\n const handleRef = useForkRef(forwardedRef, textareaRef);\n const heightRef = React.useRef(null);\n const hiddenTextareaRef = React.useRef(null);\n const calculateTextareaStyles = React.useCallback(() => {\n const textarea = textareaRef.current;\n const hiddenTextarea = hiddenTextareaRef.current;\n if (!textarea || !hiddenTextarea) {\n return undefined;\n }\n const containerWindow = ownerWindow(textarea);\n const computedStyle = containerWindow.getComputedStyle(textarea);\n\n // If input's width is shrunk and it's not visible, don't sync height.\n if (computedStyle.width === '0px') {\n return {\n outerHeightStyle: 0,\n overflowing: false\n };\n }\n hiddenTextarea.style.width = computedStyle.width;\n hiddenTextarea.value = textarea.value || props.placeholder || 'x';\n if (hiddenTextarea.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n hiddenTextarea.value += ' ';\n }\n const boxSizing = computedStyle.boxSizing;\n const padding = getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop);\n const border = getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth);\n\n // The height of the inner content\n const innerHeight = hiddenTextarea.scrollHeight;\n\n // Measure height of a textarea with a single row\n hiddenTextarea.value = 'x';\n const singleRowHeight = hiddenTextarea.scrollHeight;\n\n // The height of the outer content\n let outerHeight = innerHeight;\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n outerHeight = Math.max(outerHeight, singleRowHeight);\n\n // Take the box sizing into account for applying this value as a style.\n const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n const overflowing = Math.abs(outerHeight - innerHeight) <= 1;\n return {\n outerHeightStyle,\n overflowing\n };\n }, [maxRows, minRows, props.placeholder]);\n const didHeightChange = useEventCallback(() => {\n const textarea = textareaRef.current;\n const textareaStyles = calculateTextareaStyles();\n if (!textarea || !textareaStyles || isEmpty(textareaStyles)) {\n return false;\n }\n const outerHeightStyle = textareaStyles.outerHeightStyle;\n return heightRef.current != null && heightRef.current !== outerHeightStyle;\n });\n const syncHeight = React.useCallback(() => {\n const textarea = textareaRef.current;\n const textareaStyles = calculateTextareaStyles();\n if (!textarea || !textareaStyles || isEmpty(textareaStyles)) {\n return;\n }\n const outerHeightStyle = textareaStyles.outerHeightStyle;\n if (heightRef.current !== outerHeightStyle) {\n heightRef.current = outerHeightStyle;\n textarea.style.height = `${outerHeightStyle}px`;\n }\n textarea.style.overflow = textareaStyles.overflowing ? 'hidden' : '';\n }, [calculateTextareaStyles]);\n const frameRef = React.useRef(-1);\n useEnhancedEffect(() => {\n const debouncedHandleResize = debounce(syncHeight);\n const textarea = textareaRef?.current;\n if (!textarea) {\n return undefined;\n }\n const containerWindow = ownerWindow(textarea);\n containerWindow.addEventListener('resize', debouncedHandleResize);\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(() => {\n if (didHeightChange()) {\n // avoid \"ResizeObserver loop completed with undelivered notifications\" error\n // by temporarily unobserving the textarea element while manipulating the height\n // and reobserving one frame later\n resizeObserver.unobserve(textarea);\n cancelAnimationFrame(frameRef.current);\n syncHeight();\n frameRef.current = requestAnimationFrame(() => {\n resizeObserver.observe(textarea);\n });\n }\n });\n resizeObserver.observe(textarea);\n }\n return () => {\n debouncedHandleResize.clear();\n cancelAnimationFrame(frameRef.current);\n containerWindow.removeEventListener('resize', debouncedHandleResize);\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [calculateTextareaStyles, syncHeight, didHeightChange]);\n useEnhancedEffect(() => {\n syncHeight();\n });\n const handleChange = event => {\n if (!isControlled) {\n syncHeight();\n }\n const textarea = event.target;\n const countOfCharacters = textarea.value.length;\n const isLastCharacterNewLine = textarea.value.endsWith('\\n');\n const isEndOfTheLine = textarea.selectionStart === countOfCharacters;\n\n // Set the cursor position to the very end of the text.\n if (isLastCharacterNewLine && isEndOfTheLine) {\n textarea.setSelectionRange(countOfCharacters, countOfCharacters);\n }\n if (onChange) {\n onChange(event);\n }\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"textarea\", {\n value: value,\n onChange: handleChange,\n ref: handleRef\n // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: minRows,\n style: style,\n ...other\n }), /*#__PURE__*/_jsx(\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: hiddenTextareaRef,\n tabIndex: -1,\n style: {\n ...styles.shadow,\n ...style,\n paddingTop: 0,\n paddingBottom: 0\n }\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Maximum number of rows to display.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display.\n * @default 1\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n placeholder: PropTypes.string,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * @ignore\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputBaseUtilityClass(slot) {\n return generateUtilityClass('MuiInputBase', slot);\n}\nconst inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);\nexport default inputBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport deepmerge from '@mui/utils/deepmerge';\nimport refType from '@mui/utils/refType';\nimport InputBase from \"../InputBase/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport inputClasses, { getInputUtilityClass } from \"./inputClasses.js\";\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst InputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n if (theme.vars) {\n bottomLineColor = theme.alpha(theme.vars.palette.common.onBackground, theme.vars.opacity.inputUnderline);\n }\n return {\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.formControl,\n style: {\n 'label + &': {\n marginTop: 16\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disableUnderline,\n style: {\n '&::after': {\n left: 0,\n bottom: 0,\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${inputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${inputClasses.error}`]: {\n '&::before, &::after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]: {\n borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`\n }\n },\n [`&.${inputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disableUnderline: false\n },\n style: {\n '&::after': {\n borderBottom: `2px solid ${(theme.vars || theme).palette[color].main}`\n }\n }\n }))]\n };\n}));\nconst InputInput = styled(InputBaseInput, {\n name: 'MuiInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})({});\nconst Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInput'\n });\n const {\n disableUnderline = false,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n inputComponent = 'input',\n multiline = false,\n slotProps,\n slots = {},\n type = 'text',\n ...other\n } = props;\n const classes = useUtilityClasses(props);\n const ownerState = {\n disableUnderline\n };\n const inputComponentsProps = {\n root: {\n ownerState\n }\n };\n const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(slotProps ?? componentsPropsProp, inputComponentsProps) : inputComponentsProps;\n const RootSlot = slots.root ?? components.Root ?? InputRoot;\n const InputSlot = slots.input ?? components.Input ?? InputInput;\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n slotProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the `input` will not have an underline.\n * @default false\n */\n disableUnderline: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default Input;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getInputUtilityClass(slot) {\n return generateUtilityClass('MuiInput', slot);\n}\nconst inputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiInput', ['root', 'underline', 'input'])\n};\nexport default inputClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getFilledInputUtilityClass(slot) {\n return generateUtilityClass('MuiFilledInput', slot);\n}\nconst filledInputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiFilledInput', ['root', 'underline', 'input', 'adornedStart', 'adornedEnd', 'sizeSmall', 'multiline', 'hiddenLabel'])\n};\nexport default filledInputClasses;","'use client';\n\nimport * as React from 'react';\nimport deepmerge from '@mui/utils/deepmerge';\nimport refType from '@mui/utils/refType';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport InputBase from \"../InputBase/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport filledInputClasses, { getFilledInputUtilityClass } from \"./filledInputClasses.js\";\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport { capitalize } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline,\n startAdornment,\n endAdornment,\n size,\n hiddenLabel,\n multiline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', size === 'small' && `size${capitalize(size)}`, hiddenLabel && 'hiddenLabel', multiline && 'multiline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getFilledInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst FilledInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiFilledInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';\n const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';\n const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';\n return {\n position: 'relative',\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,\n borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,\n borderTopRightRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n }\n },\n [`&.${filledInputClasses.focused}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n },\n [`&.${filledInputClasses.disabled}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableUnderline,\n style: {\n '&::after': {\n left: 0,\n bottom: 0,\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${filledInputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${filledInputClasses.error}`]: {\n '&::before, &::after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, theme.vars.opacity.inputUnderline) : bottomLineColor}`,\n left: 0,\n bottom: 0,\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`\n },\n [`&.${filledInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n disableUnderline: false,\n color\n },\n style: {\n '&::after': {\n borderBottom: `2px solid ${(theme.vars || theme).palette[color]?.main}`\n }\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 12\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 12\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '25px 12px 8px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n paddingTop: 21,\n paddingBottom: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline && ownerState.hiddenLabel,\n style: {\n paddingTop: 16,\n paddingBottom: 17\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline && ownerState.hiddenLabel && ownerState.size === 'small',\n style: {\n paddingTop: 8,\n paddingBottom: 9\n }\n }]\n };\n}));\nconst FilledInputInput = styled(InputBaseInput, {\n name: 'MuiFilledInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n paddingTop: 25,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n ...(!theme.vars && {\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n }),\n ...(theme.vars && {\n '&:-webkit-autofill': {\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n },\n [theme.getColorSchemeSelector('dark')]: {\n '&:-webkit-autofill': {\n WebkitBoxShadow: '0 0 0 100px #266798 inset',\n WebkitTextFillColor: '#fff',\n caretColor: '#fff'\n }\n }\n }),\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 21,\n paddingBottom: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hiddenLabel,\n style: {\n paddingTop: 16,\n paddingBottom: 17\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hiddenLabel && ownerState.size === 'small',\n style: {\n paddingTop: 8,\n paddingBottom: 9\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0\n }\n }]\n})));\nconst FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFilledInput'\n });\n const {\n disableUnderline = false,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n hiddenLabel,\n // declare here to prevent spreading to DOM\n inputComponent = 'input',\n multiline = false,\n slotProps,\n slots = {},\n type = 'text',\n ...other\n } = props;\n const ownerState = {\n ...props,\n disableUnderline,\n fullWidth,\n inputComponent,\n multiline,\n type\n };\n const classes = useUtilityClasses(props);\n const filledInputComponentsProps = {\n root: {\n ownerState\n },\n input: {\n ownerState\n }\n };\n const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(filledInputComponentsProps, slotProps ?? componentsPropsProp) : filledInputComponentsProps;\n const RootSlot = slots.root ?? components.Root ?? FilledInputRoot;\n const InputSlot = slots.input ?? components.Input ?? FilledInputInput;\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n slotProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FilledInput.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the input will not have an underline.\n * @default false\n */\n disableUnderline: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nFilledInput.muiName = 'Input';\nexport default FilledInput;","'use client';\n\nvar _span;\nimport PropTypes from 'prop-types';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NotchedOutlineRoot = styled('fieldset', {\n name: 'MuiNotchedOutlined',\n shouldForwardProp: rootShouldForwardProp\n})({\n textAlign: 'left',\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden',\n minWidth: '0%'\n});\nconst NotchedOutlineLegend = styled('legend', {\n name: 'MuiNotchedOutlined',\n shouldForwardProp: rootShouldForwardProp\n})(memoTheme(({\n theme\n}) => ({\n float: 'unset',\n // Fix conflict with bootstrap\n width: 'auto',\n // Fix conflict with bootstrap\n overflow: 'hidden',\n // Fix Horizontal scroll when label too long\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.withLabel,\n style: {\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.withLabel,\n style: {\n display: 'block',\n // Fix conflict with normalize.css and sanitize.css\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n whiteSpace: 'nowrap',\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block',\n opacity: 0,\n visibility: 'visible'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.withLabel && ownerState.notched,\n style: {\n maxWidth: '100%',\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n }\n }]\n})));\n\n/**\n * @ignore - internal component.\n */\nexport default function NotchedOutline(props) {\n const {\n children,\n classes,\n className,\n label,\n notched,\n ...other\n } = props;\n const withLabel = label != null && label !== '';\n const ownerState = {\n ...props,\n notched,\n withLabel\n };\n return /*#__PURE__*/_jsx(NotchedOutlineRoot, {\n \"aria-hidden\": true,\n className: className,\n ownerState: ownerState,\n ...other,\n children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {\n ownerState: ownerState,\n children: withLabel ? /*#__PURE__*/_jsx(\"span\", {\n children: label\n }) : // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n \"aria-hidden\": true,\n children: \"\\u200B\"\n }))\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? NotchedOutline.propTypes /* remove-proptypes */ = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The label.\n */\n label: PropTypes.node,\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getOutlinedInputUtilityClass(slot) {\n return generateUtilityClass('MuiOutlinedInput', slot);\n}\nconst outlinedInputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiOutlinedInput', ['root', 'notchedOutline', 'input'])\n};\nexport default outlinedInputClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport NotchedOutline from \"./NotchedOutline.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport outlinedInputClasses, { getOutlinedInputUtilityClass } from \"./outlinedInputClasses.js\";\nimport InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n notchedOutline: ['notchedOutline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getOutlinedInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst OutlinedInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiOutlinedInput',\n slot: 'Root',\n overridesResolver: inputBaseRootOverridesResolver\n})(memoTheme(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n position: 'relative',\n borderRadius: (theme.vars || theme).shape.borderRadius,\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, 0.23) : borderColor\n }\n },\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderWidth: 2\n },\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n props: {},\n // to override the above style\n style: {\n [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.error.main\n },\n [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.action.disabled\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 14\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 14\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '16.5px 14px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n padding: '8.5px 14px'\n }\n }]\n };\n}));\nconst NotchedOutlineRoot = styled(NotchedOutline, {\n name: 'MuiOutlinedInput',\n slot: 'NotchedOutline'\n})(memoTheme(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n borderColor: theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, 0.23) : borderColor\n };\n}));\nconst OutlinedInputInput = styled(InputBaseInput, {\n name: 'MuiOutlinedInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n padding: '16.5px 14px',\n ...(!theme.vars && {\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n }),\n ...(theme.vars && {\n '&:-webkit-autofill': {\n borderRadius: 'inherit'\n },\n [theme.getColorSchemeSelector('dark')]: {\n '&:-webkit-autofill': {\n WebkitBoxShadow: '0 0 0 100px #266798 inset',\n WebkitTextFillColor: '#fff',\n caretColor: '#fff'\n }\n }\n }),\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n padding: '8.5px 14px'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 0\n }\n }]\n})));\nconst OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiOutlinedInput'\n });\n const {\n components = {},\n fullWidth = false,\n inputComponent = 'input',\n label,\n multiline = false,\n notched,\n slots = {},\n slotProps = {},\n type = 'text',\n ...other\n } = props;\n const classes = useUtilityClasses(props);\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']\n });\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n type\n };\n const RootSlot = slots.root ?? components.Root ?? OutlinedInputRoot;\n const InputSlot = slots.input ?? components.Input ?? OutlinedInputInput;\n const [NotchedSlot, notchedProps] = useSlot('notchedOutline', {\n elementType: NotchedOutlineRoot,\n className: classes.notchedOutline,\n shouldForwardComponentProp: true,\n ownerState,\n externalForwardedProps: {\n slots,\n slotProps\n },\n additionalProps: {\n label: label != null && label !== '' && fcs.required ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, \"\\u2009\", '*']\n }) : label\n }\n });\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n slotProps: slotProps,\n renderSuffix: state => /*#__PURE__*/_jsx(NotchedSlot, {\n ...notchedProps,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: {\n ...classes,\n notchedOutline: null\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? OutlinedInput.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label of the `input`. It is only used for layout. The actual labelling\n * is handled by `InputLabel`.\n */\n label: PropTypes.node,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n notchedOutline: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n notchedOutline: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nOutlinedInput.muiName = 'Input';\nexport default OutlinedInput;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport refType from '@mui/utils/refType';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Input from \"../Input/index.js\";\nimport FilledInput from \"../FilledInput/index.js\";\nimport OutlinedInput from \"../OutlinedInput/index.js\";\nimport InputLabel from \"../InputLabel/index.js\";\nimport FormControl from \"../FormControl/index.js\";\nimport FormHelperText from \"../FormHelperText/index.js\";\nimport Select from \"../Select/index.js\";\nimport { getTextFieldUtilityClass } from \"./textFieldClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst variantComponent = {\n standard: Input,\n filled: FilledInput,\n outlined: OutlinedInput\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getTextFieldUtilityClass, classes);\n};\nconst TextFieldRoot = styled(FormControl, {\n name: 'MuiTextField',\n slot: 'Root'\n})({});\n\n/**\n * The `TextField` is a convenience wrapper for the most common cases (80%).\n * It cannot be all things to all people, otherwise the API would grow out of control.\n *\n * ## Advanced Configuration\n *\n * It's important to understand that the text field is a simple abstraction\n * on top of the following components:\n *\n * - [FormControl](/material-ui/api/form-control/)\n * - [InputLabel](/material-ui/api/input-label/)\n * - [FilledInput](/material-ui/api/filled-input/)\n * - [OutlinedInput](/material-ui/api/outlined-input/)\n * - [Input](/material-ui/api/input/)\n * - [FormHelperText](/material-ui/api/form-helper-text/)\n *\n * If you wish to alter the props applied to the `input` element, you can do so as follows:\n *\n * ```jsx\n * const inputProps = {\n * step: 300,\n * };\n *\n * return <TextField id=\"time\" type=\"time\" inputProps={inputProps} />;\n * ```\n *\n * For advanced cases, please look at the source of TextField by clicking on the\n * \"Edit this page\" button above. Consider either:\n *\n * - using the upper case props for passing values directly to the components\n * - using the underlying components directly as shown in the demos\n */\nconst TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTextField'\n });\n const {\n autoComplete,\n autoFocus = false,\n children,\n className,\n color = 'primary',\n defaultValue,\n disabled = false,\n error = false,\n FormHelperTextProps: FormHelperTextPropsProp,\n fullWidth = false,\n helperText,\n id: idOverride,\n InputLabelProps: InputLabelPropsProp,\n inputProps: inputPropsProp,\n InputProps: InputPropsProp,\n inputRef,\n label,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n required = false,\n rows,\n select = false,\n SelectProps: SelectPropsProp,\n slots = {},\n slotProps = {},\n type,\n value,\n variant = 'outlined',\n ...other\n } = props;\n const ownerState = {\n ...props,\n autoFocus,\n color,\n disabled,\n error,\n fullWidth,\n multiline,\n required,\n select,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (select && !children) {\n console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');\n }\n }\n const id = useId(idOverride);\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n const InputComponent = variantComponent[variant];\n const externalForwardedProps = {\n slots,\n slotProps: {\n input: InputPropsProp,\n inputLabel: InputLabelPropsProp,\n htmlInput: inputPropsProp,\n formHelperText: FormHelperTextPropsProp,\n select: SelectPropsProp,\n ...slotProps\n }\n };\n const inputAdditionalProps = {};\n const inputLabelSlotProps = externalForwardedProps.slotProps.inputLabel;\n if (variant === 'outlined') {\n if (inputLabelSlotProps && typeof inputLabelSlotProps.shrink !== 'undefined') {\n inputAdditionalProps.notched = inputLabelSlotProps.shrink;\n }\n inputAdditionalProps.label = label;\n }\n if (select) {\n // unset defaults from textbox inputs\n if (!SelectPropsProp || !SelectPropsProp.native) {\n inputAdditionalProps.id = undefined;\n }\n inputAdditionalProps['aria-describedby'] = undefined;\n }\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: TextFieldRoot,\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n ...externalForwardedProps,\n ...other\n },\n ownerState,\n className: clsx(classes.root, className),\n ref,\n additionalProps: {\n disabled,\n error,\n fullWidth,\n required,\n color,\n variant\n }\n });\n const [InputSlot, inputProps] = useSlot('input', {\n elementType: InputComponent,\n externalForwardedProps,\n additionalProps: inputAdditionalProps,\n ownerState\n });\n const [InputLabelSlot, inputLabelProps] = useSlot('inputLabel', {\n elementType: InputLabel,\n externalForwardedProps,\n ownerState\n });\n const [HtmlInputSlot, htmlInputProps] = useSlot('htmlInput', {\n elementType: 'input',\n externalForwardedProps,\n ownerState\n });\n const [FormHelperTextSlot, formHelperTextProps] = useSlot('formHelperText', {\n elementType: FormHelperText,\n externalForwardedProps,\n ownerState\n });\n const [SelectSlot, selectProps] = useSlot('select', {\n elementType: Select,\n externalForwardedProps,\n ownerState\n });\n const InputElement = /*#__PURE__*/_jsx(InputSlot, {\n \"aria-describedby\": helperTextId,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n fullWidth: fullWidth,\n multiline: multiline,\n name: name,\n rows: rows,\n maxRows: maxRows,\n minRows: minRows,\n type: type,\n value: value,\n id: id,\n inputRef: inputRef,\n onBlur: onBlur,\n onChange: onChange,\n onFocus: onFocus,\n placeholder: placeholder,\n inputProps: htmlInputProps,\n slots: {\n input: slots.htmlInput ? HtmlInputSlot : undefined\n },\n ...inputProps\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabelSlot, {\n htmlFor: id,\n id: inputLabelId,\n ...inputLabelProps,\n children: label\n }), select ? /*#__PURE__*/_jsx(SelectSlot, {\n \"aria-describedby\": helperTextId,\n id: id,\n labelId: inputLabelId,\n value: value,\n input: InputElement,\n ...selectProps,\n children: children\n }) : InputElement, helperText && /*#__PURE__*/_jsx(FormHelperTextSlot, {\n id: helperTextId,\n ...formHelperTextProps,\n children: helperText\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextField.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.\n * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n FormHelperTextProps: PropTypes.object,\n /**\n * If `true`, the input will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: PropTypes.string,\n /**\n * Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.\n * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.\n * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n InputLabelProps: PropTypes.object,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),\n * [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)\n * component depending on the `variant` prop value.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n InputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a `textarea` element is rendered instead of an input.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Render a [`Select`](https://mui.com/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.\n * If this option is set you must pass the options of the select as children.\n * @default false\n */\n select: PropTypes.bool,\n /**\n * Props applied to the [`Select`](https://mui.com/material-ui/api/select/) element.\n * @deprecated Use `slotProps.select` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n SelectProps: PropTypes.object,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n formHelperText: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n htmlInput: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n inputLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n select: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n formHelperText: PropTypes.elementType,\n htmlInput: PropTypes.elementType,\n input: PropTypes.elementType,\n inputLabel: PropTypes.elementType,\n root: PropTypes.elementType,\n select: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#input_types).\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default TextField;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormHelperTextUtilityClasses(slot) {\n return generateUtilityClass('MuiFormHelperText', slot);\n}\nconst formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root', 'error', 'disabled', 'sizeSmall', 'sizeMedium', 'contained', 'focused', 'filled', 'required']);\nexport default formHelperTextClasses;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport formHelperTextClasses, { getFormHelperTextUtilityClasses } from \"./formHelperTextClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n contained,\n size,\n disabled,\n error,\n filled,\n focused,\n required\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', error && 'error', size && `size${capitalize(size)}`, contained && 'contained', focused && 'focused', filled && 'filled', required && 'required']\n };\n return composeClasses(slots, getFormHelperTextUtilityClasses, classes);\n};\nconst FormHelperTextRoot = styled('p', {\n name: 'MuiFormHelperText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n ...theme.typography.caption,\n textAlign: 'left',\n marginTop: 3,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n [`&.${formHelperTextClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${formHelperTextClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n },\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginTop: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.contained,\n style: {\n marginLeft: 14,\n marginRight: 14\n }\n }]\n})));\nconst FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormHelperText'\n });\n const {\n children,\n className,\n component = 'p',\n disabled,\n error,\n filled,\n focused,\n margin,\n required,\n variant,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']\n });\n const ownerState = {\n ...props,\n component,\n contained: fcs.variant === 'filled' || fcs.variant === 'outlined',\n variant: fcs.variant,\n size: fcs.size,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n };\n\n // This issue explains why this is required: https://github.com/mui/material-ui/issues/42184\n delete ownerState.ownerState;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormHelperTextRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n \"aria-hidden\": true,\n children: \"\\u200B\"\n })) : children\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormHelperText.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n *\n * If `' '` is provided, the component reserves one line height for displaying a future message.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, helper text should be displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the helper text should use filled classes key.\n */\n filled: PropTypes.bool,\n /**\n * If `true`, the helper text should use focused classes key.\n */\n focused: PropTypes.bool,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n /**\n * If `true`, the helper text should use required classes key.\n */\n required: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])\n} : void 0;\nexport default FormHelperText;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTextFieldUtilityClass(slot) {\n return generateUtilityClass('MuiTextField', slot);\n}\nconst textFieldClasses = generateUtilityClasses('MuiTextField', ['root']);\nexport default textFieldClasses;","import { Editor } from \"@/lib\";\nimport { ResponseEditorProps } from \"./types\";\n\nconst ResponseEditor = ({ value, onChange }: ResponseEditorProps) => {\n return (\n <div className=\"flex-1 min-h-0 mb-1\">\n <p className=\"text-gray-300 mb-2 text-sm\">Response Body (JSON)</p>\n <div className=\"h-[calc(100%-40px)]\">\n <Editor value={value} onChange={onChange} />\n </div>\n </div>\n );\n};\n\nexport default ResponseEditor;\n","import { useCallback, useEffect } from \"react\";\nimport { Modal, LoadingOverlay, Snackbar, PrivacyBanner } from \"@/lib\";\nimport { EndpointModalProps } from \"./types\";\nimport { useEndpointForm } from \"./hooks/useEndpointForm\";\nimport { useEndpointSubmit } from \"./hooks/useEndpointSubmit\";\nimport EndpointFormFields from \"./subcomponents/endpointFormFields\";\nimport ResponseEditor from \"./subcomponents/responseEditor\";\nimport FormActions from \"./subcomponents/formActions\";\n\nconst EndpointModal = ({\n isOpen,\n onClose,\n mode = \"create\",\n editData,\n}: EndpointModalProps) => {\n const isEditMode = mode === \"edit\";\n\n // Use custom hooks\n const {\n formData,\n formErrors,\n formTouched,\n isButtonDisabled,\n getButtonDisabledTooltip,\n validateForm,\n handlePathChange,\n handlePathBlur,\n handleMethodChange,\n handleResponseCodeChange,\n handleResponseDelayChange,\n handleResponseChange,\n resetForm,\n } = useEndpointForm({ mode, editData });\n\n const {\n isSubmittingEndpointDetails,\n snackbar,\n handleCloseSnackbar,\n handleSubmitFapiDetails,\n } = useEndpointSubmit({\n mode,\n validateForm,\n onClose,\n });\n\n // Modal close handler\n const handelModalClose = useCallback(() => {\n resetForm();\n onClose();\n }, [onClose, resetForm]);\n\n // Reset form when modal closes\n useEffect(() => {\n if (!isOpen) {\n resetForm();\n }\n }, [isOpen, resetForm]);\n\n return (\n <>\n <Modal\n isModalOpen={isOpen}\n onClose={handelModalClose}\n title={\n isEditMode ? \"Edit Mock API Endpoint\" : \"Create New Mock API Endpoint\"\n }\n size=\"fullscreen\"\n >\n <div className=\"absolute inset-0 p-6\">\n {/* Show loading overlay when submitting api details */}\n {isSubmittingEndpointDetails && (\n <LoadingOverlay\n overlayMessage={\n isEditMode\n ? \"Updating FAPI Endpoint...\"\n : \"Saving Details and Creating FAPI ...\"\n }\n />\n )}\n\n <div className=\"flex flex-col h-full\">\n {/* Privacy Banner */}\n <div className=\"mb-4\">\n <PrivacyBanner />\n </div>\n\n {/* Form Fields */}\n <EndpointFormFields\n formData={formData}\n formErrors={formErrors}\n formTouched={formTouched}\n isEditMode={isEditMode}\n onPathChange={handlePathChange}\n onPathBlur={handlePathBlur}\n onMethodChange={handleMethodChange}\n onResponseCodeChange={handleResponseCodeChange}\n onResponseDelayChange={handleResponseDelayChange}\n />\n\n {/* Response Editor */}\n <ResponseEditor\n value={formData.response}\n onChange={handleResponseChange}\n />\n\n {/* Form Actions */}\n <FormActions\n isEditMode={isEditMode}\n isSubmitting={isSubmittingEndpointDetails}\n isButtonDisabled={isButtonDisabled(isSubmittingEndpointDetails)}\n buttonDisabledTooltip={getButtonDisabledTooltip(\n isSubmittingEndpointDetails\n )}\n onSubmit={() => handleSubmitFapiDetails(formData)}\n />\n </div>\n </div>\n </Modal>\n\n <Snackbar\n isOpen={snackbar.isOpen}\n message={snackbar.message}\n onClose={handleCloseSnackbar}\n backgroundColor={snackbar.backgroundColor}\n />\n </>\n );\n};\n\nexport default EndpointModal;\n","import { Tooltip } from \"@mui/material\";\nimport { Button } from \"@/lib\";\nimport { FormActionsProps } from \"./types\";\nimport { getButtonLabel } from \"./utils\";\n\nconst FormActions = ({\n isEditMode,\n isSubmitting,\n isButtonDisabled,\n buttonDisabledTooltip,\n onSubmit,\n}: FormActionsProps) => {\n return (\n <div className=\"flex justify-start mt-auto pt-2\">\n <Tooltip title={buttonDisabledTooltip} arrow placement=\"top\">\n <span>\n <Button\n name={getButtonLabel(isEditMode, isSubmitting)}\n disabled={isButtonDisabled}\n onClick={onSubmit}\n />\n </span>\n </Tooltip>\n </div>\n );\n};\n\nexport default FormActions;\n","import { FAPI_LIMITS } from \"@/utils/data\";\nimport { EndpointStatsProps } from \"./types\";\n\nconst EndpointStats = ({ currentEndpointCount }: EndpointStatsProps) => {\n const isAtMaxLimit = currentEndpointCount >= FAPI_LIMITS.MAX_ENDPOINTS;\n\n return (\n <div className=\"flex-shrink-0\">\n <div className=\"inline-flex items-center gap-3 px-4 py-2 bg-gradient-to-r from-gray-800 to-gray-900 border border-gray-700 rounded-lg\">\n <span className=\"text-sm text-gray-400 font-googleSansFlex\">\n No. of FAPIs Created:\n </span>\n <span className=\"text-lg font-semibold text-white font-googleSansFlex\">\n {currentEndpointCount}\n </span>\n <span className=\"text-gray-500\">/</span>\n <span className=\"text-lg font-semibold text-gray-400 font-googleSansFlex\">\n {FAPI_LIMITS.MAX_ENDPOINTS}\n </span>\n {isAtMaxLimit && (\n <span className=\"ml-2 px-2 py-1 text-xs bg-red-600/20 text-red-400 rounded border border-red-600/30\">\n Max FAPI Creation Limit Reached\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default EndpointStats;\n","import { FormControl, InputLabel, MenuItem, Select } from \"@mui/material\";\nimport { FAPI } from \"@/utils/data\";\nimport { ResponseControlsProps } from \"./types\";\n\nconst ResponseControls = ({\n currentResponseCode,\n currentResponseDelay,\n onResponseCodeChange,\n onResponseDelayChange,\n}: ResponseControlsProps) => {\n return (\n <div className=\"flex flex-col md:flex-row gap-4 my-8\">\n {/* HTTP Response Code */}\n <div className=\"flex-[0.65]\">\n <FormControl fullWidth size=\"small\">\n <InputLabel>HTTP Response Status Code</InputLabel>\n <Select\n value={currentResponseCode}\n onChange={(e) => onResponseCodeChange(e.target.value as number)}\n label=\"HTTP Response Status Code\"\n className=\"font-googleSansFlex\"\n >\n {Object.values(FAPI.SUPPORTED_HTTP_RESPONSE_STATUS_CODE).map(\n (responseCode) => (\n <MenuItem key={responseCode.code} value={responseCode.code}>\n {responseCode.label}\n </MenuItem>\n )\n )}\n </Select>\n </FormControl>\n </div>\n\n {/* Response Delay */}\n <div className=\"flex-[0.35]\">\n <FormControl fullWidth size=\"small\">\n <InputLabel>Delay</InputLabel>\n <Select\n value={currentResponseDelay}\n onChange={(e) => onResponseDelayChange(e.target.value as number)}\n label=\"Delay\"\n className=\"font-googleSansFlex\"\n >\n {Object.values(FAPI.SUPPORTED_RESPONSE_DELAYS).map((delay) => (\n <MenuItem key={delay.value} value={delay.value}>\n {delay.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </div>\n </div>\n );\n};\n\nexport default ResponseControls;\n","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonUtilityClass(slot) {\n return generateUtilityClass('MuiButton', slot);\n}\nconst buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);\nexport default buttonClasses;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupContext.displayName = 'ButtonGroupContext';\n}\nexport default ButtonGroupContext;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';\n}\nexport default ButtonGroupButtonContext;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport resolveProps from '@mui/utils/resolveProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { unstable_useId as useId } from \"../utils/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport CircularProgress from \"../CircularProgress/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport buttonClasses, { getButtonUtilityClass } from \"./buttonClasses.js\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext.js\";\nimport ButtonGroupButtonContext from \"../ButtonGroup/ButtonGroupButtonContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n loading,\n loadingPosition,\n classes\n } = ownerState;\n const slots = {\n root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],\n startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],\n endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],\n loadingIndicator: ['loadingIndicator'],\n loadingWrapper: ['loadingWrapper']\n };\n const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the ButtonBase\n ...composedClasses\n };\n};\nconst commonIconStyles = [{\n props: {\n size: 'small'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n }\n}, {\n props: {\n size: 'medium'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n }\n}, {\n props: {\n size: 'large'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n }\n}];\nconst ButtonRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];\n }\n})(memoTheme(({\n theme\n}) => {\n const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];\n const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];\n return {\n ...theme.typography.button,\n minWidth: 64,\n padding: '6px 16px',\n border: 0,\n borderRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: {\n variant: 'contained'\n },\n style: {\n color: `var(--variant-containedColor)`,\n backgroundColor: `var(--variant-containedBg)`,\n boxShadow: (theme.vars || theme).shadows[2],\n '&:hover': {\n boxShadow: (theme.vars || theme).shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: (theme.vars || theme).shadows[2]\n }\n },\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[8]\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: (theme.vars || theme).shadows[6]\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled,\n boxShadow: (theme.vars || theme).shadows[0],\n backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n }\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n padding: '5px 15px',\n border: '1px solid currentColor',\n borderColor: `var(--variant-outlinedBorder, currentColor)`,\n backgroundColor: `var(--variant-outlinedBg)`,\n color: `var(--variant-outlinedColor)`,\n [`&.${buttonClasses.disabled}`]: {\n border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`\n }\n }\n }, {\n props: {\n variant: 'text'\n },\n style: {\n padding: '6px 8px',\n color: `var(--variant-textColor)`,\n backgroundColor: `var(--variant-textBg)`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n '--variant-textColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBorder': theme.alpha((theme.vars || theme).palette[color].main, 0.5),\n '--variant-containedColor': (theme.vars || theme).palette[color].contrastText,\n '--variant-containedBg': (theme.vars || theme).palette[color].main,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': (theme.vars || theme).palette[color].dark,\n '--variant-textBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity),\n '--variant-outlinedBorder': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBg': theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }\n })), {\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit',\n borderColor: 'currentColor',\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,\n '--variant-textBg': theme.alpha((theme.vars || theme).palette.text.primary, (theme.vars || theme).palette.action.hoverOpacity),\n '--variant-outlinedBg': theme.alpha((theme.vars || theme).palette.text.primary, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }\n }, {\n props: {\n size: 'small',\n variant: 'text'\n },\n style: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'text'\n },\n style: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'outlined'\n },\n style: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'contained'\n },\n style: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'contained'\n },\n style: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n disableElevation: true\n },\n style: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n boxShadow: 'none'\n }\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }, {\n props: {\n loadingPosition: 'center'\n },\n style: {\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n [`&.${buttonClasses.loading}`]: {\n color: 'transparent'\n }\n }\n }]\n };\n}));\nconst ButtonStartIcon = styled('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginLeft: -2\n }\n }, {\n props: {\n loadingPosition: 'start',\n loading: true\n },\n style: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n }, {\n props: {\n loadingPosition: 'start',\n loading: true,\n fullWidth: true\n },\n style: {\n marginRight: -8\n }\n }, ...commonIconStyles]\n}));\nconst ButtonEndIcon = styled('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})(({\n theme\n}) => ({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginRight: -2\n }\n }, {\n props: {\n loadingPosition: 'end',\n loading: true\n },\n style: {\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.short\n }),\n opacity: 0\n }\n }, {\n props: {\n loadingPosition: 'end',\n loading: true,\n fullWidth: true\n },\n style: {\n marginLeft: -8\n }\n }, ...commonIconStyles]\n}));\nconst ButtonLoadingIndicator = styled('span', {\n name: 'MuiButton',\n slot: 'LoadingIndicator'\n})(({\n theme\n}) => ({\n display: 'none',\n position: 'absolute',\n visibility: 'visible',\n variants: [{\n props: {\n loading: true\n },\n style: {\n display: 'flex'\n }\n }, {\n props: {\n loadingPosition: 'start'\n },\n style: {\n left: 14\n }\n }, {\n props: {\n loadingPosition: 'start',\n size: 'small'\n },\n style: {\n left: 10\n }\n }, {\n props: {\n variant: 'text',\n loadingPosition: 'start'\n },\n style: {\n left: 6\n }\n }, {\n props: {\n loadingPosition: 'center'\n },\n style: {\n left: '50%',\n transform: 'translate(-50%)',\n color: (theme.vars || theme).palette.action.disabled\n }\n }, {\n props: {\n loadingPosition: 'end'\n },\n style: {\n right: 14\n }\n }, {\n props: {\n loadingPosition: 'end',\n size: 'small'\n },\n style: {\n right: 10\n }\n }, {\n props: {\n variant: 'text',\n loadingPosition: 'end'\n },\n style: {\n right: 6\n }\n }, {\n props: {\n loadingPosition: 'start',\n fullWidth: true\n },\n style: {\n position: 'relative',\n left: -10\n }\n }, {\n props: {\n loadingPosition: 'end',\n fullWidth: true\n },\n style: {\n position: 'relative',\n right: -10\n }\n }]\n}));\nconst ButtonLoadingIconPlaceholder = styled('span', {\n name: 'MuiButton',\n slot: 'LoadingIconPlaceholder'\n})({\n display: 'inline-block',\n width: '1em',\n height: '1em'\n});\nconst Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {\n // props priority: `inProps` > `contextProps` > `themeDefaultProps`\n const contextProps = React.useContext(ButtonGroupContext);\n const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);\n const resolvedProps = resolveProps(contextProps, inProps);\n const props = useDefaultProps({\n props: resolvedProps,\n name: 'MuiButton'\n });\n const {\n children,\n color = 'primary',\n component = 'button',\n className,\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n id: idProp,\n loading = null,\n loadingIndicator: loadingIndicatorProp,\n loadingPosition = 'center',\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text',\n ...other\n } = props;\n const loadingId = useId(idProp);\n const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {\n \"aria-labelledby\": loadingId,\n color: \"inherit\",\n size: 16\n });\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n loading,\n loadingIndicator,\n loadingPosition,\n size,\n type,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/_jsx(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {\n className: classes.loadingIconPlaceholder,\n ownerState: ownerState\n })\n });\n const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/_jsx(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp || /*#__PURE__*/_jsx(ButtonLoadingIconPlaceholder, {\n className: classes.loadingIconPlaceholder,\n ownerState: ownerState\n })\n });\n const positionClassName = buttonGroupButtonContextPositionClassName || '';\n const loader = typeof loading === 'boolean' ?\n /*#__PURE__*/\n // use plain HTML span to minimize the runtime overhead\n _jsx(\"span\", {\n className: classes.loadingWrapper,\n style: {\n display: 'contents'\n },\n children: loading && /*#__PURE__*/_jsx(ButtonLoadingIndicator, {\n className: classes.loadingIndicator,\n ownerState: ownerState,\n children: loadingIndicator\n })\n }) : null;\n return /*#__PURE__*/_jsxs(ButtonRoot, {\n ownerState: ownerState,\n className: clsx(contextProps.className, classes.root, className, positionClassName),\n component: component,\n disabled: disabled || loading,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type,\n id: loading ? loadingId : idProp,\n ...other,\n classes: classes,\n children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n /**\n * @ignore\n */\n id: PropTypes.string,\n /**\n * If `true`, the loading indicator is visible and the button is disabled.\n * If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).\n * @default null\n */\n loading: PropTypes.bool,\n /**\n * Element placed before the children if the button is in loading state.\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default, it renders a `CircularProgress` that is labeled by the button itself.\n * @default <CircularProgress color=\"inherit\" size={16} />\n */\n loadingIndicator: PropTypes.node,\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default Button;","import { Button, CircularProgress, IconButton, Tooltip } from \"@mui/material\";\nimport {\n Edit as EditIcon,\n Trash2 as DeleteIcon,\n Save as SaveIcon,\n} from \"lucide-react\";\nimport { CardActionsProps } from \"./types\";\n\nconst CardActions = ({\n hasChanges,\n isSaving,\n isDeleting,\n onEditResponse,\n onUpdateFapi,\n onDeleteClick,\n}: CardActionsProps) => {\n return (\n <div className=\"mt-auto flex justify-between items-center\">\n {/* Edit response button */}\n <Button\n startIcon={<EditIcon size={18} />}\n onClick={onEditResponse}\n className=\"font-googleSansFlex\"\n variant=\"outlined\"\n color=\"primary\"\n >\n Edit Response\n </Button>\n\n {/* Update and Delete Fapi button group */}\n <div className=\"flex items-center space-x-2\">\n {/* Update Fapi button */}\n <Tooltip\n arrow\n placement=\"top\"\n title={hasChanges ? \"Save changes\" : \"No changes to save\"}\n >\n <span>\n <IconButton\n onClick={onUpdateFapi}\n color=\"secondary\"\n disabled={!hasChanges || isSaving}\n >\n {isSaving ? (\n <CircularProgress size={20} color=\"secondary\" />\n ) : (\n <SaveIcon size={20} />\n )}\n </IconButton>\n </span>\n </Tooltip>\n\n {/* Delete Fapi Button */}\n <Tooltip arrow placement=\"top\" title=\"Delete FAPI Endpoint\">\n <IconButton onClick={onDeleteClick} color=\"error\" disabled={isDeleting}>\n {isDeleting ? (\n <CircularProgress size={20} color=\"error\" />\n ) : (\n <DeleteIcon size={20} />\n )}\n </IconButton>\n </Tooltip>\n </div>\n </div>\n );\n};\n\nexport default CardActions;\n","\"use client\";\n\nimport { Card, Badge, Snackbar, ConfirmationModal } from \"@/lib\";\nimport type { ConfirmationButton } from \"@/lib\";\nimport { EndpointModal } from \"@/components\";\nimport { EndpointsListForFapiSimulationCard } from \"./types\";\nimport { useCardActions } from \"./hooks/useCardActions\";\nimport CardHeader from \"./subcomponents/cardHeader\";\nimport ResponseControls from \"./subcomponents/responseControls\";\nimport CardActions from \"./subcomponents/cardActions\";\n\nconst FapiSimulationCard = ({\n method,\n path,\n details,\n}: EndpointsListForFapiSimulationCard) => {\n // Use custom hook for all card actions and state\n const {\n isDeleting,\n isSaving,\n showDeleteConfirm,\n setShowDeleteConfirm,\n showEditModal,\n currentResponseCode,\n setCurrentResponseCode,\n currentResponseDelay,\n setCurrentResponseDelay,\n snackbar,\n setSnackbar,\n hasChanges,\n handleCopyEndpoint,\n handleEditResponse,\n handleCloseEditModal,\n handleUpdateFapi,\n handleDeleteCancel,\n handleDeleteFapi,\n } = useCardActions({\n method,\n path,\n initialResponseCode: details.responseCode,\n initialResponseDelay: details.responseDelay,\n });\n\n const deleteConfirmationButtons: ConfirmationButton[] = [\n {\n label: \"Cancel\",\n onClick: handleDeleteCancel,\n variant: \"secondary\",\n },\n {\n label: \"Yes, Delete\",\n onClick: handleDeleteFapi,\n variant: \"danger\",\n },\n ];\n return (\n <>\n <Card borderGradient=\"hover\" height=\"full\" width=\"full\">\n <div className=\"h-full flex flex-col font-googleSansFlex\">\n {/* Header Section with Method Badge and Path */}\n <CardHeader\n method={method}\n path={path}\n onCopyEndpoint={handleCopyEndpoint}\n />\n\n {/* Simulation Controls Section */}\n <ResponseControls\n currentResponseCode={currentResponseCode}\n currentResponseDelay={currentResponseDelay}\n onResponseCodeChange={setCurrentResponseCode}\n onResponseDelayChange={setCurrentResponseDelay}\n />\n\n {/* Action Section - Edit response, Update Fapi, Delete Fapi */}\n <CardActions\n hasChanges={hasChanges}\n isSaving={isSaving}\n isDeleting={isDeleting}\n onEditResponse={handleEditResponse}\n onUpdateFapi={handleUpdateFapi}\n onDeleteClick={() => setShowDeleteConfirm(true)}\n />\n </div>\n </Card>\n\n {/* Delete Confirmation Modal */}\n <ConfirmationModal\n isOpen={showDeleteConfirm}\n title=\"Delete FAPI Endpoint?\"\n message={\n <div className=\"space-y-4\">\n <p>Are you sure you want to delete this endpoint?</p>\n <div className=\"flex items-center gap-2 bg-black/50 px-3 py-2 rounded-md border border-gray-700\">\n <Badge method={method} />\n <span className=\"font-googleSansCode text-white break-all\">\n {path}\n </span>\n </div>\n <p className=\"text-red-400\">⚠️ This action cannot be undone.</p>\n </div>\n }\n buttons={deleteConfirmationButtons}\n onClose={handleDeleteCancel}\n />\n\n {/* Edit Endpoint Modal */}\n <EndpointModal\n isOpen={showEditModal}\n onClose={handleCloseEditModal}\n mode=\"edit\"\n editData={{\n method,\n path,\n responseCode: details.responseCode,\n responseDelay: details.responseDelay,\n response: details.response,\n }}\n />\n\n {/* Snackbar for feedback */}\n <Snackbar\n isOpen={snackbar.isOpen}\n message={snackbar.message}\n onClose={() => setSnackbar((prev) => ({ ...prev, isOpen: false }))}\n backgroundColor={snackbar.backgroundColor}\n />\n </>\n );\n};\n\nexport default FapiSimulationCard;\n","import { TextField, IconButton, Tooltip, CircularProgress } from \"@mui/material\";\nimport { Save as SaveIcon } from \"lucide-react\";\nimport { UI_LIMITS } from \"@/utils/data\";\nimport { ProjectNameSectionProps } from \"./types\";\nimport { getTooltipTitle } from \"./utils\";\n\nconst ProjectNameSection = ({\n currentProjectName,\n projectNameError,\n hasProjectNameChanges,\n isSavingProjectName,\n onProjectNameChange,\n onSaveProjectName,\n}: ProjectNameSectionProps) => {\n return (\n <div className=\"flex items-start gap-2 flex-1\">\n <div className=\"flex-1 max-w-lg\">\n <TextField\n fullWidth\n size=\"small\"\n label=\"Add the name of you project that FAPI is supporting (Optional)\"\n value={currentProjectName}\n onChange={onProjectNameChange}\n error={!!projectNameError}\n helperText={projectNameError}\n placeholder=\"e.g., The Next Big Web Application\"\n className=\"font-googleSansFlex\"\n InputProps={{\n className: \"font-googleSansFlex\",\n }}\n inputProps={{\n maxLength: UI_LIMITS.PROJECT_NAME_MAX_LENGTH,\n }}\n />\n </div>\n <Tooltip\n arrow\n placement=\"top\"\n title={getTooltipTitle(hasProjectNameChanges, projectNameError)}\n >\n <span>\n <IconButton\n onClick={onSaveProjectName}\n color=\"secondary\"\n disabled={\n !hasProjectNameChanges ||\n !!projectNameError ||\n isSavingProjectName\n }\n size=\"small\"\n >\n {isSavingProjectName ? (\n <CircularProgress size={20} color=\"secondary\" />\n ) : (\n <SaveIcon size={20} />\n )}\n </IconButton>\n </span>\n </Tooltip>\n </div>\n );\n};\n\nexport default ProjectNameSection;\n","export const getButtonLabel = (\n isEditMode: boolean,\n isSubmitting: boolean\n): string => {\n if (isEditMode) {\n return isSubmitting ? \"Updating FAPI\" : \"Update FAPI\";\n }\n return isSubmitting ? \"Creating FAPI\" : \"Create FAPI\";\n};\n","export const getExportTooltip = (currentEndpointCount: number): string => {\n if (currentEndpointCount === 0) {\n return \"No endpoints to export\";\n }\n return \"Export FAPI details to JSON file\";\n};\n","export const getTooltipTitle = (\n hasProjectNameChanges: boolean,\n projectNameError: string\n): string => {\n if (hasProjectNameChanges && !projectNameError) {\n return \"Save project name\";\n }\n if (projectNameError) {\n return \"Fix errors first\";\n }\n return \"No changes to save\";\n};\n","import { useState, useCallback, useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { HttpMethods } from \"@/types/fapi\";\nimport { STATUS_COLORS } from \"@/utils/data\";\nimport { updateFapiEndpoint, deleteEndpoint, createEndpointKey } from \"@/utils/functions\";\nimport { removeEndpoint, updateEndpoint } from \"@/store\";\n\ninterface SnackbarState {\n isOpen: boolean;\n message: string;\n backgroundColor: string;\n}\n\ninterface UseCardActionsProps {\n method: HttpMethods;\n path: string;\n initialResponseCode: number;\n initialResponseDelay: number;\n}\n\nexport const useCardActions = ({\n method,\n path,\n initialResponseCode,\n initialResponseDelay,\n}: UseCardActionsProps) => {\n const dispatch = useDispatch();\n\n const [isDeleting, setIsDeleting] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [showEditModal, setShowEditModal] = useState(false);\n const [currentResponseCode, setCurrentResponseCode] =\n useState(initialResponseCode);\n const [currentResponseDelay, setCurrentResponseDelay] =\n useState(initialResponseDelay);\n const [snackbar, setSnackbar] = useState<SnackbarState>({\n isOpen: false,\n message: \"\",\n backgroundColor: \"\",\n });\n\n // Sync local state with props when they change (e.g., after modal update)\n useEffect(() => {\n setCurrentResponseCode(initialResponseCode);\n setCurrentResponseDelay(initialResponseDelay);\n }, [initialResponseCode, initialResponseDelay]);\n\n // Check if changes have been made\n const hasChanges =\n currentResponseCode !== initialResponseCode ||\n currentResponseDelay !== initialResponseDelay;\n\n const handleCopyEndpoint = useCallback(async () => {\n try {\n await navigator.clipboard.writeText(path);\n setSnackbar({\n isOpen: true,\n message: \"Endpoint copied to clipboard\",\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n } catch (error) {\n setSnackbar({\n isOpen: true,\n message: \"Failed to copy endpoint\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n }\n }, [path]);\n\n const handleEditResponse = useCallback(() => {\n // Reset local state to saved values when opening modal\n // This ensures modal shows the source of truth and avoids confusion\n setCurrentResponseCode(initialResponseCode);\n setCurrentResponseDelay(initialResponseDelay);\n setShowEditModal(true);\n }, [initialResponseCode, initialResponseDelay]);\n\n const handleCloseEditModal = useCallback(() => {\n setShowEditModal(false);\n }, []);\n\n const handleUpdateFapi = useCallback(async () => {\n if (!hasChanges) return;\n\n setIsSaving(true);\n\n try {\n const result = await updateFapiEndpoint({\n method,\n path,\n responseCode: currentResponseCode,\n responseDelay: currentResponseDelay,\n });\n\n if (result.success) {\n // Update Redux store\n dispatch(\n updateEndpoint({\n key: createEndpointKey(method, path),\n details: {\n responseCode: currentResponseCode,\n responseDelay: currentResponseDelay,\n },\n })\n );\n\n // Show success feedback\n setSnackbar({\n isOpen: true,\n message: \"FAPI endpoint updated successfully\",\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n } else {\n // Show error feedback\n setSnackbar({\n isOpen: true,\n message: result.error || \"Failed to update endpoint\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n\n // Reset to original values on error\n setCurrentResponseCode(initialResponseCode);\n setCurrentResponseDelay(initialResponseDelay);\n }\n } catch (error) {\n setSnackbar({\n isOpen: true,\n message: \"An unexpected error occurred\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n\n // Reset to original values on error\n setCurrentResponseCode(initialResponseCode);\n setCurrentResponseDelay(initialResponseDelay);\n } finally {\n setIsSaving(false);\n }\n }, [\n method,\n path,\n currentResponseCode,\n currentResponseDelay,\n initialResponseCode,\n initialResponseDelay,\n dispatch,\n hasChanges,\n ]);\n\n const handleDeleteCancel = useCallback(() => {\n setShowDeleteConfirm(false);\n }, []);\n\n const handleDeleteFapi = useCallback(async () => {\n setShowDeleteConfirm(false);\n setIsDeleting(true);\n\n try {\n const result = await deleteEndpoint(method, path);\n\n if (result.success) {\n // Update Redux store\n dispatch(removeEndpoint(createEndpointKey(method, path)));\n\n // Show success feedback\n setSnackbar({\n isOpen: true,\n message: \"FAPI endpoint deleted successfully\",\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n } else {\n // Show error feedback\n setSnackbar({\n isOpen: true,\n message: result.error || \"Failed to delete endpoint\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n }\n } catch (error) {\n setSnackbar({\n isOpen: true,\n message: \"An unexpected error occurred\",\n backgroundColor: STATUS_COLORS.ERROR,\n });\n } finally {\n setIsDeleting(false);\n }\n }, [method, path, dispatch]);\n\n return {\n isDeleting,\n isSaving,\n showDeleteConfirm,\n setShowDeleteConfirm,\n showEditModal,\n currentResponseCode,\n setCurrentResponseCode,\n currentResponseDelay,\n setCurrentResponseDelay,\n snackbar,\n setSnackbar,\n hasChanges,\n handleCopyEndpoint,\n handleEditResponse,\n handleCloseEditModal,\n handleUpdateFapi,\n handleDeleteCancel,\n handleDeleteFapi,\n };\n};\n","import { FeatureCardProps } from \"./types\";\n\nconst FeatureCard = ({\n title,\n description,\n icon: Icon,\n iconColor,\n}: FeatureCardProps) => {\n return (\n <div className=\"group relative rounded-xl p-[1px] bg-gray-800 hover:bg-gradient-to-r hover:from-[#0EA5E9] hover:via-[#8B5CF6] hover:to-[#EC4899] transition-all duration-300 hover:shadow-[0_0_30px_rgba(139,92,246,0.3)] hover:scale-[1.02]\">\n {/* Animated gradient glow on hover */}\n <div className=\"absolute -inset-1 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 rounded-xl blur opacity-0 group-hover:opacity-30 transition duration-500\"></div>\n\n {/* Main card container */}\n <div className=\"relative h-full p-6 bg-black rounded-xl font-googleSansFlex\">\n {/* Icon */}\n {Icon && (\n <Icon\n className={`w-8 h-8 mb-4 ${iconColor} group-hover:scale-110 transition-transform duration-300`}\n strokeWidth={2}\n />\n )}\n\n {/* Card content */}\n <div className=\"flex flex-col items-start\">\n <h3 className=\"text-xl font-semibold mb-3 text-gray-50 group-hover:text-white transition-colors duration-300\">\n {title}\n </h3>\n <p className=\"text-gray-400 font-normal text-sm text-left leading-relaxed group-hover:text-gray-300 transition-colors duration-300\">\n {description}\n </p>\n </div>\n\n {/* Subtle dot pattern background */}\n <div\n className=\"absolute inset-0 opacity-5 group-hover:opacity-10 transition-opacity duration-300\"\n style={{\n backgroundImage:\n \"radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px)\",\n backgroundSize: \"20px 20px\",\n }}\n />\n </div>\n </div>\n );\n};\n\nexport default FeatureCard;\n","import { HttpMethods } from \"@/types/fapi\";\n\nexport const BORDER_COLOR_MAP: Record<HttpMethods, string> = {\n GET: \"border-emerald-500/75\",\n POST: \"border-blue-500/75\",\n PUT: \"border-amber-500/75\",\n DELETE: \"border-red-500/75\",\n};\n","import { Tooltip } from \"@mui/material\";\nimport { Button } from \"@/lib\";\nimport { STATUS_COLORS } from \"@/utils/data\";\nimport { exportEndpoints } from \"@/utils/functions\";\nimport { ImportExportActionsProps } from \"./types\";\nimport { getExportTooltip } from \"./utils\";\n\nconst ImportExportActions = ({\n isImporting,\n currentEndpointCount,\n endpoints,\n projectName,\n onImport,\n setSnackbar,\n}: ImportExportActionsProps) => {\n const handleExport = () => {\n exportEndpoints(endpoints, projectName);\n setSnackbar({\n isOpen: true,\n message: `Successfully exported ${currentEndpointCount} endpoint(s)`,\n backgroundColor: STATUS_COLORS.SUCCESS,\n });\n };\n\n return (\n <div className=\"flex items-center gap-2\">\n <Tooltip\n title=\"Import FAPI details from JSON file\"\n arrow\n placement=\"top\"\n >\n <span>\n <Button\n onClick={onImport}\n name=\"Import FAPIs\"\n disabled={isImporting}\n variant=\"secondary\"\n />\n </span>\n </Tooltip>\n\n <Tooltip title={getExportTooltip(currentEndpointCount)} arrow placement=\"top\">\n <span>\n <Button\n onClick={handleExport}\n name=\"Export FAPIs\"\n disabled={currentEndpointCount === 0}\n variant=\"secondary\"\n />\n </span>\n </Tooltip>\n </div>\n );\n};\n\nexport default ImportExportActions;\n","import { ConfirmationModal, PrivacyBanner } from \"@/lib\";\nimport type { ConfirmationButton } from \"@/lib\";\nimport { ImportConfirmationModalProps } from \"./types\";\n\nconst ImportConfirmationModal = ({\n isOpen,\n fileName,\n isAtLimit,\n onMerge,\n onReplace,\n onCancel,\n}: ImportConfirmationModalProps) => {\n const buttons: ConfirmationButton[] = [\n {\n label: \"Cancel\",\n onClick: onCancel,\n variant: \"secondary\",\n },\n {\n label: \"Merge\",\n onClick: onMerge,\n variant: \"primary\",\n disabled: isAtLimit,\n },\n {\n label: \"Replace All\",\n onClick: onReplace,\n variant: \"danger\",\n },\n ];\n\n return (\n <ConfirmationModal\n isOpen={isOpen}\n title=\"Choose Import Strategy\"\n message={\n <div className=\"space-y-5\">\n {/* Privacy Banner */}\n <PrivacyBanner />\n\n <p>You are about to import endpoints from:</p>\n <div className=\"bg-black/80 px-4 py-3 rounded-md border border-gray-600\">\n <span className=\"font-googleSansCode text-white break-all\">\n {fileName || \"unknown file\"}\n </span>\n </div>\n <p className=\"font-semibold text-base\">\n How would you like to proceed?\n </p>\n\n {/* Merge Strategy Card */}\n <div className=\"bg-gradient-to-r from-green-950/50 to-emerald-950/30 border-l-4 border-green-500 p-4 rounded-md\">\n <div className=\"flex items-start gap-3\">\n <div className=\"flex-shrink-0 w-8 h-8 bg-green-500/20 rounded-full flex items-center justify-center mt-0.5\">\n <span className=\"text-green-400 text-lg\">+</span>\n </div>\n <div className=\"flex-1\">\n <h4 className=\"font-semibold text-green-300 mb-1\">Merge</h4>\n <p className=\"text-sm text-gray-300\">\n Keep existing endpoints and add new ones from the file\n (duplicates will be skipped)\n </p>\n {isAtLimit && (\n <p className=\"text-xs text-red-400 mt-2\">\n ⚠️ Disabled: Maximum endpoint limit reached\n </p>\n )}\n </div>\n </div>\n </div>\n\n {/* Replace All Strategy Card */}\n <div className=\"bg-gradient-to-r from-red-950/50 to-rose-950/30 border-l-4 border-red-500 p-4 rounded-md\">\n <div className=\"flex items-start gap-3\">\n <div className=\"flex-shrink-0 w-8 h-8 bg-red-500/20 rounded-full flex items-center justify-center mt-0.5\">\n <span className=\"text-red-400 text-lg leading-none flex items-center justify-center\">\n !\n </span>\n </div>\n <div className=\"flex-1\">\n <h4 className=\"font-semibold text-red-300 mb-1\">\n Replace All\n </h4>\n <p className=\"text-sm text-gray-300\">\n Delete all existing endpoints and import fresh from the file\n </p>\n <p className=\"text-xs text-red-400 mt-2\">\n ⚠️ The action of deleting existing endpoints cannot be undone\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n buttons={buttons}\n onClose={onCancel}\n size=\"lg\"\n />\n );\n};\n\nexport default ImportConfirmationModal;\n","import { Tooltip } from \"@mui/material\";\nimport { Copy as CopyIcon } from \"lucide-react\";\nimport { Badge } from \"@/lib\";\nimport { CardHeaderProps } from \"./types\";\nimport { BORDER_COLOR_MAP } from \"./data\";\n\nconst CardHeader = ({ method, path, onCopyEndpoint }: CardHeaderProps) => {\n return (\n <div className=\"flex items-center justify-between gap-2 w-full min-w-0\">\n <div\n className={`flex items-center gap-2 bg-black px-2 py-1 rounded-md border min-w-0 ${BORDER_COLOR_MAP[method]}`}\n >\n <Tooltip title={path} arrow placement=\"top\">\n <span className=\"text-base font-semibold truncate text-white font-googleSansCode block min-w-0\">\n {path}\n </span>\n </Tooltip>\n <Tooltip title=\"Copy endpoint\" arrow placement=\"top\">\n <button\n onClick={onCopyEndpoint}\n className=\"flex-shrink-0 hover:opacity-70 transition-opacity\"\n >\n <CopyIcon size={14} className=\"text-gray-400\" />\n </button>\n </Tooltip>\n </div>\n <Badge method={method} />\n </div>\n );\n};\n\nexport default CardHeader;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7', key: '1m0v6g' }],\n [\n 'path',\n {\n d: 'M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z',\n key: 'ohrbg2',\n },\n ],\n];\n\n/**\n * @component @name SquarePen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/square-pen\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquarePen = createLucideIcon('square-pen', __iconNode);\n\nexport default SquarePen;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n];\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Copy = createLucideIcon('copy', __iconNode);\n\nexport default Copy;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M10 11v6', key: 'nco0om' }],\n ['path', { d: 'M14 11v6', key: 'outv1u' }],\n ['path', { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6', key: 'miytrc' }],\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', key: 'e791ji' }],\n];\n\n/**\n * @component @name Trash2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/trash-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Trash2 = createLucideIcon('trash-2', __iconNode);\n\nexport default Trash2;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z',\n key: '1c8476',\n },\n ],\n ['path', { d: 'M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7', key: '1ydtos' }],\n ['path', { d: 'M7 3v4a1 1 0 0 0 1 1h7', key: 't51u73' }],\n];\n\n/**\n * @component @name Save\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/save\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Save = createLucideIcon('save', __iconNode);\n\nexport default Save;\n"],"names":["assign","searchParamsToUrlQuery","urlQueryToSearchParams","searchParams","query","key","value","entries","existing","Array","isArray","push","stringifyUrlQueryParam","param","isNaN","String","URLSearchParams","Object","item","append","set","target","searchParamsList","keys","delete","formatUrl","formatWithValidation","urlObjectKeys","slashedProtocols","urlObj","auth","hostname","protocol","pathname","hash","host","encodeURIComponent","replace","indexOf","port","querystring","search","endsWith","slashes","test","url","process","env","NODE_ENV","forEach","includes","console","warn","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","DecodeError","MiddlewareNotFoundError","MissingStaticPage","NormalizeError","PageNotFoundError","SP","ST","WEB_VITALS","execOnce","getDisplayName","getLocationOrigin","getURL","isAbsoluteUrl","isResSent","loadGetInitialProps","normalizeRepeatedSlashes","stringifyError","fn","used","result","args","ABSOLUTE_URL_REGEX","window","location","href","origin","substring","length","Component","displayName","name","res","finished","headersSent","urlParts","split","urlNoQuery","slice","join","App","ctx","prototype","getInitialProps","message","Error","pageProps","props","performance","every","method","constructor","page","code","error","JSON","stringify","stack","parsePath","path","hashIndex","queryIndex","hasQuery","undefined","addPathPrefix","prefix","startsWith","removeTrailingSlash","route","normalizePathTrailingSlash","__NEXT_MANUAL_TRAILING_SLASH","__NEXT_TRAILING_SLASH","addBasePath","basePath","__NEXT_ROUTER_BASEPATH","required","__NEXT_MANUAL_CLIENT_BASE_PATH","warnOnce","_","warnings","Set","msg","has","add","FetchStrategy","NavigationResultTag","PrefetchPriority","createCacheKey","originalHref","nextUrl","originalUrl","URL","cacheKey","HasLoadingBoundary","matchSegment","existingSegment","segment","ACTION_HEADER","FLIGHT_HEADERS","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_ACTION_REVALIDATED_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_HMR_REFRESH_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_RSC_UNION_QUERY","NEXT_URL","RSC_CONTENT_TYPE_HEADER","RSC_HEADER","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","__DEV__","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","require","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","debugInfo","Promise","resolve","asyncState","_debugInfo","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","filename","document","HEAD_REQUEST_KEY","ROOT_SEGMENT_REQUEST_KEY","appendSegmentRequestKeyPart","convertSegmentPathToStaticExportFilename","createSegmentRequestKeyPart","PAGE_SEGMENT_KEY","safeName","encodeToFilesystemAndURLSafeString","paramType","encodedName","parentRequestKey","parallelRouteKey","childRequestKeyPart","slotKey","simpleParamValueRegex","base64url","btoa","segmentPath","doesStaticSegmentAppearInURL","getCacheKeyForDynamicParam","getParamValueFromCacheKey","getRenderedPathname","getRenderedSearch","parseDynamicParamFromURLPart","urlSearchParamsToParsedUrlQuery","urlToUrlWithoutFlightMarker","response","rewrittenQuery","headers","rewrittenPath","pathnameParts","partIndex","map","s","i","DEFAULT_SEGMENT_KEY","paramValue","renderedSearch","pageSegmentWithSearchParams","addSearchParamsIfPageSegment","fromEntries","urlWithoutFlightParameters","__NEXT_CONFIG_OUTPUT","paramCacheKey","isCatchAll","createHrefFromUrl","includeHash","createInitialRSCPayloadFromFallbackPrerender","getFlightDataPartsFromPath","getNextFlightSegmentPath","normalizeFlightData","prepareFlightRouterStateForRequest","flightDataPath","flightDataPathLength","tree","seedData","head","isHeadPartial","pathToSegment","isRootRender","fallbackInitialRSCPayload","renderedPathname","canonicalUrl","originalFlightDataPath","f","originalFlightRouterState","b","c","q","fillInFallbackFlightRouterState","m","G","S","flightRouterState","filter","p","index","fillInFallbackFlightRouterStateImpl","pathnamePartsIndex","originalSegment","newSegment","doesAppearInURL","paramName","childPathnamePartsIndex","children","newChildren","childFlightRouterState","newState","flightSegmentPath","flightData","isHmrRefresh","stripClientOnlyDataFromFlightRouterState","parallelRoutes","_url","refreshMarker","isRootLayout","hasLoadingBoundary","cleanedSegment","stripSearchParamsFromPageSegment","cleanedParallelRoutes","childState","shouldPreserveRefreshMarker","Boolean","getAppBuildId","setAppBuildId","globalBuildId","buildId","djb2Hash","hexHash","str","char","charCodeAt","toString","computeCacheBustingSearchParam","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","setCacheBustingSearchParam","setCacheBustingSearchParamWithHash","uniqueCacheKey","existingSearch","rawQuery","pairs","pair","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId","createFetch","createFromNextReadableStream","fetchServerResponse","createFromReadableStream","createFromReadableStreamBrowser","createFromFetch","createFromFetchBrowser","createDebugChannel","__NEXT_REACT_DEBUG_CHANNEL","doMpaNavigation","isPageUnloading","addEventListener","options","isLegacyPPR","__NEXT_PPR","__NEXT_CACHE_COMPONENTS","shouldImmediatelyDecode","responseUrl","redirected","contentType","interception","postponed","staleTimeHeaderSeconds","staleTime","parseInt","isFlightResponse","ok","body","TURBOPACK","waitForWebpackRuntimeHotUpdate","flightResponsePromise","flightResponse","flightStream","createUnclosingPrefetchStream","normalizedFlightData","couldBeIntercepted","prerendered","err","fetchPriority","signal","__NEXT_TEST_MODE","self","__next_r","crypto","getRandomValues","Uint32Array","fetchOptions","credentials","priority","fetchUrl","fetchPromise","fetch","createFromNextFetch","browserResponse","__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS","MAX_REDIRECTS","n","rscResponse","status","requestHeaders","debugChannel","promiseForResponse","originalFlightStream","reader","getReader","ReadableStream","pull","controller","done","read","enqueue","deleteFromLru","lruPut","updateLruSize","didScheduleCleanup","lruSize","maxLruSize","node","prev","next","size","ensureCleanupIsScheduled","tail","newNodeSize","prevNodeSize","deleted","requestCleanupCallback","ninetyPercentMax","deleteMapEntry","requestIdleCallback","cb","setTimeout","Fallback","createCacheMap","deleteFromCacheMap","getFromCacheMap","isValueExpired","setInCacheMap","setSizeInCacheMap","Revalidation","cacheMap","parent","getOrInitialize","isRevalidation","entry","remainingKeys","previousKey","existingEntry","Map","newEntry","now","currentCacheVersion","rootEntry","getEntryWithFallbackImpl","staleAt","version","lazilyEvictIfNeeded","fallbackEntry","setMapEntryValue","dropRef","oldEntry","ref","parentMap","revalidatingEntry","appendLayoutVaryPath","clonePageVaryPathWithNewSearchParams","finalizeLayoutVaryPath","finalizeMetadataVaryPath","finalizePageVaryPath","getFulfilledRouteVaryPath","getRouteVaryPath","getSegmentVaryPathForRequest","varyPath","parentPath","varyPathPart","requestKey","layoutVaryPath","pageVaryPath","pageRequestKey","fetchStrategy","originalVaryPath","isPage","doesVaryOnSearchParams","Full","PPRRuntime","searchParamsVaryPath","pathParamsVaryPath","patchedVaryPath","newSearch","clonedVaryPath","ensureLeadingSlash","normalizeAppPath","normalizeRscURL","reduce","segments","isGroupSegment","INTERCEPTION_ROUTE_MARKERS","extractInterceptionRouteInformation","isInterceptionRouteAppPath","find","interceptingRoute","marker","interceptedRoute","concat","splitInterceptingRoute","computeChangedPath","extractPathFromFlightRouterState","getSelectedParams","removeLeadingSlash","segmentToPathname","normalizeSegments","acc","some","childrenPath","childPath","computeChangedPathImpl","treeA","treeB","segmentA","parallelRoutesA","segmentB","parallelRoutesB","normalizedSegmentA","normalizedSegmentB","parallelRouterKey","changedPath","currentTree","params","parallelRoute","values","isDynamicParameter","segmentValue","handleMutable","isNotUndefined","mutable","shouldScroll","previousNextUrl","patchedTree","pushRef","pendingPush","mpaNavigation","preserveCustomHistoryState","focusAndScrollRef","apply","scrollableSegments","onlyHashChange","hashFragment","decodeURIComponent","segmentPaths","cache","collectedDebugInfo","createRouterCacheKey","withoutSearchParameters","isNavigatingToNewRootLayout","nextTree","currentTreeSegment","nextTreeSegment","currentTreeChild","nextTreeChild","FreshnessPolicy","createInitialCacheNodeForHydration","isDeferredRsc","spawnDynamicRequests","startPPRNavigation","noop","navigatedAt","initialTree","seedHead","accumulation","separateRefreshUrls","task","createCacheNodeOnNavigation","oldUrl","oldCacheNode","oldRouterState","newRouterState","freshness","prefetchData","prefetchHead","isPrefetchHeadPartial","isSamePageNavigation","didFindRootLayout","parentNeedsDynamicRequest","parentRefreshUrl","updateCacheNodeOnNavigation","parentSegmentPath","parentParallelRouteKey","oldSegment","NOT_FOUND_SEGMENT_KEY","newRouterStateChildren","oldRouterStateChildren","seedDataChildren","prefetchDataChildren","childDidFindRootLayout","oldParallelRoutes","shouldDropSiblingCaches","shouldRefreshDynamicData","newParallelRoutes","isLeafSegment","newCacheNode","needsDynamicRequest","dropPrefetchRsc","reuseDynamicCacheNode","seedRsc","seedLoading","isSeedRscPartial","isSeedHeadPartial","readCacheNodeFromSeedData","prefetchRsc","prefetchLoading","isPrefetchRSCPartial","spawnNewCacheNode","refreshUrl","accumulateRefreshUrl","patchedRouterStateChildren","taskChildren","childNeedsDynamicRequest","dynamicRequestTreeChildren","newRouterStateChild","oldRouterStateChild","oldSegmentMapChild","seedDataChild","prefetchDataChild","newSegmentChild","seedHeadChild","prefetchHeadChild","isPrefetchHeadPartialChild","reuseActiveSegmentInDefaultSlot","newSegmentKeyChild","oldCacheNodeChild","taskChild","newCacheNodeChild","newSegmentMapChild","taskChildRoute","dynamicRequestTreeChild","dynamicRequestTree","patchRouterStateWithNewChildren","createDynamicRequestTree","DYNAMIC_STALETIME_MS","oldRsc","rsc","oldRscDidResolve","baseRouterState","clone","reusedRouterState","oldRefreshMarker","existingCacheNode","cacheNode","loading","isPageSegment","createDeferredRsc","isHydration","previousNavigationDidMismatch","primaryUrl","freshnessPolicy","primaryRequestPromise","fetchMissingDynamicData","refreshRequestPromises","scopedDynamicRequestTree","voidPromise","finishNavigationTask","exitStatus","waitForRequestsToFinish","abortRemainingPendingTasks","isHardRetry","primaryRequestResult","dispatchRetryDueToTreeMismatch","seed","onFulfill","remainingCount","onReject","refreshRequestPromise","retryUrl","retryNextUrl","baseTree","retryAction","previousTree","mpa","convertServerPatchToFullTree","didReceiveUnknownParallelRoute","writeDynamicDataIntoNavigationTask","data","serverRouterState","dynamicData","dynamicHead","finishPendingCacheNode","serverChildren","dynamicDataChildren","serverRouterStateChild","dynamicDataChild","taskSegment","childDidReceiveUnknownParallelRoute","dynamicSegmentData","dynamicLoading","abortPendingCacheNode","childExitStatus","DEFERRED","Symbol","tag","pendingRsc","rej","responseDebugInfo","fulfilledRsc","rejectedRsc","reason","navigate","navigateToSeededRoute","currentUrl","currentCacheNode","currentFlightRouterState","Date","readRouteCacheEntry","EntryStatus","Fulfilled","snapshot","readRenderSnapshotFromCache","prefetchFlightRouterState","prefetchSeedData","headSnapshot","readHeadSnapshotFromCache","isPartial","newCanonicalUrl","navigateUsingPrefetchedRouteTree","Rejected","optimisticRoute","requestOptimisticRouteCacheEntry","newRenderedSearch","Async","navigateDynamicallyWithNoPrefetch","navigationSeed","navigationTaskToResult","MPA","Success","childRouterStates","childSeedDatas","slots","childTree","childResult","segmentEntry","readSegmentCacheEntry","Pending","promiseForFulfilledEntry","waitForSegmentCacheEntry","Empty","hasRuntimePrefetch","metadata","DynamicRequestTreeForEntireRoute","Default","HistoryTraversal","Hydration","RefreshAll","HMRRefresh","promiseForDynamicServerResponse","newUrl","debugInfoFromResponse","baseData","treePatch","dataPatch","headPatch","convertServerPatchToFullTreeImpl","updatedParallelRouteKey","baseTreeChildren","baseSeedDataChildren","newTreeChildren","newSeedDataChildren","childBaseRouterState","childBaseSeedData","clonedTree","clonedSeedData","isEmptySeedDataPartial","STATIC_STALETIME_MS","generateSegmentsFromPatch","handleExternalUrl","handleNavigationResult","navigateReducer","Number","__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME","getStaleTimeMs","__NEXT_CLIENT_ROUTER_STATIC_STALETIME","flightRouterPatch","childSegment","asyncResult","isExternalUrl","navigateType","getElementById","navigateUsingSegmentCache","createPromiseWithResolvers","canNewFetchStrategyProvideMoreContent","convertRouteTreeToFlightRouterState","createDetachedSegmentCacheEntry","fetchRouteOnCacheMiss","fetchSegmentOnCacheMiss","fetchSegmentPrefetchesUsingDynamicRequest","getCurrentCacheVersion","overwriteRevalidatingSegmentCacheEntry","pingInvalidationListeners","readOrCreateRevalidatingSegmentEntry","readOrCreateRouteCacheEntry","readOrCreateSegmentCacheEntry","revalidateEntireCache","upgradeToPendingSegment","upsertSegmentEntry","staleTimeSeconds","Math","max","isOutputExportMode","MetadataOnlyRequestTree","routeCacheMap","segmentCacheMap","invalidationListeners","startRevalidationCooldown","pingVisibleLinks","attachInvalidationListener","onInvalidate","notifyInvalidationListener","reportError","tasks","isPrefetchTaskDirty","readRevalidatingSegmentCacheEntry","pendingEntry","promiseWithResolvers","blockedTasks","isPPREnabled","Infinity","requestedUrl","requestedSearch","urlWithoutSearchParams","routeWithNoSearchParams","createPrefetchRequestKey","canonicalUrlForRouteWithNoSearchParams","optimisticCanonicalSearch","optimisticRenderedSearch","optimisticUrl","optimisticCanonicalUrl","optimisticRouteTree","createOptimisticRouteTree","optimisticMetadataTree","optimisticEntry","clonedSlots","originalSlots","varyPathForRequest","candidateEntry","rejectedEntry","emptyEntry","PPR","pingBlockedTasks","pingPrefetchTask","fulfillRouteCacheEntry","metadataVaryPath","SubtreeHasNoLoadingBoundary","fulfilledEntry","fulfillSegmentCacheEntry","segmentCacheEntry","rejectRouteCacheEntry","rejectSegmentCacheEntry","convertRootTreePrefetchToRouteTree","rootTree","rootSegment","convertTreePrefetchToRouteTree","prefetch","partialVaryPath","prefetchSlots","childPrefetch","childParamName","childParamType","childServerSentParamKey","paramKey","childDoesAppearInURL","childPartialVaryPath","childParamValue","childParamKey","childRequestKey","SegmentHasLoadingBoundary","convertRootFlightRouterStateToRouteTree","convertFlightRouterStateToRouteTree","parentPartialVaryPath","childRouterState","routeTree","urlAfterRedirects","headResponse","fetchPrefetchResponse","addSegmentPathToUrlInOutputExportMode","varyHeader","closed","routeIsPPREnabled","prefetchStream","createPrefetchResponseStream","onResponseSizeUpdate","serverData","staleTimeMs","writeDynamicTreeResponseIntoCache","LoadingBoundary","fulfilledVaryPath","routeKey","normalizedRequestKey","requestUrl","spawnedEntries","rejectSegmentEntriesIfStillPending","fulfilledEntries","totalBytesReceivedSoFar","averageSize","isResponsePartial","rp","writeDynamicRenderResponseIntoCache","normalizedFlightDataResult","flightDatas","writeSeedDataIntoCache","fulfillEntrySpawnedByRuntimePrefetch","entriesOwnedByCurrentTask","childSeedData","ownedEntry","possiblyNewEntry","onStreamClose","totalByteLength","byteLength","staticUrl","routeDir","staticExportFilename","currentStrategy","newStrategy","cancelPrefetchTask","reschedulePrefetchTask","schedulePrefetchTask","scheduleMicrotask","queueMicrotask","catch","taskHeap","inProgressRequests","sortIdCounter","didScheduleMicrotask","mostRecentlyHoveredLink","REVALIDATION_COOLDOWN_MS","revalidationCooldownTimeoutHandle","clearTimeout","ensureWorkIsScheduled","treeAtTimeOfPrefetch","cacheVersion","phase","hasBackgroundWork","spawnedRuntimePrefetches","sortId","isCanceled","_heapIndex","trackMostRecentlyHoveredLink","heapPush","heapDelete","Intent","heapResift","Background","processQueueInMicrotask","hasNetworkBandwidth","spawnPrefetchSubtask","prefetchSubtask","onPrefetchConnectionClosed","heapPeek","pingRoute","heapPop","background","pingRootRouteTree","keyWithoutSearch","routeWithoutSearch","pingStaticHead","pingSharedPartOfCacheComponentsTree","pingRuntimeHead","requestTree","pingRuntimePrefetches","diffRouteTreeAgainstCurrent","pingStaticSegmentData","pingRouteTreeAndIncludeDynamicData","oldTree","newTree","oldTreeChildren","newTreeChild","newTreeChildSegment","oldTreeChild","oldTreeChildSegment","doesCurrentSegmentMatchCachedSegment","pingNewPartOfCacheComponentsTree","requestTreeChildren","requestTreeChild","subtreeHasLoadingBoundary","pingPPRDisabledRouteTreeUpToLoadingBoundary","refetchMarkerContext","refetchMarker","segmentHasLoadingBoundary","isInsideRefetchingParent","spawnedSegment","pingFullSegmentRevalidation","pingPPRSegmentRevalidation","revalidatingSegment","upsertSegmentOnCompletion","pendingSegment","nonEmptyRevalidatingSegment","emptySegment","fulfilled","currentSegment","cachedSegment","compareQueuePriority","a","priorityDiff","phaseDiff","heap","heapSiftUp","first","last","pop","heapSiftDown","parentIndex","halfLength","leftIndex","left","rightIndex","right","IDLE_LINK_STATUS","PENDING_LINK_STATUS","mountFormInstance","mountLinkInstance","onLinkVisibilityChanged","onNavigationIntent","setLinkForCurrentNavigation","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","linkForMostRecentNavigation","pending","link","setOptimisticLinkStatus","prefetchable","prefetchableAndVisible","observer","IntersectionObserver","handleIntersect","rootMargin","observeVisibility","element","instance","existingInstance","observe","coercePrefetchableUrl","createPrefetchURL","reportErrorFn","router","prefetchEnabled","prefetchURL","isVisible","prefetchTask","prefetchHref","unobserve","intersectionRatio","rescheduleLinkPrefetch","unstable_upgradeToDynamicPrefetch","__NEXT_DYNAMIC_ON_HOVER","existingPrefetchTask","getCurrentAppRouterState","appRouterState","scheduleSegmentPrefetchTask","pathHasPrefix","hasBasePath","isLocalURL","locationOrigin","resolved","errorOnce","errors","LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","as","linkInstanceRef","scroll","onNavigate","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","isDefaultPrevented","dispatchNavigateAction","formatStringOrUrl","urlObjOrString","linkStatus","useOptimistic","hrefProp","asProp","childrenProp","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","forwardedRef","unstable_dynamicOnHover","restProps","useContext","AppRouterContext","getFetchStrategyFromPrefetchProp","createPropError","expected","actual","requiredPropsGuard","requiredProps","optionalPropsGuard","optionalProps","valType","locale","hasDynamicSegment","resolvedHref","child","$$typeof","for","Children","only","childRef","observeLinkVisibilityOnMount","mergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","__NEXT_LINK_NO_TOUCH_START","cloneElement","LinkStatusContext","Provider","createContext"],"mappings":"uCAEA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,IAAM,EAAgB,CAAC,EASR,SAAS,EAAW,CAAI,CAAE,CAAO,EAC9C,IAAM,EAAM,EAAA,MAAY,CAAC,GAIzB,OAHI,EAAI,OAAO,GAAK,IAClB,EAAI,OAAO,CAAG,CADmB,CACd,EAAA,EAEd,CACT,gDChBA,IAAA,EAAA,EAAA,CAAA,CAAA,OCAA,EAAA,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AgB,uBAChB,CAAqB,qBACrB,CAAmB,qBACnB,CAAmB,mBACnB,CAAiB,CACO,GAEtB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,0CACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,2BACb,CAAA,EAAA,EAAA,GAAA,EAAC,GAAA,SAAS,CAAA,CACR,SAAS,CAAA,CAAA,EACT,KAAK,QACL,MAAM,iEACN,MAAO,EACP,SAAU,EACV,MAAO,CAAC,CAAC,EACT,WAAY,EACZ,YAAY,qCACZ,UAAU,sBACV,WAAY,CACV,UAAW,qBACb,EACA,WAAY,CACV,UAAW,EAAA,SAAS,CAAC,uBAAuB,AAC9C,MAGJ,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAO,CAAA,CACN,KAAK,CAAA,CAAA,EACL,UAAU,MACV,MGlCN,AAAI,AHkCyB,CAAhB,EGlCgB,CAAC,EACrB,gBADuC,IHkCI,EG9B3C,mBAEF,8BH8BD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,UACC,CAAA,EAAA,EAAA,GAAA,EAAC,GAAA,UAAU,CAAA,CACT,QAAS,EACT,MAAM,YACN,SACE,CAAC,GACD,CAAC,CAAC,GACF,EAEF,KAAK,iBAEJ,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,GAAA,gBAAgB,CAAA,CAAC,KAAM,GAAI,MAAM,cAElC,CAAA,EAAA,EAAA,GAAA,EAAC,GAAA,CAAS,KAAM","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,201,202,203,204,205,206,207,211,212,214,216,218,219,221,222,224,225,226,227,228,229,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,309,310,311,312,325,326,327,328]}
|