diff --git a/app/globals.css b/app/globals.css index 7e8e623..ea6102b 100644 --- a/app/globals.css +++ b/app/globals.css @@ -48,12 +48,10 @@ button { color: inherit; } .upload-card { width: 100%; min-height: 100px; max-height: 260px; display: block; position: relative; overflow: hidden; border: 1px dashed #a5a59e; background: #ebe7dd; } .upload-card canvas { width: 100%; height: 100%; display: block; pointer-events: none; } .upload-card .file-input { display: none; } -.crop-preview { cursor: grab; touch-action: none; } -.crop-preview:active { cursor: grabbing; } -.crop-frame { position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px rgba(20,30,25,.22); pointer-events: none; } +.crop-preview { cursor: default; } .upload-overlay { position: absolute; z-index: 3; right: 10px; bottom: 10px; padding: 7px 10px; border: 0; color: white; background: rgba(22, 75, 57, .9); cursor: pointer; font-size: 12px; } .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 9px 0 24px; color: var(--muted); font-size: 11px; } -.crop-zoom { margin-top: 0; } +.crop-select-button { width: 100%; margin-top: 0; padding: 10px; border: 1px solid var(--ink); background: var(--lime); cursor: pointer; font-size: 12px; font-weight: 700; } .reset-crop { width: 100%; margin: 7px 0 20px; padding: 7px; border: 1px solid var(--line); background: white; cursor: pointer; color: var(--muted); font-size: 11px; } .field-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; } .field-row label, .field { display: flex; flex-direction: column; gap: 8px; } @@ -140,6 +138,30 @@ input[type="range"] { accent-color: var(--green); } .history-actions button:first-child { background: var(--lime); font-weight: 700; } .history-empty { margin-top: 18px; padding: 44px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); background: rgba(255,253,248,.5); font-size: 13px; } +.crop-dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(17,24,21,.76); backdrop-filter: blur(5px); } +.crop-dialog { width: min(1280px, 96vw); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ink); background: var(--card); box-shadow: 10px 10px 0 rgba(0,0,0,.32); } +.crop-dialog-header { flex: 0 0 auto; padding: 18px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); } +.crop-dialog-header .section-kicker { margin-bottom: 5px; } +.crop-dialog-header h2 { margin: 0; font-size: 22px; } +.crop-dialog-header p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); font-size: 12px; } +.crop-dialog-header > button { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 25px; line-height: 1; } +.crop-dialog-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 18px; display: grid; place-items: center; background-color: #e9e5db; background-image: radial-gradient(#c8c3b8 .7px, transparent .7px); background-size: 12px 12px; } +.crop-dialog-stage { position: relative; width: max-content; max-width: 100%; line-height: 0; cursor: crosshair; touch-action: none; user-select: none; box-shadow: 0 0 0 1px var(--ink); } +.crop-dialog-stage canvas { display: block; max-width: 100%; height: auto; pointer-events: none; } +.crop-selection-mask { position: absolute; z-index: 1; background: rgba(10,15,13,.55); pointer-events: none; } +.crop-selection-top { inset: 0 0 auto; } +.crop-selection-left { left: 0; } +.crop-selection-bottom { inset: auto 0 0; bottom: 0; } +.crop-selection-box { position: absolute; z-index: 2; border: 2px solid white; outline: 1px solid rgba(0,0,0,.75); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; } +.crop-selection-box::before, .crop-selection-box::after { content: ""; position: absolute; background: rgba(255,255,255,.62); } +.crop-selection-box::before { left: 33.333%; top: 0; bottom: 0; width: 1px; box-shadow: calc(33.333% * 1) 0 0 rgba(255,255,255,.62); } +.crop-selection-box::after { left: 0; right: 0; top: 33.333%; height: 1px; box-shadow: 0 calc(33.333% * 1) 0 rgba(255,255,255,.62); } +.crop-dialog-actions { flex: 0 0 auto; min-height: 66px; padding: 12px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); } +.crop-dialog-actions span { margin-right: auto; color: var(--muted); font-size: 11px; } +.crop-dialog-actions button { min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: white; cursor: pointer; font-size: 12px; } +.crop-dialog-actions .confirm { background: var(--green); color: white; font-weight: 700; } +.crop-dialog-actions .confirm:disabled { opacity: .42; cursor: not-allowed; } + @media (max-width: 1160px) { .workspace { grid-template-columns: 260px minmax(500px, 1fr); } .color-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); max-height: none; } @@ -175,6 +197,14 @@ input[type="range"] { accent-color: var(--green); } .history-section { margin: 52px auto; } .history-heading .search-box { width: 100%; } .history-grid { grid-template-columns: 1fr; } + .crop-dialog-backdrop { padding: 0; } + .crop-dialog { width: 100vw; max-height: 100vh; height: 100vh; border: 0; box-shadow: none; } + .crop-dialog-header { padding: 14px 16px; } + .crop-dialog-header h2 { font-size: 18px; } + .crop-dialog-scroll { padding: 10px; } + .crop-dialog-actions { padding: 10px 12px; flex-wrap: wrap; } + .crop-dialog-actions span { width: 100%; order: -1; } + .crop-dialog-actions button { flex: 1; padding: 0 10px; } input, select, button { font-size: 16px; } .search-box input, .color-item, .selection-tools button { font-size: 12px; } } diff --git a/app/page.tsx b/app/page.tsx index 783ab96..5f036ea 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -28,6 +28,15 @@ type ColorCluster = { type SamplingStrategy = "smooth" | "dominant"; +type CropRect = { + x: number; + y: number; + width: number; + height: number; +}; + +const FULL_CROP: CropRect = { x: 0, y: 0, width: 1, height: 1 }; + function logUsage(event: Record) { void fetch("/api/usage", { method: "POST", @@ -400,9 +409,7 @@ function sampleDominantRegions( width: number, height: number, fitMode: "cover" | "contain", - cropZoom: number, - cropX: number, - cropY: number, + crop: CropRect, ) { // A mildly center-weighted 3x3 vote keeps hard object boundaries clean. // Broad gradients are preserved later when the MARD palette is selected, @@ -420,7 +427,7 @@ function sampleDominantRegions( const ctx = sample.getContext("2d", { willReadFrequently: true })!; ctx.clearRect(0, 0, sample.width, sample.height); ctx.imageSmoothingEnabled = false; - drawFittedImage(ctx, image, sample.width, sample.height, fitMode, cropZoom, cropX, cropY); + drawFittedImage(ctx, image, sample.width, sample.height, fitMode, crop); const source = ctx.getImageData(0, 0, sample.width, sample.height).data; const result = new Uint8ClampedArray(width * height * 4); const confidence = new Float32Array(width * height); @@ -613,11 +620,13 @@ function drawFittedImage( width: number, height: number, fitMode: "cover" | "contain", - cropZoom: number, - cropX: number, - cropY: number, + crop: CropRect, ) { - const imageRatio = image.naturalWidth / image.naturalHeight; + const sourceX = crop.x * image.naturalWidth; + const sourceY = crop.y * image.naturalHeight; + const sourceWidth = crop.width * image.naturalWidth; + const sourceHeight = crop.height * image.naturalHeight; + const imageRatio = sourceWidth / sourceHeight; const boxRatio = width / height; let drawWidth = width; let drawHeight = height; @@ -628,15 +637,9 @@ function drawFittedImage( drawWidth = width; drawHeight = width / imageRatio; } - drawWidth *= cropZoom; - drawHeight *= cropZoom; - // Allow an object at the source-image edge to be dragged into the crop - // center. The exposed area intentionally becomes transparent/no-bead. - const panRangeX = drawWidth / 2; - const panRangeY = drawHeight / 2; - const drawX = (width - drawWidth) / 2 + cropX * panRangeX; - const drawY = (height - drawHeight) / 2 + cropY * panRangeY; - ctx.drawImage(image, drawX, drawY, drawWidth, drawHeight); + const drawX = (width - drawWidth) / 2; + const drawY = (height - drawHeight) / 2; + ctx.drawImage(image, sourceX, sourceY, sourceWidth, sourceHeight, drawX, drawY, drawWidth, drawHeight); } function makeDemoImage() { @@ -677,9 +680,9 @@ export default function Home() { const [colorLimit, setColorLimit] = useState(64); const [fitMode, setFitMode] = useState<"cover" | "contain">("contain"); const [samplingStrategy, setSamplingStrategy] = useState("dominant"); - const [cropZoom, setCropZoom] = useState(1); - const [cropX, setCropX] = useState(0); - const [cropY, setCropY] = useState(0); + const [cropRect, setCropRect] = useState(FULL_CROP); + const [draftCropRect, setDraftCropRect] = useState(FULL_CROP); + const [cropDialogOpen, setCropDialogOpen] = useState(false); const [pixels, setPixels] = useState([]); const [selectedCodes, setSelectedCodes] = useState>(new Set()); const [onlySelected, setOnlySelected] = useState(false); @@ -694,10 +697,11 @@ export default function Home() { const sourceImageRef = useRef(null); const fileInputRef = useRef(null); const cropCanvasRef = useRef(null); + const cropDialogCanvasRef = useRef(null); const canvasRef = useRef(null); const patternStageRef = useRef(null); - const cropPreviewRef = useRef(null); - const cropDragRef = useRef<{ pointerId: number; x: number; y: number; cropX: number; cropY: number } | null>(null); + const cropDialogStageRef = useRef(null); + const cropSelectionDragRef = useRef<{ pointerId: number; startX: number; startY: number } | null>(null); const patternDragRef = useRef<{ pointerId: number; x: number; @@ -734,7 +738,7 @@ export default function Home() { const convertImage = ( image = sourceImageRef.current, - crop = { zoom: cropZoom, x: cropX, y: cropY }, + crop = cropRect, recordUsage = true, ) => { if (!image) return; @@ -743,7 +747,7 @@ export default function Home() { let data: Uint8ClampedArray; let dominantConfidence: Float32Array | null = null; if (samplingStrategy === "dominant") { - const sampled = sampleDominantRegions(image, width, height, fitMode, crop.zoom, crop.x, crop.y); + const sampled = sampleDominantRegions(image, width, height, fitMode, crop); data = sampled.data; dominantConfidence = sampled.confidence; } else { @@ -752,7 +756,7 @@ export default function Home() { sample.height = height; const ctx = sample.getContext("2d", { willReadFrequently: true })!; ctx.clearRect(0, 0, width, height); - drawFittedImage(ctx, image, width, height, fitMode, crop.zoom, crop.x, crop.y); + drawFittedImage(ctx, image, width, height, fitMode, crop); data = ctx.getImageData(0, 0, width, height).data; } const { pixelKeys, clusters, binClusters } = mergePerceptualColors(data); @@ -803,7 +807,7 @@ export default function Home() { image.onload = () => { sourceImageRef.current = image; setSourceUrl(demo); - convertImage(image, undefined, false); + convertImage(image, FULL_CROP, false); }; image.src = demo; // This intentionally runs once to create the initial example. @@ -824,8 +828,37 @@ export default function Home() { const ctx = canvas.getContext("2d")!; ctx.fillStyle = "#f7f5ed"; ctx.fillRect(0, 0, previewWidth, previewHeight); - drawFittedImage(ctx, image, previewWidth, previewHeight, fitMode, cropZoom, cropX, cropY); - }, [sourceUrl, requestedWidth, requestedHeight, fitMode, cropZoom, cropX, cropY]); + drawFittedImage(ctx, image, previewWidth, previewHeight, fitMode, cropRect); + }, [sourceUrl, requestedWidth, requestedHeight, fitMode, cropRect]); + + useEffect(() => { + if (!cropDialogOpen) return; + const canvas = cropDialogCanvasRef.current; + const image = sourceImageRef.current; + if (!canvas || !image) return; + const maximumWidth = 1200; + const maximumHeight = 760; + const scale = Math.min(maximumWidth / image.naturalWidth, maximumHeight / image.naturalHeight, 1); + canvas.width = Math.max(1, Math.round(image.naturalWidth * scale)); + canvas.height = Math.max(1, Math.round(image.naturalHeight * scale)); + const ctx = canvas.getContext("2d")!; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.drawImage(image, 0, 0, canvas.width, canvas.height); + }, [cropDialogOpen, sourceUrl]); + + useEffect(() => { + if (!cropDialogOpen) return; + const previousOverflow = document.body.style.overflow; + document.body.style.overflow = "hidden"; + const closeOnEscape = (event: KeyboardEvent) => { + if (event.key === "Escape") setCropDialogOpen(false); + }; + window.addEventListener("keydown", closeOnEscape); + return () => { + document.body.style.overflow = previousOverflow; + window.removeEventListener("keydown", closeOnEscape); + }; + }, [cropDialogOpen]); const usedColors = useMemo(() => { const counts = new Map(); @@ -940,33 +973,81 @@ export default function Home() { sourceImageRef.current = image; setSourceUrl(url); setSourceName(file.name); - setCropZoom(1); - setCropX(0); - setCropY(0); + setCropRect(FULL_CROP); + setDraftCropRect(FULL_CROP); setStatus("图片已载入,点击“重新转换”生成图纸"); - convertImage(image, { zoom: 1, x: 0, y: 0 }); + convertImage(image, FULL_CROP); }; image.src = url; }; - const handleCropPointerDown = (event: React.PointerEvent) => { + const openCropDialog = () => { + setDraftCropRect(cropRect); + setCropDialogOpen(true); + }; + + const cropPoint = (event: React.PointerEvent) => { + const stage = cropDialogStageRef.current; + if (!stage) return { x: 0, y: 0 }; + const rect = stage.getBoundingClientRect(); + return { + x: Math.max(0, Math.min(1, (event.clientX - rect.left) / Math.max(1, rect.width))), + y: Math.max(0, Math.min(1, (event.clientY - rect.top) / Math.max(1, rect.height))), + }; + }; + + const updateDraftCrop = (startX: number, startY: number, endX: number, endY: number) => { + const targetRatio = Math.max(8, requestedWidth || 8) / Math.max(8, requestedHeight || 8); + const image = sourceImageRef.current; + if (!image) return; + const normalizedRatio = targetRatio * image.naturalHeight / image.naturalWidth; + const directionX = endX >= startX ? 1 : -1; + const directionY = endY >= startY ? 1 : -1; + let width = Math.abs(endX - startX); + let height = Math.abs(endY - startY); + if (width / Math.max(height, 0.0001) > normalizedRatio) width = height * normalizedRatio; + else height = width / Math.max(normalizedRatio, 0.0001); + const availableWidth = directionX > 0 ? 1 - startX : startX; + const availableHeight = directionY > 0 ? 1 - startY : startY; + const scale = Math.min(1, availableWidth / Math.max(width, 0.0001), availableHeight / Math.max(height, 0.0001)); + width *= scale; + height *= scale; + setDraftCropRect({ + x: directionX > 0 ? startX : startX - width, + y: directionY > 0 ? startY : startY - height, + width: Math.max(0.01, width), + height: Math.max(0.01, height), + }); + }; + + const handleCropSelectionDown = (event: React.PointerEvent) => { + if (event.button !== 0) return; + const point = cropPoint(event); event.currentTarget.setPointerCapture(event.pointerId); - cropDragRef.current = { pointerId: event.pointerId, x: event.clientX, y: event.clientY, cropX, cropY }; + cropSelectionDragRef.current = { pointerId: event.pointerId, startX: point.x, startY: point.y }; + setDraftCropRect({ x: point.x, y: point.y, width: 0.01, height: 0.01 }); }; - const handleCropPointerMove = (event: React.PointerEvent) => { - const drag = cropDragRef.current; - const preview = cropPreviewRef.current; - if (!drag || drag.pointerId !== event.pointerId || !preview) return; - const rect = preview.getBoundingClientRect(); - const nextX = drag.cropX + ((event.clientX - drag.x) / Math.max(1, rect.width)) * 2; - const nextY = drag.cropY + ((event.clientY - drag.y) / Math.max(1, rect.height)) * 2; - setCropX(Math.max(-1, Math.min(1, nextX))); - setCropY(Math.max(-1, Math.min(1, nextY))); + const handleCropSelectionMove = (event: React.PointerEvent) => { + const drag = cropSelectionDragRef.current; + if (!drag || drag.pointerId !== event.pointerId) return; + const point = cropPoint(event); + updateDraftCrop(drag.startX, drag.startY, point.x, point.y); }; - const handleCropPointerUp = (event: React.PointerEvent) => { - if (cropDragRef.current?.pointerId === event.pointerId) cropDragRef.current = null; + const handleCropSelectionEnd = (event: React.PointerEvent) => { + if (cropSelectionDragRef.current?.pointerId === event.pointerId) cropSelectionDragRef.current = null; + if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId); + }; + + const confirmCrop = () => { + if (draftCropRect.width < 0.03 || draftCropRect.height < 0.03) { + setStatus("框选区域太小,请在大图上拖出更大的选框"); + return; + } + setCropRect(draftCropRect); + setCropDialogOpen(false); + setStatus("取景区域已更新,点击“重新转换”生成图纸"); }; const toggleColor = (code: string) => { @@ -1151,21 +1232,19 @@ export default function Home() {
+ {cropDialogOpen &&
{ if (event.target === event.currentTarget) setCropDialogOpen(false); }}> +
+
+

IMAGE CROP

框选需要转换的区域

在大图上按住并拖动。选框比例为 {Math.max(8, requestedWidth || 8)} : {Math.max(8, requestedHeight || 8)}。

+ +
+
+
+ +
+
+
+
+
+
+
+
+ + 从左上角拖向右下角即可重新框选 + + +
+
+
} +

LOCAL PATTERN ARCHIVE

历史图纸

历史保存在当前浏览器,最多保留 30 份。

setHistoryQuery(e.target.value)} placeholder="按名称或 32x32 查询" />
diff --git a/out/.vite/manifest.json b/out/.vite/manifest.json index 0849f8d..a9b6a18 100644 --- a/out/.vite/manifest.json +++ b/out/.vite/manifest.json @@ -11,7 +11,7 @@ "name": "rolldown-runtime" }, "app/page.tsx": { - "file": "_next/static/chunks/page-5ZnMML26.js", + "file": "_next/static/chunks/page-CNQA87Lx.js", "name": "page", "src": "app/page.tsx", "isDynamicEntry": true, @@ -21,7 +21,7 @@ ] }, "node_modules/vinext/dist/shims/layout-segment-context.js": { - "file": "_next/static/chunks/layout-segment-context-Bq1X1g2W.js", + "file": "_next/static/chunks/layout-segment-context-Bf1cBuVr.js", "name": "layout-segment-context", "src": "node_modules/vinext/dist/shims/layout-segment-context.js", "isDynamicEntry": true, @@ -32,7 +32,7 @@ ] }, "virtual:vinext-app-browser-entry": { - "file": "_next/static/chunks/index-ByP43Bdw.js", + "file": "_next/static/chunks/index-DAoL2pdt.js", "name": "index", "src": "virtual:vinext-app-browser-entry", "isEntry": true, diff --git a/out/404.html b/out/404.html index c9f5cbc..e2d63ab 100644 --- a/out/404.html +++ b/out/404.html @@ -1,2 +1,2 @@ -豆格工坊|图片转拼豆图纸404: This page could not be found. -

404

This page could not be found.

\ No newline at end of file +豆格工坊|图片转拼豆图纸404: This page could not be found. +

404

This page could not be found.

\ No newline at end of file diff --git a/out/_next/static/91d6b0b4-aeca-4c4d-9c3c-27cc5139b142/_buildManifest.js b/out/_next/static/976d8e63-a1e8-4c46-b57a-876eef7ec109/_buildManifest.js similarity index 100% rename from out/_next/static/91d6b0b4-aeca-4c4d-9c3c-27cc5139b142/_buildManifest.js rename to out/_next/static/976d8e63-a1e8-4c46-b57a-876eef7ec109/_buildManifest.js diff --git a/out/_next/static/91d6b0b4-aeca-4c4d-9c3c-27cc5139b142/_ssgManifest.js b/out/_next/static/976d8e63-a1e8-4c46-b57a-876eef7ec109/_ssgManifest.js similarity index 100% rename from out/_next/static/91d6b0b4-aeca-4c4d-9c3c-27cc5139b142/_ssgManifest.js rename to out/_next/static/976d8e63-a1e8-4c46-b57a-876eef7ec109/_ssgManifest.js diff --git a/out/_next/static/chunks/index-ByP43Bdw.js b/out/_next/static/chunks/index-DAoL2pdt.js similarity index 99% rename from out/_next/static/chunks/index-ByP43Bdw.js rename to out/_next/static/chunks/index-DAoL2pdt.js index 0b1f3fc..f9cec77 100644 --- a/out/_next/static/chunks/index-ByP43Bdw.js +++ b/out/_next/static/chunks/index-DAoL2pdt.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_next/static/chunks/layout-segment-context-Bq1X1g2W.js","_next/static/chunks/rolldown-runtime-C60lm6uB.js","_next/static/chunks/framework-BgSIrAUN.js","_next/static/chunks/page-5ZnMML26.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_next/static/chunks/layout-segment-context-Bf1cBuVr.js","_next/static/chunks/rolldown-runtime-C60lm6uB.js","_next/static/chunks/framework-BgSIrAUN.js","_next/static/chunks/page-CNQA87Lx.js"])))=>i.map(i=>d[i]); import{n as e,r as t,t as n}from"./rolldown-runtime-C60lm6uB.js";import{i as r,n as i,r as a,t as o}from"./framework-BgSIrAUN.js";function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var c=Symbol.for(`vinext.navigationRuntime`),l=[`boundaries`,`defaults`,`interceptions`,`interceptionsBySlotId`,`layouts`,`pages`,`rootBoundaries`,`routeHandlers`,`routes`,`slotBindings`,`slots`,`templates`];function u(){return{bootstrap:{routeManifest:null,rsc:void 0},functions:{}}}function d(){return window}function f(e){return s(e)?C(Reflect.get(e,`clearNavigationCaches`))&&C(Reflect.get(e,`commitHashNavigation`))&&C(Reflect.get(e,`navigateExternal`))&&C(Reflect.get(e,`navigate`))&&C(Reflect.get(e,`notifyLinkNavigationStart`))&&C(Reflect.get(e,`pingVisibleLinks`)):!1}function p(e){return typeof e==`string`?!0:Array.isArray(e)&&e.length===2&&e[0]===3&&typeof e[1]==`string`}function m(e){if(!s(e))return!1;let t=Reflect.get(e,`pathname`),n=Reflect.get(e,`searchParams`);return typeof t==`string`&&Array.isArray(n)&&n.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`&&typeof e[1]==`string`)}function h(e){return s(e)?Object.values(e).every(e=>typeof e==`string`||Array.isArray(e)&&e.every(e=>typeof e==`string`)):!1}function g(e){if(!s(e))return!1;let t=Reflect.get(e,`done`),n=Reflect.get(e,`dynamicStaleTimeSeconds`),r=Reflect.get(e,`initialCacheKind`),i=Reflect.get(e,`nav`),a=Reflect.get(e,`params`),o=Reflect.get(e,`rsc`);return(t===void 0||typeof t==`boolean`)&&(n===void 0||typeof n==`number`&&Number.isFinite(n)&&n>=0)&&(r===void 0||r===`dynamic`||r===`static`)&&(i===void 0||m(i))&&(a===void 0||h(a))&&Array.isArray(o)&&o.every(p)}function _(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function v(e){return e===null||typeof e==`string`}function y(e){return s(e)?typeof e.id==`string`&&typeof e.sourcePattern==`string`&&_(e.sourcePatternParts)&&typeof e.targetPattern==`string`&&_(e.targetPatternParts)&&typeof e.slotId==`string`&&v(e.ownerLayoutId)&&v(e.interceptingRouteId)&&v(e.targetRouteId):!1}function b(e){return Array.isArray(e)&&e.every(y)}function x(e){if(!s(e))return!1;let t=Reflect.get(e,`graphVersion`),n=Reflect.get(e,`segmentGraph`);if(typeof t!=`string`||!s(n))return!1;let r=Reflect.get(n,`interceptions`),i=Reflect.get(n,`interceptionsBySlotId`);if(!l.every(e=>Reflect.get(n,e)instanceof Map)||!(r instanceof Map)||!(i instanceof Map))return!1;for(let e of r.values())if(!y(e))return!1;for(let e of i.values())if(!b(e))return!1;return!0}function ee(e){if(!s(e))return!1;let t=Reflect.get(e,`routeManifest`),n=Reflect.get(e,`rsc`);return(t===null||x(t))&&(n===void 0||g(n))}function S(e){if(!s(e)||!(`bootstrap`in e)||!(`functions`in e))return!1;let{bootstrap:t,functions:n}=e;return ee(t)&&f(n)}function C(e){return e===void 0||typeof e==`function`}function w(){let e=d();if(e===null)return null;let t=Reflect.get(e,c);return S(t)?t:null}function T(){let e=d();if(e===null)return u();let t=Reflect.get(e,c),n=S(t)?t:u();return Reflect.set(e,c,n),n}function E(e){let t=T();return t.bootstrap={...t.bootstrap,...e},t}function D(e){let t=T();return t.functions={...t.functions,...e},t}function te(){return O(T())}function O(e){let t=e.bootstrap.rsc;if(t===void 0){let t={rsc:[]};return e.bootstrap.rsc=t,t}return t}function ne(){return typeof w()?.functions.navigate==`function`}var k=`X-Vinext-Params`,A=`X-Vinext-Mounted-Slots`,j=`X-Vinext-Dynamic-Stale-Time`,M=`X-Vinext-Rendered-Path-And-Search`,N=`X-Vinext-Interception-Context`,P=`X-Vinext-Rsc-Render-Mode`,re=`X-Vinext-Client-Reuse-Manifest`,ie=`X-Vinext-Rsc-Redirect`,ae=`X-Vinext-Rsc-Redirect-Type`,oe=`Next-Router-State-Tree`,F=`Next-Router-Prefetch`,se=`Next-Router-Segment-Prefetch`,ce=`Next-Url`;function le(e){return e.startsWith(`/`)&&!e.startsWith(`//`)&&!e.includes(`?`)&&!e.includes(`#`)&&!e.includes(`\0`)}function ue(e){if(e===`/`||e.length>1&&e[0]===`/`&&!e.includes(`//`)&&!e.includes(`/./`)&&!e.includes(`/../`)&&!e.endsWith(`/.`)&&!e.endsWith(`/..`))return e;let t=e.split(`/`),n=[];for(let e of t)e===``||e===`.`||(e===`..`?n.pop():n.push(e));return`/`+n.join(`/`)}var I=(e,t)=>et);function de(e){let t=2166136261;for(let n=0;n>>0;let n=84696351;for(let t=0;t>>0;return t.toString(16).padStart(8,`0`)+n.toString(16).padStart(8,`0`)}var fe=[`schemaVersion`,`graphVersion`,`deploymentVersion`,`appElementsSchemaVersion`,`rscPayloadSchemaVersion`,`rootBoundaryId`,`renderEpoch`];function pe(e={}){return{schemaVersion:1,graphVersion:e.graphVersion??null,deploymentVersion:e.deploymentVersion??null,appElementsSchemaVersion:1,rscPayloadSchemaVersion:1,rootBoundaryId:e.rootBoundaryId??null,renderEpoch:e.renderEpoch??null}}function me(e){return typeof e==`string`||e===null}function he(e){return e.schemaVersion===1&&e.appElementsSchemaVersion===1&&e.rscPayloadSchemaVersion===1}function ge(e){return!s(e)||!he(e)||!me(e.graphVersion)||!me(e.deploymentVersion)||!me(e.rootBoundaryId)||!me(e.renderEpoch)?null:{schemaVersion:1,graphVersion:e.graphVersion,deploymentVersion:e.deploymentVersion,appElementsSchemaVersion:1,rscPayloadSchemaVersion:1,rootBoundaryId:e.rootBoundaryId,renderEpoch:e.renderEpoch}}var L=r(),_e=new WeakMap;function ve(e,t){_e.get(e)?.get(t)?.release()}var R=t(a(),1),ye=`\0`,be=`__artifactCompatibility`,xe=`__cacheEntryReuseProof`,z=`__dynamicStaleTime`,Se=`__interception`,Ce=`__interceptionContext`,we=`__layoutIds`,Te=`__layoutFlags`,Ee=`__renderObservation`,De=`__route`,Oe=`__rootLayout`,ke=`__skippedLayoutIds`,Ae=`__sourcePage`,je=`__slotBindings`,Me=`__VINEXT_UNMATCHED_SLOT__`,Ne=Symbol.for(`vinext.unmatchedSlot`),Pe=new Set;function Fe(e){return new Set(e)}var Ie=Fe(`CP_CACHE_ENTRY_PROOF_MISSING.CP_MODEL_DISABLED.CP_ARTIFACT_COMPATIBILITY_INCOMPATIBLE.CP_ARTIFACT_COMPATIBILITY_UNKNOWN.CP_DIMENSION_COUNT_EXCEEDED.CP_DIMENSION_NAME_MISSING.CP_DIMENSION_NAME_TOO_LONG.CP_DIMENSION_VALUE_COUNT_EXCEEDED.CP_DIMENSION_VALUE_TOO_LONG.CP_DIMENSION_VALUES_MISSING.CP_ENCODED_VARIANT_TOO_LONG.CP_INVALID_VARIANT_BUDGET.CP_ROUTE_VARIANT_BUDGET_ROUTE_MISMATCH.CP_ROUTE_VARIANT_CEILING_EXCEEDED.CP_UNSAFE_PUBLIC_DIMENSION.CP_BOUNDARY_OUTCOME_MISMATCH.CP_BOUNDARY_OUTCOME_UNKNOWN.CP_PRIVATE_DYNAMIC_DOWNGRADE.CP_STATIC_LAYOUT_CANDIDATE_OUTPUT_KIND.CP_STATIC_LAYOUT_CURRENT_OUTPUT_KIND.CP_STATIC_LAYOUT_ID_MISMATCH.CP_STATIC_LAYOUT_OBSERVATION_OUTPUT_KIND.CP_STATIC_LAYOUT_OBSERVATION_OUTPUT_MISMATCH.CP_STATIC_LAYOUT_PRIVATE_DYNAMIC_DOWNGRADE.CP_STATIC_LAYOUT_REQUEST_API_OBSERVED.CP_STATIC_LAYOUT_REQUEST_API_UNKNOWN.CP_STATIC_LAYOUT_ROOT_BOUNDARY_MISMATCH.CP_STATIC_LAYOUT_ROOT_BOUNDARY_UNKNOWN.CP_STATIC_LAYOUT_VARIANT_DIMENSION_UNPROVEN`.split(`.`)),Le=I;function Re(e,t){return Le(e.slotId,t.slotId)}function ze(e,t={}){let n=t.layoutIds?new Set(t.layoutIds):null,r=new Set,i=[];for(let t of e){if(r.has(t.slotId))throw Error(`[vinext] Invalid __slotBindings in App Router payload: duplicate slot id`);if(r.add(t.slotId),n&&t.ownerLayoutId!==null&&!n.has(t.ownerLayoutId))throw Error(`[vinext] Invalid __slotBindings in App Router payload: owner layout id missing from __layoutIds`);i.push({...t})}return i.sort(Re)}function Be(e,t){return t===null?e:`${e}${ye}${t}`}function Ve(e,t){return Be(`route:${e}`,t)}function He(e,t){return Be(`page:${e}`,t)}function Ue(e){return`layout:${e}`}function We(e){return`template:${e}`}function Ge(e,t){return`slot:${e}:${t}`}function Ke(e,t){return Be(e,t)}function qe(e){let t=e.indexOf(ye),n=t===-1?e:e.slice(0,t);return n.startsWith(`/`)?{interceptionContext:t===-1?null:e.slice(t+1),path:n}:null}function Je(e){return e.startsWith(`/`)?e:null}function Ye(e){if(e.startsWith(`route:`)){let t=qe(e.slice(6));return t?{interceptionContext:t.interceptionContext,kind:`route`,path:t.path}:null}if(e.startsWith(`page:`)){let t=qe(e.slice(5));return t?{interceptionContext:t.interceptionContext,kind:`page`,path:t.path}:null}if(e.startsWith(`layout:`)){let t=Je(e.slice(7));return t?{kind:`layout`,treePath:t}:null}if(e.startsWith(`template:`)){let t=Je(e.slice(9));return t?{kind:`template`,treePath:t}:null}if(e.startsWith(`slot:`)){let t=e.slice(5),n=t.indexOf(`:`);if(n<=0)return null;let r=t.slice(0,n),i=Je(t.slice(n+1));return i?{kind:`slot`,name:r,treePath:i}:null}return null}function Xe(e){if(!e.startsWith(`slot:`))return!1;let t=e.slice(5),n=t.indexOf(`:`);return n>0&&t.charCodeAt(n+1)===47}function Ze(e){let t=[...e.layoutIds??[]],n={[De]:e.routeId,[Ce]:e.interceptionContext,[we]:t,[Oe]:e.rootLayoutTreePath,...e.dynamicStaleTimeSeconds===void 0?{}:{[z]:e.dynamicStaleTimeSeconds},...e.sourcePage===null||e.sourcePage===void 0?{}:{[Ae]:e.sourcePage}},r=e.interception?{...n,[Se]:e.interception}:n;return e.slotBindings&&e.slotBindings.length>0?{...r,[je]:ze(e.slotBindings,{layoutIds:t})}:r}function Qe(e){let t=!1;for(let[n,r]of Object.entries(e))if(Xe(n)&&r===`__VINEXT_UNMATCHED_SLOT__`){t=!0;break}if(!t)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Xe(t)&&r===`__VINEXT_UNMATCHED_SLOT__`?Ne:r;return n}function $e(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;for(let t of Object.values(e))if(t!==`s`&&t!==`d`)return!1;return!0}function et(e){return $e(e)?e:{}}function tt(e,t){if(e===void 0)return[];if(!Array.isArray(e))throw Error(`[vinext] Invalid ${t} in App Router payload: expected layout id string[]`);let n=[];for(let r of e){if(typeof r!=`string`)throw Error(`[vinext] Invalid ${t} in App Router payload: expected layout id string[]`);if(Ye(r)?.kind!==`layout`)throw Error(`[vinext] Invalid ${t} in App Router payload: expected layout ids`);n.push(r)}return n}function nt(e){return tt(e,we)}function rt(e){return tt(e,ke)}function it(e){return e===`active`||e===`default`||e===`unmatched`}function at(e,t={}){if(e===void 0)return[];if(!Array.isArray(e))throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected array`);let n=[];for(let t of e){if(!s(t))throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected objects`);let e=t.slotId;if(typeof e!=`string`||Ye(e)?.kind!==`slot`)throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected slot ids`);let r=t.ownerLayoutId;if(r!==null&&(typeof r!=`string`||Ye(r)?.kind!==`layout`))throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected owner layout ids`);let i=t.state;if(!it(i))throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected state`);let a=t.activeRouteId;if(a!=null&&(typeof a!=`string`||Ye(a)?.kind!==`route`))throw Error(`[vinext] Invalid __slotBindings in App Router payload: expected route ids`);n.push({...a===void 0?{}:{activeRouteId:a},ownerLayoutId:r,slotId:e,state:i})}return ze(n,t)}function ot(e,t){let n=e[t];if(typeof n!=`string`)throw Error(`[vinext] Invalid __interception in App Router payload: expected strings`);return n}function st(e){if(!le(e))throw Error(`[vinext] Invalid __interception in App Router payload: expected path URLs`);return e}function ct(e,t){let n=Ye(e);if(n?.kind!==`route`||n.path!==t||n.interceptionContext!==null)throw Error(`[vinext] Invalid __interception in App Router payload: expected route ids`);return e}function lt(e){if(Ye(e)?.kind!==`slot`)throw Error(`[vinext] Invalid __interception in App Router payload: expected slot id`);return e}function ut(e){if(e==null)return null;if(!s(e))throw Error(`[vinext] Invalid __interception in App Router payload: expected object`);let t=st(ot(e,`sourceMatchedUrl`)),n=st(ot(e,`targetMatchedUrl`));return{sourceMatchedUrl:t,sourceRouteId:ct(ot(e,`sourceRouteId`),t),slotId:lt(ot(e,`slotId`)),targetMatchedUrl:n,targetRouteId:ct(ot(e,`targetRouteId`),n)}}function dt(e){return!(typeof e!=`object`||!e||Array.isArray(e)||(0,R.isValidElement)(e))}function ft(e,t){return{...e,[Te]:t}}function pt(e){if(!dt(e.element))return e.element;let t=mt(e.skipDisposition),n={};for(let[r,i]of Object.entries(e.element)){if(t.has(r)){ve(e.element,r);continue}n[r]=i===Ne?Me:i}return n[Te]=e.layoutFlags,t.size>0&&(n[ke]=[...t]),n[be]=e.artifactCompatibility??pe(),e.cacheEntryReuseProof&&(n[xe]=e.cacheEntryReuseProof),e.dynamicStaleTimeSeconds!==void 0&&(n[z]=e.dynamicStaleTimeSeconds),e.renderObservation&&(n[Ee]=e.renderObservation),n}function mt(e){if(e?.enabled!==!0)return Pe;let t=new Set;for(let n of e.skippedEntryIds)Ye(n)?.kind===`layout`&&t.add(n);return t}function ht(e){return e===void 0?pe():ge(e)??pe()}function gt(e){return e==null||typeof e!=`string`||!e.startsWith(`/`)?null:e}function _t(){return{kind:`runtime-cache-entry`,decision:null}}function vt(e){return typeof e==`string`&&Ie.has(e)}function yt(e){return e===`renderFresh`||e===`privateUncacheable`}function bt(e){return e===`affectedOutput`||e===`route`}function xt(e){if(e===void 0)return null;if(!s(e)||e.kind!==`runtime-cache-entry`)return _t();let t=e.decision;return t===null||!s(t)?_t():t.kind===`reuse`&&t.canReuse===!0&&t.code===`CP_STATIC_LAYOUT_REUSE_PROVEN`&&t.reuseClass===`static-layout`?{kind:`runtime-cache-entry`,decision:{canReuse:!0,code:t.code,kind:`reuse`,reuseClass:t.reuseClass}}:t.kind===`reject`&&t.canReuse===!1&&vt(t.code)&&yt(t.mode)&&bt(t.scope)?{kind:`runtime-cache-entry`,decision:{canReuse:!1,code:t.code,kind:`reject`,mode:t.mode,scope:t.scope}}:_t()}function St(e){let t=e[De];if(typeof t!=`string`)throw Error(`[vinext] Missing __route string in App Router payload`);let n=e[Ce];if(n!=null&&typeof n!=`string`)throw Error(`[vinext] Invalid __interceptionContext in App Router payload`);let r=e[Oe];if(r===void 0)throw Error(`[vinext] Missing __rootLayout key in App Router payload`);if(r!==null&&typeof r!=`string`)throw Error(`[vinext] Invalid __rootLayout in App Router payload: expected string or null`);let i=et(e[Te]),a=nt(e[we]),o=rt(e[ke]),s=at(e[je],{layoutIds:a}),c=ut(e[Se]),l=ht(e[be]),u=xt(e[xe]),d=e[z],f=typeof d==`number`&&Number.isFinite(d)&&d>=0?d:void 0,p=gt(e[Ae]);return{artifactCompatibility:l,...u?{cacheEntryReuseProof:u}:{},...f===void 0?{}:{dynamicStaleTimeSeconds:f},interception:c,interceptionContext:n??null,layoutIds:a,layoutFlags:i,routeId:t,rootLayoutTreePath:r,skippedLayoutIds:o,slotBindings:s,sourcePage:p}}var B={keys:{artifactCompatibility:be,cacheEntryReuseProof:xe,dynamicStaleTime:z,interception:Se,interceptionContext:Ce,layoutIds:we,layoutFlags:Te,renderObservation:Ee,rootLayout:Oe,route:De,skippedLayoutIds:ke,slotBindings:je,sourcePage:Ae},unmatchedSlotValue:Me,createMetadataEntries:Ze,decode:Qe,encodeCacheKey:Ke,encodeLayoutId:Ue,encodeOutgoingPayload:pt,encodePageId:He,encodeRouteId:Ve,encodeSlotId:Ge,encodeTemplateId:We,isSlotId:Xe,parseElementKey:Ye,readMetadata:St,withLayoutFlags:ft},Ct=4096,wt=256,Tt=16;function Et(e){return e.length===0||e.length>wt?!1:B.isSlotId(e)}function Dt(e){if(!e||e.length>Ct)return null;let t=e.split(/\s+/).filter(e=>e&&Et(e));return t.length===0?null:Array.from(new Set(t)).sort().slice(0,Tt).join(` `)||null}function Ot(e){return Object.keys(e).filter(t=>{let n=e[t],r=B.parseElementKey(t);return r?.kind===`slot`&&r.name!==`children`&&n!=null&&n!==Ne}).sort()}function kt(e){return Dt(Ot(e).join(` `))}function At(e,t){return t??e}var jt=Symbol.for(`vinext.appRouterContext`),Mt=Symbol.for(`vinext.globalLayoutRouterContext`),Nt=Symbol.for(`vinext.layoutRouterContext`),Pt=Symbol.for(`vinext.missingSlotContext`),Ft=Symbol.for(`vinext.templateContext`);function It(e,t){if(typeof R.createContext!=`function`)return null;let n=globalThis;return n[e]||(n[e]=R.createContext(t)),n[e]??null}var Lt=It(jt,null);It(Mt,null),It(Nt,null),It(Pt,new Set),It(Ft,null);var Rt=`1.0.0-beta.2`;function zt(e){let t=window.next;if(t){e.version!==void 0&&(t.version=e.version),e.appDir!==void 0&&(t.appDir=e.appDir),e.router!==void 0&&(t.router=e.router),e.__pendingUrl!==void 0&&(t.__pendingUrl=e.__pendingUrl),e.__internal_src_page!==void 0&&(t.__internal_src_page=e.__internal_src_page);return}window.next={version:e.version??Rt,...e}}function Bt(e){if(zt({}),e===null){delete window.next?.__internal_src_page;return}let t=window.next;t&&(t.__internal_src_page=e)}function Vt(e){try{return decodeURIComponent(e)}catch{return e}}function Ht(e){let t=Vt(e.startsWith(`#`)?e.slice(1):e);if(t===``||t===`top`){window.scrollTo(0,0);return}let n=document.getElementById(t);if(n){n.scrollIntoView({behavior:`auto`});return}let r=document.getElementsByName(t)[0];if(r){r.scrollIntoView({behavior:`auto`});return}window.scrollTo(0,0)}function Ut(e){requestAnimationFrame(()=>{Ht(e)})}function Wt(e,t,n){let r=n?.minFrames??0,i=n?.shouldContinue??(()=>!0),a=0,o=()=>{if(!i())return;window.scrollTo(e,t);let n=Math.abs(window.scrollY-t)<=1;!i()||n&&a>=r||a>=60||(a+=1,requestAnimationFrame(o))};o()}var Gt=Symbol.for(`vinext.layoutSegmentContext`),Kt=Symbol.for(`vinext.serverInsertedHTMLContext`),qt=Symbol.for(`vinext.bfcacheIdMapContext`),Jt=Symbol.for(`vinext.bfcacheSegmentIdContext`),Yt=Symbol.for(`vinext.navigation.clientHydrationContext`),Xt=Symbol.for(`vinext.navigation.fallback`);function Zt(e){return typeof R.createContext==`function`?R.createContext(e):null}function Qt(){let e=globalThis;return e[Kt]||(e[Kt]=Zt(null)),e[Kt]??null}Qt();function $t(){let e=globalThis;return e[Gt]||(e[Gt]=Zt({children:[]})),e[Gt]??null}function en(){let e=globalThis;return e[qt]||(e[qt]=Zt(null)),e[qt]??null}function tn(){let e=globalThis;return e[Jt]||(e[Jt]=Zt(null)),e[Jt]??null}var nn=Symbol.for(`vinext.navigation.globalAccessors`);function rn(){let e=globalThis;return e[Xt]??={serverContext:null,serverInsertedHTMLCallbacks:[]}}function an(){return globalThis[nn]}function on(){let e=globalThis;if(Object.prototype.hasOwnProperty.call(e,Yt))return e[Yt]??null}function sn(e){globalThis[Yt]=e}function cn(){sn(null)}var ln=()=>{{let e=on();return e===void 0?rn().serverContext:e}return an()?.getServerContext()??rn().serverContext},un=e=>{rn().serverContext=e,sn(e)};function dn(){return ln()}function fn(e){un(e)}var pn=`NEXT_REDIRECT;`;function mn(e){if(!e.startsWith(pn))return null;let t=e.indexOf(`;`,14);if(t===-1)return null;let n=e.slice(t+1),r=n.match(/;(303|307|308);?$/),i=n!==``&&e.endsWith(`;`);if(i&&!r)return null;let a=r?n.slice(0,-r[0].length):n,o=a;if(!i)try{o=decodeURIComponent(a)}catch{return null}return{status:r?Number(r[1]):307,type:e.slice(14,t)||null,url:o}}var hn=`NEXT_HTTP_ERROR_FALLBACK`,gn=class extends Error{digest;constructor(e,t){super(e),this.digest=t}};function _n(){throw new gn(`NEXT_NOT_FOUND`,`${hn};404`)}function vn(e){return!!e&&typeof e==`object`&&`digest`in e&&typeof e.digest==`string`&&e.digest.startsWith(`NEXT_REDIRECT;`)}function yn(e){let t=mn(e);return t?{url:t.url,type:t.type===`push`?`push`:`replace`}:null}var bn=e({default:()=>wn}),V={container:{fontFamily:`system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"`,height:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`},card:{marginTop:`-32px`,maxWidth:`325px`,padding:`32px 28px`,textAlign:`left`},icon:{marginBottom:`24px`},title:{fontSize:`24px`,fontWeight:500,letterSpacing:`-0.02em`,lineHeight:`32px`,margin:`0 0 12px 0`,color:`var(--next-error-title)`},message:{fontSize:`14px`,fontWeight:400,lineHeight:`21px`,margin:`0 0 20px 0`,color:`var(--next-error-message)`},form:{margin:0},buttonGroup:{display:`flex`,gap:`8px`,alignItems:`center`},button:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:`32px`,padding:`0 12px`,fontSize:`14px`,fontWeight:500,lineHeight:`20px`,borderRadius:`6px`,cursor:`pointer`,color:`var(--next-error-btn-text)`,background:`var(--next-error-btn-bg)`,border:`var(--next-error-btn-border)`},buttonSecondary:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,height:`32px`,padding:`0 12px`,fontSize:`14px`,fontWeight:500,lineHeight:`20px`,borderRadius:`6px`,cursor:`pointer`,color:`var(--next-error-btn-secondary-text)`,background:`var(--next-error-btn-secondary-bg)`,border:`var(--next-error-btn-secondary-border)`},digestFooter:{position:`fixed`,bottom:`32px`,left:`0`,right:`0`,textAlign:`center`,fontFamily:`ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace`,fontSize:`12px`,lineHeight:`18px`,fontWeight:400,margin:`0`,color:`var(--next-error-digest)`}},xn=` :root { --next-error-bg: #fff; @@ -29,5 +29,5 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-C60lm6uB.js";import{i as r,n } } body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); } -`.replace(/\n\s*/g,``);function Sn(){return(0,L.jsx)(`svg`,{width:`32`,height:`32`,viewBox:`-0.2 -1.5 32 32`,fill:`none`,style:V.icon,children:(0,L.jsx)(`path`,{d:`M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z`,fill:`var(--next-error-title)`})})}function Cn(){window.history.length>1?window.history.back():window.location.href=`/`}function wn({error:e}){let t=e?.digest,n=!!t,r=n?`A server error occurred. Reload to try again.`:`Reload to try again, or go back.`;return(0,L.jsxs)(`html`,{id:`__next_error__`,children:[(0,L.jsx)(`head`,{children:(0,L.jsx)(`style`,{dangerouslySetInnerHTML:{__html:xn}})}),(0,L.jsxs)(`body`,{children:[(0,L.jsx)(`div`,{style:V.container,children:(0,L.jsxs)(`div`,{style:V.card,children:[(0,L.jsx)(Sn,{}),(0,L.jsx)(`h1`,{style:V.title,children:`This page couldn’t load`}),(0,L.jsx)(`p`,{style:V.message,children:r}),(0,L.jsxs)(`div`,{style:V.buttonGroup,children:[(0,L.jsx)(`form`,{style:V.form,children:(0,L.jsx)(`button`,{type:`submit`,style:V.button,children:`Reload`})}),!n&&(0,L.jsx)(`button`,{type:`button`,style:V.buttonSecondary,onClick:Cn,children:`Back`})]})]})}),t&&(0,L.jsxs)(`p`,{style:V.digestFooter,children:[`ERROR `,t]})]})]})}function Tn(){return window.next?.__pendingUrl??null}function En(e){let t=Tn();return t===null?null:t.href===new URL(e,window.location.href).href?t:null}function Dn(e){if(window.next?.__pendingUrl!==void 0){if(e instanceof URL){if(window.next.__pendingUrl!==e)return}else if(e!==void 0&&window.next.__pendingUrl.href!==new URL(e,window.location.href).href)return;delete window.next.__pendingUrl}}function On(e){return!1}function kn(e,t){return t?e===t||e.startsWith(t+`/`):!1}function H(e,t){return kn(e,t)?e.slice(t.length)||`/`:e}var An=class{run(e,t,...n){return t(...n)}getStore(){}enterWith(){}exit(e,...t){return e(...t)}disable(){}},jn=globalThis,Mn=class{getStore(){}run(e,t,...n){return t(...n)}exit(e,...t){return e(...t)}enterWith(e){}disable(){}};function Nn(e){let t=Symbol.for(e);return jn[t]??=typeof An==`function`?new An:new Mn}Nn(`vinext.pprFallbackShell.als`),Nn(`vinext.pprFallbackShell.cacheTaskStack.als`);var Pn=Symbol.for(`vinext.clientNavigationState`),Fn=Symbol.for(`vinext.clientNavigationRenderContext`),In=``;function Ln(){return globalThis[Pn]}function Rn(){return Ln()?.cachedPathname??H(window.location.pathname,In)}function zn(){return dn()?.pathname??`/`}function Bn(e){let t=Ln();return t?(t.listeners.add(e),()=>t.listeners.delete(e)):()=>{}}function Vn(){let e=globalThis;return e[Fn]??=R.createContext(null)}function Hn(){let e=R.useContext(Vn()),t=R.useSyncExternalStore(Bn,Rn,zn);return e&&(Ln()?.navigationSnapshotActiveCount??0)>0?e.pathname:t}function Un(){if(!Lt||typeof R.useContext!=`function`)throw Error(`invariant expected app router to be mounted`);let e=R.useContext(Lt);if(e===null)throw Error(`invariant expected app router to be mounted`);return e}var Wn=`vinext:dev-error-recovery`;function Gn(e){return!e||typeof e!=`object`||!(`digest`in e)?null:String(e.digest)}function Kn(e){let t=Gn(e);return t===null?!1:t===`NEXT_NOT_FOUND`||t.startsWith(`NEXT_HTTP_ERROR_FALLBACK;`)||t.startsWith(`NEXT_REDIRECT;`)}var qn=e({DevRecoveryBoundary:()=>fr,ErrorBoundary:()=>ir,ErrorBoundaryInner:()=>rr,ForbiddenBoundary:()=>lr,ForbiddenBoundaryInner:()=>cr,GlobalErrorBoundary:()=>ar,NotFoundBoundary:()=>sr,RedirectBoundary:()=>nr,RedirectErrorBoundary:()=>tr,SerializedErrorBoundary:()=>Jn,UnauthorizedBoundary:()=>dr,UnauthorizedBoundaryInner:()=>ur});function Jn({fallback:e,error:t}){return(0,L.jsx)(e,{error:Object.assign(Error(t.message),{digest:t.digest,name:t.name??`Error`,stack:t.stack}),reset:()=>globalThis.location?.reload()})}function Yn(e){return e==null||e===``?null:e}function Xn(e){return{previousPathname:e.pathname,previousResetKey:Yn(e.resetKey)}}function Zn(e,t){let n=Yn(e.previousResetKey),r=Yn(t.previousResetKey);return n!==null||r!==null?n!==r:e.previousPathname!==t.previousPathname}function Qn(e){window.addEventListener(Wn,e)}function $n(e){window.removeEventListener(Wn,e)}function er({redirect:e,redirectType:t,reset:n}){let r=Un();return R.useEffect(()=>{R.startTransition(()=>{t===`push`?r.push(e):r.replace(e),n()})},[e,t,n,r]),null}var tr=class extends R.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if(vn(e)){if(`handled`in e&&e.handled)return{redirect:null,redirectType:null};let t=yn(e.digest);if(!t)throw e;return{redirect:t.url,redirectType:t.type}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return e!==null&&t!==null?(0,L.jsx)(er,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null,redirectType:null})}):this.props.children}};function nr({children:e}){return(0,L.jsx)(tr,{children:e})}var rr=class extends R.Component{constructor(e){super(e),this.state={error:null,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.error&&On(t.error.thrownValue)||t.error&&Zn(n,t)?{error:null,...n}:{error:t.error,...n}}static getDerivedStateFromError(e){if(Kn(e))throw e;return{error:{thrownValue:e}}}handleDevErrorRecovery=()=>{this.state.error&&this.setState({error:null,...Xn(this.props)})};componentDidMount(){Qn(this.handleDevErrorRecovery)}componentWillUnmount(){$n(this.handleDevErrorRecovery)}reset=()=>{this.setState({error:null})};render(){if(this.state.error){let e=this.props.fallback;return(0,L.jsx)(e,{error:this.state.error.thrownValue,reset:this.reset})}return this.props.children}};function ir({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(rr,{pathname:Hn(),resetKey:n,fallback:e,children:t})}function ar({fallback:e,children:t}){return(0,L.jsx)(rr,{pathname:Hn(),fallback:e,isImplicitRootErrorBoundary:e===wn,children:t})}var or=class extends R.Component{constructor(e){super(e),this.state={notFound:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.notFound&&Zn(n,t)?{notFound:!1,...n}:{notFound:t.notFound,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e){let t=String(e.digest);if(t===`NEXT_NOT_FOUND`||t===`NEXT_HTTP_ERROR_FALLBACK;404`)return{notFound:!0}}throw e}render(){return this.state.notFound?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function sr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(or,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var cr=class extends R.Component{constructor(e){super(e),this.state={forbidden:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.forbidden&&Zn(n,t)?{forbidden:!1,...n}:{forbidden:t.forbidden,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;403`)return{forbidden:!0};throw e}render(){return this.state.forbidden?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function lr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(cr,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var ur=class extends R.Component{constructor(e){super(e),this.state={unauthorized:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.unauthorized&&Zn(n,t)?{unauthorized:!1,...n}:{unauthorized:t.unauthorized,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;401`)return{unauthorized:!0};throw e}render(){return this.state.unauthorized?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function dr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(ur,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var fr=class extends R.Component{constructor(e){super(e),this.state={error:null,previousResetKey:e.resetKey}}static getDerivedStateFromProps(e,t){return e.resetKey===t.previousResetKey?null:{error:null,previousResetKey:e.resetKey}}static getDerivedStateFromError(e){if(Kn(e))throw e;return{error:{thrownValue:e}}}handleDevErrorRecovery=()=>{this.state.error&&this.setState({error:null,previousResetKey:this.props.resetKey})};componentDidMount(){Qn(this.handleDevErrorRecovery)}componentWillUnmount(){$n(this.handleDevErrorRecovery)}componentDidCatch(){this.props.onCatch?.(this.props.resetKey)}render(){return this.state.error?null:this.props.children}},pr=Symbol.for(`vinext.appRouterScrollIntent`);function mr(){let e=globalThis;return e[pr]??={nextId:0,pending:null},e[pr]}function hr(e){let t=mr();t.nextId+=1;let n={commitId:null,hash:e,headElements:typeof document>`u`?null:new Set(document.head?.children??[]),id:t.nextId,targetHoistedInHead:!1};return t.pending=n,n}function gr(){mr().pending=null}function _r(){return mr().pending}function vr(e,t){let n=mr(),r=n.pending;e==null||r===null||r.id===e.id&&(n.pending={...r,commitId:t})}function yr(e,t){let n=mr(),r=n.pending;e==null||r===null||r.id===e.id&&r.commitId===t&&(n.pending={...r,targetHoistedInHead:!0})}function br(e,t){if(e==null)return null;let n=mr(),r=n.pending;return r===null||r.id!==e.id||t!==void 0&&r.commitId!==t?null:(n.pending=null,r)}var xr=e({AppRouterScrollCommitProvider:()=>Fr,AppRouterScrollTarget:()=>Ir,AppRouterScrollTargetInner:()=>Pr}),Sr=t(i(),1),Cr=R.createContext(null),wr=`__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,Tr=[`bottom`,`height`,`left`,`right`,`top`,`width`,`x`,`y`];function Er(){let e=Reflect.get(Sr,wr);if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`findDOMNode`);return typeof t==`function`?t:null}function Dr(e){let t=Er();if(!t)return null;let n=t(e);return n instanceof Element||n instanceof Text?n:null}function Or(e){let t=getComputedStyle(e).position;if(t===`fixed`||t===`sticky`)return!0;let n=e.getBoundingClientRect();return Tr.every(e=>n[e]===0)}function kr(e,t){let n=e.getClientRects();if(n.length===0)return!1;let r=1/0;for(let e of n)e.top=0&&r<=t}function Ar(e){let t=Vt(e.startsWith(`#`)?e.slice(1):e);return t===`top`?document.body:document.getElementById(t)??document.getElementsByName(t)[0]??null}function jr(e){let t=e.ownerDocument?.head;return t!=null&&t.contains(e)}function Mr(e){if(!(e instanceof Element)||jr(e))return null;let t=e;for(;!(t instanceof HTMLElement)||Or(t);){if(t.nextElementSibling===null)return null;t=t.nextElementSibling}return{kind:`element`,element:t}}function Nr(e,t){if(t!==null){e.scrollIntoView({behavior:`auto`});return}let n=document.documentElement,r=n.clientHeight;kr(e,r)||(n.scrollTop=0,kr(e,r)||e.scrollIntoView({behavior:`auto`,block:`start`,inline:`nearest`}))}var Pr=class extends R.Component{scheduledCommitId=null;schedulePotentialScroll=()=>{let e=this.props.commitId;this.scheduledCommitId=e,queueMicrotask(()=>{this.scheduledCommitId===e&&this.handlePotentialScroll()})};handlePotentialScroll=()=>{let e=_r();if(e===null||this.props.commitId===null||e.commitId!==this.props.commitId)return;let t;if(t=e.hash===null?null:Ar(e.hash),t===null){t=Dr(this);let n=t instanceof Element?t:t?.parentElement;if(t!==null&&n!=null&&jr(t)&&!e.headElements?.has(n)){yr(e,this.props.commitId);return}}let n=Mr(t);if(n===null)return;let r=n.element,i=br(e,this.props.commitId);i!==null&&(Nr(r,i.hash),r.focus())};componentDidMount(){this.schedulePotentialScroll()}componentDidUpdate(){this.schedulePotentialScroll()}componentWillUnmount(){this.scheduledCommitId=null}render(){return this.props.children}};function Fr({children:e,commitId:t}){return(0,L.jsx)(Cr.Provider,{value:t,children:e})}function Ir({children:e}){return(0,L.jsx)(Pr,{commitId:R.useContext(Cr),children:e})}var Lr=e({BfcacheStateKeyMapContext:()=>qr,Children:()=>mi,ChildrenContext:()=>Br,ElementsContext:()=>zr,ParallelSlot:()=>hi,ParallelSlotsContext:()=>Vr,Slot:()=>pi,UNMATCHED_SLOT:()=>Ne,mergeElements:()=>fi,updateBfcacheSlotEntryOrder:()=>Zr}),Rr=Object.freeze({}),zr=R.createContext(Rr),Br=R.createContext(null),Vr=R.createContext(null),Hr=en(),Ur=tn(),Wr=Object.freeze({}),Gr=3,Kr=1,qr=R.createContext(Wr);function Jr(){return!1}function Yr(){return Jr()?Gr:Kr}function Xr(e){return Number.isFinite(e)?Math.max(1,Math.trunc(e)):1}function Zr(e,t,n=Yr()){let r=Xr(n),i=[t];for(let n of e){if(i.length>=r)break;n!==t&&i.push(n)}return i}function Qr(e,t){let n=new Set(t);for(let t of e.keys())n.has(t)||e.delete(t)}function $r(e,t){if(e.length!==t.length)return!1;for(let n=0;n0&&t.every(e=>e===`s`||e===`d`)}function ti(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`schemaVersion`in e&&`appElementsSchemaVersion`in e&&`rscPayloadSchemaVersion`in e&&`graphVersion`in e&&`deploymentVersion`in e&&`rootBoundaryId`in e&&`renderEpoch`in e}function ni(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`ownerLayoutId`in e&&`slotId`in e&&`state`in e}function ri(e){return Array.isArray(e)&&e.length>0&&e.every(ni)}function ii(e,t){return e===`__skippedLayoutIds`&&Array.isArray(t)&&t.every(e=>typeof e==`string`)}function ai(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`sourceMatchedUrl`in e&&typeof e.sourceMatchedUrl==`string`&&`sourceRouteId`in e&&typeof e.sourceRouteId==`string`&&`slotId`in e&&typeof e.slotId==`string`&&`targetMatchedUrl`in e&&typeof e.targetMatchedUrl==`string`&&`targetRouteId`in e&&typeof e.targetRouteId==`string`}function oi(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`kind`in e&&e.kind===`runtime-cache-entry`&&`decision`in e}function si(e,t){return ei(t)||ti(t)||oi(t)||ai(t)||ii(e,t)||ri(t)}function ci({entry:e,fallbackElements:t,fallbackSegmentId:n,fallbackStateKeyMap:r,SegmentContext:i}){return(0,L.jsx)(qr.Provider,{value:e.stateKeyMap??r,children:(0,L.jsx)(zr.Provider,{value:e.elements??t,children:(0,L.jsx)(i.Provider,{value:e.segmentId??n,children:e.content})})})}function li(e){let t=R.useRef(new Map),[n,r]=R.useState(()=>[e.stateKey]);t.current.set(e.stateKey,e);let i=Zr(n,e.stateKey),a=!$r(n,i),o=a?i:n;return Qr(t.current,o),a&&r(i),o.map(e=>t.current.get(e)).filter(e=>e!==void 0)}function ui({activeStateKey:e,content:t,elements:n,id:r,SegmentContext:i,stateKeyMap:a}){return(0,L.jsx)(L.Fragment,{children:li({content:t,elements:n,segmentId:r,stateKey:e,stateKeyMap:a}).map(t=>(0,L.jsx)(R.Activity,{mode:t.stateKey===e?`visible`:`hidden`,children:(0,L.jsx)(ci,{entry:t,fallbackElements:n,fallbackSegmentId:r,fallbackStateKeyMap:a,SegmentContext:i})},t.stateKey))})}function di({content:e,id:t}){let n=Ur,r=R.useContext(zr),i=R.useContext(qr),a=i[t];return n?a===void 0||!Jr()?(0,L.jsx)(n.Provider,{value:t,children:e}):(0,L.jsx)(ui,{activeStateKey:a,content:e,elements:r,id:t,SegmentContext:n,stateKeyMap:i}):(0,L.jsx)(L.Fragment,{children:e})}function fi(e,t,n={}){let r=typeof n==`boolean`?n:n.clearAbsentSlots??!1,i=typeof n==`boolean`?!n:n.preserveAbsentSlots??!0,a=typeof n==`boolean`?[]:n.preserveElementIds??[],o=typeof n==`boolean`?[]:n.preservePreviousSlotIds??[],s={...t};for(let t of a)if(Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(s[t]=n)}let c=new Set([...Object.keys(e),...Object.keys(t)].filter(e=>B.isSlotId(e)));if(r)for(let e of c)Object.hasOwn(t,e)||delete s[e];else if(i){for(let t of c)if(!Object.hasOwn(s,t)&&Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(s[t]=n)}}for(let t of o){if(!B.isSlotId(t)||!Object.hasOwn(e,t))continue;let n=e[t];n!==void 0&&n!==Ne&&(s[t]=n)}return s}function pi({id:e,children:t,parallelSlots:n}){let r=R.useContext(zr);if(!Object.hasOwn(r,e))return null;let i=r[e];if(si(e,i)||(i===Ne&&_n(),i===null))return null;let a=(0,L.jsx)(Vr.Provider,{value:n??null,children:(0,L.jsx)(Br.Provider,{value:t??null,children:i})});return Hr&&Ur?(0,L.jsx)(di,{id:e,content:a}):a}function mi(){return R.useContext(Br)}function hi({name:e}){return R.useContext(Vr)?.[e]??null}var gi=`navigation`,_i=`prefetch-dynamic-shell`,vi=`prefetch-loading-shell`;function yi(e){switch(e){case _i:return _i;case vi:return vi;default:return gi}}var bi=`x-deployment-id`;function xi(e,t=void 0){t&&e.set(bi,t)}var Si=`_rsc`,Ci=`X-Vinext-RSC-Compatibility-Id`,wi=`text/x-component`;[`RSC`,oe,F,se,ce,N,A,P].join(`, `);var Ti=12,Ei=new TextEncoder;function Di(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function Oi(e){return e??`0`}function ki(e){return e&&e.length>0?e:null}function Ai(){return ki(`ada1b67e-d2f3-4655-95ba-89944caac442`)}function ji(e,t=Ai()){let n=ki(e),r=ki(t);return r===null||n!==null&&n===r}function Mi(e,t,n){if(!e)return t;let r=new URL(e,n);Vi(r);let i=new URL(t,n),a=Hi(r.pathname);i.pathname.length>1&&i.pathname.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`);let o=a+r.search;return i.hash&&(o+=i.hash),o}function Ni(e){return ji(e.responseCompatibilityId,e.clientCompatibilityId)?{kind:`compatible`}:{hardNavigationTarget:Mi(e.responseUrl,e.currentHref,e.origin),kind:`hard-navigate`}}function Pi(e){let t=yi(e);return t===`navigation`?null:t}function Fi(e,t={}){let n=[e.get(F),e.get(se),e.get(oe),e.get(ce),e.get(N),e.get(A),...t.includeRenderModeHeader===!1?[]:[Pi(e.get(P))]];return n.every(e=>e===null)?null:n.map(Oi).join(`,`)}async function Ii(e){let t=await globalThis.crypto.subtle.digest(`SHA-256`,Ei.encode(e));return Di(new Uint8Array(t).subarray(0,Ti))}function Li(e){return(e.search.startsWith(`?`)?e.search.slice(1):e.search).split(`&`).filter(e=>e.length>0&&!Ri(e))}function Ri(e){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t);try{return decodeURIComponent(n.replaceAll(`+`,` `))===Si}catch{return n===Si}}async function zi(e){let t=Fi(e);return t===null?``:Ii(t)}function Bi(e,t){let n=Li(e);n.push(t.length>0?`${Si}=${t}`:Si),e.search=`?${n.join(`&`)}`}function Vi(e){let t=Li(e);e.search=t.length>0?`?${t.join(`&`)}`:``}function Hi(e){return e.endsWith(`.rsc`)?e.slice(0,-4):e}function Ui(e={}){let t=new Headers({Accept:wi,RSC:`1`});xi(t),e.interceptionContext!==void 0&&e.interceptionContext!==null&&t.set(N,e.interceptionContext),e.mountedSlotsHeader!==void 0&&e.mountedSlotsHeader!==null&&t.set(A,e.mountedSlotsHeader),e.clientReuseManifestHeader!==void 0&&e.clientReuseManifestHeader!==null&&t.set(re,e.clientReuseManifestHeader);let n=e.renderMode??`navigation`;return n!==`navigation`&&t.set(P,n),t}function Wi(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}async function Gi(e,t){let n=new URL(Wi(e),`http://vinext.local`);return Bi(n,await zi(t)),`${n.pathname}${n.search}`}var Ki=null;function qi(e){return Object.values(e).some(e=>typeof e==`function`)?e:null}function Ji(e){return Ki=e,Ki}function Yi(e,t){Ki?.onRouterTransitionStart?.(e,t)}Ji(qi(e({})));var Xi=/([/#?\\]|%(2f|23|3f|5c))/gi;function Zi(e){return e.replace(Xi,e=>encodeURIComponent(e))}function Qi(e){try{return Zi(decodeURIComponent(e))}catch{return e}}function $i(e){return e.split(`/`).map(e=>Qi(e)).join(`/`)}function ea(e){return $i(e).split(`/`).filter(Boolean)}function ta(e){try{return decodeURIComponent(e)}catch{return e}}function na(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}function ra(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(ta):e[t]=ta(n)}}function ia(e){return!!(e===`.`||e.startsWith(`(`)&&e.endsWith(`)`)||e.startsWith(`@`))}function aa(e){return e.split(`/`).filter(Boolean)}function oa(e){return e.startsWith(`[...`)&&e.endsWith(`]`)&&e.length>5}function sa(e){return e.startsWith(`[[...`)&&e.endsWith(`]]`)&&e.length>7}function ca(e,t){let n=0;for(let r of e){if(oa(r)||sa(r))return Math.max(n,t);n+=1}return n}var la=`_b_0_`,ua=0;function da(e){let t=/^_b_(\d+)_$/.exec(e);t&&(ua=Math.max(ua,Number(t[1])))}function fa(){return ua+=1,`_b_${ua}_`}function pa(e){return aa(e).filter(e=>!ia(e))}function ma(e,t){let n=aa(e),r=ca(pa(t),n.length);return r===0?`/`:`/${n.slice(0,r).join(`/`)}`}function ha(e){let t=new Map;for(let n of e.slotBindings)t.set(n.slotId,n);return{metadata:e,slotBindingsBySlotId:t}}function ga(e){let t;try{t=B.readMetadata(e)}catch{return null}return ha(t)}function _a(e){let t=B.parseElementKey(e);return t!==null&&t.kind!==`route`?t:null}function va(e,t){let n=t?.slotBindingsBySlotId.get(e);if(n?.activeRouteId!=null)return`${e}@${n.activeRouteId}`;let r=t?.metadata.interception;return r?.slotId===e?`${e}@${r.targetRouteId}`:null}function ya(e,t,n){if(t.kind===`page`)return`${e}@${n.pathname}`;if(t.kind===`slot`){let r=va(e,n.metadata);return r===null?`${e}@${ma(n.pathname,t.treePath)}`:r}return t.kind===`layout`||t.kind===`template`?`${e}@${ma(n.pathname,t.treePath)}`:null}function ba(e,t=ga(e)){let n=new Set(Object.keys(e));for(let e of t?.metadata.layoutIds??[])n.add(e);return n}function xa(e){let t={};for(let n of ba(e))_a(n)!==null&&(t[n]=`0`);return t}function Sa(e){let t=ue($i(e));return t.length>1?t.replace(/\/$/,``):t}function Ca(e){let t=ga(e.elements),n=Sa(e.pathname),r={};for(let i of ba(e.elements,t)){let e=_a(i);if(e===null)continue;let a=ya(i,e,{metadata:t,pathname:n});a!==null&&(r[i]=a)}return r}function wa(e){let t=e.reuseCurrent===!1?{}:e.current;for(let e of Object.values(t))da(e);for(let t of Object.values(e.restored??{}))da(t);let n=ga(e.currentElements),r=ga(e.elements),i=Sa(e.currentPathname),a=Sa(e.nextPathname),o={};for(let s of ba(e.elements,r)){let c=_a(s);if(c===null)continue;let l=ya(s,c,{metadata:n,pathname:i})===ya(s,c,{metadata:r,pathname:a})?t[s]:void 0,u=e.restored?.[s]??l??fa();o[s]=u,da(u)}return o}function Ta(e){let t={};for(let n of ba(e.elements)){if(_a(n)===null)continue;let r=e.next[n]??e.previous[n];r!==void 0&&(t[n]=r,da(r))}return t}function Ea(e){return e===`none`?`server-action`:`refresh`}function Da(e){return e!==`none`}function Oa(e,t){let n=0,r=e.length;for(;n=0?null:U(`CP_INVALID_VARIANT_BUDGET`,{budgetField:e})}function Ba(e){return za(`maxDimensionCount`,e.maxDimensionCount)??za(`maxDimensionNameLength`,e.maxDimensionNameLength)??za(`maxDimensionValueLength`,e.maxDimensionValueLength)??za(`maxEncodedLength`,e.maxEncodedLength)??za(`maxValuesPerDimension`,e.maxValuesPerDimension)??za(`maxVariantsPerRoute`,e.maxVariantsPerRoute)}function Va(e,t){let n=Ma(e.name);if(n.length===0)return U(`CP_DIMENSION_NAME_MISSING`,{source:e.source});if(n.length>t.maxDimensionNameLength)return U(`CP_DIMENSION_NAME_TOO_LONG`,{maxLength:t.maxDimensionNameLength,nameHash:Na(n),source:e.source});if(e.privacy===`public`&&Aa.has(e.source))return U(`CP_UNSAFE_PUBLIC_DIMENSION`,{name:n,source:e.source},`privateUncacheable`);let r=ja(e.values);if(r.length===0)return U(`CP_DIMENSION_VALUES_MISSING`,{name:n,source:e.source});if(r.length>t.maxValuesPerDimension)return U(`CP_DIMENSION_VALUE_COUNT_EXCEEDED`,{maxValues:t.maxValuesPerDimension,name:n,source:e.source,valueCount:r.length});for(let i of r)if(i.length>t.maxDimensionValueLength)return U(`CP_DIMENSION_VALUE_TOO_LONG`,{maxLength:t.maxDimensionValueLength,name:n,source:e.source,valueHash:Na(i)});let i=r.map(Na);return{encoded:Pa([e.source,e.privacy,n,i]),name:n,privacy:e.privacy,source:e.source,valueCount:i.length,valueHashes:i}}function Ha(e){return`code`in e}function Ua(e,t,n){let r=e.get(t),i=r??new Map;r||e.set(t,i);let a=i.get(n),o=a??new Map;return a||i.set(n,o),o}function Wa(e){let t=new Map,n=[];for(let r of e){let e=Ma(r.name),i=Ua(t,r.source,r.privacy),a=i.get(e);if(a){a.values.push(...r.values);continue}let o={name:e,privacy:r.privacy,source:r.source,values:[...r.values]};i.set(e,o),n.push(o)}return n}function Ga(e){let t=Ba(e.budget);if(t)return{kind:`breakerFallback`,fallback:t};let n=Wa(e.dimensions);if(n.length>e.budget.maxDimensionCount)return{kind:`breakerFallback`,fallback:U(`CP_DIMENSION_COUNT_EXCEEDED`,{dimensionCount:n.length,maxDimensionCount:e.budget.maxDimensionCount,routeId:e.output.routeId})};let r=[];for(let t of n){let n=Va(t,e.budget);if(Ha(n))return{kind:`breakerFallback`,fallback:n};r.push(n)}r.sort(Fa);let i=[`schema:1`,Ra(e.output),...r.map(e=>e.encoded)].join(`|`);return i.length>e.budget.maxEncodedLength?{kind:`breakerFallback`,fallback:U(`CP_ENCODED_VARIANT_TOO_LONG`,{encodedHash:Na(i),encodedLength:i.length,maxEncodedLength:e.budget.maxEncodedLength,routeId:e.output.routeId})}:{kind:`variant`,variant:{schemaVersion:1,cacheKey:`cp1:${de(i)}`,output:e.output,dimensions:r,encodedLength:i.length,budget:{...e.budget}}}}function Ka(e){return{routeId:e.routeId,variantCacheKeys:ja(e.variantCacheKeys)}}function qa(e,t){return U(`CP_ROUTE_VARIANT_CEILING_EXCEEDED`,{existingVariantCount:t,maxVariantsPerRoute:e.budget.maxVariantsPerRoute,routeId:e.output.routeId},`privateUncacheable`,`route`)}function Ja(e){if(e.routeBudget&&e.routeBudget.routeId!==e.variant.output.routeId)return{kind:`breakerFallback`,routeBudget:Ka(e.routeBudget),fallback:U(`CP_ROUTE_VARIANT_BUDGET_ROUTE_MISMATCH`,{budgetRouteId:e.routeBudget.routeId,routeId:e.variant.output.routeId},`privateUncacheable`,`route`)};let t=Ka(e.routeBudget??{routeId:e.variant.output.routeId,variantCacheKeys:[]}),n=t.variantCacheKeys.length,r=Oa(t.variantCacheKeys,e.variant.cacheKey);return n>e.variant.budget.maxVariantsPerRoute?{kind:`breakerFallback`,routeBudget:t,fallback:qa(e.variant,n)}:r.found?{kind:`variant`,variant:e.variant,routeBudget:t,didConsumeRouteVariantBudget:!1}:n>=e.variant.budget.maxVariantsPerRoute?{kind:`breakerFallback`,routeBudget:t,fallback:qa(e.variant,n)}:{kind:`variant`,variant:e.variant,routeBudget:{routeId:t.routeId,variantCacheKeys:[...t.variantCacheKeys.slice(0,r.index),e.variant.cacheKey,...t.variantCacheKeys.slice(r.index)]},didConsumeRouteVariantBudget:!0}}function Ya(e){let t=Ga({budget:e.budget,dimensions:e.dimensions,output:e.output});return t.kind===`breakerFallback`?{kind:`breakerFallback`,routeBudget:e.routeBudget?Ka(e.routeBudget):null,fallback:t.fallback}:Ja({routeBudget:e.routeBudget,variant:t.variant})}function Xa(e){if(e===null)return{kind:`runtime-cache-entry`,decision:null};switch(e.kind){case`reuse`:return{kind:`runtime-cache-entry`,decision:{canReuse:!0,code:e.proof.code,kind:`reuse`,reuseClass:e.proof.reuseClass}};case`fallback`:return{kind:`runtime-cache-entry`,decision:{canReuse:!1,code:e.fallback.code,kind:`reject`,mode:e.fallback.mode,scope:e.fallback.scope}};default:return La(e)}}function Za(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}var Qa=`fnv1a64`,$a={maxEntryCount:64,maxEntryIdLength:512,maxManifestBytes:4096,maxPayloadHashLength:16,maxVariantCacheKeyLength:256},eo=new TextEncoder;function to(e,t){return e.idt.id)}function no(e){let t=new Map;for(let n of e)t.has(n.id)||t.set(n.id,n);return Array.from(t.values()).sort(to)}function ro(e){return eo.encode(e).length}function io(e){return de(e)}function ao(e){let t=e.replayWindow??{validFromVisibleCommitVersion:e.visibleCommitVersion,validUntilVisibleCommitVersion:e.visibleCommitVersion};return{entries:no(e.entries),hashAlgorithm:Qa,replayWindow:t,schemaVersion:1,visibleCommitVersion:e.visibleCommitVersion}}function oo(e){return JSON.stringify(ao(e))}function so(e){return`static-layout:${io(e)}`}function co(e){return fe.map(t=>[t,e.artifactCompatibility[t]])}function lo(e){return io(JSON.stringify({artifactCompatibilityPairs:co(e),layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId,variantCacheKey:e.variantCacheKey}))}function uo(e){return{...e.artifactCompatibility,graphVersion:`static-layout-graph:${io(JSON.stringify({layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId}))}`,renderEpoch:`static-layout:${io(JSON.stringify({layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId,variantCacheKey:e.variantCacheKey}))}`}}function fo(e){return{...e,maxEntryCount:Math.min(e.maxEntryCount,8)}}function po(e){let t=e.entries.slice(0,e.limits.maxEntryCount),n=1,r=t.length,i=null;for(;n<=r;){let a=Math.floor((n+r)/2),o=oo({entries:t.slice(0,a),replayWindow:{validFromVisibleCommitVersion:e.visibleCommitVersion,validUntilVisibleCommitVersion:e.visibleCommitVersion},visibleCommitVersion:e.visibleCommitVersion});ro(o)<=e.limits.maxManifestBytes?(i=o,n=a+1):r=a-1}return i}function mo(e,t){return Object.hasOwn(e,t)}function ho(e){let t=so(e.layoutId),n={kind:`layout`,layoutId:e.layoutId,rootBoundaryId:e.artifactCompatibility.rootBoundaryId,routeId:t},r=Ya({budget:ka,dimensions:[],output:n,routeBudget:{routeId:n.routeId,variantCacheKeys:[]}});if(r.kind!==`variant`)return null;let i=uo({artifactCompatibility:e.artifactCompatibility,layoutId:e.layoutId,rootBoundaryId:n.rootBoundaryId,routeId:n.routeId,variantCacheKey:r.variant.cacheKey});return{artifactCompatibility:i,id:e.layoutId,payloadHash:lo({artifactCompatibility:i,layoutId:e.layoutId,rootBoundaryId:n.rootBoundaryId,routeId:n.routeId,variantCacheKey:r.variant.cacheKey}),privacy:`public`,variantCacheKey:r.variant.cacheKey}}function go(e,t={}){let n=fo(t.limits??$a),r=B.readMetadata(e.elements),i=[];for(let t of r.layoutIds){if(i.length>=n.maxEntryCount)break;if(t.length>n.maxEntryIdLength||r.layoutFlags[t]!==`s`||!mo(e.elements,t)||B.parseElementKey(t)?.kind!==`layout`)continue;let a=ho({artifactCompatibility:r.artifactCompatibility,layoutId:t});a&&i.push(a)}return i.length===0?null:po({entries:i,limits:n,visibleCommitVersion:e.visibleCommitVersion})}function _o(e,t){let n=vo(e,t);return n&&ra(n),n}function vo(e,t){let n=Object.create(null);function r(i,a){if(a===t.length)return i===e.length;let o=t[a];if(o.startsWith(`:`)&&(o.endsWith(`+`)||o.endsWith(`*`))){let t=o.slice(1,-1),s=+!!o.endsWith(`+`);for(let o=i+s;o<=e.length;o++){let s=e.slice(i,o);if(s.length>0?n[t]=s:delete n[t],r(o,a+1))return!0}return delete n[t],!1}if(o.startsWith(`:`)){if(i>=e.length)return!1;let t=o.slice(1);return n[t]=e[i],r(i+1,a+1)?!0:(delete n[t],!1)}return i>=e.length||e[i]!==o?!1:r(i+1,a+1)}return r(0,0)?n:null}function yo(e,t){let n=0;for(let r=0;r=1;if(i.startsWith(`:`)&&i.endsWith(`*`))return a;if(n>=e.length)return!1;if(i.startsWith(`:`)){n++;continue}if(e[n]!==i)return!1;n++}return!0}function bo(e,t){function n(r,i){if(i===t.length)return r===e.length;let a=t[i];if(a.startsWith(`:`)&&(a.endsWith(`+`)||a.endsWith(`*`))){let t=+!!a.endsWith(`+`);for(let a=r+t;a<=e.length;a++)if(n(a,i+1))return!0;return!1}return a.startsWith(`:`)?n(r,i+1)||r=e.length||e[r]!==a?!1:n(r+1,i+1)}return n(0,0)}function xo(e){if(e.routeManifest===null)return null;let t=H(e.currentPathname,e.basePath),n=H(e.targetPathname,e.basePath),r=ea(t),i=ea(n);for(let n of e.routeManifest.segmentGraph.interceptions.values())if(yo(r,n.sourcePatternParts)&&_o(i,n.targetPatternParts)!==null)return t;return null}function So(e){if(e.routeManifest===null)return null;let t=H(e.currentPathname,e.basePath),n=e.currentMatchedPathname?H(e.currentMatchedPathname,e.basePath):null,r=H(e.targetPathname,e.basePath),i=ea(t),a=n?ea(n):null,o=ea(r);for(let r of e.routeManifest.segmentGraph.interceptions.values())if(bo(o,r.targetPatternParts)){if(yo(i,r.sourcePatternParts))return t;if(n!==null&&a!==null&&yo(a,r.sourcePatternParts))return n}return null}var Co=`__vinext_previousNextUrl`,wo=`__vinext_historyIndex`,To=`__vinext_bfcacheIds`,Eo=`__vinext_bfcacheVersion`,Do=class{#e;#t=new Map;constructor(e){this.#e=e.maxEntries}clear(){this.#t.clear()}remember(e){if(e.historyIndex===null||(this.#t.delete(e.historyIndex),this.#t.set(e.historyIndex,{bfcacheVersion:e.bfcacheVersion,state:e.state}),this.#t.size<=this.#e))return;let t=this.#t.keys().next().value;typeof t==`number`&&this.#t.delete(t)}resolveRestore(e){let t=zo(e.historyState);if(t===null)return{kind:`skip`,reason:`missing-history-index`,targetHistoryIndex:t};let n=this.#t.get(t);return n?e.guarded?{kind:`skip`,reason:`guarded`,targetHistoryIndex:t}:n.bfcacheVersion===e.currentBfcacheVersion?{kind:`restore`,state:n.state,targetHistoryIndex:t}:(this.#t.delete(t),{kind:`skip`,reason:`stale-bfcache-version`,targetHistoryIndex:t}):{kind:`skip`,reason:`missing-snapshot`,targetHistoryIndex:t}}},Oo=class{#e;#t=0;#n;constructor(e){let t=Io(e.initialHistoryState);this.#e=t===null?0:t+1,this.#n=new Do({maxEntries:e.maxHistoryStateSnapshots})}get currentBfcacheVersion(){return this.#e}beginCacheInvalidationGuard(){this.#t+=1;let e=!1;return()=>{e||(e=!0,this.#t=Math.max(0,this.#t-1))}}isCacheInvalidationGuarded(){return this.#t>0}isCurrentBfcacheVersion(e){return Lo(e,this.#e)}readCurrentBfcacheVersionHistoryIds(e){if(this.isCacheInvalidationGuarded())return null;let t=Fo(e);return t===null?null:this.isCurrentBfcacheVersion(e)?t:null}#r(){this.#e+=1}invalidateClientState(){this.#n.clear(),this.#r()}rememberHistoryStateSnapshot(e){this.#n.remember({bfcacheVersion:this.#e,historyIndex:e.historyIndex,state:e.state})}resolveHistoryStateSnapshotRestore(e){return this.#n.resolveRestore({currentBfcacheVersion:this.#e,guarded:this.isCacheInvalidationGuarded(),historyState:e})}};function ko(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e))t[n]=r;return t}function Ao(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function jo(e,t){let n=ko(e),r=t.bfcacheIds!==void 0&&(t.bfcacheIds===null||Object.keys(t.bfcacheIds).length===0);return t.previousNextUrl===null?delete n[Co]:n[Co]=t.previousNextUrl,t.traversalIndex!==void 0&&(Za(t.traversalIndex)?n[wo]=t.traversalIndex:delete n[wo]),t.bfcacheIds!==void 0&&(r?(delete n[To],delete n[Eo]):n[To]={...t.bfcacheIds}),t.bfcacheVersion!==void 0&&(r?delete n[Eo]:Za(t.bfcacheVersion)?n[Eo]=t.bfcacheVersion:delete n[Eo]),Object.keys(n).length>0?n:null}function Mo(e,t){let n=No(t),r=zo(t),i=Fo(t),a=Io(t);return n===null&&r===null&&i===null?e:jo(e,{bfcacheIds:i,bfcacheVersion:i===null?void 0:a,previousNextUrl:n,traversalIndex:r})}function No(e){let t=Ao(e)?.[Co];return typeof t==`string`?t:null}function Po(e){let t=B.parseElementKey(e);return t?.kind===`layout`||t?.kind===`page`||t?.kind===`slot`||t?.kind===`template`}function Fo(e){let t=Ao(e)?.[To];if(!t||typeof t!=`object`||Array.isArray(t))return null;let n={};for(let[e,r]of Object.entries(t)){if(!Po(e)||typeof r!=`string`)return null;n[e]=r}return n}function Io(e){let t=Ao(e)?.[Eo];return Za(t)?t:null}function Lo(e,t){let n=Io(e);return n!==null&&n===t}function Ro(e){let t=No(e),n=Fo(e),r=Io(e);return t===null&&n===null?null:jo(null,{bfcacheIds:n,bfcacheVersion:n===null?void 0:r,previousNextUrl:t})}function zo(e){let t=Ao(e)?.[wo];return Za(t)?t:null}function Bo(e){let t=zo(e.historyState),n=`unknown`;return e.currentHistoryIndex!==null&&t!==null&&(te.currentHistoryIndex&&(n=`forward`)),{direction:n,historyState:e.historyState,targetHistoryIndex:t}}var Vo=`__next-page-redirect`;function Ho(e){if(typeof e!=`object`||!e||!(`getElementById`in e))return!1;let{getElementById:t}=e;return typeof t==`function`?t.call(e,Vo)!==null:!1}var Uo=class{#e=null;#t=0;reset(){this.#e=null}navigate(e,t,n){let r=this.#e;if(r?.href===t&&r.historyUpdateMode===n)return;let i=this.#t+1;this.#t=i,this.#e={href:t,historyUpdateMode:n,token:i};let a=()=>{let r=this.#e;r?.href!==t||r.historyUpdateMode!==n||r.token!==i||(n===`replace`?e.location.replace(t):e.location.assign(t))};if(typeof e.requestAnimationFrame==`function`){e.requestAnimationFrame(()=>{e.setTimeout(a,0)});return}e.setTimeout(a,0)}},Wo=`[\\u0000-\\u001F \\u200B\\uFEFF]*`,Go=`[\\r\\n\\t]*`;function Ko(e){let t=e.split(``).join(Go);return RegExp(`^${Wo}${t}${Go}:`,`i`)}var qo=[Ko(`javascript`),Ko(`data`),Ko(`vbscript`)],Jo=`Next.js has blocked a javascript: URL as a security precaution.`;function Yo(e){let t=``+e;return qo.some(e=>e.test(t))}function Xo(){console.error(Jo)}function Zo(e,t=Error){if(Yo(e))throw Xo(),new t(Jo)}var Qo=10;function $o(e,t){return t===null||!Yo(t)?!1:(e.body?.cancel().catch(()=>{}),Xo(),!0)}function es(e,t){let n=new URL(e,t);return Vi(n),`${Hi(n.pathname)}${n.search}${n.hash}`}function ts(e,t){let n=new URL(e,t);return`${n.pathname}${n.search}${n.hash}`}function ns(e){if(e.targetUrl.origin!==e.origin)return{href:e.targetUrl.href,kind:`terminal-hard-navigation`,reason:`externalRedirect`,redirectDepth:e.redirectDepth};let t=e.redirectedHref;if(t===es(e.currentHref,e.origin))return{href:t,kind:`no-redirect`};let n=e.maxRedirectDepth??Qo;return e.redirectDepth>=n?{href:t,kind:`terminal-hard-navigation`,reason:`maxRedirectsExceeded`,redirectDepth:e.redirectDepth}:{href:t,historyUpdateMode:e.historyUpdateMode,kind:`follow`,previousNextUrl:e.requestPreviousNextUrl,redirectDepth:e.redirectDepth+1}}function rs(e){let t=new URL(e.responseUrl,e.origin);return ns({...e,redirectedHref:Mi(t.href,e.currentHref,e.origin),targetUrl:t})}function is(e){let t=new URL(e.streamedRedirectTarget,e.origin);return ns({...e,redirectedHref:ts(e.streamedRedirectTarget,e.origin),targetUrl:t})}var W={cacheProofRejected:`NC_CACHE_REJECT`,cacheReuseTokenRejected:`NC_CACHE_TOKEN_REJECT`,commitCurrent:`NC_COMMIT`,crossDocumentFlight:`NC_CROSS_DOC_FLIGHT`,fetchFresh:`NC_FETCH_FRESH`,invalidRscPayload:`NC_RSC_INVALID`,interceptedCommitCurrent:`NC_INTERCEPT_COMMIT`,interceptedRejectedIncompatibleRoot:`NC_INTERCEPT_REJECT_ROOT`,interceptedRejectedMissingProof:`NC_INTERCEPT_REJECT_MISSING_PROOF`,interceptedRejectedMissingSlotProof:`NC_INTERCEPT_REJECT_SLOT`,interceptedRejectedTargetMismatch:`NC_INTERCEPT_REJECT_TARGET`,interceptedRejectedUndeclaredTopology:`NC_INTERCEPT_REJECT_GRAPH`,interceptedRejectedUnknownSource:`NC_INTERCEPT_REJECT_SOURCE`,optimisticRouteShell:`NC_OPTIMISTIC_SHELL`,prefetchOnly:`NC_PREFETCH_ONLY`,prefetchResponseReuse:`NC_PREFETCH_REUSE`,proceedToCommit:`NC_RSC_PROCEED`,redirectFollow:`NC_RSC_REDIRECT_FOLLOW`,redirectTerminalDepth:`NC_RSC_REDIRECT_DEPTH`,redirectTerminalExternal:`NC_RSC_REDIRECT_EXTERNAL`,requestWork:`NC_REQUEST`,rootBoundaryChanged:`NC_ROOT`,rootBoundaryUnknown:`NC_ROOT_UNKNOWN`,rscCompatibilityMismatch:`NC_RSC_COMPAT_MISMATCH`,rscNavigationError:`NC_RSC_NAV_ERROR`,sameDocumentScroll:`NC_SAME_DOC_SCROLL`,samePageSearch:`NC_SAME_PAGE_SEARCH`,serverActionRedirectCompatibilityMismatch:`NC_SA_REDIRECT_COMPAT`,serverActionRscCompatibilityMismatch:`NC_SA_RSC_COMPAT`,staleOperation:`NC_STALE`,streamedRedirectLoop:`NC_RSC_STREAMED_REDIRECT_LOOP`,visitedResponseReuse:`NC_VISITED_REUSE`},as={hardNavigate:`NT_HARD_NAVIGATE`,noCommit:`NT_NO_COMMIT`,visibleCommit:`NT_VISIBLE_COMMIT`};function os(e){return{...e.activeNavigationId===void 0?{}:{activeNavigationId:e.activeNavigationId},currentRootLayoutTreePath:e.currentRootLayoutTreePath,currentVisibleCommitVersion:e.currentVisibleCommitVersion,nextRootLayoutTreePath:e.nextRootLayoutTreePath,...e.startedNavigationId===void 0?{}:{startedNavigationId:e.startedNavigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion}}function ss(e,t={}){return{code:e,fields:{...t}}}function G(e,t={}){return{schemaVersion:0,entries:[ss(e,t)]}}function cs(e,t,n={}){return{schemaVersion:e.schemaVersion,entries:[ss(t,n),...e.entries]}}var ls=[`navigation`,`visibleCommit`,`graphVersion`,`cacheVariant`];function us(e,t,n){switch(e){case`navigation`:return t.navigationId===n.activeNavigationId?{kind:`satisfied`}:{kind:`mismatch`,reason:`staleNavigation`};case`visibleCommit`:return t.baseVisibleCommitVersion===n.visibleCommitVersion?{kind:`satisfied`}:{kind:`mismatch`,reason:`staleVisibleCommit`};case`graphVersion`:return t.graphVersion===null||n.graphVersion===null?{kind:`absent`,missingReason:`graphVersionMissing`}:t.graphVersion===n.graphVersion?{kind:`satisfied`}:{kind:`mismatch`,reason:`graphVersionMismatch`};case`cacheVariant`:{let e=t.cacheVariantFingerprint,r=n.installedCacheVariantFingerprint;return e===void 0||r===null?{kind:`absent`,missingReason:`cacheVariantMissing`}:e===r?{kind:`satisfied`}:{kind:`mismatch`,reason:`cacheVariantMismatch`}}default:throw Error(`[vinext] Unknown operation-token dimension: `+String(e))}}function ds(e,t,n){let r=new Set(n.require),i=new Set([...n.check,...n.require]);for(let n of ls){if(!i.has(n))continue;let a=us(n,e,t);if(a.kind===`mismatch`)return{authorized:!1,reason:a.reason};if(a.kind===`absent`&&r.has(n))return{authorized:!1,reason:a.missingReason}}return{authorized:!0,token:e}}function fs(e,t){return ds(e,{activeNavigationId:t.activeNavigationId,visibleCommitVersion:t.visibleCommitVersion,graphVersion:e.graphVersion,installedCacheVariantFingerprint:e.cacheVariantFingerprint??null},{check:[`navigation`,`visibleCommit`],require:[`navigation`,`visibleCommit`]})}function ps(e,t){return ds(e,{activeNavigationId:e.navigationId,visibleCommitVersion:e.baseVisibleCommitVersion,graphVersion:t.graphVersion,installedCacheVariantFingerprint:t.installedCacheVariantFingerprint},{check:[`graphVersion`,`cacheVariant`],require:[]})}function ms(e,t){return e===`push`||t===`push`?`push`:`replace`}var hs=`\0`,gs=`CP_CACHE_ENTRY_PROOF_MISSING`;function _s(e){let t=e.work.kind===`traverseFlight`?{traverseDirection:e.work.direction}:{};return{kind:`requestWork`,token:e.state.nextOperationToken,work:e.work,trace:G(W.requestWork,{eventKind:e.eventKind,targetHref:vs(e.work),...t})}}function vs(e){switch(e.kind){case`flight`:case`prefetch`:return e.href;case`traverseFlight`:return null;default:throw Error(`[vinext] Unknown requested navigation work: `+String(e))}}function ys(e,t={}){return{fetchResultSource:e.source,...t}}function bs(e){return{discardBody:e.discardBody,kind:`hardNavigate`,...e.hardNavigationMode===void 0?{}:{hardNavigationMode:e.hardNavigationMode},reason:e.reason,trace:G(e.reasonCode,ys(e.facts,{...e.redirectSignal===void 0?{}:{redirectSignal:e.redirectSignal},redirectDepth:e.facts.redirectDepth,targetHref:e.url})),url:e.url}}function xs(e){return{discardBody:e.discardBody,kind:`followRedirect`,redirect:e.redirect,trace:G(W.redirectFollow,ys(e.facts,{redirectDepth:e.redirect.redirectDepth,redirectSignal:e.redirectSignal,targetHref:e.redirect.href}))}}function Ss(e){switch(e){case`externalRedirect`:return{hardNavigationReason:`externalRedirectTarget`,traceReasonCode:W.redirectTerminalExternal};case`maxRedirectsExceeded`:return{hardNavigationReason:`redirectDepthExhausted`,traceReasonCode:W.redirectTerminalDepth};default:throw Error(`[vinext] Unknown RSC redirect terminal reason: `+String(e))}}function Cs(e){if(!e.responseOk||!e.isRscContentType||!e.hasBody){let t=Mi(e.responseUrl,e.currentHref,e.origin);return bs({discardBody:!1,facts:e,reason:`invalidRscPayload`,reasonCode:W.invalidRscPayload,url:t})}let t=Ni({clientCompatibilityId:e.clientCompatibilityId,currentHref:e.currentHref,origin:e.origin,responseCompatibilityId:e.compatibilityIdHeader,responseUrl:e.responseUrl});if(t.kind===`hard-navigate`)return bs({discardBody:!1,facts:e,reason:`rscCompatibilityMismatch`,reasonCode:W.rscCompatibilityMismatch,url:t.hardNavigationTarget});if(e.responseUrl!==null){let t=rs({currentHref:e.currentHref,historyUpdateMode:e.effectiveHistoryUpdateMode,origin:e.origin,redirectDepth:e.redirectDepth,requestPreviousNextUrl:e.requestPreviousNextUrl,responseUrl:e.responseUrl});if(t.kind===`terminal-hard-navigation`){let n=Ss(t.reason);return bs({discardBody:!1,facts:e,reason:n.hardNavigationReason,reasonCode:n.traceReasonCode,redirectSignal:`response-url`,url:t.href})}if(t.kind===`follow`)return xs({discardBody:!1,facts:e,redirect:{href:t.href,historyUpdateMode:e.effectiveHistoryUpdateMode,previousNextUrl:t.previousNextUrl,redirectDepth:t.redirectDepth},redirectSignal:`response-url`})}if(e.streamedRedirectTarget!==null){let t=ms(e.effectiveHistoryUpdateMode,e.streamedRedirectType),n=is({currentHref:e.currentHref,historyUpdateMode:t,origin:e.origin,redirectDepth:e.redirectDepth,requestPreviousNextUrl:e.requestPreviousNextUrl,streamedRedirectTarget:e.streamedRedirectTarget});if(n.kind===`terminal-hard-navigation`){let r=Ss(n.reason);return bs({discardBody:!0,facts:e,reason:r.hardNavigationReason,reasonCode:r.traceReasonCode,redirectSignal:`streamed-header`,hardNavigationMode:t===`push`?`assign`:`replace`,url:n.href})}return n.kind===`follow`?xs({discardBody:!0,facts:e,redirect:{href:n.href,historyUpdateMode:t,previousNextUrl:n.previousNextUrl,redirectDepth:n.redirectDepth},redirectSignal:`streamed-header`}):bs({discardBody:!0,facts:e,reason:`streamedRedirectLoop`,reasonCode:W.streamedRedirectLoop,redirectSignal:`streamed-header`,url:n.href})}return{discardBody:!1,kind:`proceedToCommit`,trace:G(W.proceedToCommit,ys(e))}}function ws(e,t){return G(e,{targetHref:t.targetHref})}function Ts(e){let t,n;try{t=new URL(e.currentHref),n=new URL(e.targetHref,e.currentHref)}catch{return{bypassNavigationCache:!1,kind:`flightNavigation`,trace:ws(W.crossDocumentFlight,e)}}let r=t.origin===n.origin&&H(t.pathname,e.basePath)===H(n.pathname,e.basePath),i=t.searchParams.toString()===n.searchParams.toString();return r&&i&&n.hash!==``?{hash:n.hash,kind:`sameDocumentScroll`,mode:e.mode,scroll:e.scroll,trace:ws(W.sameDocumentScroll,e)}:r&&!i?{bypassNavigationCache:!0,kind:`flightNavigation`,trace:ws(W.samePageSearch,e)}:{bypassNavigationCache:!1,kind:`flightNavigation`,trace:ws(W.crossDocumentFlight,e)}}function Es(e){return e.candidate===`missing`?{kind:`miss`}:e.mountedSlotsMatch?e.navigationKind===`refresh`?{kind:`evict`,reason:`refresh`}:e.fresh?{kind:`reuse`}:{kind:`evict`,reason:`stale`}:{kind:`evict`,reason:`mountedSlotsMismatch`}}function Ds(e,t,n={}){return G(e,{eventKind:t.navigationKind,targetHref:t.targetHref,...n})}function Os(e,t){return{kind:`fetchFresh`,reason:t,trace:Ds(W.fetchFresh,e,{freshFetchReason:t})}}function ks(e){return e.navigationKind===`refresh`?Os(e,`refresh`):!e.bypassNavigationCache&&e.visitedResponse.status===`available`?{kind:`reuseVisitedResponse`,trace:Ds(W.visitedResponseReuse,e)}:!e.bypassNavigationCache&&e.prefetch.status===`available`?{kind:`consumePrefetch`,trace:Ds(W.prefetchResponseReuse,e)}:e.navigationKind===`navigate`?e.optimisticRouteShell.status===`available`?{kind:`attemptOptimisticRouteShell`,trace:Ds(W.optimisticRouteShell,e)}:Os(e,e.bypassNavigationCache?`cacheBypassed`:e.optimisticRouteShell.reason):e.bypassNavigationCache?Os(e,`cacheBypassed`):Os(e,`cacheMiss`)}function As(e){return e.visitedResponse.status===`available`?{kind:`skip`,reason:`visitedResponseAvailable`}:e.navigationKind===`refresh`?{kind:`skip`,reason:`refresh`}:e.bypassNavigationCache?{kind:`skip`,reason:`cacheBypassed`}:{kind:`probe`}}function js(e){return{layoutIds:e.layoutIds,rootBoundaryId:e.rootBoundaryId,rootLayoutTreePath:e.rootBoundaryId,slotBindings:e.slotBindings}}function Ms(e){let t=e.indexOf(hs);return t===-1?e:e.slice(0,t)}function Ns(e){let t=Ms(e);return t.startsWith(`route:/`)?t.slice(6):null}function Ps(e){try{return new URL(e,`https://vinext.local`).pathname}catch{let[t=``]=e.split(`#`),[n=``]=t.split(`?`);return n===``?`/`:n}}function Fs(e){return ea(Ps(e))}function Is(e,t){let n=Fs(t);for(let t of e.segmentGraph.routes.values())if(_o(n,t.patternParts)!==null)return t;return null}function Ls(e,t){return _o(Fs(t),e.patternParts)!==null}function Rs(e){let t=Ms(e.routeId),n=e.routeManifest.segmentGraph.routes.get(t);if(n&&Ls(n,e.matchedUrl))return n;let r=n===void 0?Ns(e.routeId):null;if(r!==null){let t=Is(e.routeManifest,r);if(t!==null)return t}return Is(e.routeManifest,e.matchedUrl)}function zs(e,t){return t.interception===null?Rs({matchedUrl:t.matchedUrl,routeId:t.routeId,routeManifest:e}):Rs({matchedUrl:t.interception.sourceMatchedUrl,routeId:t.interception.sourceRouteId,routeManifest:e})}function Bs(e,t){let n=[];for(let r of t.slotIds){let i=e.segmentGraph.slotBindings.get(`${t.id}::${r}`);i&&n.push({ownerLayoutId:i.ownerLayoutId,slotId:i.slotId,state:i.state})}return n.sort((e,t)=>Le(e.slotId,t.slotId))}function Vs(e,t){return t.rootBoundaryId===null?null:e.segmentGraph.rootBoundaries.get(t.rootBoundaryId)?.treePath??null}function Hs(e){let t=e.routeManifest===null?null:zs(e.routeManifest,e.snapshot);if(t===null||e.routeManifest===null)return{kind:`unknown`};let n=e.slotBindingSource===`manifestTarget`&&e.snapshot.interception===null;return{kind:`known`,topology:{layoutIds:t.layoutIds,rootBoundaryId:t.rootBoundaryId,rootLayoutTreePath:Vs(e.routeManifest,t),slotBindings:n?Bs(e.routeManifest,t):e.snapshot.slotBindings}}}function Us(e,t){let n=Fs(t.sourceMatchedUrl),r=Fs(t.targetMatchedUrl),i=Rs({matchedUrl:t.targetMatchedUrl,routeId:t.targetRouteId,routeManifest:e}),a=e.segmentGraph.interceptionsBySlotId.get(t.slotId)??[];for(let e of a){if(!yo(n,e.sourcePatternParts))continue;let t=_o(r,e.targetPatternParts),a=t===null&&bo(r,e.targetPatternParts);if(!(t===null&&!a)&&!(!a&&e.targetRouteId!==null&&i?.id!==e.targetRouteId))return e}return null}function Ws(e){return e.state.traceFields?{...e.state.traceFields,currentRootLayoutTreePath:e.currentRootLayoutTreePath,nextRootLayoutTreePath:e.nextRootLayoutTreePath}:os({currentRootLayoutTreePath:e.currentRootLayoutTreePath,currentVisibleCommitVersion:e.state.visibleCommitVersion,nextRootLayoutTreePath:e.nextRootLayoutTreePath,startedVisibleCommitVersion:e.event.token.baseVisibleCommitVersion})}function Gs(e,t){return e===null||t===null?`rootBoundaryUnknown`:e===t?`currentRootBoundary`:`rootBoundaryChanged`}function Ks(e,t){return qs(js(e),js(t))}function qs(e,t){if(Gs(e.rootBoundaryId,t.rootBoundaryId)!==`currentRootBoundary`)return[];let n=[],r=Math.min(e.layoutIds.length,t.layoutIds.length);for(let i=0;ie.slotId===t.slotId);return!o||o.state!==`active`||o.ownerLayoutId===null||!a.has(o.ownerLayoutId)?{kind:`rejected`,reasonCode:W.interceptedRejectedMissingSlotProof}:r!==null&&o.ownerLayoutId!==r.ownerLayoutId?{kind:`rejected`,reasonCode:W.interceptedRejectedUndeclaredTopology}:{kind:`approved`,preserveElementIds:i,preservePreviousSlotIds:$s({currentSlotBindings:e.currentTopology.slotBindings,preservedLayoutIds:i,targetSlotBindings:e.targetTopology.slotBindings}).filter(e=>e!==t.slotId)}}function lc(e){let t=e.event.result.targetSnapshot,n=Hs({routeManifest:e.routeManifest,slotBindingSource:`snapshot`,snapshot:e.state.visibleSnapshot}),r=Hs({routeManifest:e.routeManifest,slotBindingSource:`manifestTarget`,snapshot:t}),i=Ws({currentRootLayoutTreePath:n.kind===`known`?n.topology.rootLayoutTreePath:null,event:e.event,nextRootLayoutTreePath:r.kind===`known`?r.topology.rootLayoutTreePath:null,state:e.state});if(e.event.token.lane===`prefetch`)return{kind:`noCommit`,reason:`prefetchOnly`,token:e.event.token,trace:G(W.prefetchOnly,i)};let a=nc(e.event.result.cacheEntryReuseProof);if(a.kind===`rejected`)return ic({event:e.event,rejection:a,traceFields:i});let o=a.decision;if(o!==null){let t=ps(e.event.token,{graphVersion:e.routeManifest?.graphVersion??null,installedCacheVariantFingerprint:null});if(!t.authorized)return ac({event:e.event,reason:t.reason,traceFields:i})}let s=oc(i,o),c=sc(o);if(t.interception!==null){if(n.kind===`unknown`||r.kind===`unknown`)return tc({event:e.event,reasonCode:W.interceptedRejectedUndeclaredTopology,traceFields:s});let i=cc({currentSnapshot:e.state.visibleSnapshot,currentTopology:n.topology,restoredHistorySnapshot:e.event.result.restoredHistorySnapshot===!0,routeManifest:e.routeManifest,targetSnapshot:t,targetTopology:r.topology});return i.kind===`rejected`?tc({event:e.event,reasonCode:i.reasonCode,traceFields:s}):{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:i.preserveElementIds,preservePreviousSlotIds:i.preservePreviousSlotIds,reason:`interceptedCurrentRootBoundary`,targetSnapshot:t},token:e.event.token,trace:G(W.interceptedCommitCurrent,s)}}let l=n.kind===`unknown`||r.kind===`unknown`?`rootBoundaryUnknown`:Gs(n.topology.rootBoundaryId,r.topology.rootBoundaryId);if(l===`rootBoundaryChanged`)return{kind:`hardNavigate`,reason:`rootBoundaryChanged`,token:e.event.token,trace:G(W.rootBoundaryChanged,s),url:e.event.result.href};if(l===`rootBoundaryUnknown`)return{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:[],preservePreviousSlotIds:[],reason:`unprovenTopologyFallback`,targetSnapshot:t},token:e.event.token,trace:G(W.rootBoundaryUnknown,s)};if(n.kind!==`known`||r.kind!==`known`)throw Error(`[vinext] Current-root navigation planning requires manifest topology`);return{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:Zs({currentTopology:n.topology,lane:e.event.token.lane,targetTopology:r.topology}),preservePreviousSlotIds:Qs({currentTopology:n.topology,lane:e.event.token.lane,targetTopology:r.topology}),reason:`currentRootBoundary`,targetSnapshot:t},token:e.event.token,trace:G(W.commitCurrent,s)}}function uc(e){switch(e.event.kind){case`navigate`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`flight`,mode:e.event.mode}});case`refresh`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.state.visibleSnapshot.displayUrl,kind:`flight`,mode:`refresh`}});case`traverse`:return _s({eventKind:e.event.kind,state:e.state,work:{direction:e.event.direction,historyState:e.event.historyState,kind:`traverseFlight`}});case`prefetch`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`prefetch`}});case`flightResponseArrived`:return lc({event:e.event,routeManifest:e.routeManifest,state:e.state});default:{let t=e.event;throw Error(`[vinext] Unknown navigation event: `+String(t))}}}function dc(e){if(e.clientCompatibilityId===null||!e.isRscContentType||Ni({clientCompatibilityId:e.clientCompatibilityId,currentHref:e.currentHref,origin:e.origin,responseCompatibilityId:e.compatibilityIdHeader,responseUrl:e.responseUrl}).kind===`compatible`)return{kind:`proceed`,trace:G(W.proceedToCommit,{})};if(e.actionRedirectHref!==null)return{kind:`hardNavigate`,url:e.actionRedirectHref,historyMode:e.actionRedirectType===`push`?`assign`:`replace`,clearClientNavigationCaches:!0,reason:`serverActionRedirectCompatibilityMismatch`,trace:G(W.serverActionRedirectCompatibilityMismatch,{targetHref:e.actionRedirectHref})};let t=e.currentHref;return{kind:`hardNavigate`,url:t,clearClientNavigationCaches:!1,reason:`serverActionRscCompatibilityMismatch`,trace:G(W.serverActionRscCompatibilityMismatch,{targetHref:t})}}function fc(e){return{kind:`hardNavigate`,url:e.currentHref,reason:`rscNavigationError`,trace:G(W.rscNavigationError,{targetHref:e.currentHref})}}var K={classifyEarlyNavigationIntent:Ts,classifyNavigationPrefetchProbe:As,classifyNavigationReuse:ks,classifyRscFetchResult:Cs,classifyRscNavigationError:fc,classifyRootBoundaryTransition:Gs,classifyServerActionResult:dc,classifyVisitedResponseCacheCandidate:Es,plan:uc,resolveCurrentRootBoundaryElementPersistence:Xs,resolveMountedParallelSlotPersistence:Js,resolveSameLayoutAncestorPersistence:Ks};function pc(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)}var mc=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/;function hc(e){let t=e.charCodeAt(0);return(t>=65&&t<=90||t>=97&&t<=122)&&mc.test(e)}function gc(e){return hc(e)||e.startsWith(`//`)}function _c(){let{origin:e,href:t}=window.location;if(e)return e;try{return new URL(t).origin}catch{return null}}function vc(e){let t=_c();if(!t)return null;try{let n=e.startsWith(`//`)?new URL(e,t):new URL(e);if(n.origin===t)return n.pathname+n.search+n.hash}catch{}return null}function yc(e,t){let n=vc(e);if(n==null||!t)return n;try{let e=new URL(n,`http://vinext.local`);return kn(e.pathname,t)?H(e.pathname,t)+e.search+e.hash:null}catch{return n}}function bc(e,t){return!t||!e.startsWith(`/`)||gc(e)?e:t+e}function xc(e,t,n=``){let r=t??window.location.href;if(!r||e.startsWith(`/`)||gc(e))return e;try{let t=new URL(e,r);return(n&&t.pathname===n?``:n?H(t.pathname,n):t.pathname)+t.search+t.hash}catch{return e}}function Sc(e,t,n=``){let r=xc(e,t,n);return n?r===``?n:r.startsWith(`?`)||r.startsWith(`#`)?n+r:bc(r,n):bc(r,n)}var Cc=String.raw`[\w-]+-Google|Google-[\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight`,wc=/Googlebot(?!-)|Googlebot$/i,Tc=new Map;function Ec(e){let t=e||Cc,n=Tc.get(t);if(n)return n;let r=new RegExp(t,`i`);return Tc.set(t,r),r}function Dc(e,t){return e?wc.test(e)?!0:Ec(t).test(e):!1}var Oc=class extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}},kc=class extends URLSearchParams{append(){throw new Oc}delete(){throw new Oc}set(){throw new Oc}sort(){throw new Oc}},Ac=e({releaseAppPrefetchFetchSlot:()=>Rc,scheduleAppPrefetchFetch:()=>zc}),jc=Symbol.for(`vinext.appPrefetchFetchSlotRelease`),Mc=4,Nc=[],Pc=0,Fc=!1;function Ic(){for(Fc=!1;Pc{Nc.push(()=>{let r=!1,i=()=>{r||(r=!0,--Pc,Ic())};try{e().then(e=>{e[jc]=i,t(e)},e=>{i(),n(e)})}catch(e){i(),n(e)}}),Lc()})}var Bc=`modulepreload`,Vc=function(e){return`/`+e},Hc={},Uc=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vc(t,n),t in Hc)return;Hc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Wc(e){return null}var Gc=Symbol.for(`vinext.navigation.pagesNavigationNotify`),Kc=50*1024*1024*.9;function qc(e,t){if(e===void 0||e===``)return t;let n=Number(e);return!Number.isFinite(n)||n<0?t:n*1e3}var Jc=qc(`0`,3e4),Yc=qc(`300`,3e4),Xc=3e4;function Zc(e){let t;try{t=new URL(e,window.location.href)}catch{return null}return xo({basePath:``,currentPathname:window.location.pathname,routeManifest:w()?.bootstrap.routeManifest??null,targetPathname:t.pathname})}function q(){return window.__VINEXT_RSC_PREFETCH_CACHE__||(window.__VINEXT_RSC_PREFETCH_CACHE__=new Map),window.__VINEXT_RSC_PREFETCH_CACHE__}function Qc(){return window.__VINEXT_RSC_PREFETCHED_URLS__||(window.__VINEXT_RSC_PREFETCHED_URLS__=new Set),window.__VINEXT_RSC_PREFETCHED_URLS__}function $c(e){return typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e)&&e>=0}function el(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0}function tl(e){if(e===null||e===``)return;let t=Number(e);return $c(t)?t:void 0}function nl(e,t){let n=e.dynamicStaleTimeSeconds;return $c(n)?n*1e3:t}function rl(e,t,n){return el(t.expiresAt)?t.expiresAt:e+nl(t,n)}function il(e,t,n){if(el(t.expiresAt))return t.expiresAt;let r=t.dynamicStaleTimeSeconds;return $c(r)?e+Math.max(r*1e3,Xc):e+Math.max(n,Xc)}function al(e){return e.expiresAt===void 0?e.snapshot?rl(e.timestamp,e.snapshot,Yc):e.timestamp+Yc:e.expiresAt}function ol(e){return e.mountedSlotsHeader===void 0?e.snapshot?.mountedSlotsHeader??null:e.mountedSlotsHeader}function sl(e){try{let t=new URL(e,`http://vinext.local`);return Vi(t),`${t.pathname}${t.search}`}catch{return null}}function cl(e){let t=e.indexOf(`\0`);return t===-1?{interceptionContext:null,rscUrl:e}:{interceptionContext:e.slice(t+1),rscUrl:e.slice(0,t)}}function ll(e,t){return ol(e)===t?!0:(e.snapshot?.mountedSlotsHeader??null)===t}function ul(e,t,n,r=[]){let i=q(),a=[e,...r];for(let e of a){let r=B.encodeCacheKey(e,t),a=i.get(r);if(a&&a.cacheForNavigation!==!1&&ll(a,n))return{cacheKey:r,entry:a}}let o=new Set(a.map(e=>sl(e)).filter(e=>e!==null));if(o.size===0)return null;for(let[e,r]of i){if(r.cacheForNavigation===!1)continue;let i=cl(e);if(i.interceptionContext!==t)continue;let a=sl(i.rscUrl);if(!(a===null||!o.has(a))&&ll(r,n))return{cacheKey:e,entry:r}}return null}function dl(e,t=null,n=null,r={}){let i=ul(e,t,n,r.additionalRscUrls);return i===null?!1:i.entry.pending!==void 0||al(i.entry)>Date.now()?(_l(q(),i.cacheKey,i.entry),!0):(J(q(),Qc(),i.cacheKey,i.entry,r.notifyInvalidation??!0),!1)}function fl(e){return e.snapshot?.buffer.byteLength??e.size??0}var pl=null,ml=0;function hl(e){if(pl===e)return ml;let t=0,n=new Set;for(let r of e.values())n.has(r)||(n.add(r),t+=fl(r));return pl=e,ml=t,t}function gl(e,t){pl===e&&(ml=Math.max(0,ml+t))}function _l(e,t,n){if(e.get(t)===n){e.delete(t),e.set(t,n);for(let r of n.cacheKeys??[])r===t||e.get(r)!==n||(e.delete(r),e.set(r,n))}}function vl(){let e=q(),t=hl(e);if(t<=52428800)return;let n=Date.now(),r=Qc();for(let[t,i]of e)al(i)<=n&&J(e,r,t,i,!0);if(t=hl(e),t<=52428800)return;let i=0;for(;t>Kc&&i{xl(e)},n)}function Cl(e,t){t!==void 0&&(e.onInvalidateCallbacks===void 0&&(e.onInvalidateCallbacks=new Set),e.onInvalidateCallbacks.add(t))}function wl(e,t){if(t===void 0)return;let n=q().get(e);n&&(Cl(n,t),n.outcome===`cache-seeded`&&Sl(e,n))}function Tl(){let e=q(),t=Qc();for(let[n,r]of e)J(e,t,n,r,!0);t.clear(),w()?.functions.pingVisibleLinks?.()}function El(e,t,n=null,r=null,i=Jc){let a=B.encodeCacheKey(e,n),o=q(),s=o.get(a);s&&J(o,Qc(),a,s,!1);let c=Date.now(),l={cacheForNavigation:!0,cacheKeys:new Set([a]),expiresAt:rl(c,t,i),mountedSlotsHeader:r,outcome:`cache-seeded`,size:t.buffer.byteLength,snapshot:t,timestamp:c};o.set(a,l),gl(o,t.buffer.byteLength),Qc().add(a),Sl(a,l),vl()}function Dl(e,t,n=null){let r=B.encodeCacheKey(e,n),i=q(),a=i.get(r);a?.snapshot===t&&J(i,Qc(),r,a,!1)}function Ol(e,t,n=null){let r=tl(e.headers.get(j));return{compatibilityIdHeader:e.headers.get(Ci),buffer:t,contentType:e.headers.get(`content-type`)??`text/x-component`,...r===void 0?{}:{dynamicStaleTimeSeconds:r},mountedSlotsHeader:e.headers.get(A),paramsHeader:e.headers.get(k),renderedPathAndSearch:kl(e.headers.get(M)),url:n??e.url}}function kl(e){if(e===null||e===``)return null;try{let t=decodeURIComponent(e);return t.startsWith(`/`)?t:null}catch{return null}}async function Al(e){try{return Ol(e,await e.arrayBuffer())}finally{Rc(e)}}function jl(e,t=!0){let n=new Headers({"content-type":e.contentType});return e.mountedSlotsHeader!=null&&n.set(A,e.mountedSlotsHeader),e.compatibilityIdHeader!=null&&n.set(Ci,e.compatibilityIdHeader),$c(e.dynamicStaleTimeSeconds)&&n.set(j,String(e.dynamicStaleTimeSeconds)),e.paramsHeader!=null&&n.set(k,e.paramsHeader),e.renderedPathAndSearch!=null&&n.set(M,encodeURIComponent(e.renderedPathAndSearch)),new Response(t?e.buffer.slice(0):e.buffer,{status:200,headers:n})}function Ml(e,t,n=null,r=null,i,a={}){let o=B.encodeCacheKey(e,n),s=q(),c=Qc(),l=Date.now(),u=s.get(o);u&&J(s,c,o,u,!1);let d={cacheForNavigation:a.cacheForNavigation??!0,cacheKeys:new Set([o]),mountedSlotsHeader:r,optimisticRouteShell:a.optimisticRouteShell===!0,outcome:`pending`,prefetchKind:a.prefetchKind??(a.optimisticRouteShell===!0?`loading-shell`:`navigation`),searchAgnosticShell:a.searchAgnosticShell===!0,timestamp:l};Cl(d,i?.onInvalidate),d.pending=t.then(async e=>{if(e.ok){let t=await Al(e);if(s.get(o)!==d)return;let n=fl(d);d.snapshot=t,d.size=t.buffer.byteLength,gl(s,d.size-n),d.expiresAt=il(d.timestamp,d.snapshot,a.fallbackTtlMs??Yc),Nl(s,c,o,d),vl()}else Rc(e),J(s,c,o,d,!1)}).catch(()=>{J(s,c,o,d,!1)}).finally(()=>{s.get(o)===d&&(d.pending=void 0,d.snapshot&&(d.outcome=`cache-seeded`,Sl(o,d)))}),s.set(o,d),vl()}function Nl(e,t,n,r){if(r.cacheForNavigation===!1)return;let i=r.snapshot?.renderedPathAndSearch;if(!i)return;let a=cl(n),o=B.encodeCacheKey(i,a.interceptionContext);if(o===n)return;let s=e.get(o);s&&s!==r&&J(e,t,o,s,!1),r.cacheKeys??=new Set([n]),r.cacheKeys.add(o),e.set(o,r),t.add(o)}function Pl(e,t,n){return t.pending||t.outcome!==`cache-seeded`||t.cacheForNavigation===!1?null:(J(q(),Qc(),e,t,!1),t.snapshot?!ll(t,n)||al(t)<=Date.now()?null:t.expiresAt!==void 0||t.snapshot.expiresAt!==void 0?{...t.snapshot,expiresAt:al(t)}:t.snapshot:null)}async function Fl(e,t=null,n=null,r){let i=q(),a=ul(e,t,n,r?.additionalRscUrls);if(!a)return null;let{cacheKey:o,entry:s}=a;return s.pending!==void 0&&(await s.pending.catch(()=>{}),i.get(o)!==s)||r?.shouldConsume?.()===!1?null:Pl(o,s,n)}var Il=Symbol.for(`vinext.clientNavigationState`),Ll=Symbol.for(`vinext.mountedSlotsHeader`);function Rl(e){let t=window;t[Ll]=e}function zl(){return window[Ll]??null}function Y(){let e=window;return e[Il]??={listeners:new Set,cachedSearch:window.location.search,cachedReadonlySearchParams:new kc(window.location.search),cachedPathname:H(window.location.pathname,``),clientParams:{},clientParamsJson:`{}`,pendingClientParams:null,pendingClientParamsJson:null,pendingPathname:null,pendingPathnameNavId:null,originalPushState:window.history.pushState.bind(window.history),originalReplaceState:window.history.replaceState.bind(window.history),patchInstalled:!1,hasPendingNavigationUpdate:!1,suppressUrlNotifyCount:0,navigationSnapshotActiveCount:0},e[Il]}function Bl(){let e=Y();if(e)for(let t of e.listeners)t()}globalThis[Gc]=Bl;function Vl(){let e=Y();if(!e)return!1;let t=!1,n=H(window.location.pathname,``);n!==e.cachedPathname&&(e.cachedPathname=n,t=!0);let r=window.location.search;return r!==e.cachedSearch&&(e.cachedSearch=r,e.cachedReadonlySearchParams=new kc(r),t=!0),t}function Hl(){let e=Y();e&&e.navigationSnapshotActiveCount++}var Ul=Symbol.for(`vinext.clientNavigationRenderContext`);function Wl(){if(typeof R.createContext!=`function`)return null;let e=globalThis;return e[Ul]||(e[Ul]=R.createContext(null)),e[Ul]??null}function Gl(e,t){let n=window.location.origin,r=new URL(e,n);return{pathname:H(r.pathname,``),searchParams:new kc(r.search),params:t}}function Kl(e){let t=e.searchParams.toString();return t===``?e.pathname:`${e.pathname}?${t}`}var ql=`{}`;function Jl(e){let t=Y();if(!t){let t=JSON.stringify(e);t!==ql&&(ql=t);return}let n=JSON.stringify(e);n!==t.clientParamsJson&&(t.clientParams=e,t.clientParamsJson=n,t.pendingClientParams=null,t.pendingClientParamsJson=null,Bl())}function Yl(e){let t=Y();if(!t)return;let n=JSON.stringify(e);n!==t.clientParamsJson&&n!==t.pendingClientParamsJson&&(t.pendingClientParams=e,t.pendingClientParamsJson=n,t.hasPendingNavigationUpdate=!0)}function Xl(e,t){let n=Y();n&&(n.pendingPathname=H(e,``),n.pendingPathnameNavId=t)}function Zl(e){let t=Y();t&&(t.pendingPathnameNavId===null||t.pendingPathnameNavId===e)&&(t.pendingPathname=null,t.pendingPathnameNavId=null)}function Ql(e){let t=Y();if(!t)return e();t.suppressUrlNotifyCount+=1;try{return e()}finally{--t.suppressUrlNotifyCount}}function $l(e,t){let n=Y();if(!n)return;(t?.releaseSnapshot??e!==void 0)&&n.navigationSnapshotActiveCount>0&&--n.navigationSnapshotActiveCount;let r=Vl(),i=!1;n.pendingClientParams!==null&&n.pendingClientParamsJson!==null&&(n.clientParams=n.pendingClientParams,n.clientParamsJson=n.pendingClientParamsJson,n.pendingClientParams=null,n.pendingClientParamsJson=null,i=!0),(n.pendingPathnameNavId===null||e!==void 0&&n.pendingPathnameNavId===e)&&(n.pendingPathname=null,n.pendingPathnameNavId=null);let a=r||n.hasPendingNavigationUpdate;n.hasPendingNavigationUpdate=!1,(r||i)&&cn(),a&&Bl()}function eu(e,t,n){Ql(()=>{Y()?.originalPushState.call(window.history,e,t,n)})}function tu(e,t,n){Ql(()=>{Y()?.originalReplaceState.call(window.history,e,t,n)})}function nu(){tu({...window.history.state??{},__vinext_scrollX:window.scrollX,__vinext_scrollY:window.scrollY},``)}function ru(e,t,n){let r=w()?.functions.commitHashNavigation;if(r){r(e,t,n);return}let i=Ro(window.history.state);t===`replace`?tu(i,``,e):eu(i,``,e)}function iu(e){if(!(typeof document>`u`)){if(e.hash!==null){Ht(e.hash);return}e.targetHoistedInHead||(document.documentElement.scrollTop=0)}}function au(e){queueMicrotask(()=>{let t=_r();if(t===null||t.id!==e.id)return;let n=br(e);n&&iu(n)})}function ou(e){if(e&&typeof e==`object`&&`__vinext_scrollY`in e){let{__vinext_scrollX:t,__vinext_scrollY:n}=e;Promise.resolve().then(()=>{let e=window.__VINEXT_RSC_PENDING__??null;e?e.then(()=>Wt(t,n)):Wt(t,n)})}}function su(e,t){t===`replace`?window.location.replace(e):window.location.assign(e)}async function cu(e,t,n,r=!1,i=`transition`){w()?.functions.notifyLinkNavigationStart?.();let a=e;if(pc(e)){let n=yc(e,``);if(n==null){Yi(e,t);let n=w()?.functions.navigateExternal;if(n){await n(e,t);return}su(e,t),await new Promise(()=>{});return}a=n}let o=Wc(a);if(o===`pages`||o===`document`){let e=Sc(a,window.location.href,``);Yi(e,t),t===`push`&&nu(),su(e,t),await new Promise(()=>{});return}let s=Sc(a,window.location.href,``);Yi(s,t),t===`push`&&nu();let c=K.classifyEarlyNavigationIntent({basePath:``,currentHref:window.location.href,mode:t,scroll:n,targetHref:s});if(c.kind===`sameDocumentScroll`){gr(),ru(s,c.mode,c.scroll),Dn(s),$l(),c.scroll&&Ht(c.hash);return}if(Ho(typeof document>`u`?void 0:document)){let e=w()?.functions.navigateExternal;if(e){await e(s,t);return}su(s,t),await new Promise(()=>{});return}let l=s.indexOf(`#`),u=l===-1?``:s.slice(l),d=n?hr(u||null):null;n||gr();let f=w()?.functions.navigate;try{f?await f(s,0,`navigate`,t,void 0,r,void 0,d,i):(t===`replace`?tu(null,``,s):eu(null,``,s),$l())}catch(e){throw d&&br(d),e}d&&au(d)}var lu=0;function uu(){lu+=1;let e=!1;return()=>{e||(e=!0,lu=Math.max(0,lu-1))}}function du(){return lu>0}function fu(e){queueMicrotask(e)}var pu={bfcacheId:`0`,push(e,t){Zo(e),w()?.functions.notifyLinkNavigationStart?.();let n=uu();try{R.startTransition(()=>{cu(e,`push`,t?.scroll!==!1,!0)})}catch(e){throw n(),e}fu(n)},replace(e,t){Zo(e),w()?.functions.notifyLinkNavigationStart?.();let n=uu();try{R.startTransition(()=>{cu(e,`replace`,t?.scroll!==!1,!0)})}catch(e){throw n(),e}fu(n)},back(){window.history.back()},forward(){window.history.forward()},refresh(){if(w()?.functions.clearNavigationCaches?.(),du())return;let e=w()?.functions.navigate;e&&R.startTransition(()=>{e(window.location.href,0,`refresh`,void 0,void 0,!0)})},prefetch(e,t){if(Zo(e),!Dc(window.navigator?.userAgent??``)){try{new URL(bc(e,``),window.location.href)}catch{throw Error(`Cannot prefetch '${e}' because it cannot be converted to a URL.`)}(async()=>{let n=e;if(pc(e)){let t=yc(e,``);if(t==null)return;n=t}let r=Wc(n);if(r===`pages`||r===`document`)return;let i=Sc(n,window.location.href,``),a=Zc(i),o=zl(),s=Ui({interceptionContext:a});o&&s.set(A,o);let c=await Gi(i,s),l=B.encodeCacheKey(c,a),u=Qc();if(u.has(l)){wl(l,t?.onInvalidate);return}u.add(l),Ml(c,zc(()=>fetch(c,{headers:s,credentials:`include`,priority:`low`}),`low`),a,o,t)})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})}}};function mu(e){return!e||e===`0`?la:e}function hu(){let e=tn(),t=en();if(!e||!t||typeof R.useContext!=`function`)return mu(null);try{let n=R.useContext(e),r=R.useContext(t);return mu(n===null?null:r?.[n])}catch{return mu(null)}}var gu=pu;function _u(){if(!Lt||typeof R.useContext!=`function`||typeof R.useMemo!=`function`)throw Error(`invariant expected app router to be mounted`);let e=R.useContext(Lt);if(e===null)throw Error(`invariant expected app router to be mounted`);let t=hu();return R.useMemo(()=>({...e,bfcacheId:t}),[e,t])}{let e=Y();e&&!e.patchInstalled&&(e.patchInstalled=!0,window.addEventListener(`popstate`,()=>{w()?.functions.notifyLinkNavigationStart?.()}),window.addEventListener(`popstate`,e=>{ne()||($l(),ou(e.state))}),window.history.pushState=function(t,n,r){e.originalPushState.call(window.history,Mo(t,window.history.state),n,r),e.suppressUrlNotifyCount===0&&(w()?.functions.notifyLinkNavigationStart?.(),$l())},window.history.replaceState=function(t,n,r){e.originalReplaceState.call(window.history,Mo(t,window.history.state),n,r),e.suppressUrlNotifyCount===0&&(w()?.functions.notifyLinkNavigationStart?.(),$l())})}var vu=new TextEncoder;function yu(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e{let e=o;o=void 0,e?.()},c=()=>{a||(a=!0,s(),t.close())},l=()=>{typeof queueMicrotask==`function`?queueMicrotask(c):Promise.resolve().then(c)},u=()=>{a||(a=!0,s(),t.error(Su()))};e=()=>{a||(a=!0,s())};let d=w()===null?null:te(),f=d?.rsc??(n.__VINEXT_RSC_CHUNKS__??=[]);if(f.push=function(...e){let r=Array.prototype.push.apply(this,e);if(a)return r;for(let n of e)t.enqueue(bu(n));return(d?.done||n.__VINEXT_RSC_DONE__)&&c(),r},d){let e=!!d.done;Object.defineProperty(d,`done`,{configurable:!0,enumerable:!0,get(){return e},set(t){e=!!t,e&&l()}})}else{let e=!!n.__VINEXT_RSC_DONE__;Object.defineProperty(n,`__VINEXT_RSC_DONE__`,{configurable:!0,enumerable:!0,get(){return e},set(t){e=!!t,e&&l()}})}if(typeof document<`u`)if(document.readyState===`loading`)document.addEventListener(`DOMContentLoaded`,u),o=()=>document.removeEventListener(`DOMContentLoaded`,u);else{let e=setTimeout(u);o=()=>clearTimeout(e)}},cancel(){e?.()}})}var Eu={origin:`committed-cache`},Du={origin:`fresh`},Ou={origin:`visited-cache`};function ku(e){return{id:e.id,lane:e.lane,...e.navigationCommitKind===void 0?{}:{navigationCommitKind:e.navigationCommitKind},...e.navigationId===void 0?{}:{navigationId:e.navigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`pending`}}function Au(e){return e.skippedLayoutIds.length===0}function ju(e){return e.cacheEntryReuseProof!==void 0&&Au(e)}function Mu(e){switch(e.origin){case`committed-cache`:case`fresh`:return!1;case`visited-cache`:return!0;default:throw Error(`[vinext] Unknown App Router payload origin: `+String(e))}}function Nu(e){return ue($i(e))}function Pu(e){if(e.interception!==null)return e.routeId;let t=B.parseElementKey(e.routeId);return t?.kind!==`route`||t.interceptionContext===null?e.routeId:B.encodeRouteId(t.path,null)}function Fu(e,t=``){return e===null?null:H(new URL(e,`http://localhost`).pathname,t)}function Iu(e){let t=Lu(e),n=Bu(e.pending),r=Vu({pending:e.pending,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetSnapshot:n});if(e.pending.action.operation.navigationCommitKind===`detached`&&e.currentState.activeOperation?.navigationId===e.startedNavigationId&&e.currentState.activeOperation.navigationCommitKind===`authoritative`)return{disposition:`skip`,preserveElementIds:[],trace:G(W.staleOperation,t)};let i=e.currentState.activeOperation?.navigationId===e.startedNavigationId&&e.currentState.activeOperation.navigationCommitKind===`detached`&&e.pending.action.operation.navigationCommitKind===`authoritative`?e.pending.action.operation.startedVisibleCommitVersion:e.currentState.visibleCommitVersion,a=fs(r,{activeNavigationId:e.activeNavigationId,visibleCommitVersion:i});if(!a.authorized)return{disposition:`skip`,preserveElementIds:[],trace:G(W.staleOperation,t)};let o=Wu(Uu({currentState:e.currentState,pending:e.pending,routeManifest:e.routeManifest??null,targetHref:e.targetHref,targetSnapshot:n,token:a.token,traceFields:t}));return Gu({currentState:e.currentState,decision:o,pending:e.pending})}function Lu(e){return{...os({activeNavigationId:e.activeNavigationId,currentRootLayoutTreePath:e.currentState.rootLayoutTreePath,currentVisibleCommitVersion:e.currentState.visibleCommitVersion,nextRootLayoutTreePath:e.pending.rootLayoutTreePath,startedNavigationId:e.startedNavigationId,startedVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion}),...e.targetHref===void 0?{}:{targetHref:e.targetHref}}}function Ru(e){let t=[];for(let n of Ot(e)){let e=B.parseElementKey(n);e?.kind===`slot`&&t.push({ownerLayoutId:B.encodeLayoutId(e.treePath),slotId:n})}return t}function zu(e){let t=Kl(e.navigationSnapshot),n=e.interception?.targetMatchedUrl??Nu(e.navigationSnapshot.pathname);return{displayUrl:t,interception:e.interception,interceptionContext:e.interceptionContext,layoutIds:e.layoutIds,matchedUrl:n,mountedParallelSlots:Ru(e.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:Pu({interception:e.interception,routeId:e.routeId}),slotBindings:e.slotBindings}}function Bu(e){let t=Kl(e.action.navigationSnapshot),n=e.action.interception?.targetMatchedUrl??Nu(e.action.navigationSnapshot.pathname);return{displayUrl:t,interception:e.action.interception,interceptionContext:e.action.interceptionContext,layoutIds:e.action.layoutIds,matchedUrl:n,mountedParallelSlots:Ru(e.action.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:Pu({interception:e.action.interception,routeId:e.routeId}),slotBindings:e.action.slotBindings}}function Vu(e){return{baseVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion,deploymentVersion:null,graphVersion:e.routeManifest?.graphVersion??null,lane:e.pending.action.operation.lane,navigationId:e.startedNavigationId,operationId:e.pending.action.operation.id,targetSnapshotFingerprint:Hu(e.targetSnapshot)}}function Hu(e){return`${e.routeId}|root:${e.rootBoundaryId??`unknown`}`}function Uu(e){let t=e.pending.cacheEntryReuseProof;return K.plan({routeManifest:e.routeManifest,state:{nextOperationToken:e.token,traceFields:e.traceFields,visibleCommitVersion:e.currentState.visibleCommitVersion,visibleSnapshot:zu(e.currentState)},event:{kind:`flightResponseArrived`,result:{...t?{cacheEntryReuseProof:t}:{},...e.pending.restoredHistorySnapshot?{restoredHistorySnapshot:!0}:{},href:e.targetHref??e.targetSnapshot.displayUrl,targetSnapshot:e.targetSnapshot},token:e.token}})}function Wu(e){switch(e.kind){case`proposeCommit`:return{disposition:`dispatch`,preserveAbsentSlots:e.proposal.preserveAbsentSlots,preserveElementIds:e.proposal.preserveElementIds,preservePreviousSlotIds:e.proposal.preservePreviousSlotIds,trace:e.trace};case`hardNavigate`:return{disposition:`hard-navigate`,preserveElementIds:[],trace:e.trace};case`noCommit`:return{disposition:`skip`,preserveElementIds:[],trace:e.trace};case`requestWork`:throw Error(`[vinext] Root-boundary commit planning returned requestWork (${e.work.kind}); flightResponseArrived should never request work`);default:throw Error(`[vinext] Unknown navigation decision: `+String(e))}}function Gu(e){if(e.decision.disposition!==`dispatch`||e.pending.skippedLayoutIds.length===0)return e.decision;let t=new Set(e.currentState.layoutIds),n=new Set(e.pending.action.layoutIds),r=[...e.decision.preserveElementIds],i=new Set(r),a=[];for(let o of e.pending.skippedLayoutIds)i.has(o)||B.parseElementKey(o)?.kind===`layout`&&(!t.has(o)||!n.has(o)||Object.hasOwn(e.currentState.elements,o)&&(r.push(o),i.add(o),a.push(o)));if(a.length===0)return e.decision;let o=Ku({currentSlotBindings:e.currentState.slotBindings,preservePreviousSlotIds:e.decision.preservePreviousSlotIds,skippedLayoutIds:a,targetSlotBindings:e.pending.action.slotBindings});return{...e.decision,preserveElementIds:r,preservePreviousSlotIds:o}}function Ku(e){let t=$s({currentSlotBindings:e.currentSlotBindings,preservedLayoutIds:e.skippedLayoutIds,targetSlotBindings:e.targetSlotBindings});if(t.length===0)return e.preservePreviousSlotIds;let n=[...e.preservePreviousSlotIds],r=new Set(n);for(let e of t)r.has(e)||(n.push(e),r.add(e));return n}async function qu(e){let t=await e.nextElements,n=B.readMetadata(t),r=n.cacheEntryReuseProof??(Mu(e.payloadOrigin)?Xa(null):void 0),i=e.previousNextUrl===void 0?e.currentState.previousNextUrl:e.previousNextUrl,a=n.interception===null?null:i;return{action:{bfcacheIds:wa({current:e.currentState.bfcacheIds,currentElements:e.currentState.elements,currentPathname:e.currentState.navigationSnapshot.pathname,elements:t,nextPathname:e.navigationSnapshot.pathname,restored:e.restoredBfcacheIds,reuseCurrent:e.reuseCurrentBfcacheIds}),...r?{cacheEntryReuseProof:r}:{},elements:t,interception:n.interception,interceptionContext:n.interceptionContext,layoutIds:n.layoutIds,layoutFlags:n.layoutFlags,slotBindings:n.slotBindings,navigationSnapshot:e.navigationSnapshot,operation:ku({id:e.renderId,lane:e.operationLane,navigationCommitKind:e.navigationCommitKind,navigationId:e.navigationId,startedVisibleCommitVersion:e.currentState.visibleCommitVersion}),previousNextUrl:a,renderId:e.renderId,rootLayoutTreePath:n.rootLayoutTreePath,reuseCurrentBfcacheIds:e.reuseCurrentBfcacheIds??!0,routeId:n.routeId,skippedLayoutIds:n.skippedLayoutIds,type:e.type},...r?{cacheEntryReuseProof:r}:{},interception:n.interception,interceptionContext:n.interceptionContext,previousNextUrl:a,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId,skippedLayoutIds:n.skippedLayoutIds}}var Ju=Symbol(`ApprovedVisibleCommit`);function Yu(e,t){return Xu(t),ed(e,t)}function Xu(e){if(e[Ju]!==!0)throw Error(`[vinext] Visible router state mutation requires ApprovedVisibleCommit`)}function Zu(e,t){return{id:e.id,lane:e.lane,...e.navigationCommitKind===void 0?{}:{navigationCommitKind:e.navigationCommitKind},...e.navigationId===void 0?{}:{navigationId:e.navigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`committed`,visibleCommitVersion:t}}function Qu(e,t,n){let r=e.visibleCommitVersion+1;return{...t,activeOperation:Zu(n,r),visibleCommitVersion:r}}function $u(e,t,n,r){if(r.length===0)return t;let i=new Set(r),a=new Map;for(let t of e)i.has(t.slotId)&&a.set(t.slotId,t);let o=[],s=new Set;for(let e of t){let t=a.get(e.slotId);o.push(t??e),s.add(e.slotId)}for(let e of r){if(s.has(e))continue;let t=a.get(e);t&&o.push(t)}return ze(o,{layoutIds:n})}function ed(e,t){let{action:n}=t;switch(n.type){case`traverse`:case`navigate`:case`replace`:{let r=n.reuseCurrentBfcacheIds&&n.operation.lane!==`refresh`?t.decision.preserveElementIds.filter(t=>{let r=e.bfcacheIds[t];return r!==void 0&&n.bfcacheIds[t]===r}):[],i=new Set(r),a=n.reuseCurrentBfcacheIds?t.decision.preservePreviousSlotIds.filter(e=>{let t=n.slotBindings.find(t=>t.slotId===e);return t?.ownerLayoutId!==null&&t?.ownerLayoutId!==void 0&&i.has(t.ownerLayoutId)}):[],o=n.operation.lane===`hmr`?r.filter(e=>a.some(t=>n.slotBindings.find(e=>e.slotId===t)?.ownerLayoutId===e)):[],s=n.operation.lane===`hmr`&&e.routeId===n.routeId&&Object.hasOwn(e.elements,e.routeId)?[e.routeId,...o]:o,c=s.length>1?[...new Set(s)]:s,l=n.operation.lane===`hmr`?c:r,u=fi(e.elements,n.elements,{clearAbsentSlots:n.type===`traverse`||!n.reuseCurrentBfcacheIds,preserveAbsentSlots:n.reuseCurrentBfcacheIds&&t.decision.preserveAbsentSlots,preserveElementIds:l,preservePreviousSlotIds:a});return Qu(e,{bfcacheIds:Ta({elements:u,next:n.bfcacheIds,previous:n.reuseCurrentBfcacheIds?e.bfcacheIds:{}}),elements:u,interception:n.interception,interceptionContext:n.interceptionContext,layoutFlags:rd(e.layoutFlags,n.layoutFlags,l),layoutIds:n.layoutIds,navigationSnapshot:n.navigationSnapshot,previousNextUrl:n.previousNextUrl,renderId:n.renderId,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId,slotBindings:$u(e.slotBindings,n.slotBindings,n.layoutIds,a)},n.operation)}default:{let e=n.type;throw Error(`[vinext] Unknown router action: `+String(e))}}}function td(e){let t=Iu(e);switch(t.disposition){case`skip`:return{disposition:`no-commit`,trace:t.trace};case`hard-navigate`:return{disposition:`hard-navigate`,trace:t.trace};case`dispatch`:return nd(t.trace,t.preserveElementIds,t.preserveAbsentSlots,t.preservePreviousSlotIds);default:throw Error(`[vinext] Unknown navigation commit disposition: `+String(t))}}function nd(e=G(W.commitCurrent),t=[],n=!1,r=[]){return{disposition:`commit`,preserveAbsentSlots:n,preserveElementIds:[...t],preservePreviousSlotIds:[...r],trace:e}}function rd(e,t,n){let r={...t};for(let t of n){if(Object.hasOwn(r,t))continue;let n=e[t];n&&(r[t]=n)}return r}function id(e){return{[Ju]:!0,action:e.pending.action,decision:e.decision,interception:e.pending.interception,interceptionContext:e.pending.interceptionContext,previousNextUrl:e.pending.previousNextUrl,rootLayoutTreePath:e.pending.rootLayoutTreePath,routeId:e.pending.routeId}}function ad(e){return{operationLane:e.action.operation.lane,pendingOperationId:e.action.operation.id,startedVisibleCommitVersion:e.action.operation.startedVisibleCommitVersion}}function od(e,t,n){return cs(e,t,ad(n))}function sd(e,t){switch(e.disposition){case`commit`:return{...e,trace:od(e.trace,as.visibleCommit,t)};case`hard-navigate`:return{...e,trace:od(e.trace,as.hardNavigate,t)};case`no-commit`:return{...e,trace:od(e.trace,as.noCommit,t)};default:throw Error(`[vinext] Unknown commit decision: `+String(e))}}function cd(e){let{currentState:t,pending:n}=e;if(n.action.operation.lane!==`hmr`)throw Error(`[vinext] HMR visible commit approval requires an HMR pending operation`);let r=sd(td({activeNavigationId:n.action.operation.id,currentState:t,pending:n,routeManifest:e.routeManifest,startedNavigationId:n.action.operation.id,targetHref:e.targetHref}),n);return r.disposition===`commit`?{approvedCommit:id({decision:r,pending:n}),decision:r}:{approvedCommit:null,decision:r}}function ld(e){let t=sd(td({activeNavigationId:e.activeNavigationId,currentState:e.currentState,pending:e.pending,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref}),e.pending);switch(t.disposition){case`commit`:return{approvedCommit:id({decision:t,pending:e.pending}),decision:t};case`hard-navigate`:case`no-commit`:return{approvedCommit:null,decision:t};default:throw Error(`[vinext] Unknown commit decision: `+String(t))}}async function ud(e){let t=await qu({currentState:e.currentState,navigationCommitKind:void 0,navigationId:e.startedNavigationId,nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,payloadOrigin:e.payloadOrigin,previousNextUrl:e.previousNextUrl,renderId:e.renderId,type:e.type}),n=e.getCurrentStateForApproval?.()??e.currentState,r=ld({activeNavigationId:e.getActiveNavigationId?.()??e.activeNavigationId,currentState:n,pending:t,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref});return{approvedCommit:r.approvedCommit,decision:r.decision,pending:t,trace:r.decision.trace}}var dd=`__vinext_hard_navigation_target__`;function fd(e){try{return new URL(e,window.location.href).href}catch{return e}}function pd(){try{return window.sessionStorage.getItem(dd)}catch{return null}}function md(e){try{return window.sessionStorage.setItem(dd,e),window.sessionStorage.getItem(dd)===e}catch{return!1}}function hd(){try{window.sessionStorage.removeItem(dd)}catch{}}function gd(e,t=`assign`){let n=fd(e),r=fd(window.location.href);return pd()===n&&r===n?(hd(),console.error(`[vinext] Prevented repeated hard navigation to ${n}; leaving the current document in place to avoid a reload loop.`),!1):!md(n)&&r===n?(console.error(`[vinext] Hard navigation to ${n} requires a reload-loop guard, but sessionStorage is unavailable; leaving the current document in place.`),!1):(t===`replace`?window.location.replace(e):window.location.assign(e),!0)}function _d(e,t){let n=H(e.pathname,t),r=new URLSearchParams(e.search).toString();return r===``?n:`${n}?${r}`}function vd(e,t,n){try{let r=window.location.href;return _d(new URL(n,r),e)===Kl(t)}catch{return!1}}function yd(e={}){let t=e.basePath??``,n=e.commitClientNavigationState??$l,r=e.performHardNavigation??gd,i=e.getRouteManifest??(()=>null),a=e.syncHistoryStatePreviousNextUrl??(()=>{}),o=0,s=0,c=null,l=null,u=0,d=new Map,f=new Map,p=new Map,m=null,h=null,g=null,_=null,v=null,y=!1;function b(){if(!m)throw Error(`[vinext] Browser router state setter is not initialized`);return m}function x(){if(!h)throw Error(`[vinext] Browser router state is not initialized`);return h.current}function ee(){return h||y?Promise.resolve():(v||=new Promise(e=>{_=e}),v)}function S(){y=!0;let e=_;_=null,v=null,e?.()}function C(){return u+=1,s+=1,c=s,l=null,s}function w(){return s}function T(){return o+=1,o}function E(){return h!==null}function D(e){return e===s}function te(){let e=b();g&&!g.settled&&(g.settled=!0,g.resolve(x()));let t,n=new Promise(e=>{t=e});if(!t)throw Error(`[vinext] Failed to initialize browser router promise`);let r={promise:n,resolve:t,settled:!1};return g=r,e(n),r}function O(e){!e||e.settled||(e.settled=!0,e.resolve(x()),g===e&&(g=null))}function ne(e,t){O(t),D(e)&&(c=null,l=null,Zl(e))}function k(e,t){t&&p.set(e,t)}function A(e){for(let[t,r]of p)t>e||(p.delete(t),t===e?r():n(void 0,{releaseSnapshot:!0}))}function j(e,t){for(let[n,r]of d){if(n>e)continue;d.delete(n);let i=t&&n===e;i&&r.committedState!==null&&r.onCommittedState?.(r.committedState),r.resolve(i)}}function M(e){for(let[t,n]of f)t>e||(f.delete(t),Dn(n))}async function N(t,n){let i=++u,a=l===`navigation`;if(!E())return;let o=await qu({currentState:x(),nextElements:t,navigationSnapshot:n,operationLane:`hmr`,payloadOrigin:Du,renderId:T(),type:`replace`});if(i!==u||a||!E())return;let s=cd({currentState:x(),pending:o,routeManifest:e.getRouteManifest?.()??null,targetHref:Kl(n)});s.approvedCommit?ie(s.approvedCommit):s.decision.disposition===`hard-navigate`&&r(Kl(n))}function P({renderId:e,children:t}){return(0,R.useInsertionEffect)(()=>{M(e)},[e]),(0,R.useLayoutEffect)(()=>(A(e),j(e,!0),()=>{j(e,!1)}),[e]),t}function re(e,t,n,r){let i=b(),a=d.get(e),o=e=>(a&&(a.committedState=e),e);if(n){if(n.settled)return;let e=o(Yu(x(),t));n.settled=!0,n.resolve(e),g===n&&(g=null);return}if(r===`synchronous`){(0,Sr.flushSync)(()=>{i(o(Yu(x(),t)))});return}(0,R.startTransition)(()=>{i(o(Yu(x(),t)))})}function ie(e){b()(Yu(x(),e))}function ae(e){let t={id:e.renderId,lane:`traverse`,startedVisibleCommitVersion:e.currentState.visibleCommitVersion,state:`pending`};return{action:{bfcacheIds:e.restoredState.bfcacheIds,elements:e.restoredState.elements,interception:e.restoredState.interception,interceptionContext:e.restoredState.interceptionContext,layoutFlags:e.restoredState.layoutFlags,layoutIds:e.restoredState.layoutIds,navigationSnapshot:e.restoredState.navigationSnapshot,operation:t,previousNextUrl:e.restoredState.previousNextUrl,renderId:e.renderId,rootLayoutTreePath:e.restoredState.rootLayoutTreePath,reuseCurrentBfcacheIds:!1,routeId:e.restoredState.routeId,skippedLayoutIds:[],slotBindings:e.restoredState.slotBindings,type:`traverse`},interception:e.restoredState.interception,interceptionContext:e.restoredState.interceptionContext,previousNextUrl:e.restoredState.previousNextUrl,rootLayoutTreePath:e.restoredState.rootLayoutTreePath,routeId:e.restoredState.routeId,restoredHistorySnapshot:!0,skippedLayoutIds:[]}}function oe(e){if(!vd(t,e.state.navigationSnapshot,e.targetHref))return!1;let n=x(),r=ae({currentState:n,renderId:T(),restoredState:e.state}),a=ld({activeNavigationId:s,currentState:n,pending:r,routeManifest:i(),startedNavigationId:e.navId,targetHref:e.targetHref});return a.approvedCommit===null?!1:(e.beforeCommit?.(),ie(a.approvedCommit),!0)}function F(e){Da(e?.revalidation??`none`)&&e?.onDiscardedRevalidation?.()}async function se(e){e.navId===c&&(l=e.operationLane);let t=T(),a=En(e.targetHref);a&&f.set(t,a);let o,u=new Promise(n=>{o=n,d.set(t,{committedState:null,onCommittedState:e.onCommittedState,resolve:n})}),m=!1;try{let n=await qu({currentState:x(),navigationCommitKind:e.navigationCommitKind,navigationId:e.navId,nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,payloadOrigin:e.payloadOrigin,previousNextUrl:e.previousNextUrl,renderId:t,restoredBfcacheIds:e.restoredBfcacheIds,reuseCurrentBfcacheIds:e.reuseCurrentBfcacheIds,type:e.actionType}),c=ld({activeNavigationId:s,currentState:x(),pending:n,routeManifest:i(),startedNavigationId:e.navId,targetHref:e.targetHref});if(c.decision.disposition===`no-commit`)return O(e.pendingRouterState),f.delete(t),a&&Dn(a),d.delete(t),o?.(!1),br(e.scrollIntent??null),`no-commit`;if(c.decision.disposition===`hard-navigate`)return O(e.pendingRouterState),f.delete(t),d.delete(t),br(e.scrollIntent??null),r(e.targetHref)?`hard-navigate`:(a&&Dn(a),`no-commit`);let l=c.approvedCommit;if(l===null)throw Error(`[vinext] Commit decision did not approve a visible commit`);k(t,e.createNavigationCommitEffect({bfcacheIds:l.action.bfcacheIds,href:e.targetHref,historyUpdateMode:e.historyUpdateMode,navId:e.navId,params:e.params,previousNextUrl:l.previousNextUrl,targetHistoryIndex:e.targetHistoryIndex})),vr(e.scrollIntent,t),Hl(),m=!0,re(t,l,e.pendingRouterState,e.visibleCommitMode??`transition`)}catch(r){throw f.delete(t),p.delete(t),d.delete(t),m&&n(e.navId),O(e.pendingRouterState),o?.(!1),r}return u.then(e=>e?`committed`:`no-commit`)}async function ce(e,t,n,o,c){let l=o??x(),u=c?.startedNavigationId??s,d=c?.targetHref??window.location.href,{approvedCommit:f,decision:p,pending:m,trace:h}=await ud({activeNavigationId:s,currentState:l,getActiveNavigationId:()=>s,getCurrentStateForApproval:x,navigationSnapshot:t,nextElements:e,renderId:T(),operationLane:Ea(c?.revalidation??`none`),payloadOrigin:Du,startedNavigationId:u,routeManifest:i(),targetHref:d,type:`navigate`});if(p.disposition===`hard-navigate`){r(d);return}if(f){let e=ld({activeNavigationId:s,currentState:x(),pending:m,routeManifest:i(),startedNavigationId:u,targetHref:d});if(e.decision.disposition===`hard-navigate`){r(d);return}if(e.approvedCommit){let t=e.approvedCommit;(0,R.startTransition)(()=>{ie(t)}),a(t.previousNextUrl,t.action.bfcacheIds)}else F(c)}else p.disposition===`no-commit`&&F(c);if(n){if(!n.ok)throw n.data;return n.data}}function le(e,t){return m=e,h=t,S(),()=>{m===e&&(m=null),h===t&&(h=null,y=!1)}}return{beginNavigation:C,getActiveNavigationId:w,hasBrowserRouterState:E,getBrowserRouterState:x,isCurrentNavigation:D,performHardNavigation:r,waitForBrowserRouterStateReady:ee,attachBrowserRouterState:le,beginPendingBrowserRouterState:te,finalizeNavigation:ne,restoreHistorySnapshotVisibleState:oe,renderNavigationPayload:se,commitSameUrlNavigatePayload:ce,hmrReplaceTree:N,drainPrePaintEffects:A,clearCommittedNavigationFailureTargets:M,NavigationCommitSignal:P}}var bd=`__VINEXT_RSC_FORM_STATE__`;function xd(e){let t=e.__VINEXT_RSC_FORM_STATE__??null;return delete e[bd],t}function Sd(e){let t={formState:e.formState,...e.onRecoverableError?{onRecoverableError:e.onRecoverableError}:{},onUncaughtError:e.onUncaughtError};return e.onCaughtError?{...t,onCaughtError:e.onCaughtError}:t}function Cd(e){let t;if(e.startTransition(()=>{t=e.hydrateRoot(e.container,e.children,e.options)}),t===void 0)throw Error(`[vinext] React.startTransition did not synchronously start hydration`);return t}function wd(e){let t=new URL(e);return`${t.pathname}${t.search}${t.hash}`}function Td(e){if(!e||typeof e!=`object`)return e;let t={};for(let[n,r]of Object.entries(e))n===`__vinext_scrollX`||n===`__vinext_scrollY`||(t[n]=r);return Object.keys(t).length>0?t:null}var Ed=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){this.#t=e.readHistoryState,this.#n=e.readCurrentHref,this.#r=e.pushHistoryState,this.#i=e.replaceHistoryState,this.#a=e.readVisibleNavigationMetadata,this.#e=new Oo({initialHistoryState:e.initialHistoryState,maxHistoryStateSnapshots:e.maxHistoryStateSnapshots}),this.#o=zo(e.initialHistoryState)??0,this.#s=this.#o}get currentHistoryTraversalIndex(){return this.#o}allocateNavigationHistoryTraversalIndex(e){switch(e){case`push`:return this.#s+1;case`replace`:return this.#o;case void 0:return null;default:throw Error(`[vinext] Unknown history update mode: `+String(e))}}commitHistoryTraversalIndex(e){this.#o=e,e!==null&&(this.#s=Math.max(this.#s,e))}commitTraversalIndexFromHistoryState(e){this.commitHistoryTraversalIndex(zo(e))}resolveTraversalIntent(e){return Bo({currentHistoryIndex:this.#o,historyState:e})}readCurrentBfcacheVersionHistoryIds(e){return this.#e.readCurrentBfcacheVersionHistoryIds(e)}isCacheInvalidationGuarded(){return this.#e.isCacheInvalidationGuarded()}isCurrentBfcacheVersion(e){return this.#e.isCurrentBfcacheVersion(e)}beginCacheInvalidationGuard(){return this.#e.beginCacheInvalidationGuard()}invalidateRestorableClientState(){this.#e.invalidateClientState()}rememberHistoryStateSnapshot(e){this.#e.rememberHistoryStateSnapshot({historyIndex:this.#o,state:e})}commitHashOnlyNavigation(e,t,n){let r=this.allocateNavigationHistoryTraversalIndex(t),i=this.#t(),a=this.#a(),o=a?a.previousNextUrl:No(i),s=a?a.bfcacheIds:this.#e.readCurrentBfcacheVersionHistoryIds(i),c=jo(this.#c(t,n),{bfcacheIds:s,bfcacheVersion:s===null?void 0:this.#e.currentBfcacheVersion,previousNextUrl:o,traversalIndex:r});t===`replace`?this.#i(c,e):this.#r(c,e),this.commitHistoryTraversalIndex(r)}#c(e,t){if(e!==`replace`)return null;let n=this.#t();return t?Td(n):n}commitNavigationHistory(e){let t=this.#n(),n=new URL(t).origin,r=new URL(e.href,n).href,i=e.historyUpdateMode===`replace`,a=e.targetHistoryIndex===void 0?this.allocateNavigationHistoryTraversalIndex(e.historyUpdateMode):e.targetHistoryIndex,o=jo(i?this.#t():null,{bfcacheIds:e.bfcacheIds,bfcacheVersion:this.#e.currentBfcacheVersion,previousNextUrl:e.previousNextUrl,traversalIndex:a}),s=!1;e.historyUpdateMode===`replace`&&t!==r?(e.stageClientParams(),this.#i(o,e.href),s=!0,this.commitHistoryTraversalIndex(a)):e.historyUpdateMode===`push`&&t!==r&&(e.stageClientParams(),this.#r(o,e.href),s=!0,this.commitHistoryTraversalIndex(a)),s||(this.syncCurrentHistoryStatePreviousNextUrl(e.previousNextUrl,e.bfcacheIds),e.stageClientParams(),e.targetHistoryIndex!==void 0&&this.commitHistoryTraversalIndex(e.targetHistoryIndex))}syncCurrentHistoryStatePreviousNextUrl(e,t){if(this.#l(this.#t(),e,t))return;let n=jo(this.#t(),{bfcacheIds:t,bfcacheVersion:t===void 0?void 0:this.#e.currentBfcacheVersion,previousNextUrl:e});this.#i(n),!this.#l(this.#t(),e,t)&&this.#i(n)}#l(e,t,n){return No(e)===t&&(n===void 0||Dd(Fo(e),n)&&this.#e.isCurrentBfcacheVersion(e))}writeBootstrapHistoryMetadata(){this.#i(jo(this.#t(),{previousNextUrl:null,traversalIndex:this.#o}),wd(this.#n()))}writeHydratedHistoryMetadata(e){this.#i(jo(this.#t(),{bfcacheIds:e.bfcacheIds,bfcacheVersion:this.#e.currentBfcacheVersion,previousNextUrl:e.previousNextUrl,traversalIndex:this.#o}))}restoreHistorySnapshot(e){let t=this.#e.resolveHistoryStateSnapshotRestore(e.historyState);return t.kind===`skip`?!1:e.approveVisibleRestore({state:t.state,beforeCommit:()=>{this.commitHistoryTraversalIndex(t.targetHistoryIndex),e.stageClientParams(t.state.navigationSnapshot.params)}})}};function Dd(e,t){if(e===t)return!0;if(e===null||t===null)return!1;let n=Object.entries(e),r=Object.entries(t);return n.length===r.length?n.every(([e,n])=>t[e]===n):!1}var Od=30*6e4;function kd(e){return{createdAt:e.now,...e.elements?{elements:e.elements}:{},expiresAt:rl(e.now,e.response,e.fallbackTtlMs??3e5),mountedSlotsHeader:e.mountedSlotsHeader??null,params:e.params,response:e.response}}function Ad(e,t){return t.navigationKind===`refresh`?!1:t.navigationKind===`traverse`?t.now-e.createdAtt.now}function jd(e){return!!(e&&typeof e==`object`&&`__vinext_scrollY`in e)}function Md(e,t){let n=e.getActiveNavigationId();e.markScrollRestoreConsumed(n),e.restorePopstateScrollPosition(t,{shouldContinue:()=>e.isCurrentNavigation(n)})}function Nd(e){if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(e);return}queueMicrotask(e)}function Pd(e){return{direction:`unknown`,historyState:e,targetHistoryIndex:zo(e)}}function Fd(e){return t=>{e.notifyAppRouterTransitionStart(window.location.href);let n=e.getNavigate()?.(window.location.href,0,`traverse`,void 0,void 0,!1,Pd(t.state))??Promise.resolve(),r=e.getActiveNavigationId();e.setPendingNavigation(n);let i=jd(t.state),a=()=>e.isCurrentNavigation(r)&&!e.shouldSkipScrollRestore(r);i&&Nd(()=>{a()&&e.restorePopstateScrollPosition(t.state,{shouldContinue:a})}),n.finally(()=>{a()&&!i&&e.restorePopstateScrollPosition(t.state),e.getPendingNavigation()===n&&e.setPendingNavigation(null)})}}function Id(e){if(!s(e.errorBoundary))return!1;let t=e.errorBoundary.props;return s(t)&&t.isImplicitRootErrorBoundary===!0}function Ld(e,t){console.error(e),t?.componentStack&&console.error(`The above error occurred in a React component: -`+t.componentStack)}function Rd(e){if(typeof globalThis.reportError==`function`){globalThis.reportError(e);return}console.error(e)}function zd(){return e=>{Rd(e)}}function Bd(e){return(t,n)=>{if(!Kn(t)){if(Id(n)){e(t,n);return}Ld(t,n)}}}function Vd(e){Rd(e instanceof Error&&e.cause!==void 0?e.cause:e)}function Hd(){let e=`pending`,t=null,n=null,r=()=>{if(e!==`committed`&&e!==`complete`||t===null)return;let r=t;t=null,n=r()};return{commit(){e===`pending`&&(e=`committed`,r())},complete(){e===`committed`&&(e=`complete`)},fail(){e===`complete`||e===`invalidated`||(e=`invalidated`,t=null,n?.(),n=null)},invalidate(){e!==`invalidated`&&(e=`invalidated`,t=null,n?.(),n=null)},publish(n){e!==`invalidated`&&(t=n,r())}}}var Ud=new WeakMap,Wd=new Promise(()=>{});function Gd(e){return`${e.routeId}\0${e.interceptionContext??``}\0${e.mountedSlotsHeader??``}`}function Kd(e){return`${e.cacheKey}\0${e.interceptionContext??``}\0${e.mountedSlotsHeader??``}`}function qd(){return{catchAllChild:null,dynamicChild:null,optionalCatchAllChild:null,route:null,staticChildren:new Map}}function Jd(e){let t=qd();for(let n of e.segmentGraph.routes.values()){let e=t,r=n.patternParts;if(r.length===0){e.route??=n;continue}for(let[t,i]of r.entries()){let a=t===r.length-1;if(i.startsWith(`:`)&&i.endsWith(`+`)){a&&e.catchAllChild===null&&(e.catchAllChild={paramName:i.slice(1,-1),route:n});break}if(i.startsWith(`:`)&&i.endsWith(`*`)){a&&e.optionalCatchAllChild===null&&(e.optionalCatchAllChild={paramName:i.slice(1,-1),route:n});break}if(i.startsWith(`:`)){let t=i.slice(1);e.dynamicChild===null?e.dynamicChild={node:qd(),paramName:t}:e.dynamicChild.paramName,e=e.dynamicChild.node,a&&(e.route??=n);continue}let o=e.staticChildren.get(i);o===void 0&&(o=qd(),e.staticChildren.set(i,o)),e=o,a&&(e.route??=n)}}return t}function Yd(e){let t=Ud.get(e);if(t)return t;let n=Jd(e);return Ud.set(e,n),n}function Xd(e,t,n,r){if(n===t.length)return e.route===null?e.optionalCatchAllChild===null?null:{route:e.optionalCatchAllChild.route,params:na(r)}:{route:e.route,params:na(r)};let i=t[n],a=e.staticChildren.get(i);if(a!==void 0)return Xd(a,t,n+1,r);if(e.dynamicChild!==null){r.push([e.dynamicChild.paramName,i]);let a=Xd(e.dynamicChild.node,t,n+1,r);if(a!==null)return a;r.pop()}if(e.catchAllChild!==null){let i=na(r);return i[e.catchAllChild.paramName]=t.slice(n),{route:e.catchAllChild.route,params:i}}if(e.optionalCatchAllChild!==null){let i=na(r);return i[e.optionalCatchAllChild.paramName]=t.slice(n),{route:e.optionalCatchAllChild.route,params:i}}return null}function Zd(e,t){let n;try{n=new URL(e,`https://vinext.local`)}catch{return null}Vi(n);let r=H(Hi(n.pathname),t);return ea(r===``?`/`:r)}function Qd(e){let t=Zd(e.href,e.basePath);if(t===null)return null;let n=Xd(Yd(e.routeManifest),t,0,[]);return n===null?null:(ra(n.params),n)}function $d(e,t){for(let[n,r]of Object.entries(t))e[n]=r}function ef(e){let t={...e.match.params};for(let n of e.routeManifest.segmentGraph.slotBindings.values()){if(n.routeId!==e.match.route.id||n.state!==`active`)continue;let r=n.slotPatternParts;if(!r)continue;let i=_o(e.urlParts,r);i&&$d(t,i)}return t}function tf(e,t=0){if(t>100)return!1;if(Array.isArray(e))return e.some(e=>tf(e,t+1));if(!(0,R.isValidElement)(e))return!1;let n=Reflect.get(e,`props`);return e.type===R.Suspense&&s(n)&&Reflect.get(n,`fallback`)!=null?!0:s(n)?tf(Reflect.get(n,`children`),t+1):!1}function nf(e,t){let n=new Set;t.pageId&&Object.hasOwn(e,t.pageId)&&n.add(t.pageId);for(let r of t.slotIds){let t=B.parseElementKey(r);t?.kind===`slot`&&t.name===`children`&&Object.hasOwn(e,r)&&n.add(r)}for(let t of Object.keys(e))B.parseElementKey(t)?.kind===`page`&&n.add(t);return Array.from(n).sort()}function rf(){throw Wd}function af(e){let t=Qd({basePath:e.basePath,href:e.href,routeManifest:e.routeManifest});if(t===null||!e.allowLoadingShell&&!t.route.isDynamic||e.interceptionContext!==null)return null;let n=B.readMetadata(e.elements);if(n.interception!==null||n.interceptionContext!==null)return null;let r=e.elements[n.routeId];if(!e.allowLoadingShell&&!tf(r)||e.allowLoadingShell&&e.elements.__prefetchLoadingShell!==`LoadingBoundary`||e.allowLoadingShell&&r==null)return null;let i=nf(e.elements,t.route);return i.length===0?null:{elements:e.elements,mountedSlotsHeader:e.mountedSlotsHeader,pageElementIds:i,routeId:t.route.id}}function of(e){let t={...e.elements};for(let n of e.pageElementIds)t[n]=(0,R.createElement)(rf);return t}function sf(e){if(e.interceptionContext!==null)return null;let t=Zd(e.href,e.basePath);if(t===null)return null;let n=Qd({basePath:e.basePath,href:e.href,routeManifest:e.routeManifest});if(n===null)return null;let r=e.templates.get(Gd({interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeId:n.route.id}));return r===void 0||r.mountedSlotsHeader!==e.mountedSlotsHeader?null:{elements:of(r),params:ef({match:n,routeManifest:e.routeManifest,urlParts:t}),template:r}}var cf=/[\t\n\f\r ]+/;function lf(e,t){return e===null?!1:e.split(cf).some(e=>e.length>0&&e.toLowerCase()===t.toLowerCase())}function uf(e,t){for(let n of e.split(/\s+/)){if(n===t)return!0;try{let e=new URL(n,window.location.href),r=new URL(t,window.location.href);if(e.href===r.href)return!0}catch{}}return!1}function df(e){return lf(e.getAttribute(`rel`),`stylesheet`)&&e.hasAttribute(`href`)&&(e.hasAttribute(`data-precedence`)||e.hasAttribute(`precedence`))}function ff(){let e=document.head.querySelectorAll(`style[data-vinext-inline-css][data-href]`);if(e.length===0)return;let t=document.head.querySelectorAll(`link[rel][href]`);for(let n of t){if(!df(n))continue;let t=n.getAttribute(`href`);if(t)for(let r of e){let e=r.getAttribute(`data-href`);if(e&&uf(e,t)){n.remove();break}}}}var pf=o();function mf(e){return e}function hf(e,t){let n=t?.keyFn??((...e)=>e[0]),r=t?.cache??new Map;return mf(function(...t){let i=n(...t),a=r.get(i);if(a!==void 0)return a;let o=e.apply(this,t);return r.set(i,o),o})}function gf(e){return e.split(`$$cache=`)[0]}function _f(){globalThis.__vite_rsc_require__=e=>e.startsWith(`$$server:`)?(e=e.slice(9),globalThis.__vite_rsc_server_require__(e)):globalThis.__vite_rsc_client_require__(e)}var vf=!1;function yf(e){if(vf)return;vf=!0;let t=hf(t=>e.load(gf(t)));globalThis.__vite_rsc_client_require__=t,_f()}var bf=n((e=>{var t=i(),n={stream:!0},r=Object.prototype.hasOwnProperty;function a(e,t){if(e){var n=e[t[0]];if(e=n&&n[t[2]])n=e.name;else{if(e=n&&n[`*`],!e)throw Error(`Could not find the module "`+t[0]+`" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.`);n=t[2]}return t.length===4?[e.id,e.chunks,n,1]:[e.id,e.chunks,n]}return t}function o(e,t){var n=``,r=e[t];if(r)n=r.name;else{var i=t.lastIndexOf(`#`);if(i!==-1&&(n=t.slice(i+1),r=e[t.slice(0,i)]),!r)throw Error(`Could not find the module "`+t+`" in the React Server Manifest. This is probably a bug in the React Server Components bundler.`)}return r.async?[r.id,r.chunks,n,1]:[r.id,r.chunks,n]}var s=new Map;function c(e){var t=__vite_rsc_require__(e);return typeof t.then!=`function`||t.status===`fulfilled`?null:(t.then(function(e){t.status=`fulfilled`,t.value=e},function(e){t.status=`rejected`,t.reason=e}),t)}function l(){}function u(e){for(var t=e[1],n=[],r=0;rl||l===35||l===114||l===120?(u=l,l=3,c++):(u=0,l=3);continue;case 2:m=s[c++],m===44?l=4:d=d<<4|(96s.length&&(m=-1)}var h=s.byteOffset+c;if(-1{t.exports=bf()}))(),1);function Sf(e,t={}){return xf.createFromReadableStream(e,{callServer:wf,findSourceMapURL:Tf,...t})}function Cf(e,t={}){return xf.createFromFetch(e,{callServer:wf,findSourceMapURL:Tf,...t})}function wf(...e){return globalThis.__viteRscCallServer(...e)}function Tf(e,t){let n=new URL(`/__vite_rsc_findSourceMapURL`,import.meta.url);return n.searchParams.set(`filename`,e),n.searchParams.set(`environmentName`,t),n.toString()}var Ef={"0b874ad30386":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>bn),void 0);return{get default(){return e.default}}},"15c18cfaeeff":async()=>{let e=await Uc(()=>import(`./layout-segment-context-Bq1X1g2W.js`),__vite__mapDeps([0,1,2]));return{get LayoutSegmentProvider(){return e.LayoutSegmentProvider}}},"593f344dc510":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>qn),void 0);return{get ErrorBoundary(){return e.ErrorBoundary},get ForbiddenBoundary(){return e.ForbiddenBoundary},get GlobalErrorBoundary(){return e.GlobalErrorBoundary},get NotFoundBoundary(){return e.NotFoundBoundary},get RedirectBoundary(){return e.RedirectBoundary},get SerializedErrorBoundary(){return e.SerializedErrorBoundary},get UnauthorizedBoundary(){return e.UnauthorizedBoundary}}},"6efdf509a785":async()=>{let e=await Uc(()=>import(`./page-5ZnMML26.js`),__vite__mapDeps([3,1,2]));return{get default(){return e.default}}},"8c0f216c4604":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>Lr),void 0);return{get Children(){return e.Children},get ParallelSlot(){return e.ParallelSlot},get Slot(){return e.Slot}}},"9276801271d6":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>xr),void 0);return{get AppRouterScrollTarget(){return e.AppRouterScrollTarget}}},bad85346fc72:async()=>(await Uc(()=>Promise.resolve().then(()=>Ac),void 0),{})};Df();function Df(){yf({load:async e=>{{let t=Ef[e];if(!t)throw Error(`client reference not found '${e}'`);return t()}}})}function Of(e){return e===`traverse`?`traverse`:`navigate`}function kf(e){switch(e){case`navigate`:return`navigation`;case`refresh`:return`refresh`;case`traverse`:return`traverse`;default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}var Af=50,jf=Ai(),Mf=new Map,Nf=new Set,Pf=new Map;function Ff(){return window.__VINEXT_RSC_ROOT__||window.__VINEXT_RSC_BOOTSTRAP_STATE__?!1:(window.__VINEXT_RSC_BOOTSTRAP_STATE__=`starting`,!0)}function If(){window.__VINEXT_RSC_BOOTSTRAP_STATE__=`hydrated`}function Lf(){return w()?.bootstrap.routeManifest??null}var X=new Ed({initialHistoryState:window.history.state,maxHistoryStateSnapshots:50,readHistoryState:()=>window.history.state,readCurrentHref:()=>window.location.href,pushHistoryState:(e,t)=>eu(e,``,t),replaceHistoryState:(e,t)=>tu(e,``,t),readVisibleNavigationMetadata:()=>{if(!Qf())return null;let e=Zf();return{bfcacheIds:e.bfcacheIds,previousNextUrl:e.previousNextUrl}}}),Z=yd({basePath:``,getRouteManifest:Lf,syncHistoryStatePreviousNextUrl:(e,t)=>X.syncCurrentHistoryStatePreviousNextUrl(e,t)}),Rf={markNavigationSettled(){},markNavigationStart(){},schedule(){}},zf=Z.NavigationCommitSignal,Bf=`data-vinext-action-http-fallback`;function Vf(e){if(document.head.querySelectorAll(`meta[${Bf}="robots"]`).forEach(e=>e.remove()),e!==404)return;let t=document.createElement(`meta`);t.name=`robots`,t.content=`noindex`,t.setAttribute(Bf,`robots`),document.head.appendChild(t)}var Hf=en();function Uf(e){if(!e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}}function Wf(e){return e instanceof Promise}var Gf={},Q=new Map,$=0,Kf=new Uo,qf=new Promise(()=>{}),Jf=wn,Yf=null;function Xf(e,t,n){let r=!1;return(0,Sr.flushSync)(()=>{r=X.restoreHistorySnapshot({historyState:e,stageClientParams:np,approveVisibleRestore:({state:e,beforeCommit:r})=>Z.restoreHistorySnapshotVisibleState({beforeCommit:()=>{n?.(),r()},navId:t,state:e,targetHref:window.location.href})})}),r?($l(t,{releaseSnapshot:!1}),!0):!1}function Zf(){return Z.getBrowserRouterState()}function Qf(){return Z.hasBrowserRouterState()}function $f(){return Z.waitForBrowserRouterStateReady()}function ep(){return Z.beginPendingBrowserRouterState()}function tp(e){Gf=e,Jl(e)}function np(e){Gf=e,Yl(e)}function rp(){Q.clear()}function ip(){Tl(),Mf.clear(),Nf.clear(),Pf.clear()}function ap(){$+=1,rp(),ip(),X.invalidateRestorableClientState()}function op(e){if(!e)return null;try{let t=new URL(e,window.location.origin);return Vi(t),`${t.pathname}${t.search}`}catch{return null}}function sp(e,t){let n=op(e);return n===null?!1:t.some(e=>op(e)===n)}function cp(e){return e.outcome===`cache-seeded`&&e.pending===void 0&&e.snapshot!==void 0}function lp(e){let t=e.indexOf(`\0`);return t===-1?{interceptionContext:null,rscUrl:e}:{interceptionContext:e.slice(t+1),rscUrl:e.slice(0,t)}}async function up(e){let t=lp(e.cacheKey);if(t.interceptionContext!==e.interceptionContext||ol(e.entry)!==e.mountedSlotsHeader||e.interceptionContext!==null)return!1;let n=await Tp(Cf(Promise.resolve(jl(e.entry.snapshot)))),r=af({allowLoadingShell:e.entry.optimisticRouteShell===!0,basePath:``,elements:n,href:e.entry.snapshot.url||t.rscUrl,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeManifest:e.routeManifest});return r===null?!1:(Mf.set(Gd({interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeId:r.routeId}),r),!0)}async function dp(e){if(e.routeManifest===null)return;let t=[...Pf.values()];for(let[n,r]of q()){let i=Kd({cacheKey:n,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader});if(Nf.has(i)||Pf.has(i)||!cp(r)||r.prefetchKind===`route-tree`)continue;let a=up({cacheKey:n,entry:r,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeManifest:e.routeManifest}).then(e=>{e&&Nf.add(i)}).finally(()=>{Pf.delete(i)});Pf.set(i,a),t.push(a)}t.length!==0&&await Promise.allSettled(t)}function fp(e){let{bfcacheIds:t,href:n,historyUpdateMode:r,navId:i,params:a,previousNextUrl:o,targetHistoryIndex:s}=e;return()=>{if(!Z.isCurrentNavigation(i)){$l(void 0,{releaseSnapshot:!0});return}X.commitNavigationHistory({bfcacheIds:t,href:n,historyUpdateMode:r,previousNextUrl:o,stageClientParams:()=>np(a),targetHistoryIndex:s}),Dn(n),$l(i)}}async function pp(e,t,n,r,i,a,o,s,c,l=`navigate`,u=`navigation`,d=null,f=null,p=null,m=!0,h=`transition`,g,_){return Vf(null),Z.renderNavigationPayload({actionType:l,createNavigationCommitEffect:fp,historyUpdateMode:i,navigationSnapshot:t,nextElements:e,operationLane:u,payloadOrigin:c,params:a,pendingRouterState:s,previousNextUrl:o,scrollIntent:f,restoredBfcacheIds:p,reuseCurrentBfcacheIds:m,targetHistoryIndex:d===null?void 0:d.targetHistoryIndex,targetHref:n,navId:r,navigationCommitKind:_,visibleCommitMode:h,onCommittedState:g})}function mp(){for(;Q.size>=Af;){let e=Q.keys().next().value;if(e===void 0)return;Q.delete(e)}}function hp(e,t,n,r){let i=B.encodeCacheKey(e,t),a=Q.get(i);return a?{cacheKey:i,entry:a,facts:{candidate:`present`,fresh:Ad(a,{navigationKind:r,now:Date.now()}),mountedSlotsMatch:a.mountedSlotsHeader===n,navigationKind:r}}:{cacheKey:i,entry:null,facts:{candidate:`missing`,navigationKind:r}}}function gp(e,t){return e.entry===null?null:t.kind===`reuse`?(Q.delete(e.cacheKey),Q.set(e.cacheKey,e.entry),e.entry):(Q.delete(e.cacheKey),null)}function _p(e,t){Q.delete(B.encodeCacheKey(e,t))}function vp(e,t,n,r,i=Jc,a=n.mountedSlotsHeader??null,o){let s=B.encodeCacheKey(e,t);Q.delete(s),mp();let c=kd({fallbackTtlMs:i,elements:o,now:Date.now(),mountedSlotsHeader:a,params:r,response:n});return Q.set(s,c),El(e,n,t,a,i),()=>{Q.get(s)===c&&Q.delete(s),Dl(e,n,t)}}function yp(e){return`${window.location.origin}${Kl(e)}`}function bp(){let e=B.parseElementKey(Zf().routeId);return e?.kind===`route`?e.path:null}function xp(e,t,n,r){if(n!==void 0)return{interceptionContext:Fu(n,``),previousNextUrl:n};switch(e){case`navigate`:{let e=Zf().previousNextUrl;if(e!==null)return{interceptionContext:Fu(e,``),previousNextUrl:e};let n=xo({basePath:``,currentPathname:window.location.pathname,routeManifest:Lf(),targetPathname:t});if(n!==null)return{interceptionContext:n,previousNextUrl:window.location.pathname+window.location.search};let r=So({basePath:``,currentMatchedPathname:bp(),currentPathname:window.location.pathname,routeManifest:Lf(),targetPathname:t});return r===null?{interceptionContext:null,previousNextUrl:null}:{interceptionContext:r,previousNextUrl:window.location.pathname+window.location.search}}case`traverse`:{let e=No(r??window.history.state);return{interceptionContext:Fu(e,``),previousNextUrl:e}}case`refresh`:{let e=Zf().previousNextUrl;return{interceptionContext:Fu(e,``),previousNextUrl:e}}default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}function Sp(e){return typeof e==`object`&&!!e&&`kind`in e&&e.kind===`mpa-navigation`}function Cp(e,t){Kf.navigate(window,e,t)}function wp({children:e}){let t=_u();return(0,R.useEffect)(()=>{let e=e=>{let n=`reason`in e?e.reason:e.error;if(!vn(n))return;let r=yn(n.digest);r&&(e.preventDefault(),(0,R.startTransition)(()=>{r.type===`push`?t.push(r.url):t.replace(r.url)}))};return window.addEventListener(`error`,e),window.addEventListener(`unhandledrejection`,e),()=>{window.removeEventListener(`error`,e),window.removeEventListener(`unhandledrejection`,e)}},[t]),e??null}function Tp(e){return Promise.resolve(e).then(e=>B.decode(e))}function Ep({hydrationCachePublication:e,initialElements:t,initialNavigationSnapshot:n}){let r=(0,R.use)(t),i=B.readMetadata(r),[a,o]=(0,R.useState)(()=>({activeOperation:null,bfcacheIds:xa(r),elements:r,interception:i.interception,interceptionContext:i.interceptionContext,layoutIds:i.layoutIds,layoutFlags:i.layoutFlags,navigationSnapshot:n,previousNextUrl:null,renderId:0,rootLayoutTreePath:i.rootLayoutTreePath,routeId:i.routeId,slotBindings:i.slotBindings,visibleCommitVersion:0}));if(Sp(a))throw Cp(a.href,a.historyUpdateMode),qf;let s=Wf(a)?(0,R.use)(a):a,c=(0,R.useRef)(s);c.current=s,(0,R.useLayoutEffect)(()=>{let t=Z.attachBrowserRouterState(e=>{o(e)},c);return D({navigateExternal:(e,t)=>(o({href:e,historyUpdateMode:t,kind:`mpa-navigation`}),new Promise(()=>{}))}),e.commit(),()=>{e.invalidate(),D({navigateExternal:void 0}),t(),Rl(null)}},[e,o]),(0,R.useEffect)(()=>{e.complete();let t=performance.now();window.__VINEXT_HYDRATED_AT=t,window.__NEXT_HYDRATED=!0,window.__NEXT_HYDRATED_AT=t,window.__NEXT_HYDRATED_CB?.()},[e]),(0,R.useLayoutEffect)(()=>{X.rememberHistoryStateSnapshot(s)},[s]),(0,R.useEffect)(()=>{Bt(B.readMetadata(s.elements).sourcePage)},[s.elements]),(0,R.useLayoutEffect)(()=>{let e=zl(),t=kt(c.current.elements);if(Rl(t),ff(),e===t)return;let n=window.setTimeout(()=>{w()?.functions.pingVisibleLinks?.()},0);return()=>{window.clearTimeout(n)}},[s.elements]),(0,R.useLayoutEffect)(()=>{s.renderId===0&&X.writeHydratedHistoryMetadata({bfcacheIds:s.bfcacheIds,previousNextUrl:s.previousNextUrl})},[s.bfcacheIds,s.previousNextUrl,s.renderId]);let l=(0,R.createElement)(nr,null,(0,R.createElement)(zf,{renderId:s.renderId},(0,R.createElement)(zr.Provider,{value:s.elements},(0,R.createElement)(pi,{id:s.routeId})))),u=(0,R.useMemo)(()=>Ca({elements:s.elements,pathname:s.navigationSnapshot.pathname}),[s.elements,s.navigationSnapshot.pathname]),d=(0,R.createElement)(qr.Provider,{value:u},l),f=(0,R.createElement)(wp,null,Hf?(0,R.createElement)(Hf.Provider,{value:s.bfcacheIds},d):d),p=Lt?(0,R.createElement)(Lt.Provider,{value:gu},f):f,m=(0,R.createElement)(ar,{fallback:Jf,children:(0,R.createElement)(Fr,{commitId:s.renderId},p)}),h=Wl();return h?(0,R.createElement)(h.Provider,{value:s.navigationSnapshot},m):m}function Dp(e,t,n){fn({pathname:e,searchParams:new URLSearchParams(t),params:n})}function Op(e,t){let n=t?.shouldContinue??(()=>!0);if(!n())return;if(!(e&&typeof e==`object`&&`__vinext_scrollY`in e)){window.location.hash&&Ut(window.location.hash);return}let r=Number(e.__vinext_scrollY);Wt(`__vinext_scrollX`in e?Number(e.__vinext_scrollX):0,r,{minFrames:1,shouldContinue:n})}function kp(e){if(!Qf())return!1;let t=new URL(e,window.location.origin),n=Zf();return _d(t,``)===Kl(n.navigationSnapshot)}var Ap=!1,jp=`__vinext_rsc_initial_reload__`;function Mp(){try{return sessionStorage.getItem(jp)}catch{return null}}function Np(e){try{sessionStorage.setItem(jp,e)}catch{}}function Pp(){try{sessionStorage.removeItem(jp)}catch{}}function Fp(e){let t=window.location.pathname+window.location.search;return Mp()===t?(Pp(),console.error(`[vinext] Initial RSC fetch ${e} after reload; aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null):(Np(t),Mp()===t?(console.warn(`[vinext] Initial RSC fetch ${e}; reloading once to let the server render the HTML error page`),window.location.reload(),null):(console.error(`[vinext] Initial RSC fetch ${e}; sessionStorage unavailable so the reload-loop guard cannot persist — aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null))}async function Ip(){let e=xu(),t=w()?.bootstrap.rsc;if(t||e.__VINEXT_RSC_CHUNKS__||e.__VINEXT_RSC_DONE__){if(Pp(),hd(),t)return Lp(t),t.done?(E({rsc:void 0}),Cu(t.rsc)):Tu();let n=e.__VINEXT_RSC_PARAMS__??{};return e.__VINEXT_RSC_PARAMS__&&tp(e.__VINEXT_RSC_PARAMS__),e.__VINEXT_RSC_NAV__&&Dp(e.__VINEXT_RSC_NAV__.pathname,e.__VINEXT_RSC_NAV__.searchParams,n),Tu()}let n=Ui(),r=await fetch(await Gi(window.location.pathname+window.location.search,n),{credentials:`include`,headers:n});if(!r.ok)return Fp(`returned ${r.status}`);let i=r.headers.get(`content-type`)??``;if(!i.startsWith(`text/x-component`))return Fp(`returned non-RSC content-type "${i||`(missing)`}"`);if(!r.body)return Fp(`returned empty body`);Pp(),hd();let a=Uf(r.headers.get(k)),o=a??{};if(a)try{tp(a)}catch{}return Dp(window.location.pathname,window.location.search,o),r.body}function Lp(e){let t=e.params??{};e.params&&tp(e.params),e.nav&&Dp(e.nav.pathname,e.nav.searchParams,t)}async function Rp(){if(!Ff())return;let e=w()?.bootstrap.rsc,t=await Ip();t!==null&&zp(t,null,e)}function zp(e,t,n){let r=Hd(),i=$,[a,o]=e.tee(),s=Tp(Sf(a)),c=Gl(window.location.href,Gf),l=c.params,u=Kl(c),d=new Response(o).arrayBuffer();Promise.all([s,d]).then(async([e,t])=>{if(i!==$)return;let a=B.readMetadata(e);if(!Au(a))return;let o=kt(e),s=await Gi(u,Ui({mountedSlotsHeader:o}));if(i!==$)return;let c={compatibilityIdHeader:jf,buffer:t,contentType:wi,...n?.dynamicStaleTimeSeconds===void 0?{}:{dynamicStaleTimeSeconds:n.dynamicStaleTimeSeconds},mountedSlotsHeader:o,paramsHeader:encodeURIComponent(JSON.stringify(l)),renderedPathAndSearch:null,url:s},d=n?.initialCacheKind===`static`?Yc:Jc;r.publish(()=>i===$?ju(a)?vp(s,a.interceptionContext,c,l,d,o):vp(s,a.interceptionContext,c,l,d,o,e):()=>{})}).catch(()=>{}),X.writeBootstrapHistoryMetadata();let f=zd(),p=(...e)=>{r.fail(),f(...e)},m=Sd({formState:xd(xu()),onCaughtError:(e=>((...t)=>{r.fail(),e(...t)}))(Bd(p)),onRecoverableError:(...e)=>{r.fail(),Vd(...e)},onUncaughtError:p}),h=(0,R.createElement)(Ep,{hydrationCachePublication:r,initialElements:s,initialNavigationSnapshot:c}),g=document.querySelectorAll(`style[data-vinext-error-shell-style]`);if(document.documentElement.id===`__next_error__`){let{formState:e,...t}=m;for(let e of g)e.remove();(0,R.startTransition)(()=>{let e=(0,pf.createRoot)(document,t);e.render(h),window.__VINEXT_RSC_ROOT__=e})}else window.__VINEXT_RSC_ROOT__=Cd({children:h,container:document,hydrateRoot:pf.hydrateRoot,options:m,startTransition:R.startTransition});If();let _=null;function v(){_?.abort(),_=null}D({clearNavigationCaches:ap,commitHashNavigation:(e,t,n)=>X.commitHashOnlyNavigation(e,t,n),navigate:async function(e,t=0,n=`navigate`,r,i,a=!1,o,s,c=`transition`){v();let l=new AbortController;_=l;let u=null,d=Z.beginNavigation(),f=$;Rf.markNavigationStart();let p=e,m=r,h=i,g=t,y=!1,b=n===`traverse`?o??X.resolveTraversalIntent(window.history.state):null,x=(e,t)=>{br(s??null);let n=Z.performHardNavigation(e,t);return n||Dn(e),n},ee=n===`traverse`?X.readCurrentBfcacheVersionHistoryIds(b?.historyState??window.history.state):null,S=n!==`traverse`||!X.isCacheInvalidationGuarded()&&X.isCurrentBfcacheVersion(b?.historyState??window.history.state);try{let e=a;if(e&&Qf())u=ep();else{if(await $f(),!Z.isCurrentNavigation(d))return;e&&(u=ep())}for(;;){let e=new URL(p,window.location.origin),t=xp(n,e.pathname,h,b?.historyState),r=t.interceptionContext,i=t.previousNextUrl;n===`refresh`&&X.syncCurrentHistoryStatePreviousNextUrl(i,Zf().bfcacheIds),Xl(e.pathname,d);let a=Zf(),o=a.elements,v=kt(o),C=n===`navigate`?K.classifyEarlyNavigationIntent({basePath:``,currentHref:yp(a.navigationSnapshot),mode:`push`,scroll:!1,targetHref:e.href}):null,w=C?.kind===`flightNavigation`&&C.bypassNavigationCache,T=Ui({interceptionContext:r,mountedSlotsHeader:v}),E=await Gi(e.pathname+e.search,T),D=[],te=w?{cacheKey:B.encodeCacheKey(E,r),entry:null,facts:{candidate:`missing`,navigationKind:n}}:hp(E,r,v,n),O=gp(te,K.classifyVisitedResponseCacheCandidate(te.facts)),ne=O===null?{status:`unavailable`}:{status:`available`},k=K.classifyNavigationPrefetchProbe({bypassNavigationCache:w,navigationKind:n,visitedResponse:ne}),A=n===`navigate`?Lf():null,j=k.kind===`probe`&&dl(E,r,v,{additionalRscUrls:D,notifyInvalidation:!1}),M=K.classifyNavigationReuse({bypassNavigationCache:w,navigationKind:n,optimisticRouteShell:A===null?{reason:`routeManifestMissing`,status:`unavailable`}:{status:`available`},prefetch:j?{status:`available`}:{status:`unavailable`},targetHref:p,visitedResponse:ne});if(M.kind===`reuseVisitedResponse`&&O){let e=K.classifyRscFetchResult({clientCompatibilityId:jf,compatibilityIdHeader:O.response.compatibilityIdHeader??null,currentHref:p,effectiveHistoryUpdateMode:m??`replace`,hasBody:!0,isRscContentType:!0,origin:window.location.origin,redirectDepth:g,requestPreviousNextUrl:i,responseOk:!0,responseUrl:O.response.url,source:`cached`,streamedRedirectTarget:null});if(e.kind===`hardNavigate`){e.reason===`redirectDepthExhausted`&&console.error(`[vinext] Too many RSC redirects — aborting navigation to prevent infinite loop.`),x(e.url);return}if(e.kind===`followRedirect`){n===`traverse`&&(ee=null),p=e.redirect.href,m=e.redirect.historyUpdateMode,h=e.redirect.previousNextUrl,g=e.redirect.redirectDepth;continue}if(!Z.isCurrentNavigation(d))return;let t=O.params,a=Gl(p,t),o=O.elements?Promise.resolve(O.elements):Tp(Cf(Promise.resolve(jl(O.response))));if(!Z.isCurrentNavigation(d))return;if(await pp(o,a,p,d,m,t,i,y?null:u,O.elements?Eu:Ou,Of(n),kf(n),b,s,ee,S,c)===`no-commit`){if(!Z.isCurrentNavigation(d))return;_p(E,r);continue}return}let N,P,oe=null,F=M;if(M.kind===`consumePrefetch`){let e=await Fl(E,r,v,{additionalRscUrls:D,shouldConsume:()=>Z.isCurrentNavigation(d)});if(!Z.isCurrentNavigation(d))return;e&&(N=jl(e,!1),P=e.expiresAt,oe=sp(e.url,D)?E:e.url),N||(A=n===`navigate`?Lf():null,F=K.classifyNavigationReuse({bypassNavigationCache:w,navigationKind:n,optimisticRouteShell:A===null?{reason:`routeManifestMissing`,status:`unavailable`}:{status:`available`},prefetch:{status:`unavailable`},targetHref:p,visitedResponse:{status:`unavailable`}}))}if(!N&&F.kind===`attemptOptimisticRouteShell`){if(await dp({interceptionContext:r,mountedSlotsHeader:v,routeManifest:A}),!Z.isCurrentNavigation(d))return;if(A!==null){let e=sf({basePath:``,href:p,interceptionContext:r,mountedSlotsHeader:v,routeManifest:A,templates:Mf});if(e!==null){y=!0;let t=Gl(p,e.params);pp(Promise.resolve(e.elements),t,p,d,m,e.params,i,null,Du,Of(n),kf(n),b,s,ee,S,c,void 0,`detached`).catch(e=>{Z.isCurrentNavigation(d)&&console.error(`[vinext] Optimistic RSC navigation error:`,e)})}}}if(!N){if(n===`navigate`){let e=go(a);e!==null&&T.set(re,e)}N=await fetch(E,{headers:T,credentials:`include`,signal:l.signal})}if(!Z.isCurrentNavigation(d))return;let se=N.headers.get(`content-type`)??``,ce=N.headers.get(ie),le=N.headers.get(ae),ue=le===`push`||le===`replace`?le:null;if($o(N,ce))return;let I=K.classifyRscFetchResult({clientCompatibilityId:jf,compatibilityIdHeader:N.headers.get(Ci),currentHref:p,effectiveHistoryUpdateMode:m??`replace`,hasBody:N.body!==null,isRscContentType:se.startsWith(wi),origin:window.location.origin,redirectDepth:g,requestPreviousNextUrl:i,responseOk:N.ok,responseUrl:oe??N.url,source:`live`,streamedRedirectTarget:ce,streamedRedirectType:ue});if(I.kind===`hardNavigate`){I.discardBody&&N.body?.cancel().catch(()=>{}),I.reason===`redirectDepthExhausted`&&console.error(`[vinext] Too many RSC redirects — aborting navigation to prevent infinite loop.`),I.reason===`streamedRedirectLoop`&&console.error(`[vinext] RSC streamed redirect resolved to the current URL — aborting navigation to prevent infinite loop.`),x(I.url,I.hardNavigationMode);return}if(I.kind===`followRedirect`){I.discardBody&&N.body?.cancel().catch(()=>{}),n===`traverse`&&(ee=null),p=I.redirect.href,m=I.redirect.historyUpdateMode,h=I.redirect.previousNextUrl,g=I.redirect.redirectDepth;continue}let de=Uf(N.headers.get(`X-Vinext-Params`))??{},fe=Gl(p,de),pe=N.body;if(!pe)return;let[me,he]=pe.tee(),ge=new Response(me,{status:N.status,headers:N.headers}),L=new Response(he).arrayBuffer();if(L.catch(()=>{}),!Z.isCurrentNavigation(d))return;let _e=Tp(Cf(Promise.resolve(ge)));if(!Z.isCurrentNavigation(d))return;let ve=null;if(await pp(_e,fe,p,d,m,de,i,y?null:u,Du,Of(n),kf(n),b,s,ee,S,c,e=>{ve=e,_===l&&(_=null)},y?`authoritative`:void 0)!==`committed`)return;try{let e=await _e;if(f!==$)return;let t=B.readMetadata(e),n=await L;if(f!==$)return;let i=Ol(N,n,oe),{dynamicStaleTimeSeconds:a,...o}=i,s={...ju(t)?o:{...i,...i.dynamicStaleTimeSeconds===void 0&&t.dynamicStaleTimeSeconds!==void 0?{dynamicStaleTimeSeconds:t.dynamicStaleTimeSeconds}:{}},...P===void 0?{}:{expiresAt:P},mountedSlotsHeader:kt(e)},c=At(r,t.interceptionContext);if(ju(t)){if(f!==$)return;vp(E,c,s,de,Yc,v)}else if(ve!==null){let e=ve,t={...e.elements,[B.keys.layoutFlags]:e.layoutFlags,[B.keys.layoutIds]:e.layoutIds,[B.keys.skippedLayoutIds]:[],[B.keys.slotBindings]:e.slotBindings};if(f!==$)return;vp(E,c,s,de,Jc,v,t)}else{if(f!==$)return;El(E,s,c,v,Jc)}}catch{}return}}catch(e){if(!Z.isCurrentNavigation(d))return;Ap||console.error(`[vinext] RSC navigation error:`,e),x(K.classifyRscNavigationError({currentHref:p}).url)}finally{_===l&&(_=null),Z.finalizeNavigation(d,u),Rf.markNavigationSettled()}}});let y=Fd({getActiveNavigationId:Z.getActiveNavigationId.bind(Z),getPendingNavigation:()=>window.__VINEXT_RSC_PENDING__,getNavigate:()=>w()?.functions.navigate,isCurrentNavigation:Z.isCurrentNavigation.bind(Z),notifyAppRouterTransitionStart:e=>{Yi(e,`traverse`)},restorePopstateScrollPosition:Op,setPendingNavigation:e=>{window.__VINEXT_RSC_PENDING__=e},shouldSkipScrollRestore:e=>Yf===e});window.addEventListener(`popstate`,e=>{let t=window.location.href;if(kp(t)){Yi(t,`traverse`),X.commitTraversalIndexFromHistoryState(e.state),Op(e.state);return}let n=Z.beginNavigation();if(Xf(e.state,n,()=>{v(),Yi(t,`traverse`)})){window.__VINEXT_RSC_PENDING__=null,Md({getActiveNavigationId:()=>Z.getActiveNavigationId(),isCurrentNavigation:e=>Z.isCurrentNavigation(e),markScrollRestoreConsumed:e=>{Yf=e},restorePopstateScrollPosition:Op},e.state),Z.finalizeNavigation(n,null);return}Z.finalizeNavigation(n,null),y(e)})}typeof document<`u`&&(zt({appDir:!0,router:gu}),window.addEventListener(`pagehide`,()=>{Ap=!0}),window.addEventListener(`pageshow`,e=>{Ap=!1,e.persisted&&Kf.reset()}),Rp()),window.__VINEXT_LINK_PREFETCH_ROUTES__=[{canPrefetchLoadingShell:!1,patternParts:[],isDynamic:!1}],window.__VINEXT_PAGES_LINK_PREFETCH_ROUTES__=[],window.__VINEXT_CLIENT_REWRITES__={beforeFiles:[],afterFiles:[],fallback:[]},E({routeManifest:{graphVersion:`graph:f2f0b9d3b9a227f116a88f3d35aefe796a8d28d5976fdb5f83912b20a6409574`,segmentGraph:{routes:new Map([[`route:/`,{id:`route:/`,pattern:`/`,patternParts:[],isDynamic:!1,paramNames:[],rootParamNames:[],rootBoundaryId:`root-boundary:/`,pageId:`page:/`,routeHandlerId:null,layoutIds:[`layout:/`],templateIds:[],slotIds:[]}]]),pages:new Map([[`page:/`,{id:`page:/`,routeId:`route:/`,pattern:`/`}]]),routeHandlers:new Map([]),layouts:new Map([[`layout:/`,{id:`layout:/`,treePath:`/`,patternParts:[],paramNames:[],rootBoundaryId:`root-boundary:/`}]]),templates:new Map([]),slots:new Map([]),defaults:new Map([]),slotBindings:new Map([]),interceptions:new Map([]),interceptionsBySlotId:new Map([]),boundaries:new Map([]),rootBoundaries:new Map([[`root-boundary:/`,{id:`root-boundary:/`,layoutId:`layout:/`,treePath:`/`}]])}}});export{$t as t}; \ No newline at end of file +`.replace(/\n\s*/g,``);function Sn(){return(0,L.jsx)(`svg`,{width:`32`,height:`32`,viewBox:`-0.2 -1.5 32 32`,fill:`none`,style:V.icon,children:(0,L.jsx)(`path`,{d:`M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z`,fill:`var(--next-error-title)`})})}function Cn(){window.history.length>1?window.history.back():window.location.href=`/`}function wn({error:e}){let t=e?.digest,n=!!t,r=n?`A server error occurred. Reload to try again.`:`Reload to try again, or go back.`;return(0,L.jsxs)(`html`,{id:`__next_error__`,children:[(0,L.jsx)(`head`,{children:(0,L.jsx)(`style`,{dangerouslySetInnerHTML:{__html:xn}})}),(0,L.jsxs)(`body`,{children:[(0,L.jsx)(`div`,{style:V.container,children:(0,L.jsxs)(`div`,{style:V.card,children:[(0,L.jsx)(Sn,{}),(0,L.jsx)(`h1`,{style:V.title,children:`This page couldn’t load`}),(0,L.jsx)(`p`,{style:V.message,children:r}),(0,L.jsxs)(`div`,{style:V.buttonGroup,children:[(0,L.jsx)(`form`,{style:V.form,children:(0,L.jsx)(`button`,{type:`submit`,style:V.button,children:`Reload`})}),!n&&(0,L.jsx)(`button`,{type:`button`,style:V.buttonSecondary,onClick:Cn,children:`Back`})]})]})}),t&&(0,L.jsxs)(`p`,{style:V.digestFooter,children:[`ERROR `,t]})]})]})}function Tn(){return window.next?.__pendingUrl??null}function En(e){let t=Tn();return t===null?null:t.href===new URL(e,window.location.href).href?t:null}function Dn(e){if(window.next?.__pendingUrl!==void 0){if(e instanceof URL){if(window.next.__pendingUrl!==e)return}else if(e!==void 0&&window.next.__pendingUrl.href!==new URL(e,window.location.href).href)return;delete window.next.__pendingUrl}}function On(e){return!1}function kn(e,t){return t?e===t||e.startsWith(t+`/`):!1}function H(e,t){return kn(e,t)?e.slice(t.length)||`/`:e}var An=class{run(e,t,...n){return t(...n)}getStore(){}enterWith(){}exit(e,...t){return e(...t)}disable(){}},jn=globalThis,Mn=class{getStore(){}run(e,t,...n){return t(...n)}exit(e,...t){return e(...t)}enterWith(e){}disable(){}};function Nn(e){let t=Symbol.for(e);return jn[t]??=typeof An==`function`?new An:new Mn}Nn(`vinext.pprFallbackShell.als`),Nn(`vinext.pprFallbackShell.cacheTaskStack.als`);var Pn=Symbol.for(`vinext.clientNavigationState`),Fn=Symbol.for(`vinext.clientNavigationRenderContext`),In=``;function Ln(){return globalThis[Pn]}function Rn(){return Ln()?.cachedPathname??H(window.location.pathname,In)}function zn(){return dn()?.pathname??`/`}function Bn(e){let t=Ln();return t?(t.listeners.add(e),()=>t.listeners.delete(e)):()=>{}}function Vn(){let e=globalThis;return e[Fn]??=R.createContext(null)}function Hn(){let e=R.useContext(Vn()),t=R.useSyncExternalStore(Bn,Rn,zn);return e&&(Ln()?.navigationSnapshotActiveCount??0)>0?e.pathname:t}function Un(){if(!Lt||typeof R.useContext!=`function`)throw Error(`invariant expected app router to be mounted`);let e=R.useContext(Lt);if(e===null)throw Error(`invariant expected app router to be mounted`);return e}var Wn=`vinext:dev-error-recovery`;function Gn(e){return!e||typeof e!=`object`||!(`digest`in e)?null:String(e.digest)}function Kn(e){let t=Gn(e);return t===null?!1:t===`NEXT_NOT_FOUND`||t.startsWith(`NEXT_HTTP_ERROR_FALLBACK;`)||t.startsWith(`NEXT_REDIRECT;`)}var qn=e({DevRecoveryBoundary:()=>fr,ErrorBoundary:()=>ir,ErrorBoundaryInner:()=>rr,ForbiddenBoundary:()=>lr,ForbiddenBoundaryInner:()=>cr,GlobalErrorBoundary:()=>ar,NotFoundBoundary:()=>sr,RedirectBoundary:()=>nr,RedirectErrorBoundary:()=>tr,SerializedErrorBoundary:()=>Jn,UnauthorizedBoundary:()=>dr,UnauthorizedBoundaryInner:()=>ur});function Jn({fallback:e,error:t}){return(0,L.jsx)(e,{error:Object.assign(Error(t.message),{digest:t.digest,name:t.name??`Error`,stack:t.stack}),reset:()=>globalThis.location?.reload()})}function Yn(e){return e==null||e===``?null:e}function Xn(e){return{previousPathname:e.pathname,previousResetKey:Yn(e.resetKey)}}function Zn(e,t){let n=Yn(e.previousResetKey),r=Yn(t.previousResetKey);return n!==null||r!==null?n!==r:e.previousPathname!==t.previousPathname}function Qn(e){window.addEventListener(Wn,e)}function $n(e){window.removeEventListener(Wn,e)}function er({redirect:e,redirectType:t,reset:n}){let r=Un();return R.useEffect(()=>{R.startTransition(()=>{t===`push`?r.push(e):r.replace(e),n()})},[e,t,n,r]),null}var tr=class extends R.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if(vn(e)){if(`handled`in e&&e.handled)return{redirect:null,redirectType:null};let t=yn(e.digest);if(!t)throw e;return{redirect:t.url,redirectType:t.type}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return e!==null&&t!==null?(0,L.jsx)(er,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null,redirectType:null})}):this.props.children}};function nr({children:e}){return(0,L.jsx)(tr,{children:e})}var rr=class extends R.Component{constructor(e){super(e),this.state={error:null,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.error&&On(t.error.thrownValue)||t.error&&Zn(n,t)?{error:null,...n}:{error:t.error,...n}}static getDerivedStateFromError(e){if(Kn(e))throw e;return{error:{thrownValue:e}}}handleDevErrorRecovery=()=>{this.state.error&&this.setState({error:null,...Xn(this.props)})};componentDidMount(){Qn(this.handleDevErrorRecovery)}componentWillUnmount(){$n(this.handleDevErrorRecovery)}reset=()=>{this.setState({error:null})};render(){if(this.state.error){let e=this.props.fallback;return(0,L.jsx)(e,{error:this.state.error.thrownValue,reset:this.reset})}return this.props.children}};function ir({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(rr,{pathname:Hn(),resetKey:n,fallback:e,children:t})}function ar({fallback:e,children:t}){return(0,L.jsx)(rr,{pathname:Hn(),fallback:e,isImplicitRootErrorBoundary:e===wn,children:t})}var or=class extends R.Component{constructor(e){super(e),this.state={notFound:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.notFound&&Zn(n,t)?{notFound:!1,...n}:{notFound:t.notFound,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e){let t=String(e.digest);if(t===`NEXT_NOT_FOUND`||t===`NEXT_HTTP_ERROR_FALLBACK;404`)return{notFound:!0}}throw e}render(){return this.state.notFound?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function sr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(or,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var cr=class extends R.Component{constructor(e){super(e),this.state={forbidden:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.forbidden&&Zn(n,t)?{forbidden:!1,...n}:{forbidden:t.forbidden,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;403`)return{forbidden:!0};throw e}render(){return this.state.forbidden?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function lr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(cr,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var ur=class extends R.Component{constructor(e){super(e),this.state={unauthorized:!1,...Xn(e)}}static getDerivedStateFromProps(e,t){let n=Xn(e);return t.unauthorized&&Zn(n,t)?{unauthorized:!1,...n}:{unauthorized:t.unauthorized,...n}}static getDerivedStateFromError(e){if(e&&typeof e==`object`&&`digest`in e&&String(e.digest)===`NEXT_HTTP_ERROR_FALLBACK;401`)return{unauthorized:!0};throw e}render(){return this.state.unauthorized?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`meta`,{name:`robots`,content:`noindex`}),this.props.fallback]}):this.props.children}};function dr({fallback:e,children:t,resetKey:n}){return(0,L.jsx)(ur,{pathname:Hn(),resetKey:n,fallback:e,children:t})}var fr=class extends R.Component{constructor(e){super(e),this.state={error:null,previousResetKey:e.resetKey}}static getDerivedStateFromProps(e,t){return e.resetKey===t.previousResetKey?null:{error:null,previousResetKey:e.resetKey}}static getDerivedStateFromError(e){if(Kn(e))throw e;return{error:{thrownValue:e}}}handleDevErrorRecovery=()=>{this.state.error&&this.setState({error:null,previousResetKey:this.props.resetKey})};componentDidMount(){Qn(this.handleDevErrorRecovery)}componentWillUnmount(){$n(this.handleDevErrorRecovery)}componentDidCatch(){this.props.onCatch?.(this.props.resetKey)}render(){return this.state.error?null:this.props.children}},pr=Symbol.for(`vinext.appRouterScrollIntent`);function mr(){let e=globalThis;return e[pr]??={nextId:0,pending:null},e[pr]}function hr(e){let t=mr();t.nextId+=1;let n={commitId:null,hash:e,headElements:typeof document>`u`?null:new Set(document.head?.children??[]),id:t.nextId,targetHoistedInHead:!1};return t.pending=n,n}function gr(){mr().pending=null}function _r(){return mr().pending}function vr(e,t){let n=mr(),r=n.pending;e==null||r===null||r.id===e.id&&(n.pending={...r,commitId:t})}function yr(e,t){let n=mr(),r=n.pending;e==null||r===null||r.id===e.id&&r.commitId===t&&(n.pending={...r,targetHoistedInHead:!0})}function br(e,t){if(e==null)return null;let n=mr(),r=n.pending;return r===null||r.id!==e.id||t!==void 0&&r.commitId!==t?null:(n.pending=null,r)}var xr=e({AppRouterScrollCommitProvider:()=>Fr,AppRouterScrollTarget:()=>Ir,AppRouterScrollTargetInner:()=>Pr}),Sr=t(i(),1),Cr=R.createContext(null),wr=`__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,Tr=[`bottom`,`height`,`left`,`right`,`top`,`width`,`x`,`y`];function Er(){let e=Reflect.get(Sr,wr);if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`findDOMNode`);return typeof t==`function`?t:null}function Dr(e){let t=Er();if(!t)return null;let n=t(e);return n instanceof Element||n instanceof Text?n:null}function Or(e){let t=getComputedStyle(e).position;if(t===`fixed`||t===`sticky`)return!0;let n=e.getBoundingClientRect();return Tr.every(e=>n[e]===0)}function kr(e,t){let n=e.getClientRects();if(n.length===0)return!1;let r=1/0;for(let e of n)e.top=0&&r<=t}function Ar(e){let t=Vt(e.startsWith(`#`)?e.slice(1):e);return t===`top`?document.body:document.getElementById(t)??document.getElementsByName(t)[0]??null}function jr(e){let t=e.ownerDocument?.head;return t!=null&&t.contains(e)}function Mr(e){if(!(e instanceof Element)||jr(e))return null;let t=e;for(;!(t instanceof HTMLElement)||Or(t);){if(t.nextElementSibling===null)return null;t=t.nextElementSibling}return{kind:`element`,element:t}}function Nr(e,t){if(t!==null){e.scrollIntoView({behavior:`auto`});return}let n=document.documentElement,r=n.clientHeight;kr(e,r)||(n.scrollTop=0,kr(e,r)||e.scrollIntoView({behavior:`auto`,block:`start`,inline:`nearest`}))}var Pr=class extends R.Component{scheduledCommitId=null;schedulePotentialScroll=()=>{let e=this.props.commitId;this.scheduledCommitId=e,queueMicrotask(()=>{this.scheduledCommitId===e&&this.handlePotentialScroll()})};handlePotentialScroll=()=>{let e=_r();if(e===null||this.props.commitId===null||e.commitId!==this.props.commitId)return;let t;if(t=e.hash===null?null:Ar(e.hash),t===null){t=Dr(this);let n=t instanceof Element?t:t?.parentElement;if(t!==null&&n!=null&&jr(t)&&!e.headElements?.has(n)){yr(e,this.props.commitId);return}}let n=Mr(t);if(n===null)return;let r=n.element,i=br(e,this.props.commitId);i!==null&&(Nr(r,i.hash),r.focus())};componentDidMount(){this.schedulePotentialScroll()}componentDidUpdate(){this.schedulePotentialScroll()}componentWillUnmount(){this.scheduledCommitId=null}render(){return this.props.children}};function Fr({children:e,commitId:t}){return(0,L.jsx)(Cr.Provider,{value:t,children:e})}function Ir({children:e}){return(0,L.jsx)(Pr,{commitId:R.useContext(Cr),children:e})}var Lr=e({BfcacheStateKeyMapContext:()=>qr,Children:()=>mi,ChildrenContext:()=>Br,ElementsContext:()=>zr,ParallelSlot:()=>hi,ParallelSlotsContext:()=>Vr,Slot:()=>pi,UNMATCHED_SLOT:()=>Ne,mergeElements:()=>fi,updateBfcacheSlotEntryOrder:()=>Zr}),Rr=Object.freeze({}),zr=R.createContext(Rr),Br=R.createContext(null),Vr=R.createContext(null),Hr=en(),Ur=tn(),Wr=Object.freeze({}),Gr=3,Kr=1,qr=R.createContext(Wr);function Jr(){return!1}function Yr(){return Jr()?Gr:Kr}function Xr(e){return Number.isFinite(e)?Math.max(1,Math.trunc(e)):1}function Zr(e,t,n=Yr()){let r=Xr(n),i=[t];for(let n of e){if(i.length>=r)break;n!==t&&i.push(n)}return i}function Qr(e,t){let n=new Set(t);for(let t of e.keys())n.has(t)||e.delete(t)}function $r(e,t){if(e.length!==t.length)return!1;for(let n=0;n0&&t.every(e=>e===`s`||e===`d`)}function ti(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`schemaVersion`in e&&`appElementsSchemaVersion`in e&&`rscPayloadSchemaVersion`in e&&`graphVersion`in e&&`deploymentVersion`in e&&`rootBoundaryId`in e&&`renderEpoch`in e}function ni(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`ownerLayoutId`in e&&`slotId`in e&&`state`in e}function ri(e){return Array.isArray(e)&&e.length>0&&e.every(ni)}function ii(e,t){return e===`__skippedLayoutIds`&&Array.isArray(t)&&t.every(e=>typeof e==`string`)}function ai(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`sourceMatchedUrl`in e&&typeof e.sourceMatchedUrl==`string`&&`sourceRouteId`in e&&typeof e.sourceRouteId==`string`&&`slotId`in e&&typeof e.slotId==`string`&&`targetMatchedUrl`in e&&typeof e.targetMatchedUrl==`string`&&`targetRouteId`in e&&typeof e.targetRouteId==`string`}function oi(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:`kind`in e&&e.kind===`runtime-cache-entry`&&`decision`in e}function si(e,t){return ei(t)||ti(t)||oi(t)||ai(t)||ii(e,t)||ri(t)}function ci({entry:e,fallbackElements:t,fallbackSegmentId:n,fallbackStateKeyMap:r,SegmentContext:i}){return(0,L.jsx)(qr.Provider,{value:e.stateKeyMap??r,children:(0,L.jsx)(zr.Provider,{value:e.elements??t,children:(0,L.jsx)(i.Provider,{value:e.segmentId??n,children:e.content})})})}function li(e){let t=R.useRef(new Map),[n,r]=R.useState(()=>[e.stateKey]);t.current.set(e.stateKey,e);let i=Zr(n,e.stateKey),a=!$r(n,i),o=a?i:n;return Qr(t.current,o),a&&r(i),o.map(e=>t.current.get(e)).filter(e=>e!==void 0)}function ui({activeStateKey:e,content:t,elements:n,id:r,SegmentContext:i,stateKeyMap:a}){return(0,L.jsx)(L.Fragment,{children:li({content:t,elements:n,segmentId:r,stateKey:e,stateKeyMap:a}).map(t=>(0,L.jsx)(R.Activity,{mode:t.stateKey===e?`visible`:`hidden`,children:(0,L.jsx)(ci,{entry:t,fallbackElements:n,fallbackSegmentId:r,fallbackStateKeyMap:a,SegmentContext:i})},t.stateKey))})}function di({content:e,id:t}){let n=Ur,r=R.useContext(zr),i=R.useContext(qr),a=i[t];return n?a===void 0||!Jr()?(0,L.jsx)(n.Provider,{value:t,children:e}):(0,L.jsx)(ui,{activeStateKey:a,content:e,elements:r,id:t,SegmentContext:n,stateKeyMap:i}):(0,L.jsx)(L.Fragment,{children:e})}function fi(e,t,n={}){let r=typeof n==`boolean`?n:n.clearAbsentSlots??!1,i=typeof n==`boolean`?!n:n.preserveAbsentSlots??!0,a=typeof n==`boolean`?[]:n.preserveElementIds??[],o=typeof n==`boolean`?[]:n.preservePreviousSlotIds??[],s={...t};for(let t of a)if(Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(s[t]=n)}let c=new Set([...Object.keys(e),...Object.keys(t)].filter(e=>B.isSlotId(e)));if(r)for(let e of c)Object.hasOwn(t,e)||delete s[e];else if(i){for(let t of c)if(!Object.hasOwn(s,t)&&Object.hasOwn(e,t)){let n=e[t];n!==void 0&&(s[t]=n)}}for(let t of o){if(!B.isSlotId(t)||!Object.hasOwn(e,t))continue;let n=e[t];n!==void 0&&n!==Ne&&(s[t]=n)}return s}function pi({id:e,children:t,parallelSlots:n}){let r=R.useContext(zr);if(!Object.hasOwn(r,e))return null;let i=r[e];if(si(e,i)||(i===Ne&&_n(),i===null))return null;let a=(0,L.jsx)(Vr.Provider,{value:n??null,children:(0,L.jsx)(Br.Provider,{value:t??null,children:i})});return Hr&&Ur?(0,L.jsx)(di,{id:e,content:a}):a}function mi(){return R.useContext(Br)}function hi({name:e}){return R.useContext(Vr)?.[e]??null}var gi=`navigation`,_i=`prefetch-dynamic-shell`,vi=`prefetch-loading-shell`;function yi(e){switch(e){case _i:return _i;case vi:return vi;default:return gi}}var bi=`x-deployment-id`;function xi(e,t=void 0){t&&e.set(bi,t)}var Si=`_rsc`,Ci=`X-Vinext-RSC-Compatibility-Id`,wi=`text/x-component`;[`RSC`,oe,F,se,ce,N,A,P].join(`, `);var Ti=12,Ei=new TextEncoder;function Di(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function Oi(e){return e??`0`}function ki(e){return e&&e.length>0?e:null}function Ai(){return ki(`47ae2e23-b9c0-47dc-b96e-3b0919b4342b`)}function ji(e,t=Ai()){let n=ki(e),r=ki(t);return r===null||n!==null&&n===r}function Mi(e,t,n){if(!e)return t;let r=new URL(e,n);Vi(r);let i=new URL(t,n),a=Hi(r.pathname);i.pathname.length>1&&i.pathname.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`);let o=a+r.search;return i.hash&&(o+=i.hash),o}function Ni(e){return ji(e.responseCompatibilityId,e.clientCompatibilityId)?{kind:`compatible`}:{hardNavigationTarget:Mi(e.responseUrl,e.currentHref,e.origin),kind:`hard-navigate`}}function Pi(e){let t=yi(e);return t===`navigation`?null:t}function Fi(e,t={}){let n=[e.get(F),e.get(se),e.get(oe),e.get(ce),e.get(N),e.get(A),...t.includeRenderModeHeader===!1?[]:[Pi(e.get(P))]];return n.every(e=>e===null)?null:n.map(Oi).join(`,`)}async function Ii(e){let t=await globalThis.crypto.subtle.digest(`SHA-256`,Ei.encode(e));return Di(new Uint8Array(t).subarray(0,Ti))}function Li(e){return(e.search.startsWith(`?`)?e.search.slice(1):e.search).split(`&`).filter(e=>e.length>0&&!Ri(e))}function Ri(e){let t=e.indexOf(`=`),n=t===-1?e:e.slice(0,t);try{return decodeURIComponent(n.replaceAll(`+`,` `))===Si}catch{return n===Si}}async function zi(e){let t=Fi(e);return t===null?``:Ii(t)}function Bi(e,t){let n=Li(e);n.push(t.length>0?`${Si}=${t}`:Si),e.search=`?${n.join(`&`)}`}function Vi(e){let t=Li(e);e.search=t.length>0?`?${t.join(`&`)}`:``}function Hi(e){return e.endsWith(`.rsc`)?e.slice(0,-4):e}function Ui(e={}){let t=new Headers({Accept:wi,RSC:`1`});xi(t),e.interceptionContext!==void 0&&e.interceptionContext!==null&&t.set(N,e.interceptionContext),e.mountedSlotsHeader!==void 0&&e.mountedSlotsHeader!==null&&t.set(A,e.mountedSlotsHeader),e.clientReuseManifestHeader!==void 0&&e.clientReuseManifestHeader!==null&&t.set(re,e.clientReuseManifestHeader);let n=e.renderMode??`navigation`;return n!==`navigation`&&t.set(P,n),t}function Wi(e){let t=e.indexOf(`#`);return t===-1?e:e.slice(0,t)}async function Gi(e,t){let n=new URL(Wi(e),`http://vinext.local`);return Bi(n,await zi(t)),`${n.pathname}${n.search}`}var Ki=null;function qi(e){return Object.values(e).some(e=>typeof e==`function`)?e:null}function Ji(e){return Ki=e,Ki}function Yi(e,t){Ki?.onRouterTransitionStart?.(e,t)}Ji(qi(e({})));var Xi=/([/#?\\]|%(2f|23|3f|5c))/gi;function Zi(e){return e.replace(Xi,e=>encodeURIComponent(e))}function Qi(e){try{return Zi(decodeURIComponent(e))}catch{return e}}function $i(e){return e.split(`/`).map(e=>Qi(e)).join(`/`)}function ea(e){return $i(e).split(`/`).filter(Boolean)}function ta(e){try{return decodeURIComponent(e)}catch{return e}}function na(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}function ra(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(ta):e[t]=ta(n)}}function ia(e){return!!(e===`.`||e.startsWith(`(`)&&e.endsWith(`)`)||e.startsWith(`@`))}function aa(e){return e.split(`/`).filter(Boolean)}function oa(e){return e.startsWith(`[...`)&&e.endsWith(`]`)&&e.length>5}function sa(e){return e.startsWith(`[[...`)&&e.endsWith(`]]`)&&e.length>7}function ca(e,t){let n=0;for(let r of e){if(oa(r)||sa(r))return Math.max(n,t);n+=1}return n}var la=`_b_0_`,ua=0;function da(e){let t=/^_b_(\d+)_$/.exec(e);t&&(ua=Math.max(ua,Number(t[1])))}function fa(){return ua+=1,`_b_${ua}_`}function pa(e){return aa(e).filter(e=>!ia(e))}function ma(e,t){let n=aa(e),r=ca(pa(t),n.length);return r===0?`/`:`/${n.slice(0,r).join(`/`)}`}function ha(e){let t=new Map;for(let n of e.slotBindings)t.set(n.slotId,n);return{metadata:e,slotBindingsBySlotId:t}}function ga(e){let t;try{t=B.readMetadata(e)}catch{return null}return ha(t)}function _a(e){let t=B.parseElementKey(e);return t!==null&&t.kind!==`route`?t:null}function va(e,t){let n=t?.slotBindingsBySlotId.get(e);if(n?.activeRouteId!=null)return`${e}@${n.activeRouteId}`;let r=t?.metadata.interception;return r?.slotId===e?`${e}@${r.targetRouteId}`:null}function ya(e,t,n){if(t.kind===`page`)return`${e}@${n.pathname}`;if(t.kind===`slot`){let r=va(e,n.metadata);return r===null?`${e}@${ma(n.pathname,t.treePath)}`:r}return t.kind===`layout`||t.kind===`template`?`${e}@${ma(n.pathname,t.treePath)}`:null}function ba(e,t=ga(e)){let n=new Set(Object.keys(e));for(let e of t?.metadata.layoutIds??[])n.add(e);return n}function xa(e){let t={};for(let n of ba(e))_a(n)!==null&&(t[n]=`0`);return t}function Sa(e){let t=ue($i(e));return t.length>1?t.replace(/\/$/,``):t}function Ca(e){let t=ga(e.elements),n=Sa(e.pathname),r={};for(let i of ba(e.elements,t)){let e=_a(i);if(e===null)continue;let a=ya(i,e,{metadata:t,pathname:n});a!==null&&(r[i]=a)}return r}function wa(e){let t=e.reuseCurrent===!1?{}:e.current;for(let e of Object.values(t))da(e);for(let t of Object.values(e.restored??{}))da(t);let n=ga(e.currentElements),r=ga(e.elements),i=Sa(e.currentPathname),a=Sa(e.nextPathname),o={};for(let s of ba(e.elements,r)){let c=_a(s);if(c===null)continue;let l=ya(s,c,{metadata:n,pathname:i})===ya(s,c,{metadata:r,pathname:a})?t[s]:void 0,u=e.restored?.[s]??l??fa();o[s]=u,da(u)}return o}function Ta(e){let t={};for(let n of ba(e.elements)){if(_a(n)===null)continue;let r=e.next[n]??e.previous[n];r!==void 0&&(t[n]=r,da(r))}return t}function Ea(e){return e===`none`?`server-action`:`refresh`}function Da(e){return e!==`none`}function Oa(e,t){let n=0,r=e.length;for(;n=0?null:U(`CP_INVALID_VARIANT_BUDGET`,{budgetField:e})}function Ba(e){return za(`maxDimensionCount`,e.maxDimensionCount)??za(`maxDimensionNameLength`,e.maxDimensionNameLength)??za(`maxDimensionValueLength`,e.maxDimensionValueLength)??za(`maxEncodedLength`,e.maxEncodedLength)??za(`maxValuesPerDimension`,e.maxValuesPerDimension)??za(`maxVariantsPerRoute`,e.maxVariantsPerRoute)}function Va(e,t){let n=Ma(e.name);if(n.length===0)return U(`CP_DIMENSION_NAME_MISSING`,{source:e.source});if(n.length>t.maxDimensionNameLength)return U(`CP_DIMENSION_NAME_TOO_LONG`,{maxLength:t.maxDimensionNameLength,nameHash:Na(n),source:e.source});if(e.privacy===`public`&&Aa.has(e.source))return U(`CP_UNSAFE_PUBLIC_DIMENSION`,{name:n,source:e.source},`privateUncacheable`);let r=ja(e.values);if(r.length===0)return U(`CP_DIMENSION_VALUES_MISSING`,{name:n,source:e.source});if(r.length>t.maxValuesPerDimension)return U(`CP_DIMENSION_VALUE_COUNT_EXCEEDED`,{maxValues:t.maxValuesPerDimension,name:n,source:e.source,valueCount:r.length});for(let i of r)if(i.length>t.maxDimensionValueLength)return U(`CP_DIMENSION_VALUE_TOO_LONG`,{maxLength:t.maxDimensionValueLength,name:n,source:e.source,valueHash:Na(i)});let i=r.map(Na);return{encoded:Pa([e.source,e.privacy,n,i]),name:n,privacy:e.privacy,source:e.source,valueCount:i.length,valueHashes:i}}function Ha(e){return`code`in e}function Ua(e,t,n){let r=e.get(t),i=r??new Map;r||e.set(t,i);let a=i.get(n),o=a??new Map;return a||i.set(n,o),o}function Wa(e){let t=new Map,n=[];for(let r of e){let e=Ma(r.name),i=Ua(t,r.source,r.privacy),a=i.get(e);if(a){a.values.push(...r.values);continue}let o={name:e,privacy:r.privacy,source:r.source,values:[...r.values]};i.set(e,o),n.push(o)}return n}function Ga(e){let t=Ba(e.budget);if(t)return{kind:`breakerFallback`,fallback:t};let n=Wa(e.dimensions);if(n.length>e.budget.maxDimensionCount)return{kind:`breakerFallback`,fallback:U(`CP_DIMENSION_COUNT_EXCEEDED`,{dimensionCount:n.length,maxDimensionCount:e.budget.maxDimensionCount,routeId:e.output.routeId})};let r=[];for(let t of n){let n=Va(t,e.budget);if(Ha(n))return{kind:`breakerFallback`,fallback:n};r.push(n)}r.sort(Fa);let i=[`schema:1`,Ra(e.output),...r.map(e=>e.encoded)].join(`|`);return i.length>e.budget.maxEncodedLength?{kind:`breakerFallback`,fallback:U(`CP_ENCODED_VARIANT_TOO_LONG`,{encodedHash:Na(i),encodedLength:i.length,maxEncodedLength:e.budget.maxEncodedLength,routeId:e.output.routeId})}:{kind:`variant`,variant:{schemaVersion:1,cacheKey:`cp1:${de(i)}`,output:e.output,dimensions:r,encodedLength:i.length,budget:{...e.budget}}}}function Ka(e){return{routeId:e.routeId,variantCacheKeys:ja(e.variantCacheKeys)}}function qa(e,t){return U(`CP_ROUTE_VARIANT_CEILING_EXCEEDED`,{existingVariantCount:t,maxVariantsPerRoute:e.budget.maxVariantsPerRoute,routeId:e.output.routeId},`privateUncacheable`,`route`)}function Ja(e){if(e.routeBudget&&e.routeBudget.routeId!==e.variant.output.routeId)return{kind:`breakerFallback`,routeBudget:Ka(e.routeBudget),fallback:U(`CP_ROUTE_VARIANT_BUDGET_ROUTE_MISMATCH`,{budgetRouteId:e.routeBudget.routeId,routeId:e.variant.output.routeId},`privateUncacheable`,`route`)};let t=Ka(e.routeBudget??{routeId:e.variant.output.routeId,variantCacheKeys:[]}),n=t.variantCacheKeys.length,r=Oa(t.variantCacheKeys,e.variant.cacheKey);return n>e.variant.budget.maxVariantsPerRoute?{kind:`breakerFallback`,routeBudget:t,fallback:qa(e.variant,n)}:r.found?{kind:`variant`,variant:e.variant,routeBudget:t,didConsumeRouteVariantBudget:!1}:n>=e.variant.budget.maxVariantsPerRoute?{kind:`breakerFallback`,routeBudget:t,fallback:qa(e.variant,n)}:{kind:`variant`,variant:e.variant,routeBudget:{routeId:t.routeId,variantCacheKeys:[...t.variantCacheKeys.slice(0,r.index),e.variant.cacheKey,...t.variantCacheKeys.slice(r.index)]},didConsumeRouteVariantBudget:!0}}function Ya(e){let t=Ga({budget:e.budget,dimensions:e.dimensions,output:e.output});return t.kind===`breakerFallback`?{kind:`breakerFallback`,routeBudget:e.routeBudget?Ka(e.routeBudget):null,fallback:t.fallback}:Ja({routeBudget:e.routeBudget,variant:t.variant})}function Xa(e){if(e===null)return{kind:`runtime-cache-entry`,decision:null};switch(e.kind){case`reuse`:return{kind:`runtime-cache-entry`,decision:{canReuse:!0,code:e.proof.code,kind:`reuse`,reuseClass:e.proof.reuseClass}};case`fallback`:return{kind:`runtime-cache-entry`,decision:{canReuse:!1,code:e.fallback.code,kind:`reject`,mode:e.fallback.mode,scope:e.fallback.scope}};default:return La(e)}}function Za(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}var Qa=`fnv1a64`,$a={maxEntryCount:64,maxEntryIdLength:512,maxManifestBytes:4096,maxPayloadHashLength:16,maxVariantCacheKeyLength:256},eo=new TextEncoder;function to(e,t){return e.idt.id)}function no(e){let t=new Map;for(let n of e)t.has(n.id)||t.set(n.id,n);return Array.from(t.values()).sort(to)}function ro(e){return eo.encode(e).length}function io(e){return de(e)}function ao(e){let t=e.replayWindow??{validFromVisibleCommitVersion:e.visibleCommitVersion,validUntilVisibleCommitVersion:e.visibleCommitVersion};return{entries:no(e.entries),hashAlgorithm:Qa,replayWindow:t,schemaVersion:1,visibleCommitVersion:e.visibleCommitVersion}}function oo(e){return JSON.stringify(ao(e))}function so(e){return`static-layout:${io(e)}`}function co(e){return fe.map(t=>[t,e.artifactCompatibility[t]])}function lo(e){return io(JSON.stringify({artifactCompatibilityPairs:co(e),layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId,variantCacheKey:e.variantCacheKey}))}function uo(e){return{...e.artifactCompatibility,graphVersion:`static-layout-graph:${io(JSON.stringify({layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId}))}`,renderEpoch:`static-layout:${io(JSON.stringify({layoutId:e.layoutId,rootBoundaryId:e.rootBoundaryId,variantCacheKey:e.variantCacheKey}))}`}}function fo(e){return{...e,maxEntryCount:Math.min(e.maxEntryCount,8)}}function po(e){let t=e.entries.slice(0,e.limits.maxEntryCount),n=1,r=t.length,i=null;for(;n<=r;){let a=Math.floor((n+r)/2),o=oo({entries:t.slice(0,a),replayWindow:{validFromVisibleCommitVersion:e.visibleCommitVersion,validUntilVisibleCommitVersion:e.visibleCommitVersion},visibleCommitVersion:e.visibleCommitVersion});ro(o)<=e.limits.maxManifestBytes?(i=o,n=a+1):r=a-1}return i}function mo(e,t){return Object.hasOwn(e,t)}function ho(e){let t=so(e.layoutId),n={kind:`layout`,layoutId:e.layoutId,rootBoundaryId:e.artifactCompatibility.rootBoundaryId,routeId:t},r=Ya({budget:ka,dimensions:[],output:n,routeBudget:{routeId:n.routeId,variantCacheKeys:[]}});if(r.kind!==`variant`)return null;let i=uo({artifactCompatibility:e.artifactCompatibility,layoutId:e.layoutId,rootBoundaryId:n.rootBoundaryId,routeId:n.routeId,variantCacheKey:r.variant.cacheKey});return{artifactCompatibility:i,id:e.layoutId,payloadHash:lo({artifactCompatibility:i,layoutId:e.layoutId,rootBoundaryId:n.rootBoundaryId,routeId:n.routeId,variantCacheKey:r.variant.cacheKey}),privacy:`public`,variantCacheKey:r.variant.cacheKey}}function go(e,t={}){let n=fo(t.limits??$a),r=B.readMetadata(e.elements),i=[];for(let t of r.layoutIds){if(i.length>=n.maxEntryCount)break;if(t.length>n.maxEntryIdLength||r.layoutFlags[t]!==`s`||!mo(e.elements,t)||B.parseElementKey(t)?.kind!==`layout`)continue;let a=ho({artifactCompatibility:r.artifactCompatibility,layoutId:t});a&&i.push(a)}return i.length===0?null:po({entries:i,limits:n,visibleCommitVersion:e.visibleCommitVersion})}function _o(e,t){let n=vo(e,t);return n&&ra(n),n}function vo(e,t){let n=Object.create(null);function r(i,a){if(a===t.length)return i===e.length;let o=t[a];if(o.startsWith(`:`)&&(o.endsWith(`+`)||o.endsWith(`*`))){let t=o.slice(1,-1),s=+!!o.endsWith(`+`);for(let o=i+s;o<=e.length;o++){let s=e.slice(i,o);if(s.length>0?n[t]=s:delete n[t],r(o,a+1))return!0}return delete n[t],!1}if(o.startsWith(`:`)){if(i>=e.length)return!1;let t=o.slice(1);return n[t]=e[i],r(i+1,a+1)?!0:(delete n[t],!1)}return i>=e.length||e[i]!==o?!1:r(i+1,a+1)}return r(0,0)?n:null}function yo(e,t){let n=0;for(let r=0;r=1;if(i.startsWith(`:`)&&i.endsWith(`*`))return a;if(n>=e.length)return!1;if(i.startsWith(`:`)){n++;continue}if(e[n]!==i)return!1;n++}return!0}function bo(e,t){function n(r,i){if(i===t.length)return r===e.length;let a=t[i];if(a.startsWith(`:`)&&(a.endsWith(`+`)||a.endsWith(`*`))){let t=+!!a.endsWith(`+`);for(let a=r+t;a<=e.length;a++)if(n(a,i+1))return!0;return!1}return a.startsWith(`:`)?n(r,i+1)||r=e.length||e[r]!==a?!1:n(r+1,i+1)}return n(0,0)}function xo(e){if(e.routeManifest===null)return null;let t=H(e.currentPathname,e.basePath),n=H(e.targetPathname,e.basePath),r=ea(t),i=ea(n);for(let n of e.routeManifest.segmentGraph.interceptions.values())if(yo(r,n.sourcePatternParts)&&_o(i,n.targetPatternParts)!==null)return t;return null}function So(e){if(e.routeManifest===null)return null;let t=H(e.currentPathname,e.basePath),n=e.currentMatchedPathname?H(e.currentMatchedPathname,e.basePath):null,r=H(e.targetPathname,e.basePath),i=ea(t),a=n?ea(n):null,o=ea(r);for(let r of e.routeManifest.segmentGraph.interceptions.values())if(bo(o,r.targetPatternParts)){if(yo(i,r.sourcePatternParts))return t;if(n!==null&&a!==null&&yo(a,r.sourcePatternParts))return n}return null}var Co=`__vinext_previousNextUrl`,wo=`__vinext_historyIndex`,To=`__vinext_bfcacheIds`,Eo=`__vinext_bfcacheVersion`,Do=class{#e;#t=new Map;constructor(e){this.#e=e.maxEntries}clear(){this.#t.clear()}remember(e){if(e.historyIndex===null||(this.#t.delete(e.historyIndex),this.#t.set(e.historyIndex,{bfcacheVersion:e.bfcacheVersion,state:e.state}),this.#t.size<=this.#e))return;let t=this.#t.keys().next().value;typeof t==`number`&&this.#t.delete(t)}resolveRestore(e){let t=zo(e.historyState);if(t===null)return{kind:`skip`,reason:`missing-history-index`,targetHistoryIndex:t};let n=this.#t.get(t);return n?e.guarded?{kind:`skip`,reason:`guarded`,targetHistoryIndex:t}:n.bfcacheVersion===e.currentBfcacheVersion?{kind:`restore`,state:n.state,targetHistoryIndex:t}:(this.#t.delete(t),{kind:`skip`,reason:`stale-bfcache-version`,targetHistoryIndex:t}):{kind:`skip`,reason:`missing-snapshot`,targetHistoryIndex:t}}},Oo=class{#e;#t=0;#n;constructor(e){let t=Io(e.initialHistoryState);this.#e=t===null?0:t+1,this.#n=new Do({maxEntries:e.maxHistoryStateSnapshots})}get currentBfcacheVersion(){return this.#e}beginCacheInvalidationGuard(){this.#t+=1;let e=!1;return()=>{e||(e=!0,this.#t=Math.max(0,this.#t-1))}}isCacheInvalidationGuarded(){return this.#t>0}isCurrentBfcacheVersion(e){return Lo(e,this.#e)}readCurrentBfcacheVersionHistoryIds(e){if(this.isCacheInvalidationGuarded())return null;let t=Fo(e);return t===null?null:this.isCurrentBfcacheVersion(e)?t:null}#r(){this.#e+=1}invalidateClientState(){this.#n.clear(),this.#r()}rememberHistoryStateSnapshot(e){this.#n.remember({bfcacheVersion:this.#e,historyIndex:e.historyIndex,state:e.state})}resolveHistoryStateSnapshotRestore(e){return this.#n.resolveRestore({currentBfcacheVersion:this.#e,guarded:this.isCacheInvalidationGuarded(),historyState:e})}};function ko(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e))t[n]=r;return t}function Ao(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function jo(e,t){let n=ko(e),r=t.bfcacheIds!==void 0&&(t.bfcacheIds===null||Object.keys(t.bfcacheIds).length===0);return t.previousNextUrl===null?delete n[Co]:n[Co]=t.previousNextUrl,t.traversalIndex!==void 0&&(Za(t.traversalIndex)?n[wo]=t.traversalIndex:delete n[wo]),t.bfcacheIds!==void 0&&(r?(delete n[To],delete n[Eo]):n[To]={...t.bfcacheIds}),t.bfcacheVersion!==void 0&&(r?delete n[Eo]:Za(t.bfcacheVersion)?n[Eo]=t.bfcacheVersion:delete n[Eo]),Object.keys(n).length>0?n:null}function Mo(e,t){let n=No(t),r=zo(t),i=Fo(t),a=Io(t);return n===null&&r===null&&i===null?e:jo(e,{bfcacheIds:i,bfcacheVersion:i===null?void 0:a,previousNextUrl:n,traversalIndex:r})}function No(e){let t=Ao(e)?.[Co];return typeof t==`string`?t:null}function Po(e){let t=B.parseElementKey(e);return t?.kind===`layout`||t?.kind===`page`||t?.kind===`slot`||t?.kind===`template`}function Fo(e){let t=Ao(e)?.[To];if(!t||typeof t!=`object`||Array.isArray(t))return null;let n={};for(let[e,r]of Object.entries(t)){if(!Po(e)||typeof r!=`string`)return null;n[e]=r}return n}function Io(e){let t=Ao(e)?.[Eo];return Za(t)?t:null}function Lo(e,t){let n=Io(e);return n!==null&&n===t}function Ro(e){let t=No(e),n=Fo(e),r=Io(e);return t===null&&n===null?null:jo(null,{bfcacheIds:n,bfcacheVersion:n===null?void 0:r,previousNextUrl:t})}function zo(e){let t=Ao(e)?.[wo];return Za(t)?t:null}function Bo(e){let t=zo(e.historyState),n=`unknown`;return e.currentHistoryIndex!==null&&t!==null&&(te.currentHistoryIndex&&(n=`forward`)),{direction:n,historyState:e.historyState,targetHistoryIndex:t}}var Vo=`__next-page-redirect`;function Ho(e){if(typeof e!=`object`||!e||!(`getElementById`in e))return!1;let{getElementById:t}=e;return typeof t==`function`?t.call(e,Vo)!==null:!1}var Uo=class{#e=null;#t=0;reset(){this.#e=null}navigate(e,t,n){let r=this.#e;if(r?.href===t&&r.historyUpdateMode===n)return;let i=this.#t+1;this.#t=i,this.#e={href:t,historyUpdateMode:n,token:i};let a=()=>{let r=this.#e;r?.href!==t||r.historyUpdateMode!==n||r.token!==i||(n===`replace`?e.location.replace(t):e.location.assign(t))};if(typeof e.requestAnimationFrame==`function`){e.requestAnimationFrame(()=>{e.setTimeout(a,0)});return}e.setTimeout(a,0)}},Wo=`[\\u0000-\\u001F \\u200B\\uFEFF]*`,Go=`[\\r\\n\\t]*`;function Ko(e){let t=e.split(``).join(Go);return RegExp(`^${Wo}${t}${Go}:`,`i`)}var qo=[Ko(`javascript`),Ko(`data`),Ko(`vbscript`)],Jo=`Next.js has blocked a javascript: URL as a security precaution.`;function Yo(e){let t=``+e;return qo.some(e=>e.test(t))}function Xo(){console.error(Jo)}function Zo(e,t=Error){if(Yo(e))throw Xo(),new t(Jo)}var Qo=10;function $o(e,t){return t===null||!Yo(t)?!1:(e.body?.cancel().catch(()=>{}),Xo(),!0)}function es(e,t){let n=new URL(e,t);return Vi(n),`${Hi(n.pathname)}${n.search}${n.hash}`}function ts(e,t){let n=new URL(e,t);return`${n.pathname}${n.search}${n.hash}`}function ns(e){if(e.targetUrl.origin!==e.origin)return{href:e.targetUrl.href,kind:`terminal-hard-navigation`,reason:`externalRedirect`,redirectDepth:e.redirectDepth};let t=e.redirectedHref;if(t===es(e.currentHref,e.origin))return{href:t,kind:`no-redirect`};let n=e.maxRedirectDepth??Qo;return e.redirectDepth>=n?{href:t,kind:`terminal-hard-navigation`,reason:`maxRedirectsExceeded`,redirectDepth:e.redirectDepth}:{href:t,historyUpdateMode:e.historyUpdateMode,kind:`follow`,previousNextUrl:e.requestPreviousNextUrl,redirectDepth:e.redirectDepth+1}}function rs(e){let t=new URL(e.responseUrl,e.origin);return ns({...e,redirectedHref:Mi(t.href,e.currentHref,e.origin),targetUrl:t})}function is(e){let t=new URL(e.streamedRedirectTarget,e.origin);return ns({...e,redirectedHref:ts(e.streamedRedirectTarget,e.origin),targetUrl:t})}var W={cacheProofRejected:`NC_CACHE_REJECT`,cacheReuseTokenRejected:`NC_CACHE_TOKEN_REJECT`,commitCurrent:`NC_COMMIT`,crossDocumentFlight:`NC_CROSS_DOC_FLIGHT`,fetchFresh:`NC_FETCH_FRESH`,invalidRscPayload:`NC_RSC_INVALID`,interceptedCommitCurrent:`NC_INTERCEPT_COMMIT`,interceptedRejectedIncompatibleRoot:`NC_INTERCEPT_REJECT_ROOT`,interceptedRejectedMissingProof:`NC_INTERCEPT_REJECT_MISSING_PROOF`,interceptedRejectedMissingSlotProof:`NC_INTERCEPT_REJECT_SLOT`,interceptedRejectedTargetMismatch:`NC_INTERCEPT_REJECT_TARGET`,interceptedRejectedUndeclaredTopology:`NC_INTERCEPT_REJECT_GRAPH`,interceptedRejectedUnknownSource:`NC_INTERCEPT_REJECT_SOURCE`,optimisticRouteShell:`NC_OPTIMISTIC_SHELL`,prefetchOnly:`NC_PREFETCH_ONLY`,prefetchResponseReuse:`NC_PREFETCH_REUSE`,proceedToCommit:`NC_RSC_PROCEED`,redirectFollow:`NC_RSC_REDIRECT_FOLLOW`,redirectTerminalDepth:`NC_RSC_REDIRECT_DEPTH`,redirectTerminalExternal:`NC_RSC_REDIRECT_EXTERNAL`,requestWork:`NC_REQUEST`,rootBoundaryChanged:`NC_ROOT`,rootBoundaryUnknown:`NC_ROOT_UNKNOWN`,rscCompatibilityMismatch:`NC_RSC_COMPAT_MISMATCH`,rscNavigationError:`NC_RSC_NAV_ERROR`,sameDocumentScroll:`NC_SAME_DOC_SCROLL`,samePageSearch:`NC_SAME_PAGE_SEARCH`,serverActionRedirectCompatibilityMismatch:`NC_SA_REDIRECT_COMPAT`,serverActionRscCompatibilityMismatch:`NC_SA_RSC_COMPAT`,staleOperation:`NC_STALE`,streamedRedirectLoop:`NC_RSC_STREAMED_REDIRECT_LOOP`,visitedResponseReuse:`NC_VISITED_REUSE`},as={hardNavigate:`NT_HARD_NAVIGATE`,noCommit:`NT_NO_COMMIT`,visibleCommit:`NT_VISIBLE_COMMIT`};function os(e){return{...e.activeNavigationId===void 0?{}:{activeNavigationId:e.activeNavigationId},currentRootLayoutTreePath:e.currentRootLayoutTreePath,currentVisibleCommitVersion:e.currentVisibleCommitVersion,nextRootLayoutTreePath:e.nextRootLayoutTreePath,...e.startedNavigationId===void 0?{}:{startedNavigationId:e.startedNavigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion}}function ss(e,t={}){return{code:e,fields:{...t}}}function G(e,t={}){return{schemaVersion:0,entries:[ss(e,t)]}}function cs(e,t,n={}){return{schemaVersion:e.schemaVersion,entries:[ss(t,n),...e.entries]}}var ls=[`navigation`,`visibleCommit`,`graphVersion`,`cacheVariant`];function us(e,t,n){switch(e){case`navigation`:return t.navigationId===n.activeNavigationId?{kind:`satisfied`}:{kind:`mismatch`,reason:`staleNavigation`};case`visibleCommit`:return t.baseVisibleCommitVersion===n.visibleCommitVersion?{kind:`satisfied`}:{kind:`mismatch`,reason:`staleVisibleCommit`};case`graphVersion`:return t.graphVersion===null||n.graphVersion===null?{kind:`absent`,missingReason:`graphVersionMissing`}:t.graphVersion===n.graphVersion?{kind:`satisfied`}:{kind:`mismatch`,reason:`graphVersionMismatch`};case`cacheVariant`:{let e=t.cacheVariantFingerprint,r=n.installedCacheVariantFingerprint;return e===void 0||r===null?{kind:`absent`,missingReason:`cacheVariantMissing`}:e===r?{kind:`satisfied`}:{kind:`mismatch`,reason:`cacheVariantMismatch`}}default:throw Error(`[vinext] Unknown operation-token dimension: `+String(e))}}function ds(e,t,n){let r=new Set(n.require),i=new Set([...n.check,...n.require]);for(let n of ls){if(!i.has(n))continue;let a=us(n,e,t);if(a.kind===`mismatch`)return{authorized:!1,reason:a.reason};if(a.kind===`absent`&&r.has(n))return{authorized:!1,reason:a.missingReason}}return{authorized:!0,token:e}}function fs(e,t){return ds(e,{activeNavigationId:t.activeNavigationId,visibleCommitVersion:t.visibleCommitVersion,graphVersion:e.graphVersion,installedCacheVariantFingerprint:e.cacheVariantFingerprint??null},{check:[`navigation`,`visibleCommit`],require:[`navigation`,`visibleCommit`]})}function ps(e,t){return ds(e,{activeNavigationId:e.navigationId,visibleCommitVersion:e.baseVisibleCommitVersion,graphVersion:t.graphVersion,installedCacheVariantFingerprint:t.installedCacheVariantFingerprint},{check:[`graphVersion`,`cacheVariant`],require:[]})}function ms(e,t){return e===`push`||t===`push`?`push`:`replace`}var hs=`\0`,gs=`CP_CACHE_ENTRY_PROOF_MISSING`;function _s(e){let t=e.work.kind===`traverseFlight`?{traverseDirection:e.work.direction}:{};return{kind:`requestWork`,token:e.state.nextOperationToken,work:e.work,trace:G(W.requestWork,{eventKind:e.eventKind,targetHref:vs(e.work),...t})}}function vs(e){switch(e.kind){case`flight`:case`prefetch`:return e.href;case`traverseFlight`:return null;default:throw Error(`[vinext] Unknown requested navigation work: `+String(e))}}function ys(e,t={}){return{fetchResultSource:e.source,...t}}function bs(e){return{discardBody:e.discardBody,kind:`hardNavigate`,...e.hardNavigationMode===void 0?{}:{hardNavigationMode:e.hardNavigationMode},reason:e.reason,trace:G(e.reasonCode,ys(e.facts,{...e.redirectSignal===void 0?{}:{redirectSignal:e.redirectSignal},redirectDepth:e.facts.redirectDepth,targetHref:e.url})),url:e.url}}function xs(e){return{discardBody:e.discardBody,kind:`followRedirect`,redirect:e.redirect,trace:G(W.redirectFollow,ys(e.facts,{redirectDepth:e.redirect.redirectDepth,redirectSignal:e.redirectSignal,targetHref:e.redirect.href}))}}function Ss(e){switch(e){case`externalRedirect`:return{hardNavigationReason:`externalRedirectTarget`,traceReasonCode:W.redirectTerminalExternal};case`maxRedirectsExceeded`:return{hardNavigationReason:`redirectDepthExhausted`,traceReasonCode:W.redirectTerminalDepth};default:throw Error(`[vinext] Unknown RSC redirect terminal reason: `+String(e))}}function Cs(e){if(!e.responseOk||!e.isRscContentType||!e.hasBody){let t=Mi(e.responseUrl,e.currentHref,e.origin);return bs({discardBody:!1,facts:e,reason:`invalidRscPayload`,reasonCode:W.invalidRscPayload,url:t})}let t=Ni({clientCompatibilityId:e.clientCompatibilityId,currentHref:e.currentHref,origin:e.origin,responseCompatibilityId:e.compatibilityIdHeader,responseUrl:e.responseUrl});if(t.kind===`hard-navigate`)return bs({discardBody:!1,facts:e,reason:`rscCompatibilityMismatch`,reasonCode:W.rscCompatibilityMismatch,url:t.hardNavigationTarget});if(e.responseUrl!==null){let t=rs({currentHref:e.currentHref,historyUpdateMode:e.effectiveHistoryUpdateMode,origin:e.origin,redirectDepth:e.redirectDepth,requestPreviousNextUrl:e.requestPreviousNextUrl,responseUrl:e.responseUrl});if(t.kind===`terminal-hard-navigation`){let n=Ss(t.reason);return bs({discardBody:!1,facts:e,reason:n.hardNavigationReason,reasonCode:n.traceReasonCode,redirectSignal:`response-url`,url:t.href})}if(t.kind===`follow`)return xs({discardBody:!1,facts:e,redirect:{href:t.href,historyUpdateMode:e.effectiveHistoryUpdateMode,previousNextUrl:t.previousNextUrl,redirectDepth:t.redirectDepth},redirectSignal:`response-url`})}if(e.streamedRedirectTarget!==null){let t=ms(e.effectiveHistoryUpdateMode,e.streamedRedirectType),n=is({currentHref:e.currentHref,historyUpdateMode:t,origin:e.origin,redirectDepth:e.redirectDepth,requestPreviousNextUrl:e.requestPreviousNextUrl,streamedRedirectTarget:e.streamedRedirectTarget});if(n.kind===`terminal-hard-navigation`){let r=Ss(n.reason);return bs({discardBody:!0,facts:e,reason:r.hardNavigationReason,reasonCode:r.traceReasonCode,redirectSignal:`streamed-header`,hardNavigationMode:t===`push`?`assign`:`replace`,url:n.href})}return n.kind===`follow`?xs({discardBody:!0,facts:e,redirect:{href:n.href,historyUpdateMode:t,previousNextUrl:n.previousNextUrl,redirectDepth:n.redirectDepth},redirectSignal:`streamed-header`}):bs({discardBody:!0,facts:e,reason:`streamedRedirectLoop`,reasonCode:W.streamedRedirectLoop,redirectSignal:`streamed-header`,url:n.href})}return{discardBody:!1,kind:`proceedToCommit`,trace:G(W.proceedToCommit,ys(e))}}function ws(e,t){return G(e,{targetHref:t.targetHref})}function Ts(e){let t,n;try{t=new URL(e.currentHref),n=new URL(e.targetHref,e.currentHref)}catch{return{bypassNavigationCache:!1,kind:`flightNavigation`,trace:ws(W.crossDocumentFlight,e)}}let r=t.origin===n.origin&&H(t.pathname,e.basePath)===H(n.pathname,e.basePath),i=t.searchParams.toString()===n.searchParams.toString();return r&&i&&n.hash!==``?{hash:n.hash,kind:`sameDocumentScroll`,mode:e.mode,scroll:e.scroll,trace:ws(W.sameDocumentScroll,e)}:r&&!i?{bypassNavigationCache:!0,kind:`flightNavigation`,trace:ws(W.samePageSearch,e)}:{bypassNavigationCache:!1,kind:`flightNavigation`,trace:ws(W.crossDocumentFlight,e)}}function Es(e){return e.candidate===`missing`?{kind:`miss`}:e.mountedSlotsMatch?e.navigationKind===`refresh`?{kind:`evict`,reason:`refresh`}:e.fresh?{kind:`reuse`}:{kind:`evict`,reason:`stale`}:{kind:`evict`,reason:`mountedSlotsMismatch`}}function Ds(e,t,n={}){return G(e,{eventKind:t.navigationKind,targetHref:t.targetHref,...n})}function Os(e,t){return{kind:`fetchFresh`,reason:t,trace:Ds(W.fetchFresh,e,{freshFetchReason:t})}}function ks(e){return e.navigationKind===`refresh`?Os(e,`refresh`):!e.bypassNavigationCache&&e.visitedResponse.status===`available`?{kind:`reuseVisitedResponse`,trace:Ds(W.visitedResponseReuse,e)}:!e.bypassNavigationCache&&e.prefetch.status===`available`?{kind:`consumePrefetch`,trace:Ds(W.prefetchResponseReuse,e)}:e.navigationKind===`navigate`?e.optimisticRouteShell.status===`available`?{kind:`attemptOptimisticRouteShell`,trace:Ds(W.optimisticRouteShell,e)}:Os(e,e.bypassNavigationCache?`cacheBypassed`:e.optimisticRouteShell.reason):e.bypassNavigationCache?Os(e,`cacheBypassed`):Os(e,`cacheMiss`)}function As(e){return e.visitedResponse.status===`available`?{kind:`skip`,reason:`visitedResponseAvailable`}:e.navigationKind===`refresh`?{kind:`skip`,reason:`refresh`}:e.bypassNavigationCache?{kind:`skip`,reason:`cacheBypassed`}:{kind:`probe`}}function js(e){return{layoutIds:e.layoutIds,rootBoundaryId:e.rootBoundaryId,rootLayoutTreePath:e.rootBoundaryId,slotBindings:e.slotBindings}}function Ms(e){let t=e.indexOf(hs);return t===-1?e:e.slice(0,t)}function Ns(e){let t=Ms(e);return t.startsWith(`route:/`)?t.slice(6):null}function Ps(e){try{return new URL(e,`https://vinext.local`).pathname}catch{let[t=``]=e.split(`#`),[n=``]=t.split(`?`);return n===``?`/`:n}}function Fs(e){return ea(Ps(e))}function Is(e,t){let n=Fs(t);for(let t of e.segmentGraph.routes.values())if(_o(n,t.patternParts)!==null)return t;return null}function Ls(e,t){return _o(Fs(t),e.patternParts)!==null}function Rs(e){let t=Ms(e.routeId),n=e.routeManifest.segmentGraph.routes.get(t);if(n&&Ls(n,e.matchedUrl))return n;let r=n===void 0?Ns(e.routeId):null;if(r!==null){let t=Is(e.routeManifest,r);if(t!==null)return t}return Is(e.routeManifest,e.matchedUrl)}function zs(e,t){return t.interception===null?Rs({matchedUrl:t.matchedUrl,routeId:t.routeId,routeManifest:e}):Rs({matchedUrl:t.interception.sourceMatchedUrl,routeId:t.interception.sourceRouteId,routeManifest:e})}function Bs(e,t){let n=[];for(let r of t.slotIds){let i=e.segmentGraph.slotBindings.get(`${t.id}::${r}`);i&&n.push({ownerLayoutId:i.ownerLayoutId,slotId:i.slotId,state:i.state})}return n.sort((e,t)=>Le(e.slotId,t.slotId))}function Vs(e,t){return t.rootBoundaryId===null?null:e.segmentGraph.rootBoundaries.get(t.rootBoundaryId)?.treePath??null}function Hs(e){let t=e.routeManifest===null?null:zs(e.routeManifest,e.snapshot);if(t===null||e.routeManifest===null)return{kind:`unknown`};let n=e.slotBindingSource===`manifestTarget`&&e.snapshot.interception===null;return{kind:`known`,topology:{layoutIds:t.layoutIds,rootBoundaryId:t.rootBoundaryId,rootLayoutTreePath:Vs(e.routeManifest,t),slotBindings:n?Bs(e.routeManifest,t):e.snapshot.slotBindings}}}function Us(e,t){let n=Fs(t.sourceMatchedUrl),r=Fs(t.targetMatchedUrl),i=Rs({matchedUrl:t.targetMatchedUrl,routeId:t.targetRouteId,routeManifest:e}),a=e.segmentGraph.interceptionsBySlotId.get(t.slotId)??[];for(let e of a){if(!yo(n,e.sourcePatternParts))continue;let t=_o(r,e.targetPatternParts),a=t===null&&bo(r,e.targetPatternParts);if(!(t===null&&!a)&&!(!a&&e.targetRouteId!==null&&i?.id!==e.targetRouteId))return e}return null}function Ws(e){return e.state.traceFields?{...e.state.traceFields,currentRootLayoutTreePath:e.currentRootLayoutTreePath,nextRootLayoutTreePath:e.nextRootLayoutTreePath}:os({currentRootLayoutTreePath:e.currentRootLayoutTreePath,currentVisibleCommitVersion:e.state.visibleCommitVersion,nextRootLayoutTreePath:e.nextRootLayoutTreePath,startedVisibleCommitVersion:e.event.token.baseVisibleCommitVersion})}function Gs(e,t){return e===null||t===null?`rootBoundaryUnknown`:e===t?`currentRootBoundary`:`rootBoundaryChanged`}function Ks(e,t){return qs(js(e),js(t))}function qs(e,t){if(Gs(e.rootBoundaryId,t.rootBoundaryId)!==`currentRootBoundary`)return[];let n=[],r=Math.min(e.layoutIds.length,t.layoutIds.length);for(let i=0;ie.slotId===t.slotId);return!o||o.state!==`active`||o.ownerLayoutId===null||!a.has(o.ownerLayoutId)?{kind:`rejected`,reasonCode:W.interceptedRejectedMissingSlotProof}:r!==null&&o.ownerLayoutId!==r.ownerLayoutId?{kind:`rejected`,reasonCode:W.interceptedRejectedUndeclaredTopology}:{kind:`approved`,preserveElementIds:i,preservePreviousSlotIds:$s({currentSlotBindings:e.currentTopology.slotBindings,preservedLayoutIds:i,targetSlotBindings:e.targetTopology.slotBindings}).filter(e=>e!==t.slotId)}}function lc(e){let t=e.event.result.targetSnapshot,n=Hs({routeManifest:e.routeManifest,slotBindingSource:`snapshot`,snapshot:e.state.visibleSnapshot}),r=Hs({routeManifest:e.routeManifest,slotBindingSource:`manifestTarget`,snapshot:t}),i=Ws({currentRootLayoutTreePath:n.kind===`known`?n.topology.rootLayoutTreePath:null,event:e.event,nextRootLayoutTreePath:r.kind===`known`?r.topology.rootLayoutTreePath:null,state:e.state});if(e.event.token.lane===`prefetch`)return{kind:`noCommit`,reason:`prefetchOnly`,token:e.event.token,trace:G(W.prefetchOnly,i)};let a=nc(e.event.result.cacheEntryReuseProof);if(a.kind===`rejected`)return ic({event:e.event,rejection:a,traceFields:i});let o=a.decision;if(o!==null){let t=ps(e.event.token,{graphVersion:e.routeManifest?.graphVersion??null,installedCacheVariantFingerprint:null});if(!t.authorized)return ac({event:e.event,reason:t.reason,traceFields:i})}let s=oc(i,o),c=sc(o);if(t.interception!==null){if(n.kind===`unknown`||r.kind===`unknown`)return tc({event:e.event,reasonCode:W.interceptedRejectedUndeclaredTopology,traceFields:s});let i=cc({currentSnapshot:e.state.visibleSnapshot,currentTopology:n.topology,restoredHistorySnapshot:e.event.result.restoredHistorySnapshot===!0,routeManifest:e.routeManifest,targetSnapshot:t,targetTopology:r.topology});return i.kind===`rejected`?tc({event:e.event,reasonCode:i.reasonCode,traceFields:s}):{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:i.preserveElementIds,preservePreviousSlotIds:i.preservePreviousSlotIds,reason:`interceptedCurrentRootBoundary`,targetSnapshot:t},token:e.event.token,trace:G(W.interceptedCommitCurrent,s)}}let l=n.kind===`unknown`||r.kind===`unknown`?`rootBoundaryUnknown`:Gs(n.topology.rootBoundaryId,r.topology.rootBoundaryId);if(l===`rootBoundaryChanged`)return{kind:`hardNavigate`,reason:`rootBoundaryChanged`,token:e.event.token,trace:G(W.rootBoundaryChanged,s),url:e.event.result.href};if(l===`rootBoundaryUnknown`)return{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:[],preservePreviousSlotIds:[],reason:`unprovenTopologyFallback`,targetSnapshot:t},token:e.event.token,trace:G(W.rootBoundaryUnknown,s)};if(n.kind!==`known`||r.kind!==`known`)throw Error(`[vinext] Current-root navigation planning requires manifest topology`);return{kind:`proposeCommit`,proposal:{...c,preserveAbsentSlots:!1,preserveElementIds:Zs({currentTopology:n.topology,lane:e.event.token.lane,targetTopology:r.topology}),preservePreviousSlotIds:Qs({currentTopology:n.topology,lane:e.event.token.lane,targetTopology:r.topology}),reason:`currentRootBoundary`,targetSnapshot:t},token:e.event.token,trace:G(W.commitCurrent,s)}}function uc(e){switch(e.event.kind){case`navigate`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`flight`,mode:e.event.mode}});case`refresh`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.state.visibleSnapshot.displayUrl,kind:`flight`,mode:`refresh`}});case`traverse`:return _s({eventKind:e.event.kind,state:e.state,work:{direction:e.event.direction,historyState:e.event.historyState,kind:`traverseFlight`}});case`prefetch`:return _s({eventKind:e.event.kind,state:e.state,work:{href:e.event.href,kind:`prefetch`}});case`flightResponseArrived`:return lc({event:e.event,routeManifest:e.routeManifest,state:e.state});default:{let t=e.event;throw Error(`[vinext] Unknown navigation event: `+String(t))}}}function dc(e){if(e.clientCompatibilityId===null||!e.isRscContentType||Ni({clientCompatibilityId:e.clientCompatibilityId,currentHref:e.currentHref,origin:e.origin,responseCompatibilityId:e.compatibilityIdHeader,responseUrl:e.responseUrl}).kind===`compatible`)return{kind:`proceed`,trace:G(W.proceedToCommit,{})};if(e.actionRedirectHref!==null)return{kind:`hardNavigate`,url:e.actionRedirectHref,historyMode:e.actionRedirectType===`push`?`assign`:`replace`,clearClientNavigationCaches:!0,reason:`serverActionRedirectCompatibilityMismatch`,trace:G(W.serverActionRedirectCompatibilityMismatch,{targetHref:e.actionRedirectHref})};let t=e.currentHref;return{kind:`hardNavigate`,url:t,clearClientNavigationCaches:!1,reason:`serverActionRscCompatibilityMismatch`,trace:G(W.serverActionRscCompatibilityMismatch,{targetHref:t})}}function fc(e){return{kind:`hardNavigate`,url:e.currentHref,reason:`rscNavigationError`,trace:G(W.rscNavigationError,{targetHref:e.currentHref})}}var K={classifyEarlyNavigationIntent:Ts,classifyNavigationPrefetchProbe:As,classifyNavigationReuse:ks,classifyRscFetchResult:Cs,classifyRscNavigationError:fc,classifyRootBoundaryTransition:Gs,classifyServerActionResult:dc,classifyVisitedResponseCacheCandidate:Es,plan:uc,resolveCurrentRootBoundaryElementPersistence:Xs,resolveMountedParallelSlotPersistence:Js,resolveSameLayoutAncestorPersistence:Ks};function pc(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)}var mc=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/;function hc(e){let t=e.charCodeAt(0);return(t>=65&&t<=90||t>=97&&t<=122)&&mc.test(e)}function gc(e){return hc(e)||e.startsWith(`//`)}function _c(){let{origin:e,href:t}=window.location;if(e)return e;try{return new URL(t).origin}catch{return null}}function vc(e){let t=_c();if(!t)return null;try{let n=e.startsWith(`//`)?new URL(e,t):new URL(e);if(n.origin===t)return n.pathname+n.search+n.hash}catch{}return null}function yc(e,t){let n=vc(e);if(n==null||!t)return n;try{let e=new URL(n,`http://vinext.local`);return kn(e.pathname,t)?H(e.pathname,t)+e.search+e.hash:null}catch{return n}}function bc(e,t){return!t||!e.startsWith(`/`)||gc(e)?e:t+e}function xc(e,t,n=``){let r=t??window.location.href;if(!r||e.startsWith(`/`)||gc(e))return e;try{let t=new URL(e,r);return(n&&t.pathname===n?``:n?H(t.pathname,n):t.pathname)+t.search+t.hash}catch{return e}}function Sc(e,t,n=``){let r=xc(e,t,n);return n?r===``?n:r.startsWith(`?`)||r.startsWith(`#`)?n+r:bc(r,n):bc(r,n)}var Cc=String.raw`[\w-]+-Google|Google-[\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight`,wc=/Googlebot(?!-)|Googlebot$/i,Tc=new Map;function Ec(e){let t=e||Cc,n=Tc.get(t);if(n)return n;let r=new RegExp(t,`i`);return Tc.set(t,r),r}function Dc(e,t){return e?wc.test(e)?!0:Ec(t).test(e):!1}var Oc=class extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}},kc=class extends URLSearchParams{append(){throw new Oc}delete(){throw new Oc}set(){throw new Oc}sort(){throw new Oc}},Ac=e({releaseAppPrefetchFetchSlot:()=>Rc,scheduleAppPrefetchFetch:()=>zc}),jc=Symbol.for(`vinext.appPrefetchFetchSlotRelease`),Mc=4,Nc=[],Pc=0,Fc=!1;function Ic(){for(Fc=!1;Pc{Nc.push(()=>{let r=!1,i=()=>{r||(r=!0,--Pc,Ic())};try{e().then(e=>{e[jc]=i,t(e)},e=>{i(),n(e)})}catch(e){i(),n(e)}}),Lc()})}var Bc=`modulepreload`,Vc=function(e){return`/`+e},Hc={},Uc=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vc(t,n),t in Hc)return;Hc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Wc(e){return null}var Gc=Symbol.for(`vinext.navigation.pagesNavigationNotify`),Kc=50*1024*1024*.9;function qc(e,t){if(e===void 0||e===``)return t;let n=Number(e);return!Number.isFinite(n)||n<0?t:n*1e3}var Jc=qc(`0`,3e4),Yc=qc(`300`,3e4),Xc=3e4;function Zc(e){let t;try{t=new URL(e,window.location.href)}catch{return null}return xo({basePath:``,currentPathname:window.location.pathname,routeManifest:w()?.bootstrap.routeManifest??null,targetPathname:t.pathname})}function q(){return window.__VINEXT_RSC_PREFETCH_CACHE__||(window.__VINEXT_RSC_PREFETCH_CACHE__=new Map),window.__VINEXT_RSC_PREFETCH_CACHE__}function Qc(){return window.__VINEXT_RSC_PREFETCHED_URLS__||(window.__VINEXT_RSC_PREFETCHED_URLS__=new Set),window.__VINEXT_RSC_PREFETCHED_URLS__}function $c(e){return typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e)&&e>=0}function el(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0}function tl(e){if(e===null||e===``)return;let t=Number(e);return $c(t)?t:void 0}function nl(e,t){let n=e.dynamicStaleTimeSeconds;return $c(n)?n*1e3:t}function rl(e,t,n){return el(t.expiresAt)?t.expiresAt:e+nl(t,n)}function il(e,t,n){if(el(t.expiresAt))return t.expiresAt;let r=t.dynamicStaleTimeSeconds;return $c(r)?e+Math.max(r*1e3,Xc):e+Math.max(n,Xc)}function al(e){return e.expiresAt===void 0?e.snapshot?rl(e.timestamp,e.snapshot,Yc):e.timestamp+Yc:e.expiresAt}function ol(e){return e.mountedSlotsHeader===void 0?e.snapshot?.mountedSlotsHeader??null:e.mountedSlotsHeader}function sl(e){try{let t=new URL(e,`http://vinext.local`);return Vi(t),`${t.pathname}${t.search}`}catch{return null}}function cl(e){let t=e.indexOf(`\0`);return t===-1?{interceptionContext:null,rscUrl:e}:{interceptionContext:e.slice(t+1),rscUrl:e.slice(0,t)}}function ll(e,t){return ol(e)===t?!0:(e.snapshot?.mountedSlotsHeader??null)===t}function ul(e,t,n,r=[]){let i=q(),a=[e,...r];for(let e of a){let r=B.encodeCacheKey(e,t),a=i.get(r);if(a&&a.cacheForNavigation!==!1&&ll(a,n))return{cacheKey:r,entry:a}}let o=new Set(a.map(e=>sl(e)).filter(e=>e!==null));if(o.size===0)return null;for(let[e,r]of i){if(r.cacheForNavigation===!1)continue;let i=cl(e);if(i.interceptionContext!==t)continue;let a=sl(i.rscUrl);if(!(a===null||!o.has(a))&&ll(r,n))return{cacheKey:e,entry:r}}return null}function dl(e,t=null,n=null,r={}){let i=ul(e,t,n,r.additionalRscUrls);return i===null?!1:i.entry.pending!==void 0||al(i.entry)>Date.now()?(_l(q(),i.cacheKey,i.entry),!0):(J(q(),Qc(),i.cacheKey,i.entry,r.notifyInvalidation??!0),!1)}function fl(e){return e.snapshot?.buffer.byteLength??e.size??0}var pl=null,ml=0;function hl(e){if(pl===e)return ml;let t=0,n=new Set;for(let r of e.values())n.has(r)||(n.add(r),t+=fl(r));return pl=e,ml=t,t}function gl(e,t){pl===e&&(ml=Math.max(0,ml+t))}function _l(e,t,n){if(e.get(t)===n){e.delete(t),e.set(t,n);for(let r of n.cacheKeys??[])r===t||e.get(r)!==n||(e.delete(r),e.set(r,n))}}function vl(){let e=q(),t=hl(e);if(t<=52428800)return;let n=Date.now(),r=Qc();for(let[t,i]of e)al(i)<=n&&J(e,r,t,i,!0);if(t=hl(e),t<=52428800)return;let i=0;for(;t>Kc&&i{xl(e)},n)}function Cl(e,t){t!==void 0&&(e.onInvalidateCallbacks===void 0&&(e.onInvalidateCallbacks=new Set),e.onInvalidateCallbacks.add(t))}function wl(e,t){if(t===void 0)return;let n=q().get(e);n&&(Cl(n,t),n.outcome===`cache-seeded`&&Sl(e,n))}function Tl(){let e=q(),t=Qc();for(let[n,r]of e)J(e,t,n,r,!0);t.clear(),w()?.functions.pingVisibleLinks?.()}function El(e,t,n=null,r=null,i=Jc){let a=B.encodeCacheKey(e,n),o=q(),s=o.get(a);s&&J(o,Qc(),a,s,!1);let c=Date.now(),l={cacheForNavigation:!0,cacheKeys:new Set([a]),expiresAt:rl(c,t,i),mountedSlotsHeader:r,outcome:`cache-seeded`,size:t.buffer.byteLength,snapshot:t,timestamp:c};o.set(a,l),gl(o,t.buffer.byteLength),Qc().add(a),Sl(a,l),vl()}function Dl(e,t,n=null){let r=B.encodeCacheKey(e,n),i=q(),a=i.get(r);a?.snapshot===t&&J(i,Qc(),r,a,!1)}function Ol(e,t,n=null){let r=tl(e.headers.get(j));return{compatibilityIdHeader:e.headers.get(Ci),buffer:t,contentType:e.headers.get(`content-type`)??`text/x-component`,...r===void 0?{}:{dynamicStaleTimeSeconds:r},mountedSlotsHeader:e.headers.get(A),paramsHeader:e.headers.get(k),renderedPathAndSearch:kl(e.headers.get(M)),url:n??e.url}}function kl(e){if(e===null||e===``)return null;try{let t=decodeURIComponent(e);return t.startsWith(`/`)?t:null}catch{return null}}async function Al(e){try{return Ol(e,await e.arrayBuffer())}finally{Rc(e)}}function jl(e,t=!0){let n=new Headers({"content-type":e.contentType});return e.mountedSlotsHeader!=null&&n.set(A,e.mountedSlotsHeader),e.compatibilityIdHeader!=null&&n.set(Ci,e.compatibilityIdHeader),$c(e.dynamicStaleTimeSeconds)&&n.set(j,String(e.dynamicStaleTimeSeconds)),e.paramsHeader!=null&&n.set(k,e.paramsHeader),e.renderedPathAndSearch!=null&&n.set(M,encodeURIComponent(e.renderedPathAndSearch)),new Response(t?e.buffer.slice(0):e.buffer,{status:200,headers:n})}function Ml(e,t,n=null,r=null,i,a={}){let o=B.encodeCacheKey(e,n),s=q(),c=Qc(),l=Date.now(),u=s.get(o);u&&J(s,c,o,u,!1);let d={cacheForNavigation:a.cacheForNavigation??!0,cacheKeys:new Set([o]),mountedSlotsHeader:r,optimisticRouteShell:a.optimisticRouteShell===!0,outcome:`pending`,prefetchKind:a.prefetchKind??(a.optimisticRouteShell===!0?`loading-shell`:`navigation`),searchAgnosticShell:a.searchAgnosticShell===!0,timestamp:l};Cl(d,i?.onInvalidate),d.pending=t.then(async e=>{if(e.ok){let t=await Al(e);if(s.get(o)!==d)return;let n=fl(d);d.snapshot=t,d.size=t.buffer.byteLength,gl(s,d.size-n),d.expiresAt=il(d.timestamp,d.snapshot,a.fallbackTtlMs??Yc),Nl(s,c,o,d),vl()}else Rc(e),J(s,c,o,d,!1)}).catch(()=>{J(s,c,o,d,!1)}).finally(()=>{s.get(o)===d&&(d.pending=void 0,d.snapshot&&(d.outcome=`cache-seeded`,Sl(o,d)))}),s.set(o,d),vl()}function Nl(e,t,n,r){if(r.cacheForNavigation===!1)return;let i=r.snapshot?.renderedPathAndSearch;if(!i)return;let a=cl(n),o=B.encodeCacheKey(i,a.interceptionContext);if(o===n)return;let s=e.get(o);s&&s!==r&&J(e,t,o,s,!1),r.cacheKeys??=new Set([n]),r.cacheKeys.add(o),e.set(o,r),t.add(o)}function Pl(e,t,n){return t.pending||t.outcome!==`cache-seeded`||t.cacheForNavigation===!1?null:(J(q(),Qc(),e,t,!1),t.snapshot?!ll(t,n)||al(t)<=Date.now()?null:t.expiresAt!==void 0||t.snapshot.expiresAt!==void 0?{...t.snapshot,expiresAt:al(t)}:t.snapshot:null)}async function Fl(e,t=null,n=null,r){let i=q(),a=ul(e,t,n,r?.additionalRscUrls);if(!a)return null;let{cacheKey:o,entry:s}=a;return s.pending!==void 0&&(await s.pending.catch(()=>{}),i.get(o)!==s)||r?.shouldConsume?.()===!1?null:Pl(o,s,n)}var Il=Symbol.for(`vinext.clientNavigationState`),Ll=Symbol.for(`vinext.mountedSlotsHeader`);function Rl(e){let t=window;t[Ll]=e}function zl(){return window[Ll]??null}function Y(){let e=window;return e[Il]??={listeners:new Set,cachedSearch:window.location.search,cachedReadonlySearchParams:new kc(window.location.search),cachedPathname:H(window.location.pathname,``),clientParams:{},clientParamsJson:`{}`,pendingClientParams:null,pendingClientParamsJson:null,pendingPathname:null,pendingPathnameNavId:null,originalPushState:window.history.pushState.bind(window.history),originalReplaceState:window.history.replaceState.bind(window.history),patchInstalled:!1,hasPendingNavigationUpdate:!1,suppressUrlNotifyCount:0,navigationSnapshotActiveCount:0},e[Il]}function Bl(){let e=Y();if(e)for(let t of e.listeners)t()}globalThis[Gc]=Bl;function Vl(){let e=Y();if(!e)return!1;let t=!1,n=H(window.location.pathname,``);n!==e.cachedPathname&&(e.cachedPathname=n,t=!0);let r=window.location.search;return r!==e.cachedSearch&&(e.cachedSearch=r,e.cachedReadonlySearchParams=new kc(r),t=!0),t}function Hl(){let e=Y();e&&e.navigationSnapshotActiveCount++}var Ul=Symbol.for(`vinext.clientNavigationRenderContext`);function Wl(){if(typeof R.createContext!=`function`)return null;let e=globalThis;return e[Ul]||(e[Ul]=R.createContext(null)),e[Ul]??null}function Gl(e,t){let n=window.location.origin,r=new URL(e,n);return{pathname:H(r.pathname,``),searchParams:new kc(r.search),params:t}}function Kl(e){let t=e.searchParams.toString();return t===``?e.pathname:`${e.pathname}?${t}`}var ql=`{}`;function Jl(e){let t=Y();if(!t){let t=JSON.stringify(e);t!==ql&&(ql=t);return}let n=JSON.stringify(e);n!==t.clientParamsJson&&(t.clientParams=e,t.clientParamsJson=n,t.pendingClientParams=null,t.pendingClientParamsJson=null,Bl())}function Yl(e){let t=Y();if(!t)return;let n=JSON.stringify(e);n!==t.clientParamsJson&&n!==t.pendingClientParamsJson&&(t.pendingClientParams=e,t.pendingClientParamsJson=n,t.hasPendingNavigationUpdate=!0)}function Xl(e,t){let n=Y();n&&(n.pendingPathname=H(e,``),n.pendingPathnameNavId=t)}function Zl(e){let t=Y();t&&(t.pendingPathnameNavId===null||t.pendingPathnameNavId===e)&&(t.pendingPathname=null,t.pendingPathnameNavId=null)}function Ql(e){let t=Y();if(!t)return e();t.suppressUrlNotifyCount+=1;try{return e()}finally{--t.suppressUrlNotifyCount}}function $l(e,t){let n=Y();if(!n)return;(t?.releaseSnapshot??e!==void 0)&&n.navigationSnapshotActiveCount>0&&--n.navigationSnapshotActiveCount;let r=Vl(),i=!1;n.pendingClientParams!==null&&n.pendingClientParamsJson!==null&&(n.clientParams=n.pendingClientParams,n.clientParamsJson=n.pendingClientParamsJson,n.pendingClientParams=null,n.pendingClientParamsJson=null,i=!0),(n.pendingPathnameNavId===null||e!==void 0&&n.pendingPathnameNavId===e)&&(n.pendingPathname=null,n.pendingPathnameNavId=null);let a=r||n.hasPendingNavigationUpdate;n.hasPendingNavigationUpdate=!1,(r||i)&&cn(),a&&Bl()}function eu(e,t,n){Ql(()=>{Y()?.originalPushState.call(window.history,e,t,n)})}function tu(e,t,n){Ql(()=>{Y()?.originalReplaceState.call(window.history,e,t,n)})}function nu(){tu({...window.history.state??{},__vinext_scrollX:window.scrollX,__vinext_scrollY:window.scrollY},``)}function ru(e,t,n){let r=w()?.functions.commitHashNavigation;if(r){r(e,t,n);return}let i=Ro(window.history.state);t===`replace`?tu(i,``,e):eu(i,``,e)}function iu(e){if(!(typeof document>`u`)){if(e.hash!==null){Ht(e.hash);return}e.targetHoistedInHead||(document.documentElement.scrollTop=0)}}function au(e){queueMicrotask(()=>{let t=_r();if(t===null||t.id!==e.id)return;let n=br(e);n&&iu(n)})}function ou(e){if(e&&typeof e==`object`&&`__vinext_scrollY`in e){let{__vinext_scrollX:t,__vinext_scrollY:n}=e;Promise.resolve().then(()=>{let e=window.__VINEXT_RSC_PENDING__??null;e?e.then(()=>Wt(t,n)):Wt(t,n)})}}function su(e,t){t===`replace`?window.location.replace(e):window.location.assign(e)}async function cu(e,t,n,r=!1,i=`transition`){w()?.functions.notifyLinkNavigationStart?.();let a=e;if(pc(e)){let n=yc(e,``);if(n==null){Yi(e,t);let n=w()?.functions.navigateExternal;if(n){await n(e,t);return}su(e,t),await new Promise(()=>{});return}a=n}let o=Wc(a);if(o===`pages`||o===`document`){let e=Sc(a,window.location.href,``);Yi(e,t),t===`push`&&nu(),su(e,t),await new Promise(()=>{});return}let s=Sc(a,window.location.href,``);Yi(s,t),t===`push`&&nu();let c=K.classifyEarlyNavigationIntent({basePath:``,currentHref:window.location.href,mode:t,scroll:n,targetHref:s});if(c.kind===`sameDocumentScroll`){gr(),ru(s,c.mode,c.scroll),Dn(s),$l(),c.scroll&&Ht(c.hash);return}if(Ho(typeof document>`u`?void 0:document)){let e=w()?.functions.navigateExternal;if(e){await e(s,t);return}su(s,t),await new Promise(()=>{});return}let l=s.indexOf(`#`),u=l===-1?``:s.slice(l),d=n?hr(u||null):null;n||gr();let f=w()?.functions.navigate;try{f?await f(s,0,`navigate`,t,void 0,r,void 0,d,i):(t===`replace`?tu(null,``,s):eu(null,``,s),$l())}catch(e){throw d&&br(d),e}d&&au(d)}var lu=0;function uu(){lu+=1;let e=!1;return()=>{e||(e=!0,lu=Math.max(0,lu-1))}}function du(){return lu>0}function fu(e){queueMicrotask(e)}var pu={bfcacheId:`0`,push(e,t){Zo(e),w()?.functions.notifyLinkNavigationStart?.();let n=uu();try{R.startTransition(()=>{cu(e,`push`,t?.scroll!==!1,!0)})}catch(e){throw n(),e}fu(n)},replace(e,t){Zo(e),w()?.functions.notifyLinkNavigationStart?.();let n=uu();try{R.startTransition(()=>{cu(e,`replace`,t?.scroll!==!1,!0)})}catch(e){throw n(),e}fu(n)},back(){window.history.back()},forward(){window.history.forward()},refresh(){if(w()?.functions.clearNavigationCaches?.(),du())return;let e=w()?.functions.navigate;e&&R.startTransition(()=>{e(window.location.href,0,`refresh`,void 0,void 0,!0)})},prefetch(e,t){if(Zo(e),!Dc(window.navigator?.userAgent??``)){try{new URL(bc(e,``),window.location.href)}catch{throw Error(`Cannot prefetch '${e}' because it cannot be converted to a URL.`)}(async()=>{let n=e;if(pc(e)){let t=yc(e,``);if(t==null)return;n=t}let r=Wc(n);if(r===`pages`||r===`document`)return;let i=Sc(n,window.location.href,``),a=Zc(i),o=zl(),s=Ui({interceptionContext:a});o&&s.set(A,o);let c=await Gi(i,s),l=B.encodeCacheKey(c,a),u=Qc();if(u.has(l)){wl(l,t?.onInvalidate);return}u.add(l),Ml(c,zc(()=>fetch(c,{headers:s,credentials:`include`,priority:`low`}),`low`),a,o,t)})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})}}};function mu(e){return!e||e===`0`?la:e}function hu(){let e=tn(),t=en();if(!e||!t||typeof R.useContext!=`function`)return mu(null);try{let n=R.useContext(e),r=R.useContext(t);return mu(n===null?null:r?.[n])}catch{return mu(null)}}var gu=pu;function _u(){if(!Lt||typeof R.useContext!=`function`||typeof R.useMemo!=`function`)throw Error(`invariant expected app router to be mounted`);let e=R.useContext(Lt);if(e===null)throw Error(`invariant expected app router to be mounted`);let t=hu();return R.useMemo(()=>({...e,bfcacheId:t}),[e,t])}{let e=Y();e&&!e.patchInstalled&&(e.patchInstalled=!0,window.addEventListener(`popstate`,()=>{w()?.functions.notifyLinkNavigationStart?.()}),window.addEventListener(`popstate`,e=>{ne()||($l(),ou(e.state))}),window.history.pushState=function(t,n,r){e.originalPushState.call(window.history,Mo(t,window.history.state),n,r),e.suppressUrlNotifyCount===0&&(w()?.functions.notifyLinkNavigationStart?.(),$l())},window.history.replaceState=function(t,n,r){e.originalReplaceState.call(window.history,Mo(t,window.history.state),n,r),e.suppressUrlNotifyCount===0&&(w()?.functions.notifyLinkNavigationStart?.(),$l())})}var vu=new TextEncoder;function yu(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e{let e=o;o=void 0,e?.()},c=()=>{a||(a=!0,s(),t.close())},l=()=>{typeof queueMicrotask==`function`?queueMicrotask(c):Promise.resolve().then(c)},u=()=>{a||(a=!0,s(),t.error(Su()))};e=()=>{a||(a=!0,s())};let d=w()===null?null:te(),f=d?.rsc??(n.__VINEXT_RSC_CHUNKS__??=[]);if(f.push=function(...e){let r=Array.prototype.push.apply(this,e);if(a)return r;for(let n of e)t.enqueue(bu(n));return(d?.done||n.__VINEXT_RSC_DONE__)&&c(),r},d){let e=!!d.done;Object.defineProperty(d,`done`,{configurable:!0,enumerable:!0,get(){return e},set(t){e=!!t,e&&l()}})}else{let e=!!n.__VINEXT_RSC_DONE__;Object.defineProperty(n,`__VINEXT_RSC_DONE__`,{configurable:!0,enumerable:!0,get(){return e},set(t){e=!!t,e&&l()}})}if(typeof document<`u`)if(document.readyState===`loading`)document.addEventListener(`DOMContentLoaded`,u),o=()=>document.removeEventListener(`DOMContentLoaded`,u);else{let e=setTimeout(u);o=()=>clearTimeout(e)}},cancel(){e?.()}})}var Eu={origin:`committed-cache`},Du={origin:`fresh`},Ou={origin:`visited-cache`};function ku(e){return{id:e.id,lane:e.lane,...e.navigationCommitKind===void 0?{}:{navigationCommitKind:e.navigationCommitKind},...e.navigationId===void 0?{}:{navigationId:e.navigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`pending`}}function Au(e){return e.skippedLayoutIds.length===0}function ju(e){return e.cacheEntryReuseProof!==void 0&&Au(e)}function Mu(e){switch(e.origin){case`committed-cache`:case`fresh`:return!1;case`visited-cache`:return!0;default:throw Error(`[vinext] Unknown App Router payload origin: `+String(e))}}function Nu(e){return ue($i(e))}function Pu(e){if(e.interception!==null)return e.routeId;let t=B.parseElementKey(e.routeId);return t?.kind!==`route`||t.interceptionContext===null?e.routeId:B.encodeRouteId(t.path,null)}function Fu(e,t=``){return e===null?null:H(new URL(e,`http://localhost`).pathname,t)}function Iu(e){let t=Lu(e),n=Bu(e.pending),r=Vu({pending:e.pending,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetSnapshot:n});if(e.pending.action.operation.navigationCommitKind===`detached`&&e.currentState.activeOperation?.navigationId===e.startedNavigationId&&e.currentState.activeOperation.navigationCommitKind===`authoritative`)return{disposition:`skip`,preserveElementIds:[],trace:G(W.staleOperation,t)};let i=e.currentState.activeOperation?.navigationId===e.startedNavigationId&&e.currentState.activeOperation.navigationCommitKind===`detached`&&e.pending.action.operation.navigationCommitKind===`authoritative`?e.pending.action.operation.startedVisibleCommitVersion:e.currentState.visibleCommitVersion,a=fs(r,{activeNavigationId:e.activeNavigationId,visibleCommitVersion:i});if(!a.authorized)return{disposition:`skip`,preserveElementIds:[],trace:G(W.staleOperation,t)};let o=Wu(Uu({currentState:e.currentState,pending:e.pending,routeManifest:e.routeManifest??null,targetHref:e.targetHref,targetSnapshot:n,token:a.token,traceFields:t}));return Gu({currentState:e.currentState,decision:o,pending:e.pending})}function Lu(e){return{...os({activeNavigationId:e.activeNavigationId,currentRootLayoutTreePath:e.currentState.rootLayoutTreePath,currentVisibleCommitVersion:e.currentState.visibleCommitVersion,nextRootLayoutTreePath:e.pending.rootLayoutTreePath,startedNavigationId:e.startedNavigationId,startedVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion}),...e.targetHref===void 0?{}:{targetHref:e.targetHref}}}function Ru(e){let t=[];for(let n of Ot(e)){let e=B.parseElementKey(n);e?.kind===`slot`&&t.push({ownerLayoutId:B.encodeLayoutId(e.treePath),slotId:n})}return t}function zu(e){let t=Kl(e.navigationSnapshot),n=e.interception?.targetMatchedUrl??Nu(e.navigationSnapshot.pathname);return{displayUrl:t,interception:e.interception,interceptionContext:e.interceptionContext,layoutIds:e.layoutIds,matchedUrl:n,mountedParallelSlots:Ru(e.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:Pu({interception:e.interception,routeId:e.routeId}),slotBindings:e.slotBindings}}function Bu(e){let t=Kl(e.action.navigationSnapshot),n=e.action.interception?.targetMatchedUrl??Nu(e.action.navigationSnapshot.pathname);return{displayUrl:t,interception:e.action.interception,interceptionContext:e.action.interceptionContext,layoutIds:e.action.layoutIds,matchedUrl:n,mountedParallelSlots:Ru(e.action.elements),rootBoundaryId:e.rootLayoutTreePath,routeId:Pu({interception:e.action.interception,routeId:e.routeId}),slotBindings:e.action.slotBindings}}function Vu(e){return{baseVisibleCommitVersion:e.pending.action.operation.startedVisibleCommitVersion,deploymentVersion:null,graphVersion:e.routeManifest?.graphVersion??null,lane:e.pending.action.operation.lane,navigationId:e.startedNavigationId,operationId:e.pending.action.operation.id,targetSnapshotFingerprint:Hu(e.targetSnapshot)}}function Hu(e){return`${e.routeId}|root:${e.rootBoundaryId??`unknown`}`}function Uu(e){let t=e.pending.cacheEntryReuseProof;return K.plan({routeManifest:e.routeManifest,state:{nextOperationToken:e.token,traceFields:e.traceFields,visibleCommitVersion:e.currentState.visibleCommitVersion,visibleSnapshot:zu(e.currentState)},event:{kind:`flightResponseArrived`,result:{...t?{cacheEntryReuseProof:t}:{},...e.pending.restoredHistorySnapshot?{restoredHistorySnapshot:!0}:{},href:e.targetHref??e.targetSnapshot.displayUrl,targetSnapshot:e.targetSnapshot},token:e.token}})}function Wu(e){switch(e.kind){case`proposeCommit`:return{disposition:`dispatch`,preserveAbsentSlots:e.proposal.preserveAbsentSlots,preserveElementIds:e.proposal.preserveElementIds,preservePreviousSlotIds:e.proposal.preservePreviousSlotIds,trace:e.trace};case`hardNavigate`:return{disposition:`hard-navigate`,preserveElementIds:[],trace:e.trace};case`noCommit`:return{disposition:`skip`,preserveElementIds:[],trace:e.trace};case`requestWork`:throw Error(`[vinext] Root-boundary commit planning returned requestWork (${e.work.kind}); flightResponseArrived should never request work`);default:throw Error(`[vinext] Unknown navigation decision: `+String(e))}}function Gu(e){if(e.decision.disposition!==`dispatch`||e.pending.skippedLayoutIds.length===0)return e.decision;let t=new Set(e.currentState.layoutIds),n=new Set(e.pending.action.layoutIds),r=[...e.decision.preserveElementIds],i=new Set(r),a=[];for(let o of e.pending.skippedLayoutIds)i.has(o)||B.parseElementKey(o)?.kind===`layout`&&(!t.has(o)||!n.has(o)||Object.hasOwn(e.currentState.elements,o)&&(r.push(o),i.add(o),a.push(o)));if(a.length===0)return e.decision;let o=Ku({currentSlotBindings:e.currentState.slotBindings,preservePreviousSlotIds:e.decision.preservePreviousSlotIds,skippedLayoutIds:a,targetSlotBindings:e.pending.action.slotBindings});return{...e.decision,preserveElementIds:r,preservePreviousSlotIds:o}}function Ku(e){let t=$s({currentSlotBindings:e.currentSlotBindings,preservedLayoutIds:e.skippedLayoutIds,targetSlotBindings:e.targetSlotBindings});if(t.length===0)return e.preservePreviousSlotIds;let n=[...e.preservePreviousSlotIds],r=new Set(n);for(let e of t)r.has(e)||(n.push(e),r.add(e));return n}async function qu(e){let t=await e.nextElements,n=B.readMetadata(t),r=n.cacheEntryReuseProof??(Mu(e.payloadOrigin)?Xa(null):void 0),i=e.previousNextUrl===void 0?e.currentState.previousNextUrl:e.previousNextUrl,a=n.interception===null?null:i;return{action:{bfcacheIds:wa({current:e.currentState.bfcacheIds,currentElements:e.currentState.elements,currentPathname:e.currentState.navigationSnapshot.pathname,elements:t,nextPathname:e.navigationSnapshot.pathname,restored:e.restoredBfcacheIds,reuseCurrent:e.reuseCurrentBfcacheIds}),...r?{cacheEntryReuseProof:r}:{},elements:t,interception:n.interception,interceptionContext:n.interceptionContext,layoutIds:n.layoutIds,layoutFlags:n.layoutFlags,slotBindings:n.slotBindings,navigationSnapshot:e.navigationSnapshot,operation:ku({id:e.renderId,lane:e.operationLane,navigationCommitKind:e.navigationCommitKind,navigationId:e.navigationId,startedVisibleCommitVersion:e.currentState.visibleCommitVersion}),previousNextUrl:a,renderId:e.renderId,rootLayoutTreePath:n.rootLayoutTreePath,reuseCurrentBfcacheIds:e.reuseCurrentBfcacheIds??!0,routeId:n.routeId,skippedLayoutIds:n.skippedLayoutIds,type:e.type},...r?{cacheEntryReuseProof:r}:{},interception:n.interception,interceptionContext:n.interceptionContext,previousNextUrl:a,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId,skippedLayoutIds:n.skippedLayoutIds}}var Ju=Symbol(`ApprovedVisibleCommit`);function Yu(e,t){return Xu(t),ed(e,t)}function Xu(e){if(e[Ju]!==!0)throw Error(`[vinext] Visible router state mutation requires ApprovedVisibleCommit`)}function Zu(e,t){return{id:e.id,lane:e.lane,...e.navigationCommitKind===void 0?{}:{navigationCommitKind:e.navigationCommitKind},...e.navigationId===void 0?{}:{navigationId:e.navigationId},startedVisibleCommitVersion:e.startedVisibleCommitVersion,state:`committed`,visibleCommitVersion:t}}function Qu(e,t,n){let r=e.visibleCommitVersion+1;return{...t,activeOperation:Zu(n,r),visibleCommitVersion:r}}function $u(e,t,n,r){if(r.length===0)return t;let i=new Set(r),a=new Map;for(let t of e)i.has(t.slotId)&&a.set(t.slotId,t);let o=[],s=new Set;for(let e of t){let t=a.get(e.slotId);o.push(t??e),s.add(e.slotId)}for(let e of r){if(s.has(e))continue;let t=a.get(e);t&&o.push(t)}return ze(o,{layoutIds:n})}function ed(e,t){let{action:n}=t;switch(n.type){case`traverse`:case`navigate`:case`replace`:{let r=n.reuseCurrentBfcacheIds&&n.operation.lane!==`refresh`?t.decision.preserveElementIds.filter(t=>{let r=e.bfcacheIds[t];return r!==void 0&&n.bfcacheIds[t]===r}):[],i=new Set(r),a=n.reuseCurrentBfcacheIds?t.decision.preservePreviousSlotIds.filter(e=>{let t=n.slotBindings.find(t=>t.slotId===e);return t?.ownerLayoutId!==null&&t?.ownerLayoutId!==void 0&&i.has(t.ownerLayoutId)}):[],o=n.operation.lane===`hmr`?r.filter(e=>a.some(t=>n.slotBindings.find(e=>e.slotId===t)?.ownerLayoutId===e)):[],s=n.operation.lane===`hmr`&&e.routeId===n.routeId&&Object.hasOwn(e.elements,e.routeId)?[e.routeId,...o]:o,c=s.length>1?[...new Set(s)]:s,l=n.operation.lane===`hmr`?c:r,u=fi(e.elements,n.elements,{clearAbsentSlots:n.type===`traverse`||!n.reuseCurrentBfcacheIds,preserveAbsentSlots:n.reuseCurrentBfcacheIds&&t.decision.preserveAbsentSlots,preserveElementIds:l,preservePreviousSlotIds:a});return Qu(e,{bfcacheIds:Ta({elements:u,next:n.bfcacheIds,previous:n.reuseCurrentBfcacheIds?e.bfcacheIds:{}}),elements:u,interception:n.interception,interceptionContext:n.interceptionContext,layoutFlags:rd(e.layoutFlags,n.layoutFlags,l),layoutIds:n.layoutIds,navigationSnapshot:n.navigationSnapshot,previousNextUrl:n.previousNextUrl,renderId:n.renderId,rootLayoutTreePath:n.rootLayoutTreePath,routeId:n.routeId,slotBindings:$u(e.slotBindings,n.slotBindings,n.layoutIds,a)},n.operation)}default:{let e=n.type;throw Error(`[vinext] Unknown router action: `+String(e))}}}function td(e){let t=Iu(e);switch(t.disposition){case`skip`:return{disposition:`no-commit`,trace:t.trace};case`hard-navigate`:return{disposition:`hard-navigate`,trace:t.trace};case`dispatch`:return nd(t.trace,t.preserveElementIds,t.preserveAbsentSlots,t.preservePreviousSlotIds);default:throw Error(`[vinext] Unknown navigation commit disposition: `+String(t))}}function nd(e=G(W.commitCurrent),t=[],n=!1,r=[]){return{disposition:`commit`,preserveAbsentSlots:n,preserveElementIds:[...t],preservePreviousSlotIds:[...r],trace:e}}function rd(e,t,n){let r={...t};for(let t of n){if(Object.hasOwn(r,t))continue;let n=e[t];n&&(r[t]=n)}return r}function id(e){return{[Ju]:!0,action:e.pending.action,decision:e.decision,interception:e.pending.interception,interceptionContext:e.pending.interceptionContext,previousNextUrl:e.pending.previousNextUrl,rootLayoutTreePath:e.pending.rootLayoutTreePath,routeId:e.pending.routeId}}function ad(e){return{operationLane:e.action.operation.lane,pendingOperationId:e.action.operation.id,startedVisibleCommitVersion:e.action.operation.startedVisibleCommitVersion}}function od(e,t,n){return cs(e,t,ad(n))}function sd(e,t){switch(e.disposition){case`commit`:return{...e,trace:od(e.trace,as.visibleCommit,t)};case`hard-navigate`:return{...e,trace:od(e.trace,as.hardNavigate,t)};case`no-commit`:return{...e,trace:od(e.trace,as.noCommit,t)};default:throw Error(`[vinext] Unknown commit decision: `+String(e))}}function cd(e){let{currentState:t,pending:n}=e;if(n.action.operation.lane!==`hmr`)throw Error(`[vinext] HMR visible commit approval requires an HMR pending operation`);let r=sd(td({activeNavigationId:n.action.operation.id,currentState:t,pending:n,routeManifest:e.routeManifest,startedNavigationId:n.action.operation.id,targetHref:e.targetHref}),n);return r.disposition===`commit`?{approvedCommit:id({decision:r,pending:n}),decision:r}:{approvedCommit:null,decision:r}}function ld(e){let t=sd(td({activeNavigationId:e.activeNavigationId,currentState:e.currentState,pending:e.pending,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref}),e.pending);switch(t.disposition){case`commit`:return{approvedCommit:id({decision:t,pending:e.pending}),decision:t};case`hard-navigate`:case`no-commit`:return{approvedCommit:null,decision:t};default:throw Error(`[vinext] Unknown commit decision: `+String(t))}}async function ud(e){let t=await qu({currentState:e.currentState,navigationCommitKind:void 0,navigationId:e.startedNavigationId,nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,payloadOrigin:e.payloadOrigin,previousNextUrl:e.previousNextUrl,renderId:e.renderId,type:e.type}),n=e.getCurrentStateForApproval?.()??e.currentState,r=ld({activeNavigationId:e.getActiveNavigationId?.()??e.activeNavigationId,currentState:n,pending:t,routeManifest:e.routeManifest??null,startedNavigationId:e.startedNavigationId,targetHref:e.targetHref});return{approvedCommit:r.approvedCommit,decision:r.decision,pending:t,trace:r.decision.trace}}var dd=`__vinext_hard_navigation_target__`;function fd(e){try{return new URL(e,window.location.href).href}catch{return e}}function pd(){try{return window.sessionStorage.getItem(dd)}catch{return null}}function md(e){try{return window.sessionStorage.setItem(dd,e),window.sessionStorage.getItem(dd)===e}catch{return!1}}function hd(){try{window.sessionStorage.removeItem(dd)}catch{}}function gd(e,t=`assign`){let n=fd(e),r=fd(window.location.href);return pd()===n&&r===n?(hd(),console.error(`[vinext] Prevented repeated hard navigation to ${n}; leaving the current document in place to avoid a reload loop.`),!1):!md(n)&&r===n?(console.error(`[vinext] Hard navigation to ${n} requires a reload-loop guard, but sessionStorage is unavailable; leaving the current document in place.`),!1):(t===`replace`?window.location.replace(e):window.location.assign(e),!0)}function _d(e,t){let n=H(e.pathname,t),r=new URLSearchParams(e.search).toString();return r===``?n:`${n}?${r}`}function vd(e,t,n){try{let r=window.location.href;return _d(new URL(n,r),e)===Kl(t)}catch{return!1}}function yd(e={}){let t=e.basePath??``,n=e.commitClientNavigationState??$l,r=e.performHardNavigation??gd,i=e.getRouteManifest??(()=>null),a=e.syncHistoryStatePreviousNextUrl??(()=>{}),o=0,s=0,c=null,l=null,u=0,d=new Map,f=new Map,p=new Map,m=null,h=null,g=null,_=null,v=null,y=!1;function b(){if(!m)throw Error(`[vinext] Browser router state setter is not initialized`);return m}function x(){if(!h)throw Error(`[vinext] Browser router state is not initialized`);return h.current}function ee(){return h||y?Promise.resolve():(v||=new Promise(e=>{_=e}),v)}function S(){y=!0;let e=_;_=null,v=null,e?.()}function C(){return u+=1,s+=1,c=s,l=null,s}function w(){return s}function T(){return o+=1,o}function E(){return h!==null}function D(e){return e===s}function te(){let e=b();g&&!g.settled&&(g.settled=!0,g.resolve(x()));let t,n=new Promise(e=>{t=e});if(!t)throw Error(`[vinext] Failed to initialize browser router promise`);let r={promise:n,resolve:t,settled:!1};return g=r,e(n),r}function O(e){!e||e.settled||(e.settled=!0,e.resolve(x()),g===e&&(g=null))}function ne(e,t){O(t),D(e)&&(c=null,l=null,Zl(e))}function k(e,t){t&&p.set(e,t)}function A(e){for(let[t,r]of p)t>e||(p.delete(t),t===e?r():n(void 0,{releaseSnapshot:!0}))}function j(e,t){for(let[n,r]of d){if(n>e)continue;d.delete(n);let i=t&&n===e;i&&r.committedState!==null&&r.onCommittedState?.(r.committedState),r.resolve(i)}}function M(e){for(let[t,n]of f)t>e||(f.delete(t),Dn(n))}async function N(t,n){let i=++u,a=l===`navigation`;if(!E())return;let o=await qu({currentState:x(),nextElements:t,navigationSnapshot:n,operationLane:`hmr`,payloadOrigin:Du,renderId:T(),type:`replace`});if(i!==u||a||!E())return;let s=cd({currentState:x(),pending:o,routeManifest:e.getRouteManifest?.()??null,targetHref:Kl(n)});s.approvedCommit?ie(s.approvedCommit):s.decision.disposition===`hard-navigate`&&r(Kl(n))}function P({renderId:e,children:t}){return(0,R.useInsertionEffect)(()=>{M(e)},[e]),(0,R.useLayoutEffect)(()=>(A(e),j(e,!0),()=>{j(e,!1)}),[e]),t}function re(e,t,n,r){let i=b(),a=d.get(e),o=e=>(a&&(a.committedState=e),e);if(n){if(n.settled)return;let e=o(Yu(x(),t));n.settled=!0,n.resolve(e),g===n&&(g=null);return}if(r===`synchronous`){(0,Sr.flushSync)(()=>{i(o(Yu(x(),t)))});return}(0,R.startTransition)(()=>{i(o(Yu(x(),t)))})}function ie(e){b()(Yu(x(),e))}function ae(e){let t={id:e.renderId,lane:`traverse`,startedVisibleCommitVersion:e.currentState.visibleCommitVersion,state:`pending`};return{action:{bfcacheIds:e.restoredState.bfcacheIds,elements:e.restoredState.elements,interception:e.restoredState.interception,interceptionContext:e.restoredState.interceptionContext,layoutFlags:e.restoredState.layoutFlags,layoutIds:e.restoredState.layoutIds,navigationSnapshot:e.restoredState.navigationSnapshot,operation:t,previousNextUrl:e.restoredState.previousNextUrl,renderId:e.renderId,rootLayoutTreePath:e.restoredState.rootLayoutTreePath,reuseCurrentBfcacheIds:!1,routeId:e.restoredState.routeId,skippedLayoutIds:[],slotBindings:e.restoredState.slotBindings,type:`traverse`},interception:e.restoredState.interception,interceptionContext:e.restoredState.interceptionContext,previousNextUrl:e.restoredState.previousNextUrl,rootLayoutTreePath:e.restoredState.rootLayoutTreePath,routeId:e.restoredState.routeId,restoredHistorySnapshot:!0,skippedLayoutIds:[]}}function oe(e){if(!vd(t,e.state.navigationSnapshot,e.targetHref))return!1;let n=x(),r=ae({currentState:n,renderId:T(),restoredState:e.state}),a=ld({activeNavigationId:s,currentState:n,pending:r,routeManifest:i(),startedNavigationId:e.navId,targetHref:e.targetHref});return a.approvedCommit===null?!1:(e.beforeCommit?.(),ie(a.approvedCommit),!0)}function F(e){Da(e?.revalidation??`none`)&&e?.onDiscardedRevalidation?.()}async function se(e){e.navId===c&&(l=e.operationLane);let t=T(),a=En(e.targetHref);a&&f.set(t,a);let o,u=new Promise(n=>{o=n,d.set(t,{committedState:null,onCommittedState:e.onCommittedState,resolve:n})}),m=!1;try{let n=await qu({currentState:x(),navigationCommitKind:e.navigationCommitKind,navigationId:e.navId,nextElements:e.nextElements,navigationSnapshot:e.navigationSnapshot,operationLane:e.operationLane,payloadOrigin:e.payloadOrigin,previousNextUrl:e.previousNextUrl,renderId:t,restoredBfcacheIds:e.restoredBfcacheIds,reuseCurrentBfcacheIds:e.reuseCurrentBfcacheIds,type:e.actionType}),c=ld({activeNavigationId:s,currentState:x(),pending:n,routeManifest:i(),startedNavigationId:e.navId,targetHref:e.targetHref});if(c.decision.disposition===`no-commit`)return O(e.pendingRouterState),f.delete(t),a&&Dn(a),d.delete(t),o?.(!1),br(e.scrollIntent??null),`no-commit`;if(c.decision.disposition===`hard-navigate`)return O(e.pendingRouterState),f.delete(t),d.delete(t),br(e.scrollIntent??null),r(e.targetHref)?`hard-navigate`:(a&&Dn(a),`no-commit`);let l=c.approvedCommit;if(l===null)throw Error(`[vinext] Commit decision did not approve a visible commit`);k(t,e.createNavigationCommitEffect({bfcacheIds:l.action.bfcacheIds,href:e.targetHref,historyUpdateMode:e.historyUpdateMode,navId:e.navId,params:e.params,previousNextUrl:l.previousNextUrl,targetHistoryIndex:e.targetHistoryIndex})),vr(e.scrollIntent,t),Hl(),m=!0,re(t,l,e.pendingRouterState,e.visibleCommitMode??`transition`)}catch(r){throw f.delete(t),p.delete(t),d.delete(t),m&&n(e.navId),O(e.pendingRouterState),o?.(!1),r}return u.then(e=>e?`committed`:`no-commit`)}async function ce(e,t,n,o,c){let l=o??x(),u=c?.startedNavigationId??s,d=c?.targetHref??window.location.href,{approvedCommit:f,decision:p,pending:m,trace:h}=await ud({activeNavigationId:s,currentState:l,getActiveNavigationId:()=>s,getCurrentStateForApproval:x,navigationSnapshot:t,nextElements:e,renderId:T(),operationLane:Ea(c?.revalidation??`none`),payloadOrigin:Du,startedNavigationId:u,routeManifest:i(),targetHref:d,type:`navigate`});if(p.disposition===`hard-navigate`){r(d);return}if(f){let e=ld({activeNavigationId:s,currentState:x(),pending:m,routeManifest:i(),startedNavigationId:u,targetHref:d});if(e.decision.disposition===`hard-navigate`){r(d);return}if(e.approvedCommit){let t=e.approvedCommit;(0,R.startTransition)(()=>{ie(t)}),a(t.previousNextUrl,t.action.bfcacheIds)}else F(c)}else p.disposition===`no-commit`&&F(c);if(n){if(!n.ok)throw n.data;return n.data}}function le(e,t){return m=e,h=t,S(),()=>{m===e&&(m=null),h===t&&(h=null,y=!1)}}return{beginNavigation:C,getActiveNavigationId:w,hasBrowserRouterState:E,getBrowserRouterState:x,isCurrentNavigation:D,performHardNavigation:r,waitForBrowserRouterStateReady:ee,attachBrowserRouterState:le,beginPendingBrowserRouterState:te,finalizeNavigation:ne,restoreHistorySnapshotVisibleState:oe,renderNavigationPayload:se,commitSameUrlNavigatePayload:ce,hmrReplaceTree:N,drainPrePaintEffects:A,clearCommittedNavigationFailureTargets:M,NavigationCommitSignal:P}}var bd=`__VINEXT_RSC_FORM_STATE__`;function xd(e){let t=e.__VINEXT_RSC_FORM_STATE__??null;return delete e[bd],t}function Sd(e){let t={formState:e.formState,...e.onRecoverableError?{onRecoverableError:e.onRecoverableError}:{},onUncaughtError:e.onUncaughtError};return e.onCaughtError?{...t,onCaughtError:e.onCaughtError}:t}function Cd(e){let t;if(e.startTransition(()=>{t=e.hydrateRoot(e.container,e.children,e.options)}),t===void 0)throw Error(`[vinext] React.startTransition did not synchronously start hydration`);return t}function wd(e){let t=new URL(e);return`${t.pathname}${t.search}${t.hash}`}function Td(e){if(!e||typeof e!=`object`)return e;let t={};for(let[n,r]of Object.entries(e))n===`__vinext_scrollX`||n===`__vinext_scrollY`||(t[n]=r);return Object.keys(t).length>0?t:null}var Ed=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){this.#t=e.readHistoryState,this.#n=e.readCurrentHref,this.#r=e.pushHistoryState,this.#i=e.replaceHistoryState,this.#a=e.readVisibleNavigationMetadata,this.#e=new Oo({initialHistoryState:e.initialHistoryState,maxHistoryStateSnapshots:e.maxHistoryStateSnapshots}),this.#o=zo(e.initialHistoryState)??0,this.#s=this.#o}get currentHistoryTraversalIndex(){return this.#o}allocateNavigationHistoryTraversalIndex(e){switch(e){case`push`:return this.#s+1;case`replace`:return this.#o;case void 0:return null;default:throw Error(`[vinext] Unknown history update mode: `+String(e))}}commitHistoryTraversalIndex(e){this.#o=e,e!==null&&(this.#s=Math.max(this.#s,e))}commitTraversalIndexFromHistoryState(e){this.commitHistoryTraversalIndex(zo(e))}resolveTraversalIntent(e){return Bo({currentHistoryIndex:this.#o,historyState:e})}readCurrentBfcacheVersionHistoryIds(e){return this.#e.readCurrentBfcacheVersionHistoryIds(e)}isCacheInvalidationGuarded(){return this.#e.isCacheInvalidationGuarded()}isCurrentBfcacheVersion(e){return this.#e.isCurrentBfcacheVersion(e)}beginCacheInvalidationGuard(){return this.#e.beginCacheInvalidationGuard()}invalidateRestorableClientState(){this.#e.invalidateClientState()}rememberHistoryStateSnapshot(e){this.#e.rememberHistoryStateSnapshot({historyIndex:this.#o,state:e})}commitHashOnlyNavigation(e,t,n){let r=this.allocateNavigationHistoryTraversalIndex(t),i=this.#t(),a=this.#a(),o=a?a.previousNextUrl:No(i),s=a?a.bfcacheIds:this.#e.readCurrentBfcacheVersionHistoryIds(i),c=jo(this.#c(t,n),{bfcacheIds:s,bfcacheVersion:s===null?void 0:this.#e.currentBfcacheVersion,previousNextUrl:o,traversalIndex:r});t===`replace`?this.#i(c,e):this.#r(c,e),this.commitHistoryTraversalIndex(r)}#c(e,t){if(e!==`replace`)return null;let n=this.#t();return t?Td(n):n}commitNavigationHistory(e){let t=this.#n(),n=new URL(t).origin,r=new URL(e.href,n).href,i=e.historyUpdateMode===`replace`,a=e.targetHistoryIndex===void 0?this.allocateNavigationHistoryTraversalIndex(e.historyUpdateMode):e.targetHistoryIndex,o=jo(i?this.#t():null,{bfcacheIds:e.bfcacheIds,bfcacheVersion:this.#e.currentBfcacheVersion,previousNextUrl:e.previousNextUrl,traversalIndex:a}),s=!1;e.historyUpdateMode===`replace`&&t!==r?(e.stageClientParams(),this.#i(o,e.href),s=!0,this.commitHistoryTraversalIndex(a)):e.historyUpdateMode===`push`&&t!==r&&(e.stageClientParams(),this.#r(o,e.href),s=!0,this.commitHistoryTraversalIndex(a)),s||(this.syncCurrentHistoryStatePreviousNextUrl(e.previousNextUrl,e.bfcacheIds),e.stageClientParams(),e.targetHistoryIndex!==void 0&&this.commitHistoryTraversalIndex(e.targetHistoryIndex))}syncCurrentHistoryStatePreviousNextUrl(e,t){if(this.#l(this.#t(),e,t))return;let n=jo(this.#t(),{bfcacheIds:t,bfcacheVersion:t===void 0?void 0:this.#e.currentBfcacheVersion,previousNextUrl:e});this.#i(n),!this.#l(this.#t(),e,t)&&this.#i(n)}#l(e,t,n){return No(e)===t&&(n===void 0||Dd(Fo(e),n)&&this.#e.isCurrentBfcacheVersion(e))}writeBootstrapHistoryMetadata(){this.#i(jo(this.#t(),{previousNextUrl:null,traversalIndex:this.#o}),wd(this.#n()))}writeHydratedHistoryMetadata(e){this.#i(jo(this.#t(),{bfcacheIds:e.bfcacheIds,bfcacheVersion:this.#e.currentBfcacheVersion,previousNextUrl:e.previousNextUrl,traversalIndex:this.#o}))}restoreHistorySnapshot(e){let t=this.#e.resolveHistoryStateSnapshotRestore(e.historyState);return t.kind===`skip`?!1:e.approveVisibleRestore({state:t.state,beforeCommit:()=>{this.commitHistoryTraversalIndex(t.targetHistoryIndex),e.stageClientParams(t.state.navigationSnapshot.params)}})}};function Dd(e,t){if(e===t)return!0;if(e===null||t===null)return!1;let n=Object.entries(e),r=Object.entries(t);return n.length===r.length?n.every(([e,n])=>t[e]===n):!1}var Od=30*6e4;function kd(e){return{createdAt:e.now,...e.elements?{elements:e.elements}:{},expiresAt:rl(e.now,e.response,e.fallbackTtlMs??3e5),mountedSlotsHeader:e.mountedSlotsHeader??null,params:e.params,response:e.response}}function Ad(e,t){return t.navigationKind===`refresh`?!1:t.navigationKind===`traverse`?t.now-e.createdAtt.now}function jd(e){return!!(e&&typeof e==`object`&&`__vinext_scrollY`in e)}function Md(e,t){let n=e.getActiveNavigationId();e.markScrollRestoreConsumed(n),e.restorePopstateScrollPosition(t,{shouldContinue:()=>e.isCurrentNavigation(n)})}function Nd(e){if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(e);return}queueMicrotask(e)}function Pd(e){return{direction:`unknown`,historyState:e,targetHistoryIndex:zo(e)}}function Fd(e){return t=>{e.notifyAppRouterTransitionStart(window.location.href);let n=e.getNavigate()?.(window.location.href,0,`traverse`,void 0,void 0,!1,Pd(t.state))??Promise.resolve(),r=e.getActiveNavigationId();e.setPendingNavigation(n);let i=jd(t.state),a=()=>e.isCurrentNavigation(r)&&!e.shouldSkipScrollRestore(r);i&&Nd(()=>{a()&&e.restorePopstateScrollPosition(t.state,{shouldContinue:a})}),n.finally(()=>{a()&&!i&&e.restorePopstateScrollPosition(t.state),e.getPendingNavigation()===n&&e.setPendingNavigation(null)})}}function Id(e){if(!s(e.errorBoundary))return!1;let t=e.errorBoundary.props;return s(t)&&t.isImplicitRootErrorBoundary===!0}function Ld(e,t){console.error(e),t?.componentStack&&console.error(`The above error occurred in a React component: +`+t.componentStack)}function Rd(e){if(typeof globalThis.reportError==`function`){globalThis.reportError(e);return}console.error(e)}function zd(){return e=>{Rd(e)}}function Bd(e){return(t,n)=>{if(!Kn(t)){if(Id(n)){e(t,n);return}Ld(t,n)}}}function Vd(e){Rd(e instanceof Error&&e.cause!==void 0?e.cause:e)}function Hd(){let e=`pending`,t=null,n=null,r=()=>{if(e!==`committed`&&e!==`complete`||t===null)return;let r=t;t=null,n=r()};return{commit(){e===`pending`&&(e=`committed`,r())},complete(){e===`committed`&&(e=`complete`)},fail(){e===`complete`||e===`invalidated`||(e=`invalidated`,t=null,n?.(),n=null)},invalidate(){e!==`invalidated`&&(e=`invalidated`,t=null,n?.(),n=null)},publish(n){e!==`invalidated`&&(t=n,r())}}}var Ud=new WeakMap,Wd=new Promise(()=>{});function Gd(e){return`${e.routeId}\0${e.interceptionContext??``}\0${e.mountedSlotsHeader??``}`}function Kd(e){return`${e.cacheKey}\0${e.interceptionContext??``}\0${e.mountedSlotsHeader??``}`}function qd(){return{catchAllChild:null,dynamicChild:null,optionalCatchAllChild:null,route:null,staticChildren:new Map}}function Jd(e){let t=qd();for(let n of e.segmentGraph.routes.values()){let e=t,r=n.patternParts;if(r.length===0){e.route??=n;continue}for(let[t,i]of r.entries()){let a=t===r.length-1;if(i.startsWith(`:`)&&i.endsWith(`+`)){a&&e.catchAllChild===null&&(e.catchAllChild={paramName:i.slice(1,-1),route:n});break}if(i.startsWith(`:`)&&i.endsWith(`*`)){a&&e.optionalCatchAllChild===null&&(e.optionalCatchAllChild={paramName:i.slice(1,-1),route:n});break}if(i.startsWith(`:`)){let t=i.slice(1);e.dynamicChild===null?e.dynamicChild={node:qd(),paramName:t}:e.dynamicChild.paramName,e=e.dynamicChild.node,a&&(e.route??=n);continue}let o=e.staticChildren.get(i);o===void 0&&(o=qd(),e.staticChildren.set(i,o)),e=o,a&&(e.route??=n)}}return t}function Yd(e){let t=Ud.get(e);if(t)return t;let n=Jd(e);return Ud.set(e,n),n}function Xd(e,t,n,r){if(n===t.length)return e.route===null?e.optionalCatchAllChild===null?null:{route:e.optionalCatchAllChild.route,params:na(r)}:{route:e.route,params:na(r)};let i=t[n],a=e.staticChildren.get(i);if(a!==void 0)return Xd(a,t,n+1,r);if(e.dynamicChild!==null){r.push([e.dynamicChild.paramName,i]);let a=Xd(e.dynamicChild.node,t,n+1,r);if(a!==null)return a;r.pop()}if(e.catchAllChild!==null){let i=na(r);return i[e.catchAllChild.paramName]=t.slice(n),{route:e.catchAllChild.route,params:i}}if(e.optionalCatchAllChild!==null){let i=na(r);return i[e.optionalCatchAllChild.paramName]=t.slice(n),{route:e.optionalCatchAllChild.route,params:i}}return null}function Zd(e,t){let n;try{n=new URL(e,`https://vinext.local`)}catch{return null}Vi(n);let r=H(Hi(n.pathname),t);return ea(r===``?`/`:r)}function Qd(e){let t=Zd(e.href,e.basePath);if(t===null)return null;let n=Xd(Yd(e.routeManifest),t,0,[]);return n===null?null:(ra(n.params),n)}function $d(e,t){for(let[n,r]of Object.entries(t))e[n]=r}function ef(e){let t={...e.match.params};for(let n of e.routeManifest.segmentGraph.slotBindings.values()){if(n.routeId!==e.match.route.id||n.state!==`active`)continue;let r=n.slotPatternParts;if(!r)continue;let i=_o(e.urlParts,r);i&&$d(t,i)}return t}function tf(e,t=0){if(t>100)return!1;if(Array.isArray(e))return e.some(e=>tf(e,t+1));if(!(0,R.isValidElement)(e))return!1;let n=Reflect.get(e,`props`);return e.type===R.Suspense&&s(n)&&Reflect.get(n,`fallback`)!=null?!0:s(n)?tf(Reflect.get(n,`children`),t+1):!1}function nf(e,t){let n=new Set;t.pageId&&Object.hasOwn(e,t.pageId)&&n.add(t.pageId);for(let r of t.slotIds){let t=B.parseElementKey(r);t?.kind===`slot`&&t.name===`children`&&Object.hasOwn(e,r)&&n.add(r)}for(let t of Object.keys(e))B.parseElementKey(t)?.kind===`page`&&n.add(t);return Array.from(n).sort()}function rf(){throw Wd}function af(e){let t=Qd({basePath:e.basePath,href:e.href,routeManifest:e.routeManifest});if(t===null||!e.allowLoadingShell&&!t.route.isDynamic||e.interceptionContext!==null)return null;let n=B.readMetadata(e.elements);if(n.interception!==null||n.interceptionContext!==null)return null;let r=e.elements[n.routeId];if(!e.allowLoadingShell&&!tf(r)||e.allowLoadingShell&&e.elements.__prefetchLoadingShell!==`LoadingBoundary`||e.allowLoadingShell&&r==null)return null;let i=nf(e.elements,t.route);return i.length===0?null:{elements:e.elements,mountedSlotsHeader:e.mountedSlotsHeader,pageElementIds:i,routeId:t.route.id}}function of(e){let t={...e.elements};for(let n of e.pageElementIds)t[n]=(0,R.createElement)(rf);return t}function sf(e){if(e.interceptionContext!==null)return null;let t=Zd(e.href,e.basePath);if(t===null)return null;let n=Qd({basePath:e.basePath,href:e.href,routeManifest:e.routeManifest});if(n===null)return null;let r=e.templates.get(Gd({interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeId:n.route.id}));return r===void 0||r.mountedSlotsHeader!==e.mountedSlotsHeader?null:{elements:of(r),params:ef({match:n,routeManifest:e.routeManifest,urlParts:t}),template:r}}var cf=/[\t\n\f\r ]+/;function lf(e,t){return e===null?!1:e.split(cf).some(e=>e.length>0&&e.toLowerCase()===t.toLowerCase())}function uf(e,t){for(let n of e.split(/\s+/)){if(n===t)return!0;try{let e=new URL(n,window.location.href),r=new URL(t,window.location.href);if(e.href===r.href)return!0}catch{}}return!1}function df(e){return lf(e.getAttribute(`rel`),`stylesheet`)&&e.hasAttribute(`href`)&&(e.hasAttribute(`data-precedence`)||e.hasAttribute(`precedence`))}function ff(){let e=document.head.querySelectorAll(`style[data-vinext-inline-css][data-href]`);if(e.length===0)return;let t=document.head.querySelectorAll(`link[rel][href]`);for(let n of t){if(!df(n))continue;let t=n.getAttribute(`href`);if(t)for(let r of e){let e=r.getAttribute(`data-href`);if(e&&uf(e,t)){n.remove();break}}}}var pf=o();function mf(e){return e}function hf(e,t){let n=t?.keyFn??((...e)=>e[0]),r=t?.cache??new Map;return mf(function(...t){let i=n(...t),a=r.get(i);if(a!==void 0)return a;let o=e.apply(this,t);return r.set(i,o),o})}function gf(e){return e.split(`$$cache=`)[0]}function _f(){globalThis.__vite_rsc_require__=e=>e.startsWith(`$$server:`)?(e=e.slice(9),globalThis.__vite_rsc_server_require__(e)):globalThis.__vite_rsc_client_require__(e)}var vf=!1;function yf(e){if(vf)return;vf=!0;let t=hf(t=>e.load(gf(t)));globalThis.__vite_rsc_client_require__=t,_f()}var bf=n((e=>{var t=i(),n={stream:!0},r=Object.prototype.hasOwnProperty;function a(e,t){if(e){var n=e[t[0]];if(e=n&&n[t[2]])n=e.name;else{if(e=n&&n[`*`],!e)throw Error(`Could not find the module "`+t[0]+`" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.`);n=t[2]}return t.length===4?[e.id,e.chunks,n,1]:[e.id,e.chunks,n]}return t}function o(e,t){var n=``,r=e[t];if(r)n=r.name;else{var i=t.lastIndexOf(`#`);if(i!==-1&&(n=t.slice(i+1),r=e[t.slice(0,i)]),!r)throw Error(`Could not find the module "`+t+`" in the React Server Manifest. This is probably a bug in the React Server Components bundler.`)}return r.async?[r.id,r.chunks,n,1]:[r.id,r.chunks,n]}var s=new Map;function c(e){var t=__vite_rsc_require__(e);return typeof t.then!=`function`||t.status===`fulfilled`?null:(t.then(function(e){t.status=`fulfilled`,t.value=e},function(e){t.status=`rejected`,t.reason=e}),t)}function l(){}function u(e){for(var t=e[1],n=[],r=0;rl||l===35||l===114||l===120?(u=l,l=3,c++):(u=0,l=3);continue;case 2:m=s[c++],m===44?l=4:d=d<<4|(96s.length&&(m=-1)}var h=s.byteOffset+c;if(-1{t.exports=bf()}))(),1);function Sf(e,t={}){return xf.createFromReadableStream(e,{callServer:wf,findSourceMapURL:Tf,...t})}function Cf(e,t={}){return xf.createFromFetch(e,{callServer:wf,findSourceMapURL:Tf,...t})}function wf(...e){return globalThis.__viteRscCallServer(...e)}function Tf(e,t){let n=new URL(`/__vite_rsc_findSourceMapURL`,import.meta.url);return n.searchParams.set(`filename`,e),n.searchParams.set(`environmentName`,t),n.toString()}var Ef={"0b874ad30386":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>bn),void 0);return{get default(){return e.default}}},"15c18cfaeeff":async()=>{let e=await Uc(()=>import(`./layout-segment-context-Bf1cBuVr.js`),__vite__mapDeps([0,1,2]));return{get LayoutSegmentProvider(){return e.LayoutSegmentProvider}}},"593f344dc510":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>qn),void 0);return{get ErrorBoundary(){return e.ErrorBoundary},get ForbiddenBoundary(){return e.ForbiddenBoundary},get GlobalErrorBoundary(){return e.GlobalErrorBoundary},get NotFoundBoundary(){return e.NotFoundBoundary},get RedirectBoundary(){return e.RedirectBoundary},get SerializedErrorBoundary(){return e.SerializedErrorBoundary},get UnauthorizedBoundary(){return e.UnauthorizedBoundary}}},"6efdf509a785":async()=>{let e=await Uc(()=>import(`./page-CNQA87Lx.js`),__vite__mapDeps([3,1,2]));return{get default(){return e.default}}},"8c0f216c4604":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>Lr),void 0);return{get Children(){return e.Children},get ParallelSlot(){return e.ParallelSlot},get Slot(){return e.Slot}}},"9276801271d6":async()=>{let e=await Uc(()=>Promise.resolve().then(()=>xr),void 0);return{get AppRouterScrollTarget(){return e.AppRouterScrollTarget}}},bad85346fc72:async()=>(await Uc(()=>Promise.resolve().then(()=>Ac),void 0),{})};Df();function Df(){yf({load:async e=>{{let t=Ef[e];if(!t)throw Error(`client reference not found '${e}'`);return t()}}})}function Of(e){return e===`traverse`?`traverse`:`navigate`}function kf(e){switch(e){case`navigate`:return`navigation`;case`refresh`:return`refresh`;case`traverse`:return`traverse`;default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}var Af=50,jf=Ai(),Mf=new Map,Nf=new Set,Pf=new Map;function Ff(){return window.__VINEXT_RSC_ROOT__||window.__VINEXT_RSC_BOOTSTRAP_STATE__?!1:(window.__VINEXT_RSC_BOOTSTRAP_STATE__=`starting`,!0)}function If(){window.__VINEXT_RSC_BOOTSTRAP_STATE__=`hydrated`}function Lf(){return w()?.bootstrap.routeManifest??null}var X=new Ed({initialHistoryState:window.history.state,maxHistoryStateSnapshots:50,readHistoryState:()=>window.history.state,readCurrentHref:()=>window.location.href,pushHistoryState:(e,t)=>eu(e,``,t),replaceHistoryState:(e,t)=>tu(e,``,t),readVisibleNavigationMetadata:()=>{if(!Qf())return null;let e=Zf();return{bfcacheIds:e.bfcacheIds,previousNextUrl:e.previousNextUrl}}}),Z=yd({basePath:``,getRouteManifest:Lf,syncHistoryStatePreviousNextUrl:(e,t)=>X.syncCurrentHistoryStatePreviousNextUrl(e,t)}),Rf={markNavigationSettled(){},markNavigationStart(){},schedule(){}},zf=Z.NavigationCommitSignal,Bf=`data-vinext-action-http-fallback`;function Vf(e){if(document.head.querySelectorAll(`meta[${Bf}="robots"]`).forEach(e=>e.remove()),e!==404)return;let t=document.createElement(`meta`);t.name=`robots`,t.content=`noindex`,t.setAttribute(Bf,`robots`),document.head.appendChild(t)}var Hf=en();function Uf(e){if(!e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}}function Wf(e){return e instanceof Promise}var Gf={},Q=new Map,$=0,Kf=new Uo,qf=new Promise(()=>{}),Jf=wn,Yf=null;function Xf(e,t,n){let r=!1;return(0,Sr.flushSync)(()=>{r=X.restoreHistorySnapshot({historyState:e,stageClientParams:np,approveVisibleRestore:({state:e,beforeCommit:r})=>Z.restoreHistorySnapshotVisibleState({beforeCommit:()=>{n?.(),r()},navId:t,state:e,targetHref:window.location.href})})}),r?($l(t,{releaseSnapshot:!1}),!0):!1}function Zf(){return Z.getBrowserRouterState()}function Qf(){return Z.hasBrowserRouterState()}function $f(){return Z.waitForBrowserRouterStateReady()}function ep(){return Z.beginPendingBrowserRouterState()}function tp(e){Gf=e,Jl(e)}function np(e){Gf=e,Yl(e)}function rp(){Q.clear()}function ip(){Tl(),Mf.clear(),Nf.clear(),Pf.clear()}function ap(){$+=1,rp(),ip(),X.invalidateRestorableClientState()}function op(e){if(!e)return null;try{let t=new URL(e,window.location.origin);return Vi(t),`${t.pathname}${t.search}`}catch{return null}}function sp(e,t){let n=op(e);return n===null?!1:t.some(e=>op(e)===n)}function cp(e){return e.outcome===`cache-seeded`&&e.pending===void 0&&e.snapshot!==void 0}function lp(e){let t=e.indexOf(`\0`);return t===-1?{interceptionContext:null,rscUrl:e}:{interceptionContext:e.slice(t+1),rscUrl:e.slice(0,t)}}async function up(e){let t=lp(e.cacheKey);if(t.interceptionContext!==e.interceptionContext||ol(e.entry)!==e.mountedSlotsHeader||e.interceptionContext!==null)return!1;let n=await Tp(Cf(Promise.resolve(jl(e.entry.snapshot)))),r=af({allowLoadingShell:e.entry.optimisticRouteShell===!0,basePath:``,elements:n,href:e.entry.snapshot.url||t.rscUrl,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeManifest:e.routeManifest});return r===null?!1:(Mf.set(Gd({interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeId:r.routeId}),r),!0)}async function dp(e){if(e.routeManifest===null)return;let t=[...Pf.values()];for(let[n,r]of q()){let i=Kd({cacheKey:n,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader});if(Nf.has(i)||Pf.has(i)||!cp(r)||r.prefetchKind===`route-tree`)continue;let a=up({cacheKey:n,entry:r,interceptionContext:e.interceptionContext,mountedSlotsHeader:e.mountedSlotsHeader,routeManifest:e.routeManifest}).then(e=>{e&&Nf.add(i)}).finally(()=>{Pf.delete(i)});Pf.set(i,a),t.push(a)}t.length!==0&&await Promise.allSettled(t)}function fp(e){let{bfcacheIds:t,href:n,historyUpdateMode:r,navId:i,params:a,previousNextUrl:o,targetHistoryIndex:s}=e;return()=>{if(!Z.isCurrentNavigation(i)){$l(void 0,{releaseSnapshot:!0});return}X.commitNavigationHistory({bfcacheIds:t,href:n,historyUpdateMode:r,previousNextUrl:o,stageClientParams:()=>np(a),targetHistoryIndex:s}),Dn(n),$l(i)}}async function pp(e,t,n,r,i,a,o,s,c,l=`navigate`,u=`navigation`,d=null,f=null,p=null,m=!0,h=`transition`,g,_){return Vf(null),Z.renderNavigationPayload({actionType:l,createNavigationCommitEffect:fp,historyUpdateMode:i,navigationSnapshot:t,nextElements:e,operationLane:u,payloadOrigin:c,params:a,pendingRouterState:s,previousNextUrl:o,scrollIntent:f,restoredBfcacheIds:p,reuseCurrentBfcacheIds:m,targetHistoryIndex:d===null?void 0:d.targetHistoryIndex,targetHref:n,navId:r,navigationCommitKind:_,visibleCommitMode:h,onCommittedState:g})}function mp(){for(;Q.size>=Af;){let e=Q.keys().next().value;if(e===void 0)return;Q.delete(e)}}function hp(e,t,n,r){let i=B.encodeCacheKey(e,t),a=Q.get(i);return a?{cacheKey:i,entry:a,facts:{candidate:`present`,fresh:Ad(a,{navigationKind:r,now:Date.now()}),mountedSlotsMatch:a.mountedSlotsHeader===n,navigationKind:r}}:{cacheKey:i,entry:null,facts:{candidate:`missing`,navigationKind:r}}}function gp(e,t){return e.entry===null?null:t.kind===`reuse`?(Q.delete(e.cacheKey),Q.set(e.cacheKey,e.entry),e.entry):(Q.delete(e.cacheKey),null)}function _p(e,t){Q.delete(B.encodeCacheKey(e,t))}function vp(e,t,n,r,i=Jc,a=n.mountedSlotsHeader??null,o){let s=B.encodeCacheKey(e,t);Q.delete(s),mp();let c=kd({fallbackTtlMs:i,elements:o,now:Date.now(),mountedSlotsHeader:a,params:r,response:n});return Q.set(s,c),El(e,n,t,a,i),()=>{Q.get(s)===c&&Q.delete(s),Dl(e,n,t)}}function yp(e){return`${window.location.origin}${Kl(e)}`}function bp(){let e=B.parseElementKey(Zf().routeId);return e?.kind===`route`?e.path:null}function xp(e,t,n,r){if(n!==void 0)return{interceptionContext:Fu(n,``),previousNextUrl:n};switch(e){case`navigate`:{let e=Zf().previousNextUrl;if(e!==null)return{interceptionContext:Fu(e,``),previousNextUrl:e};let n=xo({basePath:``,currentPathname:window.location.pathname,routeManifest:Lf(),targetPathname:t});if(n!==null)return{interceptionContext:n,previousNextUrl:window.location.pathname+window.location.search};let r=So({basePath:``,currentMatchedPathname:bp(),currentPathname:window.location.pathname,routeManifest:Lf(),targetPathname:t});return r===null?{interceptionContext:null,previousNextUrl:null}:{interceptionContext:r,previousNextUrl:window.location.pathname+window.location.search}}case`traverse`:{let e=No(r??window.history.state);return{interceptionContext:Fu(e,``),previousNextUrl:e}}case`refresh`:{let e=Zf().previousNextUrl;return{interceptionContext:Fu(e,``),previousNextUrl:e}}default:throw Error(`[vinext] Unknown navigation kind: `+String(e))}}function Sp(e){return typeof e==`object`&&!!e&&`kind`in e&&e.kind===`mpa-navigation`}function Cp(e,t){Kf.navigate(window,e,t)}function wp({children:e}){let t=_u();return(0,R.useEffect)(()=>{let e=e=>{let n=`reason`in e?e.reason:e.error;if(!vn(n))return;let r=yn(n.digest);r&&(e.preventDefault(),(0,R.startTransition)(()=>{r.type===`push`?t.push(r.url):t.replace(r.url)}))};return window.addEventListener(`error`,e),window.addEventListener(`unhandledrejection`,e),()=>{window.removeEventListener(`error`,e),window.removeEventListener(`unhandledrejection`,e)}},[t]),e??null}function Tp(e){return Promise.resolve(e).then(e=>B.decode(e))}function Ep({hydrationCachePublication:e,initialElements:t,initialNavigationSnapshot:n}){let r=(0,R.use)(t),i=B.readMetadata(r),[a,o]=(0,R.useState)(()=>({activeOperation:null,bfcacheIds:xa(r),elements:r,interception:i.interception,interceptionContext:i.interceptionContext,layoutIds:i.layoutIds,layoutFlags:i.layoutFlags,navigationSnapshot:n,previousNextUrl:null,renderId:0,rootLayoutTreePath:i.rootLayoutTreePath,routeId:i.routeId,slotBindings:i.slotBindings,visibleCommitVersion:0}));if(Sp(a))throw Cp(a.href,a.historyUpdateMode),qf;let s=Wf(a)?(0,R.use)(a):a,c=(0,R.useRef)(s);c.current=s,(0,R.useLayoutEffect)(()=>{let t=Z.attachBrowserRouterState(e=>{o(e)},c);return D({navigateExternal:(e,t)=>(o({href:e,historyUpdateMode:t,kind:`mpa-navigation`}),new Promise(()=>{}))}),e.commit(),()=>{e.invalidate(),D({navigateExternal:void 0}),t(),Rl(null)}},[e,o]),(0,R.useEffect)(()=>{e.complete();let t=performance.now();window.__VINEXT_HYDRATED_AT=t,window.__NEXT_HYDRATED=!0,window.__NEXT_HYDRATED_AT=t,window.__NEXT_HYDRATED_CB?.()},[e]),(0,R.useLayoutEffect)(()=>{X.rememberHistoryStateSnapshot(s)},[s]),(0,R.useEffect)(()=>{Bt(B.readMetadata(s.elements).sourcePage)},[s.elements]),(0,R.useLayoutEffect)(()=>{let e=zl(),t=kt(c.current.elements);if(Rl(t),ff(),e===t)return;let n=window.setTimeout(()=>{w()?.functions.pingVisibleLinks?.()},0);return()=>{window.clearTimeout(n)}},[s.elements]),(0,R.useLayoutEffect)(()=>{s.renderId===0&&X.writeHydratedHistoryMetadata({bfcacheIds:s.bfcacheIds,previousNextUrl:s.previousNextUrl})},[s.bfcacheIds,s.previousNextUrl,s.renderId]);let l=(0,R.createElement)(nr,null,(0,R.createElement)(zf,{renderId:s.renderId},(0,R.createElement)(zr.Provider,{value:s.elements},(0,R.createElement)(pi,{id:s.routeId})))),u=(0,R.useMemo)(()=>Ca({elements:s.elements,pathname:s.navigationSnapshot.pathname}),[s.elements,s.navigationSnapshot.pathname]),d=(0,R.createElement)(qr.Provider,{value:u},l),f=(0,R.createElement)(wp,null,Hf?(0,R.createElement)(Hf.Provider,{value:s.bfcacheIds},d):d),p=Lt?(0,R.createElement)(Lt.Provider,{value:gu},f):f,m=(0,R.createElement)(ar,{fallback:Jf,children:(0,R.createElement)(Fr,{commitId:s.renderId},p)}),h=Wl();return h?(0,R.createElement)(h.Provider,{value:s.navigationSnapshot},m):m}function Dp(e,t,n){fn({pathname:e,searchParams:new URLSearchParams(t),params:n})}function Op(e,t){let n=t?.shouldContinue??(()=>!0);if(!n())return;if(!(e&&typeof e==`object`&&`__vinext_scrollY`in e)){window.location.hash&&Ut(window.location.hash);return}let r=Number(e.__vinext_scrollY);Wt(`__vinext_scrollX`in e?Number(e.__vinext_scrollX):0,r,{minFrames:1,shouldContinue:n})}function kp(e){if(!Qf())return!1;let t=new URL(e,window.location.origin),n=Zf();return _d(t,``)===Kl(n.navigationSnapshot)}var Ap=!1,jp=`__vinext_rsc_initial_reload__`;function Mp(){try{return sessionStorage.getItem(jp)}catch{return null}}function Np(e){try{sessionStorage.setItem(jp,e)}catch{}}function Pp(){try{sessionStorage.removeItem(jp)}catch{}}function Fp(e){let t=window.location.pathname+window.location.search;return Mp()===t?(Pp(),console.error(`[vinext] Initial RSC fetch ${e} after reload; aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null):(Np(t),Mp()===t?(console.warn(`[vinext] Initial RSC fetch ${e}; reloading once to let the server render the HTML error page`),window.location.reload(),null):(console.error(`[vinext] Initial RSC fetch ${e}; sessionStorage unavailable so the reload-loop guard cannot persist — aborting hydration. Server-rendered HTML remains visible; client components will not hydrate.`),null))}async function Ip(){let e=xu(),t=w()?.bootstrap.rsc;if(t||e.__VINEXT_RSC_CHUNKS__||e.__VINEXT_RSC_DONE__){if(Pp(),hd(),t)return Lp(t),t.done?(E({rsc:void 0}),Cu(t.rsc)):Tu();let n=e.__VINEXT_RSC_PARAMS__??{};return e.__VINEXT_RSC_PARAMS__&&tp(e.__VINEXT_RSC_PARAMS__),e.__VINEXT_RSC_NAV__&&Dp(e.__VINEXT_RSC_NAV__.pathname,e.__VINEXT_RSC_NAV__.searchParams,n),Tu()}let n=Ui(),r=await fetch(await Gi(window.location.pathname+window.location.search,n),{credentials:`include`,headers:n});if(!r.ok)return Fp(`returned ${r.status}`);let i=r.headers.get(`content-type`)??``;if(!i.startsWith(`text/x-component`))return Fp(`returned non-RSC content-type "${i||`(missing)`}"`);if(!r.body)return Fp(`returned empty body`);Pp(),hd();let a=Uf(r.headers.get(k)),o=a??{};if(a)try{tp(a)}catch{}return Dp(window.location.pathname,window.location.search,o),r.body}function Lp(e){let t=e.params??{};e.params&&tp(e.params),e.nav&&Dp(e.nav.pathname,e.nav.searchParams,t)}async function Rp(){if(!Ff())return;let e=w()?.bootstrap.rsc,t=await Ip();t!==null&&zp(t,null,e)}function zp(e,t,n){let r=Hd(),i=$,[a,o]=e.tee(),s=Tp(Sf(a)),c=Gl(window.location.href,Gf),l=c.params,u=Kl(c),d=new Response(o).arrayBuffer();Promise.all([s,d]).then(async([e,t])=>{if(i!==$)return;let a=B.readMetadata(e);if(!Au(a))return;let o=kt(e),s=await Gi(u,Ui({mountedSlotsHeader:o}));if(i!==$)return;let c={compatibilityIdHeader:jf,buffer:t,contentType:wi,...n?.dynamicStaleTimeSeconds===void 0?{}:{dynamicStaleTimeSeconds:n.dynamicStaleTimeSeconds},mountedSlotsHeader:o,paramsHeader:encodeURIComponent(JSON.stringify(l)),renderedPathAndSearch:null,url:s},d=n?.initialCacheKind===`static`?Yc:Jc;r.publish(()=>i===$?ju(a)?vp(s,a.interceptionContext,c,l,d,o):vp(s,a.interceptionContext,c,l,d,o,e):()=>{})}).catch(()=>{}),X.writeBootstrapHistoryMetadata();let f=zd(),p=(...e)=>{r.fail(),f(...e)},m=Sd({formState:xd(xu()),onCaughtError:(e=>((...t)=>{r.fail(),e(...t)}))(Bd(p)),onRecoverableError:(...e)=>{r.fail(),Vd(...e)},onUncaughtError:p}),h=(0,R.createElement)(Ep,{hydrationCachePublication:r,initialElements:s,initialNavigationSnapshot:c}),g=document.querySelectorAll(`style[data-vinext-error-shell-style]`);if(document.documentElement.id===`__next_error__`){let{formState:e,...t}=m;for(let e of g)e.remove();(0,R.startTransition)(()=>{let e=(0,pf.createRoot)(document,t);e.render(h),window.__VINEXT_RSC_ROOT__=e})}else window.__VINEXT_RSC_ROOT__=Cd({children:h,container:document,hydrateRoot:pf.hydrateRoot,options:m,startTransition:R.startTransition});If();let _=null;function v(){_?.abort(),_=null}D({clearNavigationCaches:ap,commitHashNavigation:(e,t,n)=>X.commitHashOnlyNavigation(e,t,n),navigate:async function(e,t=0,n=`navigate`,r,i,a=!1,o,s,c=`transition`){v();let l=new AbortController;_=l;let u=null,d=Z.beginNavigation(),f=$;Rf.markNavigationStart();let p=e,m=r,h=i,g=t,y=!1,b=n===`traverse`?o??X.resolveTraversalIntent(window.history.state):null,x=(e,t)=>{br(s??null);let n=Z.performHardNavigation(e,t);return n||Dn(e),n},ee=n===`traverse`?X.readCurrentBfcacheVersionHistoryIds(b?.historyState??window.history.state):null,S=n!==`traverse`||!X.isCacheInvalidationGuarded()&&X.isCurrentBfcacheVersion(b?.historyState??window.history.state);try{let e=a;if(e&&Qf())u=ep();else{if(await $f(),!Z.isCurrentNavigation(d))return;e&&(u=ep())}for(;;){let e=new URL(p,window.location.origin),t=xp(n,e.pathname,h,b?.historyState),r=t.interceptionContext,i=t.previousNextUrl;n===`refresh`&&X.syncCurrentHistoryStatePreviousNextUrl(i,Zf().bfcacheIds),Xl(e.pathname,d);let a=Zf(),o=a.elements,v=kt(o),C=n===`navigate`?K.classifyEarlyNavigationIntent({basePath:``,currentHref:yp(a.navigationSnapshot),mode:`push`,scroll:!1,targetHref:e.href}):null,w=C?.kind===`flightNavigation`&&C.bypassNavigationCache,T=Ui({interceptionContext:r,mountedSlotsHeader:v}),E=await Gi(e.pathname+e.search,T),D=[],te=w?{cacheKey:B.encodeCacheKey(E,r),entry:null,facts:{candidate:`missing`,navigationKind:n}}:hp(E,r,v,n),O=gp(te,K.classifyVisitedResponseCacheCandidate(te.facts)),ne=O===null?{status:`unavailable`}:{status:`available`},k=K.classifyNavigationPrefetchProbe({bypassNavigationCache:w,navigationKind:n,visitedResponse:ne}),A=n===`navigate`?Lf():null,j=k.kind===`probe`&&dl(E,r,v,{additionalRscUrls:D,notifyInvalidation:!1}),M=K.classifyNavigationReuse({bypassNavigationCache:w,navigationKind:n,optimisticRouteShell:A===null?{reason:`routeManifestMissing`,status:`unavailable`}:{status:`available`},prefetch:j?{status:`available`}:{status:`unavailable`},targetHref:p,visitedResponse:ne});if(M.kind===`reuseVisitedResponse`&&O){let e=K.classifyRscFetchResult({clientCompatibilityId:jf,compatibilityIdHeader:O.response.compatibilityIdHeader??null,currentHref:p,effectiveHistoryUpdateMode:m??`replace`,hasBody:!0,isRscContentType:!0,origin:window.location.origin,redirectDepth:g,requestPreviousNextUrl:i,responseOk:!0,responseUrl:O.response.url,source:`cached`,streamedRedirectTarget:null});if(e.kind===`hardNavigate`){e.reason===`redirectDepthExhausted`&&console.error(`[vinext] Too many RSC redirects — aborting navigation to prevent infinite loop.`),x(e.url);return}if(e.kind===`followRedirect`){n===`traverse`&&(ee=null),p=e.redirect.href,m=e.redirect.historyUpdateMode,h=e.redirect.previousNextUrl,g=e.redirect.redirectDepth;continue}if(!Z.isCurrentNavigation(d))return;let t=O.params,a=Gl(p,t),o=O.elements?Promise.resolve(O.elements):Tp(Cf(Promise.resolve(jl(O.response))));if(!Z.isCurrentNavigation(d))return;if(await pp(o,a,p,d,m,t,i,y?null:u,O.elements?Eu:Ou,Of(n),kf(n),b,s,ee,S,c)===`no-commit`){if(!Z.isCurrentNavigation(d))return;_p(E,r);continue}return}let N,P,oe=null,F=M;if(M.kind===`consumePrefetch`){let e=await Fl(E,r,v,{additionalRscUrls:D,shouldConsume:()=>Z.isCurrentNavigation(d)});if(!Z.isCurrentNavigation(d))return;e&&(N=jl(e,!1),P=e.expiresAt,oe=sp(e.url,D)?E:e.url),N||(A=n===`navigate`?Lf():null,F=K.classifyNavigationReuse({bypassNavigationCache:w,navigationKind:n,optimisticRouteShell:A===null?{reason:`routeManifestMissing`,status:`unavailable`}:{status:`available`},prefetch:{status:`unavailable`},targetHref:p,visitedResponse:{status:`unavailable`}}))}if(!N&&F.kind===`attemptOptimisticRouteShell`){if(await dp({interceptionContext:r,mountedSlotsHeader:v,routeManifest:A}),!Z.isCurrentNavigation(d))return;if(A!==null){let e=sf({basePath:``,href:p,interceptionContext:r,mountedSlotsHeader:v,routeManifest:A,templates:Mf});if(e!==null){y=!0;let t=Gl(p,e.params);pp(Promise.resolve(e.elements),t,p,d,m,e.params,i,null,Du,Of(n),kf(n),b,s,ee,S,c,void 0,`detached`).catch(e=>{Z.isCurrentNavigation(d)&&console.error(`[vinext] Optimistic RSC navigation error:`,e)})}}}if(!N){if(n===`navigate`){let e=go(a);e!==null&&T.set(re,e)}N=await fetch(E,{headers:T,credentials:`include`,signal:l.signal})}if(!Z.isCurrentNavigation(d))return;let se=N.headers.get(`content-type`)??``,ce=N.headers.get(ie),le=N.headers.get(ae),ue=le===`push`||le===`replace`?le:null;if($o(N,ce))return;let I=K.classifyRscFetchResult({clientCompatibilityId:jf,compatibilityIdHeader:N.headers.get(Ci),currentHref:p,effectiveHistoryUpdateMode:m??`replace`,hasBody:N.body!==null,isRscContentType:se.startsWith(wi),origin:window.location.origin,redirectDepth:g,requestPreviousNextUrl:i,responseOk:N.ok,responseUrl:oe??N.url,source:`live`,streamedRedirectTarget:ce,streamedRedirectType:ue});if(I.kind===`hardNavigate`){I.discardBody&&N.body?.cancel().catch(()=>{}),I.reason===`redirectDepthExhausted`&&console.error(`[vinext] Too many RSC redirects — aborting navigation to prevent infinite loop.`),I.reason===`streamedRedirectLoop`&&console.error(`[vinext] RSC streamed redirect resolved to the current URL — aborting navigation to prevent infinite loop.`),x(I.url,I.hardNavigationMode);return}if(I.kind===`followRedirect`){I.discardBody&&N.body?.cancel().catch(()=>{}),n===`traverse`&&(ee=null),p=I.redirect.href,m=I.redirect.historyUpdateMode,h=I.redirect.previousNextUrl,g=I.redirect.redirectDepth;continue}let de=Uf(N.headers.get(`X-Vinext-Params`))??{},fe=Gl(p,de),pe=N.body;if(!pe)return;let[me,he]=pe.tee(),ge=new Response(me,{status:N.status,headers:N.headers}),L=new Response(he).arrayBuffer();if(L.catch(()=>{}),!Z.isCurrentNavigation(d))return;let _e=Tp(Cf(Promise.resolve(ge)));if(!Z.isCurrentNavigation(d))return;let ve=null;if(await pp(_e,fe,p,d,m,de,i,y?null:u,Du,Of(n),kf(n),b,s,ee,S,c,e=>{ve=e,_===l&&(_=null)},y?`authoritative`:void 0)!==`committed`)return;try{let e=await _e;if(f!==$)return;let t=B.readMetadata(e),n=await L;if(f!==$)return;let i=Ol(N,n,oe),{dynamicStaleTimeSeconds:a,...o}=i,s={...ju(t)?o:{...i,...i.dynamicStaleTimeSeconds===void 0&&t.dynamicStaleTimeSeconds!==void 0?{dynamicStaleTimeSeconds:t.dynamicStaleTimeSeconds}:{}},...P===void 0?{}:{expiresAt:P},mountedSlotsHeader:kt(e)},c=At(r,t.interceptionContext);if(ju(t)){if(f!==$)return;vp(E,c,s,de,Yc,v)}else if(ve!==null){let e=ve,t={...e.elements,[B.keys.layoutFlags]:e.layoutFlags,[B.keys.layoutIds]:e.layoutIds,[B.keys.skippedLayoutIds]:[],[B.keys.slotBindings]:e.slotBindings};if(f!==$)return;vp(E,c,s,de,Jc,v,t)}else{if(f!==$)return;El(E,s,c,v,Jc)}}catch{}return}}catch(e){if(!Z.isCurrentNavigation(d))return;Ap||console.error(`[vinext] RSC navigation error:`,e),x(K.classifyRscNavigationError({currentHref:p}).url)}finally{_===l&&(_=null),Z.finalizeNavigation(d,u),Rf.markNavigationSettled()}}});let y=Fd({getActiveNavigationId:Z.getActiveNavigationId.bind(Z),getPendingNavigation:()=>window.__VINEXT_RSC_PENDING__,getNavigate:()=>w()?.functions.navigate,isCurrentNavigation:Z.isCurrentNavigation.bind(Z),notifyAppRouterTransitionStart:e=>{Yi(e,`traverse`)},restorePopstateScrollPosition:Op,setPendingNavigation:e=>{window.__VINEXT_RSC_PENDING__=e},shouldSkipScrollRestore:e=>Yf===e});window.addEventListener(`popstate`,e=>{let t=window.location.href;if(kp(t)){Yi(t,`traverse`),X.commitTraversalIndexFromHistoryState(e.state),Op(e.state);return}let n=Z.beginNavigation();if(Xf(e.state,n,()=>{v(),Yi(t,`traverse`)})){window.__VINEXT_RSC_PENDING__=null,Md({getActiveNavigationId:()=>Z.getActiveNavigationId(),isCurrentNavigation:e=>Z.isCurrentNavigation(e),markScrollRestoreConsumed:e=>{Yf=e},restorePopstateScrollPosition:Op},e.state),Z.finalizeNavigation(n,null);return}Z.finalizeNavigation(n,null),y(e)})}typeof document<`u`&&(zt({appDir:!0,router:gu}),window.addEventListener(`pagehide`,()=>{Ap=!0}),window.addEventListener(`pageshow`,e=>{Ap=!1,e.persisted&&Kf.reset()}),Rp()),window.__VINEXT_LINK_PREFETCH_ROUTES__=[{canPrefetchLoadingShell:!1,patternParts:[],isDynamic:!1}],window.__VINEXT_PAGES_LINK_PREFETCH_ROUTES__=[],window.__VINEXT_CLIENT_REWRITES__={beforeFiles:[],afterFiles:[],fallback:[]},E({routeManifest:{graphVersion:`graph:f2f0b9d3b9a227f116a88f3d35aefe796a8d28d5976fdb5f83912b20a6409574`,segmentGraph:{routes:new Map([[`route:/`,{id:`route:/`,pattern:`/`,patternParts:[],isDynamic:!1,paramNames:[],rootParamNames:[],rootBoundaryId:`root-boundary:/`,pageId:`page:/`,routeHandlerId:null,layoutIds:[`layout:/`],templateIds:[],slotIds:[]}]]),pages:new Map([[`page:/`,{id:`page:/`,routeId:`route:/`,pattern:`/`}]]),routeHandlers:new Map([]),layouts:new Map([[`layout:/`,{id:`layout:/`,treePath:`/`,patternParts:[],paramNames:[],rootBoundaryId:`root-boundary:/`}]]),templates:new Map([]),slots:new Map([]),defaults:new Map([]),slotBindings:new Map([]),interceptions:new Map([]),interceptionsBySlotId:new Map([]),boundaries:new Map([]),rootBoundaries:new Map([[`root-boundary:/`,{id:`root-boundary:/`,layoutId:`layout:/`,treePath:`/`}]])}}});export{$t as t}; \ No newline at end of file diff --git a/out/_next/static/chunks/layout-segment-context-Bq1X1g2W.js b/out/_next/static/chunks/layout-segment-context-Bf1cBuVr.js similarity index 74% rename from out/_next/static/chunks/layout-segment-context-Bq1X1g2W.js rename to out/_next/static/chunks/layout-segment-context-Bf1cBuVr.js index 216baa7..1372a3c 100644 --- a/out/_next/static/chunks/layout-segment-context-Bq1X1g2W.js +++ b/out/_next/static/chunks/layout-segment-context-Bf1cBuVr.js @@ -1 +1 @@ -import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{r as t}from"./framework-BgSIrAUN.js";import{t as n}from"./index-ByP43Bdw.js";var r=e(t(),1),i=new Map;function a(e,t){return e?{...e,...t}:t}function o({providerId:e,segmentMap:t,children:o}){let s=(0,r.useRef)(null),c=n(),l=a(s.current??(e?i.get(e)??null:null),t);return(0,r.useEffect)(()=>{s.current=l,e&&i.set(e,l)},[l,e]),c?(0,r.createElement)(c.Provider,{value:l},o):o}export{o as LayoutSegmentProvider,a as mergeLayoutSegmentMap}; \ No newline at end of file +import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{r as t}from"./framework-BgSIrAUN.js";import{t as n}from"./index-DAoL2pdt.js";var r=e(t(),1),i=new Map;function a(e,t){return e?{...e,...t}:t}function o({providerId:e,segmentMap:t,children:o}){let s=(0,r.useRef)(null),c=n(),l=a(s.current??(e?i.get(e)??null:null),t);return(0,r.useEffect)(()=>{s.current=l,e&&i.set(e,l)},[l,e]),c?(0,r.createElement)(c.Provider,{value:l},o):o}export{o as LayoutSegmentProvider,a as mergeLayoutSegmentMap}; \ No newline at end of file diff --git a/out/_next/static/chunks/page-5ZnMML26.js b/out/_next/static/chunks/page-5ZnMML26.js deleted file mode 100644 index 8ea541e..0000000 --- a/out/_next/static/chunks/page-5ZnMML26.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-BgSIrAUN.js";var r=e(n(),1),i=Object.entries({A:`#FAF4C8 #FFFFD5 #FEFF8B #FBED56 #F4D738 #FEAC4C #FE8B4C #FFDA45 #FF995B #F77C31 #FFDD99 #FE9F72 #FFC365 #FD543D #FFF365 #FFFF9F #FFE36E #FEBE7D #FD7C72 #FFD568 #FFE395 #F4F57D #E6C9B7 #F7F8A2 #FFD67D #FFC830`,B:`#E6EE31 #63F347 #9EF780 #5DE035 #35E352 #65E2A6 #3DAF80 #1C9C4F #27523A #95D3C2 #5D722A #166F41 #CAEB7B #ADE946 #2E5132 #C5ED9C #9BB13A #E6EE49 #24B88C #C2F0CC #156A6B #0B3C43 #303A21 #EEFCA5 #4E846D #8D7A35 #CCE1AF #9EE5B9 #C5E254 #E2FCB1 #B0E792 #9CAB5A`,C:`#E8FFE7 #A9F9FC #A0E2FB #41CCFF #01ACEB #50AAF0 #3677D2 #0F54C0 #324BCA #3EBCE2 #28DDDE #1C334D #CDE8FF #D5FDFF #22C4C6 #1557A8 #04D1F6 #1D3344 #1887A2 #176DAF #BEDDFF #67B4BE #C8E2FF #7CC4FF #A9E5E5 #3CAED8 #D3DFFA #BBCFED #34488E`,D:`#AEB4F2 #858EDD #2F54AF #182A84 #B843C5 #AC7BDE #8854B3 #E2D3FF #D5B9F8 #361851 #B9BAE1 #DE9AD4 #B90095 #8B279B #2F1F90 #E3E1EE #C4D4F6 #A45EC7 #D8C3D7 #9C32B2 #9A009B #333A95 #EBDAFC #7786E5 #494FC7 #DFC2F8`,E:`#FDD3CC #FEC0DF #FFB7E7 #E8649E #F551A2 #F13D74 #C63478 #FFDBE9 #E970CC #D33793 #FCDDD2 #F78FC3 #B5006D #FFD1BA #F8C7C9 #FFF3EB #FFE2EA #FFC7DB #FEBAD5 #D8C7D1 #BD9DA1 #B785A1 #937A8D #E1BCE8`,F:`#FD957B #FC3D46 #F74941 #FC283C #E7002F #943630 #971937 #BC0028 #E2677A #8A4526 #5A2121 #FD4E6A #F35744 #FFA9AD #D30022 #FEC2A6 #E69C79 #D37C46 #C1444A #CD9391 #F7B4C6 #FDC0D0 #F67E66 #E698AA #E54B4F`,G:`#FFE2CE #FFC4AA #F4C3A5 #E1B383 #EDB045 #E99C17 #9D5B3E #753832 #E6B483 #D98C39 #E0C593 #FFC890 #B7714A #8D614C #FCF9E0 #F2D9BA #78524B #FFE4CC #E07935 #A94023 #B88558`,H:`#FDFBFF #FEFFFF #B6B1BA #89858C #48464E #2F2B2F #000000 #E7D6DB #EDEDED #EEE9EA #CECDD5 #FFF5ED #F5ECD2 #CFD7D3 #98A6A8 #1D1414 #F1EDED #FFFDF0 #F6EFE2 #949FA3 #FFFBE1 #CACAD4 #9A9D94`,M:`#BCC6B8 #8AA386 #697D80 #E3D2BC #D0CCAA #B0A782 #B4A497 #B38281 #A58767 #C5B2BC #9F7594 #644749 #D19066 #C77362 #757D78`}).flatMap(([e,t])=>t.split(` `).map((t,n)=>[e+(n+1),t])),a=t();function o(e){fetch(`/api/usage`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),keepalive:!0}).catch(()=>void 0)}var s=128,c=30,l=`bead-pattern-history`,u=`pixel-bead-pattern-history`,d=`patterns`;function f(){return typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function p(){return new Promise((e,t)=>{let n=indexedDB.open(u,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(d)||n.result.createObjectStore(d)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}async function m(){let e=await p();return new Promise((t,n)=>{let r=e.transaction(d,`readonly`),i=r.objectStore(d).get(l);i.onsuccess=()=>t(Array.isArray(i.result)?i.result:[]),i.onerror=()=>n(i.error),r.oncomplete=()=>e.close()})}async function h(e){let t=await p();return new Promise((n,r)=>{let i=t.transaction(d,`readwrite`);i.objectStore(d).put(e,l),i.oncomplete=()=>{t.close(),n()},i.onerror=()=>{t.close(),r(i.error)},i.onabort=()=>{t.close(),r(i.error)}})}var g={A:`黄橙系`,B:`绿色系`,C:`蓝青系`,D:`紫蓝系`,E:`粉红系`,F:`红色系`,G:`肤棕系`,H:`黑白灰系`,M:`莫兰迪系`};function _([e,t,n]){let r=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},i=r(e),a=r(t),o=r(n),s=Math.cbrt(.4122214708*i+.5363325363*a+.0514459929*o),c=Math.cbrt(.2119034982*i+.6806995451*a+.1073969566*o),l=Math.cbrt(.0883024619*i+.2817188376*a+.6299787005*o);return[.2104542553*s+.793617785*c-.0040720468*l,1.9779984951*s-2.428592205*c+.4505937099*l,.0259040371*s+.7827717662*c-.808675766*l]}function v(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])}function y(e,t,n){let r=[n[0]-t[0],n[1]-t[1],n[2]-t[2]],i=r[0]**2+r[1]**2+r[2]**2;if(i<.07**2)return!1;let a=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],o=(a[0]*r[0]+a[1]*r[1]+a[2]*r[2])/i;return o<.12||o>.88?!1:v(e,[t[0]+r[0]*o,t[1]+r[1]*o,t[2]+r[2]*o])<=.025}var b=i.map(([e,t])=>{let n=[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)];return{code:e,name:`MARD ${g[e[0]]}`,hex:t,rgb:n,lab:_(n)}}),ee=e=>[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)];function x(e,t){let n=t[0],r=1/0;for(let i of t){let t=v(e,i.lab);t>3<<10|a>>3<<5|o>>3;t.push(c);let l=n.get(c);l?(l.count+=1,l.red+=i,l.green+=a,l.blue+=o):n.set(c,{count:1,red:i,green:a,blue:o})}let r=[...n.entries()].map(([e,t])=>{let n=[t.red/t.count,t.green/t.count,t.blue/t.count];return{key:e,count:t.count,rgb:n,lab:_(n)}}).sort((e,t)=>t.count-e.count),i=[];for(let e of r){let t=-1,n=1/0;for(let r=0;r=0&&n<=.015){let n=i[t],r=n.count+e.count;n.rgb=n.rgb.map((t,i)=>(t*n.count+e.rgb[i]*e.count)/r),n.lab=n.lab.map((t,i)=>(t*n.count+e.lab[i]*e.count)/r),n.count=r}else i.push({count:e.count,rgb:[...e.rgb],lab:[...e.lab]})}let a=new Map;for(let e of r){let t=0,n=1/0;i.forEach((r,i)=>{let a=v(e.lab,r.lab);at.score-e.score||e.error/e.count-t.error/t.count);for(let e of i)r.every(t=>v(e.color.lab,t.lab)>=.035)&&r.push(e.color);return r.slice(0,Math.max(0,Math.min(t,r.length)))}function re(e,t,n){let r=e.map(e=>x(e.lab,t));if(n<12)return r;let i=e.reduce((e,t)=>e+t.count,0),a=Math.max(24,i*.012),o=Math.min(8,Math.max(0,n-t.length)),s=[],c=e.map((e,t)=>({cluster:e,index:t,exact:x(e.lab,b)})).filter(({cluster:e,exact:t,index:n})=>e.count>=a&&t.code!==r[n].code).sort((e,t)=>t.cluster.count-e.cluster.count);for(let e of c){if(s.length>=o)break;if(s.some(t=>t.code===e.exact.code)){r[e.index]=e.exact;continue}Math.min(...t.map(t=>v(t.lab,e.exact.lab)))<.018||(s.push(e.exact),r[e.index]=e.exact)}return r}function ie(e,t,n,r,i){if(i<12)return e;let a=[...e],o=[];for(let e=0;ee.code.startsWith(`H`)):b);!u.has(l.code)&&u.size>=8||(u.add(l.code),a[r]=l)}return a}function ae(e,t,n){let r=new Map;e.forEach(e=>{e&&r.set(e.code,(r.get(e.code)??0)+1)});let i=[...e],a=0;for(let o=0;o2)continue;let u=new Map;for(let r=-1;r<=1;r++)for(let i=-1;i<=1;i++){if(r===0&&i===0)continue;let a=o+r,c=s+i;if(a<0||c<0||a>=n||c>=t)continue;let d=e[a*t+c];if(!d||d.code===l.code)continue;let f=u.get(d.code)??{color:d,count:0};f.count+=1,u.set(d.code,f)}let d=[...u.values()].sort((e,t)=>t.count-e.count)[0];if(!d)continue;let f=(r.get(l.code)??0)===1?3:5;d.count(t*h.weight+p[n]*u)/e),h.weight=e,h.count+=1,h.samples.push({rgb:f,lab:p}),h.containsCenter||=m}else r.push({count:1,weight:u,lab:[...p],samples:[{rgb:f,lab:p}],containsCenter:m})}let a=(e*t+n)*4;if(i>=10/2||r.length===0){f[a+3]=0,p[e*t+n]=i/10;continue}let o=r.map(e=>{let t=e.weight;if(e.count<=2)for(let n=0;nt.effectiveWeight-e.effectiveWeight||t.group.weight-e.group.weight||Number(t.group.containsCenter)-Number(e.group.containsCenter))[0].group,u=o.samples.reduce((e,t)=>v(t.lab,o.lab)=n||d>=t)continue;let f=e[s*t+d];if(!f)continue;if(f.code===c.code){u+=1;continue}let p=l.get(f.code)??{color:f,count:0};p.count+=1,l.set(f.code,p)}if(u>2)continue;let d=[...l.values()].sort((e,t)=>t.count-e.count).slice(0,3),f=null,p=0;for(let e=0;e=d[t].count?d[e]:d[t];n.count>p&&(f=n.color,p=n.count)}f&&(r[s]=f,i+=1)}return{colors:r,changed:i}}function ce(e,t,n,r){let i=[...e],a=0,o=[-1,0,1];for(let s=0;s=.625)continue;let d=Math.hypot(u.lab[1],u.lab[2]);if(u.lab[0]<.32||u.lab[0]>.96||d>.14)continue;let f=new Map,p=0,m=0;for(let i of o)for(let a of o){if(i===0&&a===0)continue;let o=s+i,l=c+a;if(o<0||l<0||o>=r||l>=n)continue;let d=o*n+l,h=e[d];if(!h)continue;h.code===u.code&&(m+=1);let g=f.get(h.code)??{color:h,count:0,confidentCount:0};g.count+=1,t[d]>=.625&&(g.confidentCount+=1),f.set(h.code,g),p+=1}if(m>0)continue;let h=[...f.values()].sort((e,t)=>t.count-e.count)[0];if(!h||h.color.code===u.code)continue;let g=p>=7?5:Math.max(2,Math.ceil(p*.67));h.count.075||(i[l]=h.color,a+=1)}return{colors:i,changed:a}}function S(e,t,n,r,i,a,o,s){let c=t.naturalWidth/t.naturalHeight,l=n/r,u=n,d=r;i===`cover`&&c>l||i===`contain`&&c{o({event:`page_view`});let e=!1;return(async()=>{try{let t=await m(),n=localStorage.getItem(l);if(t.length===0&&n){let e=JSON.parse(n);Array.isArray(e)&&(t=e.slice(0,c),await h(t)),localStorage.removeItem(l)}e||ge(t.slice(0,c))}catch{e||K(`历史记录读取失败,请检查浏览器是否允许本地存储`)}})(),()=>{e=!0}},[]);let Se=(e=q.current,t={zoom:D,x:k,y:j},n=!0)=>{if(!e)return;let r=Math.max(8,Math.min(256,s)),i=Math.max(8,Math.min(256,d)),a,c=null;if(E===`dominant`){let n=oe(e,r,i,w,t.zoom,t.x,t.y);a=n.data,c=n.confidence}else{let n=document.createElement(`canvas`);n.width=r,n.height=i;let o=n.getContext(`2d`,{willReadFrequently:!0});o.clearRect(0,0,r,i),S(o,e,r,i,w,t.zoom,t.x,t.y),a=o.getImageData(0,0,r,i).data}let{pixelKeys:l,clusters:f,binClusters:m}=te(a),h=re(f,ne(f,Math.max(2,Math.min(x,b.length))),x),g=l.map(e=>e===null?null:h[m.get(e)??0]),v=0;if(c){let e=ce(g,c,r,i);g=e.colors,v=e.changed;let t=se(g,r,i);g=t.colors,v+=t.changed,g=ie(g,a,r,i,x);let n=ae(g,r,i);g=n.colors,v+=n.changed}let ee=g.map(e=>({color:e}));_(r),y(i),u(r),p(i),de(ee),F(new Set);let le=E===`dominant`?`区域主色 · 清理 ${v} 个低可信孤立格`:`平滑取色`,C=new Set(g.filter(e=>e!==null).map(e=>e.code)).size,T=g.filter(e=>e!==null).length;n&&o({event:`conversion`,width:r,height:i,sampling_strategy:E,color_limit:x,actual_colors:C,bead_count:T,transparent_cells:r*i-T}),K(`已转换为 ${r} × ${i} · ${T} 颗拼豆 · ${le} · ${C} 种差异色`)};(0,r.useEffect)(()=>{let e=le(),n=new Image;n.onload=()=>{q.current=n,t(e),Se(n,void 0,!1)},n.src=e},[]),(0,r.useEffect)(()=>{let e=be.current,t=q.current;if(!e||!t)return;let n=Math.max(8,Math.min(256,s||8))/Math.max(8,Math.min(256,d||8)),r=n>=1?600:Math.max(120,Math.round(600*n)),i=n>=1?Math.max(120,Math.round(600/n)):600;e.width=r,e.height=i;let a=e.getContext(`2d`);a.fillStyle=`#f7f5ed`,a.fillRect(0,0,r,i),S(a,t,r,i,w,D,k,j)},[e,s,d,w,D,k,j]);let $=(0,r.useMemo)(()=>{let e=new Map;return N.forEach(({color:t})=>{t&&e.set(t.code,(e.get(t.code)??0)+1)}),b.filter(t=>e.has(t.code)).map(t=>({...t,count:e.get(t.code)})).sort((e,t)=>t.count-e.count)},[N]),Ce=(0,r.useMemo)(()=>N.reduce((e,t)=>e+ +!!t.color,0),[N]),we=(0,r.useMemo)(()=>{let e=V.trim().toLowerCase();return $.filter(t=>!e||t.code.toLowerCase().includes(e)||t.name.includes(e)||t.hex.toLowerCase().includes(e))},[V,$]);(0,r.useEffect)(()=>{let e=J.current;if(!e||N.length===0)return;let t=L,n=Math.max(22,t),r=Math.min(window.devicePixelRatio||1,2);e.width=(g*t+n)*r,e.height=(v*t+n)*r,e.style.width=`${g*t+n}px`,e.style.height=`${v*t+n}px`;let i=e.getContext(`2d`);i.scale(r,r),i.fillStyle=`#ffffff`,i.fillRect(0,0,g*t+n,v*t+n),i.fillStyle=`#f0eee7`,i.fillRect(n,0,g*t,n),i.fillRect(0,n,n,v*t),i.strokeStyle=`rgba(32,38,36,.25)`,i.lineWidth=.6,i.font=`600 ${Math.max(7,Math.min(10,t*.35))}px Arial`,i.fillStyle=`#56605b`,i.textAlign=`center`,i.textBaseline=`middle`;let a=t<10?10:t<16?5:1;for(let e=0;e{let a=n+r%g*t,o=n+Math.floor(r/g)*t;if(!e){i.clearRect(a,o,t,t),z&&(i.strokeStyle=`rgba(32,38,36,.12)`,i.lineWidth=.6,i.strokeRect(a+.3,o+.3,t-.6,t-.6));return}let s=P.size>0,c=P.has(e.code);if(I&&s&&!c?i.fillStyle=`#ffffff`:(i.fillStyle=e.hex,i.globalAlpha=s&&!c?.12:1,i.fillRect(a,o,t,t),i.globalAlpha=1),z&&(i.strokeStyle=s&&!c?`rgba(32,38,36,.07)`:`rgba(32,38,36,.22)`,i.lineWidth=.6,i.strokeRect(a+.3,o+.3,t-.6,t-.6)),B&&t>=22&&(!s||c)){let[n,r,s]=ee(e.hex);i.fillStyle=n*.299+r*.587+s*.114>160?`#1f2925`:`#ffffff`,i.font=`600 ${Math.max(7,t*.28)}px Arial`,i.textAlign=`center`,i.textBaseline=`middle`,i.fillText(e.code,a+t/2,o+t/2)}}),z){i.strokeStyle=`rgba(32,38,36,.48)`,i.lineWidth=1.5;for(let e=5;e{let r=n.target.files?.[0];if(!r)return;if(!r.type.startsWith(`image/`)){K(`请选择 JPG、PNG 或 WebP 图片`);return}let a=URL.createObjectURL(r),o=new Image;o.onload=()=>{e.startsWith(`blob:`)&&URL.revokeObjectURL(e),q.current=o,t(a),i(r.name),O(1),A(0),M(0),K(`图片已载入,点击“重新转换”生成图纸`),Se(o,{zoom:1,x:0,y:0})},o.src=a},Ee=e=>{e.currentTarget.setPointerCapture(e.pointerId),X.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,cropX:k,cropY:j}},De=e=>{let t=X.current,n=xe.current;if(!t||t.pointerId!==e.pointerId||!n)return;let r=n.getBoundingClientRect(),i=t.cropX+(e.clientX-t.x)/Math.max(1,r.width)*2,a=t.cropY+(e.clientY-t.y)/Math.max(1,r.height)*2;A(Math.max(-1,Math.min(1,i))),M(Math.max(-1,Math.min(1,a)))},Oe=e=>{X.current?.pointerId===e.pointerId&&(X.current=null)},ke=e=>{F(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ae=e=>{if(e.button!==0)return;let t=Y.current;t&&(Q.current=!1,e.currentTarget.setPointerCapture(e.pointerId),Z.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,moved:!1})},je=e=>{let t=Y.current,n=Z.current;if(!t||!n||n.pointerId!==e.pointerId)return;let r=e.clientX-n.x,i=e.clientY-n.y;!n.moved&&Math.hypot(r,i)<5||(n.moved=!0,t.classList.add(`is-dragging`),t.scrollLeft=n.scrollLeft-r,t.scrollTop=n.scrollTop-i,U(null))},Me=e=>{let t=Y.current,n=Z.current;!n||n.pointerId!==e.pointerId||(Q.current=n.moved,Z.current=null,t?.classList.remove(`is-dragging`),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},Ne=e=>{Z.current?.pointerId===e.pointerId&&(Z.current=null,Q.current=!1,Y.current?.classList.remove(`is-dragging`),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},Pe=e=>{Z.current?.pointerId===e.pointerId&&(Z.current=null,Q.current=!1,Y.current?.classList.remove(`is-dragging`))},Fe=e=>{if(Q.current){Q.current=!1;return}let t=J.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.max(22,L),i=Math.floor((e.clientX-n.left-r)/L),a=Math.floor((e.clientY-n.top-r)/L),o=N[a*g+i];i>=0&&a>=0&&i{if(Z.current?.moved){U(null);return}let t=J.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.max(22,L),i=Math.floor((e.clientX-n.left-r)/L),a=Math.floor((e.clientY-n.top-r)/L),o=N[a*g+i];if(i<0||a<0||i>=g||a>=v||!o?.color){U(null);return}U({row:a+1,column:i+1,color:o.color,left:e.clientX-n.left+14,top:e.clientY-n.top+14})},Le=async e=>{await h(e),ge(e)},Re=async()=>{if(N.length)try{await Le([{id:f(),name:n.replace(/\.[^.]+$/,``)||`未命名图纸`,savedAt:new Date().toISOString(),width:g,height:v,colorLimit:x,codes:N.map(e=>e.color?.code??null)},...W].slice(0,c)),_e(``),K(`图纸已保存到本机历史记录`),requestAnimationFrame(()=>document.getElementById(`history-title`)?.scrollIntoView({behavior:`smooth`,block:`start`}))}catch{K(`保存历史失败,请检查浏览器是否允许本地存储或剩余空间是否充足`)}},ze=e=>{let t=new Map(b.map(e=>[e.code,e]));de(e.codes.map(e=>({color:e===null?null:t.get(e)??b[0]}))),_(e.width),y(e.height),u(e.width),p(e.height),C(e.colorLimit),i(e.name),F(new Set),K(`已恢复历史图纸:${e.name}`),document.getElementById(`pattern-preview`)?.scrollIntoView({behavior:`smooth`})},Be=async e=>{try{await Le(W.filter(t=>t.id!==e))}catch{K(`删除历史失败,请稍后重试`)}},Ve=(0,r.useMemo)(()=>{let e=G.trim().toLowerCase();return W.filter(t=>!e||t.name.toLowerCase().includes(e)||`${t.width}x${t.height}`.includes(e))},[W,G]);return(0,a.jsxs)(`main`,{children:[(0,a.jsxs)(`header`,{className:`topbar`,children:[(0,a.jsxs)(`a`,{className:`brand`,href:`#top`,"aria-label":`豆格工坊首页`,children:[(0,a.jsxs)(`span`,{className:`brand-mark`,"aria-hidden":`true`,children:[(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{})]}),(0,a.jsx)(`span`,{children:`豆格工坊`})]}),(0,a.jsx)(`span`,{className:`top-note`,children:`图片转拼豆图纸 · 本地处理`})]}),(0,a.jsxs)(`section`,{className:`hero`,id:`top`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`eyebrow`,children:`PIXEL BEAD STUDIO`}),(0,a.jsxs)(`h1`,{children:[`把喜欢的图片,`,(0,a.jsx)(`br`,{}),(0,a.jsx)(`em`,{children:`变成一格一格的快乐。`})]}),(0,a.jsx)(`p`,{className:`hero-copy`,children:`上传图片,选择图纸大小和颜色数量;点击任意像素格,就能单独查看该颜色需要摆放的区域。`})]}),(0,a.jsxs)(`div`,{className:`hero-badge`,children:[(0,a.jsxs)(`strong`,{children:[g,` × `,v]}),(0,a.jsx)(`span`,{children:`当前图纸格数`})]})]}),(0,a.jsxs)(`section`,{className:`workspace`,"aria-label":`拼豆图纸转换工具`,children:[(0,a.jsxs)(`aside`,{className:`control-panel`,children:[(0,a.jsxs)(`div`,{className:`panel-heading`,children:[(0,a.jsx)(`span`,{children:`01`}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h2`,{children:`图片与规格`}),(0,a.jsx)(`p`,{children:`先决定图纸需要多少格`})]})]}),(0,a.jsxs)(`div`,{className:`upload-card crop-preview`,style:{aspectRatio:`${Math.max(8,s||8)} / ${Math.max(8,d||8)}`},ref:xe,onPointerDown:Ee,onPointerMove:De,onPointerUp:Oe,onPointerCancel:Oe,children:[(0,a.jsx)(`canvas`,{ref:be,"aria-label":`转换区域预览,可拖动调整取景`}),(0,a.jsx)(`span`,{className:`crop-frame`,"aria-hidden":`true`}),(0,a.jsx)(`button`,{type:`button`,className:`upload-overlay`,onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),ye.current?.click()},children:`更换图片`}),(0,a.jsx)(`input`,{ref:ye,className:`file-input`,type:`file`,accept:`image/png,image/jpeg,image/webp`,onChange:Te})]}),(0,a.jsx)(`p`,{className:`file-name`,title:n,children:n}),(0,a.jsxs)(`label`,{className:`field crop-zoom`,children:[(0,a.jsxs)(`span`,{children:[`取景缩放 `,(0,a.jsxs)(`b`,{children:[D.toFixed(1),`×`]})]}),(0,a.jsx)(`input`,{type:`range`,min:`1`,max:`5`,step:`0.1`,value:D,onChange:e=>O(Number(e.target.value))})]}),(0,a.jsx)(`button`,{className:`reset-crop`,onClick:()=>{O(1),A(0),M(0)},children:`复位取景`}),(0,a.jsxs)(`div`,{className:`field-row`,children:[(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:`横向格数`}),(0,a.jsx)(`input`,{type:`number`,min:`8`,max:`256`,value:s,onChange:e=>u(Number(e.target.value))})]}),(0,a.jsx)(`span`,{className:`times`,children:`×`}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:`纵向格数`}),(0,a.jsx)(`input`,{type:`number`,min:`8`,max:`256`,value:d,onChange:e=>p(Number(e.target.value))})]})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsxs)(`span`,{children:[`最多使用颜色 `,(0,a.jsx)(`b`,{children:x})]}),(0,a.jsx)(`input`,{type:`range`,min:`2`,max:`64`,value:x,onChange:e=>C(Number(e.target.value))})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsx)(`span`,{children:`取色策略`}),(0,a.jsxs)(`select`,{value:E,onChange:e=>ue(e.target.value),children:[(0,a.jsx)(`option`,{value:`dominant`,children:`区域主色(减少杂色)`}),(0,a.jsx)(`option`,{value:`smooth`,children:`平滑取色(细节丰富)`})]})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsx)(`span`,{children:`图片适应方式`}),(0,a.jsxs)(`select`,{value:w,onChange:e=>T(e.target.value),children:[(0,a.jsx)(`option`,{value:`contain`,children:`完整显示`}),(0,a.jsx)(`option`,{value:`cover`,children:`裁剪铺满`})]})]}),(0,a.jsx)(`button`,{className:`primary-button`,onClick:()=>Se(),children:`重新转换`}),(0,a.jsx)(`p`,{className:`privacy-note`,children:`图片只在当前浏览器中处理,不会上传到服务器。`})]}),(0,a.jsxs)(`section`,{className:`pattern-panel`,id:`pattern-preview`,children:[(0,a.jsxs)(`div`,{className:`pattern-toolbar`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`section-kicker`,children:`02 / 图纸预览`}),(0,a.jsx)(`h2`,{children:`点击格子,筛选颜色`})]}),(0,a.jsxs)(`div`,{className:`zoom-control`,"aria-label":`图纸缩放`,children:[(0,a.jsx)(`button`,{onClick:()=>R(e=>Math.max(3,e-1)),"aria-label":`缩小`,children:`−`}),(0,a.jsx)(`input`,{"aria-label":`缩放比例`,type:`range`,min:`3`,max:`42`,step:`1`,value:L,onChange:e=>R(Number(e.target.value))}),(0,a.jsx)(`button`,{onClick:()=>R(e=>Math.min(42,e+1)),"aria-label":`放大`,children:`+`}),(0,a.jsxs)(`output`,{children:[L,`px`]})]})]}),(0,a.jsx)(`div`,{className:`canvas-viewport`,children:(0,a.jsx)(`div`,{className:`canvas-stage`,ref:Y,children:(0,a.jsxs)(`div`,{className:`canvas-wrap`,children:[(0,a.jsx)(`canvas`,{ref:J,onPointerDown:Ae,onPointerMove:je,onPointerUp:Me,onPointerCancel:Ne,onLostPointerCapture:Pe,onContextMenu:e=>e.preventDefault(),onClick:Fe,onMouseMove:Ie,onMouseLeave:()=>U(null),"aria-label":`转换后的拼豆像素图,可拖动查看,轻点格子选择颜色`}),H&&(0,a.jsxs)(`div`,{className:`pixel-tooltip`,style:{left:H.left,top:H.top},children:[(0,a.jsx)(`span`,{className:`tooltip-swatch`,style:{backgroundColor:H.color.hex}}),(0,a.jsxs)(`strong`,{children:[`第 `,H.row,` 行 · 第 `,H.column,` 列`]}),(0,a.jsxs)(`small`,{children:[H.color.code,` · `,H.color.name,` · `,H.color.hex]})]})]})})}),(0,a.jsxs)(`div`,{className:`pattern-footer`,children:[(0,a.jsx)(`span`,{className:`status-dot`}),` `,(0,a.jsx)(`span`,{children:ve}),(0,a.jsxs)(`div`,{className:`view-options`,children:[(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:z,onChange:e=>pe(e.target.checked)}),` 网格`]}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:B,onChange:e=>me(e.target.checked)}),` 格内编号`]}),(0,a.jsx)(`button`,{className:`save-button`,onClick:Re,children:`保存历史`}),(0,a.jsx)(`button`,{onClick:()=>{let e=J.current;if(!e)return;let t=document.createElement(`a`);t.download=`拼豆图纸-${g}x${v}.png`,t.href=e.toDataURL(`image/png`),t.click()},children:`下载 PNG`})]})]}),(0,a.jsxs)(`div`,{className:`pattern-legend`,children:[(0,a.jsxs)(`div`,{className:`legend-heading`,children:[(0,a.jsx)(`strong`,{children:`本图所需颜色与用量`}),(0,a.jsxs)(`span`,{children:[`按数量从多到少,共 `,$.length,` 色`]})]}),(0,a.jsx)(`div`,{className:`legend-list`,children:$.map(e=>(0,a.jsxs)(`button`,{className:P.has(e.code)?`active`:``,onClick:()=>ke(e.code),children:[(0,a.jsx)(`i`,{style:{backgroundColor:e.hex}}),(0,a.jsx)(`strong`,{children:e.code}),(0,a.jsx)(`span`,{children:e.name}),(0,a.jsxs)(`b`,{children:[e.count,` 颗`]})]},e.code))})]})]}),(0,a.jsxs)(`aside`,{className:`color-panel`,children:[(0,a.jsxs)(`div`,{className:`panel-heading`,children:[(0,a.jsx)(`span`,{children:`03`}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h2`,{children:`分色查看`}),(0,a.jsxs)(`p`,{children:[$.length,` 种颜色 · `,Ce,` 颗`]})]})]}),(0,a.jsxs)(`div`,{className:`search-box`,children:[(0,a.jsx)(`span`,{children:`⌕`}),(0,a.jsx)(`input`,{value:V,onChange:e=>he(e.target.value),placeholder:`输入 A6、MARD A 或 #FEAC4C`})]}),(0,a.jsxs)(`div`,{className:`selection-tools`,children:[(0,a.jsxs)(`label`,{className:`switch-row`,children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:I,onChange:e=>fe(e.target.checked)}),(0,a.jsx)(`span`,{className:`switch`}),(0,a.jsx)(`span`,{children:`只显示选中颜色`})]}),P.size>0&&(0,a.jsxs)(`button`,{onClick:()=>F(new Set),children:[`清除 `,P.size,` 项`]})]}),(0,a.jsx)(`div`,{className:`color-list`,children:we.map(e=>{let t=P.has(e.code);return(0,a.jsxs)(`button`,{className:`color-item ${t?`active`:``}`,onClick:()=>ke(e.code),"aria-pressed":t,children:[(0,a.jsx)(`span`,{className:`swatch`,style:{backgroundColor:e.hex}}),(0,a.jsxs)(`span`,{className:`color-meta`,children:[(0,a.jsxs)(`strong`,{children:[e.code,` · `,e.name]}),(0,a.jsx)(`small`,{children:e.hex})]}),(0,a.jsxs)(`b`,{children:[e.count,(0,a.jsx)(`small`,{children:`颗`})]})]},e.code)})}),(0,a.jsxs)(`p`,{className:`palette-note`,children:[(0,a.jsx)(`strong`,{children:`MARD 221 基础色卡`}),`:默认使用 A/B/C/D/E/F/G/H/M 九个系列。屏幕色值仅用于近似匹配,实体豆颜色会受批次、光线和屏幕影响。`]})]})]}),(0,a.jsxs)(`section`,{className:`history-section`,"aria-labelledby":`history-title`,children:[(0,a.jsxs)(`div`,{className:`history-heading`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`section-kicker`,children:`LOCAL PATTERN ARCHIVE`}),(0,a.jsx)(`h2`,{id:`history-title`,children:`历史图纸`}),(0,a.jsx)(`p`,{children:`历史保存在当前浏览器,最多保留 30 份。`})]}),(0,a.jsxs)(`div`,{className:`search-box`,children:[(0,a.jsx)(`span`,{children:`⌕`}),(0,a.jsx)(`input`,{value:G,onChange:e=>_e(e.target.value),placeholder:`按名称或 32x32 查询`})]})]}),Ve.length?(0,a.jsx)(`div`,{className:`history-grid`,children:Ve.map(e=>{let t=new Map;return e.codes.forEach(e=>{e&&t.set(e,(t.get(e)??0)+1)}),(0,a.jsxs)(`article`,{className:`history-card`,children:[(0,a.jsx)(`div`,{className:`history-swatches`,children:[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,6).map(([e,t])=>(0,a.jsx)(`i`,{style:{backgroundColor:b.find(t=>t.code===e)?.hex,flexGrow:t}},e))}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h3`,{children:e.name}),(0,a.jsxs)(`p`,{children:[e.width,` × `,e.height,` · `,new Date(e.savedAt).toLocaleString(`zh-CN`,{hour12:!1})]})]}),(0,a.jsxs)(`div`,{className:`history-actions`,children:[(0,a.jsx)(`button`,{onClick:()=>ze(e),children:`打开`}),(0,a.jsx)(`button`,{onClick:()=>Be(e.id),children:`删除`})]})]},e.id)})}):(0,a.jsx)(`div`,{className:`history-empty`,children:`还没有符合条件的历史图纸。转换完成后点击“保存历史”即可在这里查询。`})]})]})}export{C as default}; \ No newline at end of file diff --git a/out/_next/static/chunks/page-CNQA87Lx.js b/out/_next/static/chunks/page-CNQA87Lx.js new file mode 100644 index 0000000..f5b8c81 --- /dev/null +++ b/out/_next/static/chunks/page-CNQA87Lx.js @@ -0,0 +1 @@ +import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-BgSIrAUN.js";var r=e(n(),1),i=Object.entries({A:`#FAF4C8 #FFFFD5 #FEFF8B #FBED56 #F4D738 #FEAC4C #FE8B4C #FFDA45 #FF995B #F77C31 #FFDD99 #FE9F72 #FFC365 #FD543D #FFF365 #FFFF9F #FFE36E #FEBE7D #FD7C72 #FFD568 #FFE395 #F4F57D #E6C9B7 #F7F8A2 #FFD67D #FFC830`,B:`#E6EE31 #63F347 #9EF780 #5DE035 #35E352 #65E2A6 #3DAF80 #1C9C4F #27523A #95D3C2 #5D722A #166F41 #CAEB7B #ADE946 #2E5132 #C5ED9C #9BB13A #E6EE49 #24B88C #C2F0CC #156A6B #0B3C43 #303A21 #EEFCA5 #4E846D #8D7A35 #CCE1AF #9EE5B9 #C5E254 #E2FCB1 #B0E792 #9CAB5A`,C:`#E8FFE7 #A9F9FC #A0E2FB #41CCFF #01ACEB #50AAF0 #3677D2 #0F54C0 #324BCA #3EBCE2 #28DDDE #1C334D #CDE8FF #D5FDFF #22C4C6 #1557A8 #04D1F6 #1D3344 #1887A2 #176DAF #BEDDFF #67B4BE #C8E2FF #7CC4FF #A9E5E5 #3CAED8 #D3DFFA #BBCFED #34488E`,D:`#AEB4F2 #858EDD #2F54AF #182A84 #B843C5 #AC7BDE #8854B3 #E2D3FF #D5B9F8 #361851 #B9BAE1 #DE9AD4 #B90095 #8B279B #2F1F90 #E3E1EE #C4D4F6 #A45EC7 #D8C3D7 #9C32B2 #9A009B #333A95 #EBDAFC #7786E5 #494FC7 #DFC2F8`,E:`#FDD3CC #FEC0DF #FFB7E7 #E8649E #F551A2 #F13D74 #C63478 #FFDBE9 #E970CC #D33793 #FCDDD2 #F78FC3 #B5006D #FFD1BA #F8C7C9 #FFF3EB #FFE2EA #FFC7DB #FEBAD5 #D8C7D1 #BD9DA1 #B785A1 #937A8D #E1BCE8`,F:`#FD957B #FC3D46 #F74941 #FC283C #E7002F #943630 #971937 #BC0028 #E2677A #8A4526 #5A2121 #FD4E6A #F35744 #FFA9AD #D30022 #FEC2A6 #E69C79 #D37C46 #C1444A #CD9391 #F7B4C6 #FDC0D0 #F67E66 #E698AA #E54B4F`,G:`#FFE2CE #FFC4AA #F4C3A5 #E1B383 #EDB045 #E99C17 #9D5B3E #753832 #E6B483 #D98C39 #E0C593 #FFC890 #B7714A #8D614C #FCF9E0 #F2D9BA #78524B #FFE4CC #E07935 #A94023 #B88558`,H:`#FDFBFF #FEFFFF #B6B1BA #89858C #48464E #2F2B2F #000000 #E7D6DB #EDEDED #EEE9EA #CECDD5 #FFF5ED #F5ECD2 #CFD7D3 #98A6A8 #1D1414 #F1EDED #FFFDF0 #F6EFE2 #949FA3 #FFFBE1 #CACAD4 #9A9D94`,M:`#BCC6B8 #8AA386 #697D80 #E3D2BC #D0CCAA #B0A782 #B4A497 #B38281 #A58767 #C5B2BC #9F7594 #644749 #D19066 #C77362 #757D78`}).flatMap(([e,t])=>t.split(` `).map((t,n)=>[e+(n+1),t])),a=t(),o={x:0,y:0,width:1,height:1};function s(e){fetch(`/api/usage`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),keepalive:!0}).catch(()=>void 0)}var c=128,l=30,u=`bead-pattern-history`,d=`pixel-bead-pattern-history`,f=`patterns`;function p(){return typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function m(){return new Promise((e,t)=>{let n=indexedDB.open(d,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(f)||n.result.createObjectStore(f)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}async function h(){let e=await m();return new Promise((t,n)=>{let r=e.transaction(f,`readonly`),i=r.objectStore(f).get(u);i.onsuccess=()=>t(Array.isArray(i.result)?i.result:[]),i.onerror=()=>n(i.error),r.oncomplete=()=>e.close()})}async function g(e){let t=await m();return new Promise((n,r)=>{let i=t.transaction(f,`readwrite`);i.objectStore(f).put(e,u),i.oncomplete=()=>{t.close(),n()},i.onerror=()=>{t.close(),r(i.error)},i.onabort=()=>{t.close(),r(i.error)}})}var _={A:`黄橙系`,B:`绿色系`,C:`蓝青系`,D:`紫蓝系`,E:`粉红系`,F:`红色系`,G:`肤棕系`,H:`黑白灰系`,M:`莫兰迪系`};function v([e,t,n]){let r=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},i=r(e),a=r(t),o=r(n),s=Math.cbrt(.4122214708*i+.5363325363*a+.0514459929*o),c=Math.cbrt(.2119034982*i+.6806995451*a+.1073969566*o),l=Math.cbrt(.0883024619*i+.2817188376*a+.6299787005*o);return[.2104542553*s+.793617785*c-.0040720468*l,1.9779984951*s-2.428592205*c+.4505937099*l,.0259040371*s+.7827717662*c-.808675766*l]}function y(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])}function b(e,t,n){let r=[n[0]-t[0],n[1]-t[1],n[2]-t[2]],i=r[0]**2+r[1]**2+r[2]**2;if(i<.07**2)return!1;let a=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],o=(a[0]*r[0]+a[1]*r[1]+a[2]*r[2])/i;return o<.12||o>.88?!1:y(e,[t[0]+r[0]*o,t[1]+r[1]*o,t[2]+r[2]*o])<=.025}var x=i.map(([e,t])=>{let n=[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)];return{code:e,name:`MARD ${_[e[0]]}`,hex:t,rgb:n,lab:v(n)}}),ee=e=>[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)];function S(e,t){let n=t[0],r=1/0;for(let i of t){let t=y(e,i.lab);t>3<<10|a>>3<<5|o>>3;t.push(s);let l=n.get(s);l?(l.count+=1,l.red+=i,l.green+=a,l.blue+=o):n.set(s,{count:1,red:i,green:a,blue:o})}let r=[...n.entries()].map(([e,t])=>{let n=[t.red/t.count,t.green/t.count,t.blue/t.count];return{key:e,count:t.count,rgb:n,lab:v(n)}}).sort((e,t)=>t.count-e.count),i=[];for(let e of r){let t=-1,n=1/0;for(let r=0;r=0&&n<=.015){let n=i[t],r=n.count+e.count;n.rgb=n.rgb.map((t,i)=>(t*n.count+e.rgb[i]*e.count)/r),n.lab=n.lab.map((t,i)=>(t*n.count+e.lab[i]*e.count)/r),n.count=r}else i.push({count:e.count,rgb:[...e.rgb],lab:[...e.lab]})}let a=new Map;for(let e of r){let t=0,n=1/0;i.forEach((r,i)=>{let a=y(e.lab,r.lab);at.score-e.score||e.error/e.count-t.error/t.count);for(let e of i)r.every(t=>y(e.color.lab,t.lab)>=.035)&&r.push(e.color);return r.slice(0,Math.max(0,Math.min(t,r.length)))}function re(e,t,n){let r=e.map(e=>S(e.lab,t));if(n<12)return r;let i=e.reduce((e,t)=>e+t.count,0),a=Math.max(24,i*.012),o=Math.min(8,Math.max(0,n-t.length)),s=[],c=e.map((e,t)=>({cluster:e,index:t,exact:S(e.lab,x)})).filter(({cluster:e,exact:t,index:n})=>e.count>=a&&t.code!==r[n].code).sort((e,t)=>t.cluster.count-e.cluster.count);for(let e of c){if(s.length>=o)break;if(s.some(t=>t.code===e.exact.code)){r[e.index]=e.exact;continue}Math.min(...t.map(t=>y(t.lab,e.exact.lab)))<.018||(s.push(e.exact),r[e.index]=e.exact)}return r}function ie(e,t,n,r,i){if(i<12)return e;let a=[...e],o=[];for(let e=0;ee.code.startsWith(`H`)):x);!u.has(l.code)&&u.size>=8||(u.add(l.code),a[r]=l)}return a}function ae(e,t,n){let r=new Map;e.forEach(e=>{e&&r.set(e.code,(r.get(e.code)??0)+1)});let i=[...e],a=0;for(let o=0;o2)continue;let u=new Map;for(let r=-1;r<=1;r++)for(let i=-1;i<=1;i++){if(r===0&&i===0)continue;let a=o+r,c=s+i;if(a<0||c<0||a>=n||c>=t)continue;let d=e[a*t+c];if(!d||d.code===l.code)continue;let f=u.get(d.code)??{color:d,count:0};f.count+=1,u.set(d.code,f)}let d=[...u.values()].sort((e,t)=>t.count-e.count)[0];if(!d)continue;let f=(r.get(l.code)??0)===1?3:5;d.count(t*h.weight+p[n]*d)/e),h.weight=e,h.count+=1,h.samples.push({rgb:f,lab:p}),h.containsCenter||=m}else r.push({count:1,weight:d,lab:[...p],samples:[{rgb:f,lab:p}],containsCenter:m})}let s=(e*t+n)*4;if(i>=10/2||r.length===0){u[s+3]=0,d[e*t+n]=i/10;continue}let f=r.map(e=>{let t=e.weight;if(e.count<=2)for(let n=0;nt.effectiveWeight-e.effectiveWeight||t.group.weight-e.group.weight||Number(t.group.containsCenter)-Number(e.group.containsCenter))[0].group,p=f.samples.reduce((e,t)=>y(t.lab,f.lab)=n||d>=t)continue;let f=e[s*t+d];if(!f)continue;if(f.code===c.code){u+=1;continue}let p=l.get(f.code)??{color:f,count:0};p.count+=1,l.set(f.code,p)}if(u>2)continue;let d=[...l.values()].sort((e,t)=>t.count-e.count).slice(0,3),f=null,p=0;for(let e=0;e=d[t].count?d[e]:d[t];n.count>p&&(f=n.color,p=n.count)}f&&(r[s]=f,i+=1)}return{colors:r,changed:i}}function ce(e,t,n,r){let i=[...e],a=0,o=[-1,0,1];for(let s=0;s=.625)continue;let d=Math.hypot(u.lab[1],u.lab[2]);if(u.lab[0]<.32||u.lab[0]>.96||d>.14)continue;let f=new Map,p=0,m=0;for(let i of o)for(let a of o){if(i===0&&a===0)continue;let o=s+i,l=c+a;if(o<0||l<0||o>=r||l>=n)continue;let d=o*n+l,h=e[d];if(!h)continue;h.code===u.code&&(m+=1);let g=f.get(h.code)??{color:h,count:0,confidentCount:0};g.count+=1,t[d]>=.625&&(g.confidentCount+=1),f.set(h.code,g),p+=1}if(m>0)continue;let h=[...f.values()].sort((e,t)=>t.count-e.count)[0];if(!h||h.color.code===u.code)continue;let g=p>=7?5:Math.max(2,Math.ceil(p*.67));h.count.075||(i[l]=h.color,a+=1)}return{colors:i,changed:a}}function le(e,t,n,r,i,a){let o=a.x*t.naturalWidth,s=a.y*t.naturalHeight,c=a.width*t.naturalWidth,l=a.height*t.naturalHeight,u=c/l,d=n/r,f=n,p=r;i===`cover`&&u>d||i===`contain`&&u{s({event:`page_view`});let e=!1;return(async()=>{try{let t=await h(),n=localStorage.getItem(u);if(t.length===0&&n){let e=JSON.parse(n);Array.isArray(e)&&(t=e.slice(0,l),await g(t)),localStorage.removeItem(u)}e||ve(t.slice(0,l))}catch{e||G(`历史记录读取失败,请检查浏览器是否允许本地存储`)}})(),()=>{e=!0}},[]);let Q=(e=K.current,t=E,n=!0)=>{if(!e)return;let r=Math.max(8,Math.min(256,c)),i=Math.max(8,Math.min(256,f)),a,o=null;if(T===`dominant`){let n=oe(e,r,i,w,t);a=n.data,o=n.confidence}else{let n=document.createElement(`canvas`);n.width=r,n.height=i;let o=n.getContext(`2d`,{willReadFrequently:!0});o.clearRect(0,0,r,i),le(o,e,r,i,w,t),a=o.getImageData(0,0,r,i).data}let{pixelKeys:l,clusters:u,binClusters:p}=te(a),h=re(u,ne(u,Math.max(2,Math.min(S,x.length))),S),g=l.map(e=>e===null?null:h[p.get(e)??0]),_=0;if(o){let e=ce(g,o,r,i);g=e.colors,_=e.changed;let t=se(g,r,i);g=t.colors,_+=t.changed,g=ie(g,a,r,i,S);let n=ae(g,r,i);g=n.colors,_+=n.changed}let y=g.map(e=>({color:e}));v(r),b(i),d(r),m(i),pe(y),P(new Set);let ee=T===`dominant`?`区域主色 · 清理 ${_} 个低可信孤立格`:`平滑取色`,ue=new Set(g.filter(e=>e!==null).map(e=>e.code)).size,C=g.filter(e=>e!==null).length;n&&s({event:`conversion`,width:r,height:i,sampling_strategy:T,color_limit:S,actual_colors:ue,bead_count:C,transparent_cells:r*i-C}),G(`已转换为 ${r} × ${i} · ${C} 颗拼豆 · ${ee} · ${ue} 种差异色`)};(0,r.useEffect)(()=>{let e=ue(),n=new Image;n.onload=()=>{K.current=n,t(e),Q(n,o,!1)},n.src=e},[]),(0,r.useEffect)(()=>{let e=Se.current,t=K.current;if(!e||!t)return;let n=Math.max(8,Math.min(256,c||8))/Math.max(8,Math.min(256,f||8)),r=n>=1?600:Math.max(120,Math.round(600*n)),i=n>=1?Math.max(120,Math.round(600/n)):600;e.width=r,e.height=i;let a=e.getContext(`2d`);a.fillStyle=`#f7f5ed`,a.fillRect(0,0,r,i),le(a,t,r,i,w,E)},[e,c,f,w,E]),(0,r.useEffect)(()=>{if(!A)return;let e=Ce.current,t=K.current;if(!e||!t)return;let n=Math.min(1200/t.naturalWidth,760/t.naturalHeight,1);e.width=Math.max(1,Math.round(t.naturalWidth*n)),e.height=Math.max(1,Math.round(t.naturalHeight*n));let r=e.getContext(`2d`);r.clearRect(0,0,e.width,e.height),r.drawImage(t,0,0,e.width,e.height)},[A,e]),(0,r.useEffect)(()=>{if(!A)return;let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=e=>{e.key===`Escape`&&j(!1)};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[A]);let $=(0,r.useMemo)(()=>{let e=new Map;return M.forEach(({color:t})=>{t&&e.set(t.code,(e.get(t.code)??0)+1)}),x.filter(t=>e.has(t.code)).map(t=>({...t,count:e.get(t.code)})).sort((e,t)=>t.count-e.count)},[M]),Te=(0,r.useMemo)(()=>M.reduce((e,t)=>e+ +!!t.color,0),[M]),Ee=(0,r.useMemo)(()=>{let e=B.trim().toLowerCase();return $.filter(t=>!e||t.code.toLowerCase().includes(e)||t.name.includes(e)||t.hex.toLowerCase().includes(e))},[B,$]);(0,r.useEffect)(()=>{let e=q.current;if(!e||M.length===0)return;let t=I,n=Math.max(22,t),r=Math.min(window.devicePixelRatio||1,2);e.width=(_*t+n)*r,e.height=(y*t+n)*r,e.style.width=`${_*t+n}px`,e.style.height=`${y*t+n}px`;let i=e.getContext(`2d`);i.scale(r,r),i.fillStyle=`#ffffff`,i.fillRect(0,0,_*t+n,y*t+n),i.fillStyle=`#f0eee7`,i.fillRect(n,0,_*t,n),i.fillRect(0,n,n,y*t),i.strokeStyle=`rgba(32,38,36,.25)`,i.lineWidth=.6,i.font=`600 ${Math.max(7,Math.min(10,t*.35))}px Arial`,i.fillStyle=`#56605b`,i.textAlign=`center`,i.textBaseline=`middle`;let a=t<10?10:t<16?5:1;for(let e=0;e<_;e++){let r=n+e*t;i.strokeRect(r+.3,.3,t-.6,n-.6),(e===0||(e+1)%a===0)&&i.fillText(String(e+1),r+t/2,n/2)}for(let e=0;e{let a=n+r%_*t,o=n+Math.floor(r/_)*t;if(!e){i.clearRect(a,o,t,t),R&&(i.strokeStyle=`rgba(32,38,36,.12)`,i.lineWidth=.6,i.strokeRect(a+.3,o+.3,t-.6,t-.6));return}let s=N.size>0,c=N.has(e.code);if(F&&s&&!c?i.fillStyle=`#ffffff`:(i.fillStyle=e.hex,i.globalAlpha=s&&!c?.12:1,i.fillRect(a,o,t,t),i.globalAlpha=1),R&&(i.strokeStyle=s&&!c?`rgba(32,38,36,.07)`:`rgba(32,38,36,.22)`,i.lineWidth=.6,i.strokeRect(a+.3,o+.3,t-.6,t-.6)),z&&t>=22&&(!s||c)){let[n,r,s]=ee(e.hex);i.fillStyle=n*.299+r*.587+s*.114>160?`#1f2925`:`#ffffff`,i.font=`600 ${Math.max(7,t*.28)}px Arial`,i.textAlign=`center`,i.textBaseline=`middle`,i.fillText(e.code,a+t/2,o+t/2)}}),R){i.strokeStyle=`rgba(32,38,36,.48)`,i.lineWidth=1.5;for(let e=5;e<_;e+=5){let r=n+e*t;i.beginPath(),i.moveTo(r,n),i.lineTo(r,n+y*t),i.stroke()}for(let e=5;e{let r=n.target.files?.[0];if(!r)return;if(!r.type.startsWith(`image/`)){G(`请选择 JPG、PNG 或 WebP 图片`);return}let a=URL.createObjectURL(r),s=new Image;s.onload=()=>{e.startsWith(`blob:`)&&URL.revokeObjectURL(e),K.current=s,t(a),i(r.name),D(o),k(o),G(`图片已载入,点击“重新转换”生成图纸`),Q(s,o)},s.src=a},Oe=()=>{k(E),j(!0)},ke=e=>{let t=we.current;if(!t)return{x:0,y:0};let n=t.getBoundingClientRect();return{x:Math.max(0,Math.min(1,(e.clientX-n.left)/Math.max(1,n.width))),y:Math.max(0,Math.min(1,(e.clientY-n.top)/Math.max(1,n.height)))}},Ae=(e,t,n,r)=>{let i=Math.max(8,c||8)/Math.max(8,f||8),a=K.current;if(!a)return;let o=i*a.naturalHeight/a.naturalWidth,s=n>=e?1:-1,l=r>=t?1:-1,u=Math.abs(n-e),d=Math.abs(r-t);u/Math.max(d,1e-4)>o?u=d*o:d=u/Math.max(o,1e-4);let p=s>0?1-e:e,m=l>0?1-t:t,h=Math.min(1,p/Math.max(u,1e-4),m/Math.max(d,1e-4));u*=h,d*=h,k({x:s>0?e:e-u,y:l>0?t:t-d,width:Math.max(.01,u),height:Math.max(.01,d)})},je=e=>{if(e.button!==0)return;let t=ke(e);e.currentTarget.setPointerCapture(e.pointerId),Y.current={pointerId:e.pointerId,startX:t.x,startY:t.y},k({x:t.x,y:t.y,width:.01,height:.01})},Me=e=>{let t=Y.current;if(!t||t.pointerId!==e.pointerId)return;let n=ke(e);Ae(t.startX,t.startY,n.x,n.y)},Ne=e=>{Y.current?.pointerId===e.pointerId&&(Y.current=null),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},Pe=()=>{if(O.width<.03||O.height<.03){G(`框选区域太小,请在大图上拖出更大的选框`);return}D(O),j(!1),G(`取景区域已更新,点击“重新转换”生成图纸`)},Fe=e=>{P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ie=e=>{if(e.button!==0)return;let t=J.current;t&&(Z.current=!1,e.currentTarget.setPointerCapture(e.pointerId),X.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,moved:!1})},Le=e=>{let t=J.current,n=X.current;if(!t||!n||n.pointerId!==e.pointerId)return;let r=e.clientX-n.x,i=e.clientY-n.y;!n.moved&&Math.hypot(r,i)<5||(n.moved=!0,t.classList.add(`is-dragging`),t.scrollLeft=n.scrollLeft-r,t.scrollTop=n.scrollTop-i,H(null))},Re=e=>{let t=J.current,n=X.current;!n||n.pointerId!==e.pointerId||(Z.current=n.moved,X.current=null,t?.classList.remove(`is-dragging`),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},ze=e=>{X.current?.pointerId===e.pointerId&&(X.current=null,Z.current=!1,J.current?.classList.remove(`is-dragging`),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},Be=e=>{X.current?.pointerId===e.pointerId&&(X.current=null,Z.current=!1,J.current?.classList.remove(`is-dragging`))},Ve=e=>{if(Z.current){Z.current=!1;return}let t=q.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.max(22,I),i=Math.floor((e.clientX-n.left-r)/I),a=Math.floor((e.clientY-n.top-r)/I),o=M[a*_+i];i>=0&&a>=0&&i<_&&a{if(X.current?.moved){H(null);return}let t=q.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.max(22,I),i=Math.floor((e.clientX-n.left-r)/I),a=Math.floor((e.clientY-n.top-r)/I),o=M[a*_+i];if(i<0||a<0||i>=_||a>=y||!o?.color){H(null);return}H({row:a+1,column:i+1,color:o.color,left:e.clientX-n.left+14,top:e.clientY-n.top+14})},Ue=async e=>{await g(e),ve(e)},We=async()=>{if(M.length)try{await Ue([{id:p(),name:n.replace(/\.[^.]+$/,``)||`未命名图纸`,savedAt:new Date().toISOString(),width:_,height:y,colorLimit:S,codes:M.map(e=>e.color?.code??null)},...U].slice(0,l)),ye(``),G(`图纸已保存到本机历史记录`),requestAnimationFrame(()=>document.getElementById(`history-title`)?.scrollIntoView({behavior:`smooth`,block:`start`}))}catch{G(`保存历史失败,请检查浏览器是否允许本地存储或剩余空间是否充足`)}},Ge=e=>{let t=new Map(x.map(e=>[e.code,e]));pe(e.codes.map(e=>({color:e===null?null:t.get(e)??x[0]}))),v(e.width),b(e.height),d(e.width),m(e.height),C(e.colorLimit),i(e.name),P(new Set),G(`已恢复历史图纸:${e.name}`),document.getElementById(`pattern-preview`)?.scrollIntoView({behavior:`smooth`})},Ke=async e=>{try{await Ue(U.filter(t=>t.id!==e))}catch{G(`删除历史失败,请稍后重试`)}},qe=(0,r.useMemo)(()=>{let e=W.trim().toLowerCase();return U.filter(t=>!e||t.name.toLowerCase().includes(e)||`${t.width}x${t.height}`.includes(e))},[U,W]);return(0,a.jsxs)(`main`,{children:[(0,a.jsxs)(`header`,{className:`topbar`,children:[(0,a.jsxs)(`a`,{className:`brand`,href:`#top`,"aria-label":`豆格工坊首页`,children:[(0,a.jsxs)(`span`,{className:`brand-mark`,"aria-hidden":`true`,children:[(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{}),(0,a.jsx)(`i`,{})]}),(0,a.jsx)(`span`,{children:`豆格工坊`})]}),(0,a.jsx)(`span`,{className:`top-note`,children:`图片转拼豆图纸 · 本地处理`})]}),(0,a.jsxs)(`section`,{className:`hero`,id:`top`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`eyebrow`,children:`PIXEL BEAD STUDIO`}),(0,a.jsxs)(`h1`,{children:[`把喜欢的图片,`,(0,a.jsx)(`br`,{}),(0,a.jsx)(`em`,{children:`变成一格一格的快乐。`})]}),(0,a.jsx)(`p`,{className:`hero-copy`,children:`上传图片,选择图纸大小和颜色数量;点击任意像素格,就能单独查看该颜色需要摆放的区域。`})]}),(0,a.jsxs)(`div`,{className:`hero-badge`,children:[(0,a.jsxs)(`strong`,{children:[_,` × `,y]}),(0,a.jsx)(`span`,{children:`当前图纸格数`})]})]}),(0,a.jsxs)(`section`,{className:`workspace`,"aria-label":`拼豆图纸转换工具`,children:[(0,a.jsxs)(`aside`,{className:`control-panel`,children:[(0,a.jsxs)(`div`,{className:`panel-heading`,children:[(0,a.jsx)(`span`,{children:`01`}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h2`,{children:`图片与规格`}),(0,a.jsx)(`p`,{children:`先决定图纸需要多少格`})]})]}),(0,a.jsxs)(`div`,{className:`upload-card crop-preview`,style:{aspectRatio:`${Math.max(8,c||8)} / ${Math.max(8,f||8)}`},children:[(0,a.jsx)(`canvas`,{ref:Se,"aria-label":`当前取景区域预览`}),(0,a.jsx)(`button`,{type:`button`,className:`upload-overlay`,onClick:()=>xe.current?.click(),children:`更换图片`}),(0,a.jsx)(`input`,{ref:xe,className:`file-input`,type:`file`,accept:`image/png,image/jpeg,image/webp`,onChange:De})]}),(0,a.jsx)(`p`,{className:`file-name`,title:n,children:n}),(0,a.jsx)(`button`,{className:`crop-select-button`,onClick:Oe,children:`选择取景区域`}),(0,a.jsx)(`button`,{className:`reset-crop`,onClick:()=>{D(o),k(o),G(`已恢复使用整张图片`)},children:`使用整张图片`}),(0,a.jsxs)(`div`,{className:`field-row`,children:[(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:`横向格数`}),(0,a.jsx)(`input`,{type:`number`,min:`8`,max:`256`,value:c,onChange:e=>d(Number(e.target.value))})]}),(0,a.jsx)(`span`,{className:`times`,children:`×`}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:`纵向格数`}),(0,a.jsx)(`input`,{type:`number`,min:`8`,max:`256`,value:f,onChange:e=>m(Number(e.target.value))})]})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsxs)(`span`,{children:[`最多使用颜色 `,(0,a.jsx)(`b`,{children:S})]}),(0,a.jsx)(`input`,{type:`range`,min:`2`,max:`64`,value:S,onChange:e=>C(Number(e.target.value))})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsx)(`span`,{children:`取色策略`}),(0,a.jsxs)(`select`,{value:T,onChange:e=>fe(e.target.value),children:[(0,a.jsx)(`option`,{value:`dominant`,children:`区域主色(减少杂色)`}),(0,a.jsx)(`option`,{value:`smooth`,children:`平滑取色(细节丰富)`})]})]}),(0,a.jsxs)(`label`,{className:`field`,children:[(0,a.jsx)(`span`,{children:`图片适应方式`}),(0,a.jsxs)(`select`,{value:w,onChange:e=>de(e.target.value),children:[(0,a.jsx)(`option`,{value:`contain`,children:`完整显示`}),(0,a.jsx)(`option`,{value:`cover`,children:`裁剪铺满`})]})]}),(0,a.jsx)(`button`,{className:`primary-button`,onClick:()=>Q(),children:`重新转换`}),(0,a.jsx)(`p`,{className:`privacy-note`,children:`图片只在当前浏览器中处理,不会上传到服务器。`})]}),(0,a.jsxs)(`section`,{className:`pattern-panel`,id:`pattern-preview`,children:[(0,a.jsxs)(`div`,{className:`pattern-toolbar`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`section-kicker`,children:`02 / 图纸预览`}),(0,a.jsx)(`h2`,{children:`点击格子,筛选颜色`})]}),(0,a.jsxs)(`div`,{className:`zoom-control`,"aria-label":`图纸缩放`,children:[(0,a.jsx)(`button`,{onClick:()=>L(e=>Math.max(3,e-1)),"aria-label":`缩小`,children:`−`}),(0,a.jsx)(`input`,{"aria-label":`缩放比例`,type:`range`,min:`3`,max:`42`,step:`1`,value:I,onChange:e=>L(Number(e.target.value))}),(0,a.jsx)(`button`,{onClick:()=>L(e=>Math.min(42,e+1)),"aria-label":`放大`,children:`+`}),(0,a.jsxs)(`output`,{children:[I,`px`]})]})]}),(0,a.jsx)(`div`,{className:`canvas-viewport`,children:(0,a.jsx)(`div`,{className:`canvas-stage`,ref:J,children:(0,a.jsxs)(`div`,{className:`canvas-wrap`,children:[(0,a.jsx)(`canvas`,{ref:q,onPointerDown:Ie,onPointerMove:Le,onPointerUp:Re,onPointerCancel:ze,onLostPointerCapture:Be,onContextMenu:e=>e.preventDefault(),onClick:Ve,onMouseMove:He,onMouseLeave:()=>H(null),"aria-label":`转换后的拼豆像素图,可拖动查看,轻点格子选择颜色`}),V&&(0,a.jsxs)(`div`,{className:`pixel-tooltip`,style:{left:V.left,top:V.top},children:[(0,a.jsx)(`span`,{className:`tooltip-swatch`,style:{backgroundColor:V.color.hex}}),(0,a.jsxs)(`strong`,{children:[`第 `,V.row,` 行 · 第 `,V.column,` 列`]}),(0,a.jsxs)(`small`,{children:[V.color.code,` · `,V.color.name,` · `,V.color.hex]})]})]})})}),(0,a.jsxs)(`div`,{className:`pattern-footer`,children:[(0,a.jsx)(`span`,{className:`status-dot`}),` `,(0,a.jsx)(`span`,{children:be}),(0,a.jsxs)(`div`,{className:`view-options`,children:[(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:R,onChange:e=>he(e.target.checked)}),` 网格`]}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:z,onChange:e=>ge(e.target.checked)}),` 格内编号`]}),(0,a.jsx)(`button`,{className:`save-button`,onClick:We,children:`保存历史`}),(0,a.jsx)(`button`,{onClick:()=>{let e=q.current;if(!e)return;let t=document.createElement(`a`);t.download=`拼豆图纸-${_}x${y}.png`,t.href=e.toDataURL(`image/png`),t.click()},children:`下载 PNG`})]})]}),(0,a.jsxs)(`div`,{className:`pattern-legend`,children:[(0,a.jsxs)(`div`,{className:`legend-heading`,children:[(0,a.jsx)(`strong`,{children:`本图所需颜色与用量`}),(0,a.jsxs)(`span`,{children:[`按数量从多到少,共 `,$.length,` 色`]})]}),(0,a.jsx)(`div`,{className:`legend-list`,children:$.map(e=>(0,a.jsxs)(`button`,{className:N.has(e.code)?`active`:``,onClick:()=>Fe(e.code),children:[(0,a.jsx)(`i`,{style:{backgroundColor:e.hex}}),(0,a.jsx)(`strong`,{children:e.code}),(0,a.jsx)(`span`,{children:e.name}),(0,a.jsxs)(`b`,{children:[e.count,` 颗`]})]},e.code))})]})]}),(0,a.jsxs)(`aside`,{className:`color-panel`,children:[(0,a.jsxs)(`div`,{className:`panel-heading`,children:[(0,a.jsx)(`span`,{children:`03`}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h2`,{children:`分色查看`}),(0,a.jsxs)(`p`,{children:[$.length,` 种颜色 · `,Te,` 颗`]})]})]}),(0,a.jsxs)(`div`,{className:`search-box`,children:[(0,a.jsx)(`span`,{children:`⌕`}),(0,a.jsx)(`input`,{value:B,onChange:e=>_e(e.target.value),placeholder:`输入 A6、MARD A 或 #FEAC4C`})]}),(0,a.jsxs)(`div`,{className:`selection-tools`,children:[(0,a.jsxs)(`label`,{className:`switch-row`,children:[(0,a.jsx)(`input`,{type:`checkbox`,checked:F,onChange:e=>me(e.target.checked)}),(0,a.jsx)(`span`,{className:`switch`}),(0,a.jsx)(`span`,{children:`只显示选中颜色`})]}),N.size>0&&(0,a.jsxs)(`button`,{onClick:()=>P(new Set),children:[`清除 `,N.size,` 项`]})]}),(0,a.jsx)(`div`,{className:`color-list`,children:Ee.map(e=>{let t=N.has(e.code);return(0,a.jsxs)(`button`,{className:`color-item ${t?`active`:``}`,onClick:()=>Fe(e.code),"aria-pressed":t,children:[(0,a.jsx)(`span`,{className:`swatch`,style:{backgroundColor:e.hex}}),(0,a.jsxs)(`span`,{className:`color-meta`,children:[(0,a.jsxs)(`strong`,{children:[e.code,` · `,e.name]}),(0,a.jsx)(`small`,{children:e.hex})]}),(0,a.jsxs)(`b`,{children:[e.count,(0,a.jsx)(`small`,{children:`颗`})]})]},e.code)})}),(0,a.jsxs)(`p`,{className:`palette-note`,children:[(0,a.jsx)(`strong`,{children:`MARD 221 基础色卡`}),`:默认使用 A/B/C/D/E/F/G/H/M 九个系列。屏幕色值仅用于近似匹配,实体豆颜色会受批次、光线和屏幕影响。`]})]})]}),A&&(0,a.jsx)(`div`,{className:`crop-dialog-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&j(!1)},children:(0,a.jsxs)(`section`,{className:`crop-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`crop-dialog-title`,children:[(0,a.jsxs)(`div`,{className:`crop-dialog-header`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`section-kicker`,children:`IMAGE CROP`}),(0,a.jsx)(`h2`,{id:`crop-dialog-title`,children:`框选需要转换的区域`}),(0,a.jsxs)(`p`,{children:[`在大图上按住并拖动。选框比例为 `,Math.max(8,c||8),` : `,Math.max(8,f||8),`。`]})]}),(0,a.jsx)(`button`,{"aria-label":`关闭取景窗口`,onClick:()=>j(!1),children:`×`})]}),(0,a.jsx)(`div`,{className:`crop-dialog-scroll`,children:(0,a.jsxs)(`div`,{className:`crop-dialog-stage`,ref:we,onPointerDown:je,onPointerMove:Me,onPointerUp:Ne,onPointerCancel:Ne,children:[(0,a.jsx)(`canvas`,{ref:Ce,"aria-label":`可框选的原始大图`}),(0,a.jsx)(`div`,{className:`crop-selection-mask crop-selection-top`,style:{height:`${O.y*100}%`}}),(0,a.jsx)(`div`,{className:`crop-selection-mask crop-selection-left`,style:{top:`${O.y*100}%`,width:`${O.x*100}%`,height:`${O.height*100}%`}}),(0,a.jsx)(`div`,{className:`crop-selection-mask crop-selection-right`,style:{top:`${O.y*100}%`,left:`${(O.x+O.width)*100}%`,right:0,height:`${O.height*100}%`}}),(0,a.jsx)(`div`,{className:`crop-selection-mask crop-selection-bottom`,style:{top:`${(O.y+O.height)*100}%`}}),(0,a.jsx)(`div`,{className:`crop-selection-box`,style:{left:`${O.x*100}%`,top:`${O.y*100}%`,width:`${O.width*100}%`,height:`${O.height*100}%`}})]})}),(0,a.jsxs)(`div`,{className:`crop-dialog-actions`,children:[(0,a.jsx)(`button`,{onClick:()=>k(o),children:`选择整张图`}),(0,a.jsx)(`span`,{children:`从左上角拖向右下角即可重新框选`}),(0,a.jsx)(`button`,{onClick:()=>j(!1),children:`取消`}),(0,a.jsx)(`button`,{className:`confirm`,disabled:O.width<.03||O.height<.03,onClick:Pe,children:`使用此区域`})]})]})}),(0,a.jsxs)(`section`,{className:`history-section`,"aria-labelledby":`history-title`,children:[(0,a.jsxs)(`div`,{className:`history-heading`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`section-kicker`,children:`LOCAL PATTERN ARCHIVE`}),(0,a.jsx)(`h2`,{id:`history-title`,children:`历史图纸`}),(0,a.jsx)(`p`,{children:`历史保存在当前浏览器,最多保留 30 份。`})]}),(0,a.jsxs)(`div`,{className:`search-box`,children:[(0,a.jsx)(`span`,{children:`⌕`}),(0,a.jsx)(`input`,{value:W,onChange:e=>ye(e.target.value),placeholder:`按名称或 32x32 查询`})]})]}),qe.length?(0,a.jsx)(`div`,{className:`history-grid`,children:qe.map(e=>{let t=new Map;return e.codes.forEach(e=>{e&&t.set(e,(t.get(e)??0)+1)}),(0,a.jsxs)(`article`,{className:`history-card`,children:[(0,a.jsx)(`div`,{className:`history-swatches`,children:[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,6).map(([e,t])=>(0,a.jsx)(`i`,{style:{backgroundColor:x.find(t=>t.code===e)?.hex,flexGrow:t}},e))}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`h3`,{children:e.name}),(0,a.jsxs)(`p`,{children:[e.width,` × `,e.height,` · `,new Date(e.savedAt).toLocaleString(`zh-CN`,{hour12:!1})]})]}),(0,a.jsxs)(`div`,{className:`history-actions`,children:[(0,a.jsx)(`button`,{onClick:()=>Ge(e),children:`打开`}),(0,a.jsx)(`button`,{onClick:()=>Ke(e.id),children:`删除`})]})]},e.id)})}):(0,a.jsx)(`div`,{className:`history-empty`,children:`还没有符合条件的历史图纸。转换完成后点击“保存历史”即可在这里查询。`})]})]})}export{C as default}; \ No newline at end of file diff --git a/out/_next/static/css/index.BD45GRB0.css b/out/_next/static/css/index.BD45GRB0.css new file mode 100644 index 0000000..7b7ede1 --- /dev/null +++ b/out/_next/static/css/index.BD45GRB0.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}::backdrop{--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.block{display:block}.hidden{display:none}.table{display:table}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}:root{--ink:#202724;--muted:#69716d;--paper:#f5f1e8;--card:#fffdf8;--line:#d9d5ca;--green:#1f6b4d;--green-dark:#164b39;--lime:#cbe568;--orange:#ee7b43}*{box-sizing:border-box}html{scroll-behavior:smooth}body{background:var(--paper);color:var(--ink);margin:0;font-family:Microsoft YaHei,PingFang SC,system-ui,sans-serif}button,input,select{font:inherit}button,label,input[type=range]{-webkit-tap-highlight-color:transparent}button{color:inherit}.topbar{border-bottom:1px solid var(--line);z-index:20;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#f5f1e8eb;justify-content:space-between;align-items:center;height:72px;padding:0 clamp(20px,5vw,80px);display:flex;position:sticky;top:0}.brand{color:var(--ink);letter-spacing:.04em;align-items:center;gap:11px;font-size:20px;font-weight:800;text-decoration:none;display:flex}.brand-mark{grid-template-columns:repeat(2,8px);gap:3px;display:grid;rotate:-8deg}.brand-mark i{background:var(--green);border-radius:50%;width:8px;height:8px;box-shadow:inset -1px -1px #00000026}.brand-mark i:nth-child(2){background:var(--orange)}.brand-mark i:nth-child(3){background:var(--lime)}.top-note{color:var(--muted);letter-spacing:.08em;font-size:13px}.hero{justify-content:space-between;align-items:flex-end;gap:48px;max-width:1560px;margin:0 auto;padding:clamp(42px,7vw,92px) clamp(20px,5vw,80px) clamp(38px,6vw,72px);display:flex}.eyebrow,.section-kicker{color:var(--green);letter-spacing:.2em;margin:0 0 14px;font-size:11px;font-weight:800}.hero h1{letter-spacing:-.055em;margin:0;font-family:Georgia,Songti SC,serif;font-size:clamp(40px,6.3vw,88px);font-weight:500;line-height:1.04}.hero h1 em{color:var(--green);font-style:normal}.hero-copy{max-width:720px;color:var(--muted);margin:28px 0 0;font-size:clamp(15px,1.5vw,18px);line-height:1.8}.hero-badge{border:1px solid var(--ink);background:var(--lime);width:150px;height:150px;box-shadow:6px 6px 0 var(--ink);border-radius:50%;flex-direction:column;flex:none;justify-content:center;align-items:center;display:flex;rotate:6deg}.hero-badge strong{font-family:Georgia,serif;font-size:26px}.hero-badge span{margin-top:5px;font-size:11px}.workspace{border-top:1px solid var(--ink);border-bottom:1px solid var(--ink);background:var(--card);grid-template-columns:minmax(240px,300px) minmax(500px,1fr) minmax(260px,330px);max-width:1760px;margin:0 auto 80px;display:grid}.control-panel,.color-panel{min-width:0;padding:28px}.control-panel{border-right:1px solid var(--line)}.color-panel{border-left:1px solid var(--line);flex-direction:column;max-height:790px;display:flex}.panel-heading{align-items:flex-start;gap:14px;margin-bottom:24px;display:flex}.panel-heading>span{border:1px solid var(--ink);border-radius:50%;flex:none;place-items:center;width:32px;height:32px;font:700 11px Georgia,serif;display:grid}.panel-heading h2,.pattern-toolbar h2{margin:0;font-size:18px}.panel-heading p{color:var(--muted);margin:5px 0 0;font-size:12px}.upload-card{background:#ebe7dd;border:1px dashed #a5a59e;width:100%;min-height:100px;max-height:260px;display:block;position:relative;overflow:hidden}.upload-card canvas{pointer-events:none;width:100%;height:100%;display:block}.upload-card .file-input{display:none}.crop-preview{cursor:default}.upload-overlay{z-index:3;color:#fff;cursor:pointer;background:#164b39e6;border:0;padding:7px 10px;font-size:12px;position:absolute;bottom:10px;right:10px}.file-name{text-overflow:ellipsis;white-space:nowrap;color:var(--muted);margin:9px 0 24px;font-size:11px;overflow:hidden}.crop-select-button{border:1px solid var(--ink);background:var(--lime);cursor:pointer;width:100%;margin-top:0;padding:10px;font-size:12px;font-weight:700}.reset-crop{border:1px solid var(--line);cursor:pointer;width:100%;color:var(--muted);background:#fff;margin:7px 0 20px;padding:7px;font-size:11px}.field-row{grid-template-columns:1fr auto 1fr;align-items:end;gap:8px;display:grid}.field-row label,.field{flex-direction:column;gap:8px;display:flex}.field-row label span,.field>span{color:var(--muted);font-size:12px}.field-row input,.field select{border:1px solid var(--line);background:#fff;border-radius:0;outline:none;width:100%;height:43px;padding:0 10px}.field-row input:focus,.field select:focus,.search-box:focus-within{border-color:var(--green);box-shadow:0 0 0 2px #1f6b4d1c}.times{color:var(--muted);padding-bottom:11px}.field{margin-top:22px}.field>span{justify-content:space-between;display:flex}.field b{color:var(--green)}input[type=range]{accent-color:var(--green)}.primary-button{border:1px solid var(--ink);background:var(--green);color:#fff;cursor:pointer;width:100%;min-height:48px;box-shadow:3px 3px 0 var(--ink);margin-top:24px;font-weight:700;transition:transform .15s,box-shadow .15s}.primary-button:hover{box-shadow:1px 1px 0 var(--ink);transform:translate(2px,2px)}.privacy-note,.palette-note{color:var(--muted);margin:16px 0 0;font-size:11px;line-height:1.6}.pattern-panel{background-color:#f1eee6;background-image:radial-gradient(#cbc6ba .7px,#0000 .7px);background-size:12px 12px;flex-direction:column;min-width:0;display:flex}.pattern-toolbar{background:var(--card);border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:24px;min-height:90px;padding:22px 28px;display:flex}.pattern-toolbar .section-kicker{margin-bottom:5px}.zoom-control{align-items:center;gap:7px;display:flex}.zoom-control button{border:1px solid var(--line);cursor:pointer;background:#fff;width:36px;height:36px;font-size:20px}.zoom-control input{width:95px}.zoom-control output{width:38px;color:var(--muted);text-align:right;font-size:11px}.canvas-viewport{aspect-ratio:1;contain:size layout;flex:none;align-self:stretch;width:100%;height:auto;min-height:0;position:relative;overflow:hidden}.canvas-stage{cursor:grab;touch-action:none;overscroll-behavior:contain;-webkit-user-select:none;user-select:none;scrollbar-gutter:stable;width:auto;height:auto;padding:12px;display:block;position:absolute;inset:0;overflow:scroll}.canvas-stage.is-dragging{cursor:grabbing}.canvas-wrap{border:1px solid var(--ink);background-color:#f7f5ef;background-image:linear-gradient(45deg,#dedbd3 25%,#0000 25%),linear-gradient(-45deg,#dedbd3 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#dedbd3 75%),linear-gradient(-45deg,#0000 75%,#dedbd3 75%);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px;width:max-content;margin:auto;line-height:0;position:relative}.canvas-wrap canvas{cursor:inherit;image-rendering:pixelated}.pixel-tooltip{z-index:5;color:#fff;pointer-events:none;background:#161e1bf0;border:1px solid #fff3;border-radius:3px;grid-template-columns:14px auto;align-items:center;gap:3px 8px;width:max-content;max-width:260px;padding:9px 11px;line-height:1.35;display:grid;position:absolute;box-shadow:4px 4px #0003}.tooltip-swatch{border:1px solid #fff9;border-radius:50%;grid-row:1/3;width:14px;height:14px}.pixel-tooltip strong{font-size:11px}.pixel-tooltip small{color:#dce4df;font-size:10px}.pattern-footer{background:var(--card);border-top:1px solid var(--line);min-height:62px;color:var(--muted);align-items:center;gap:9px;padding:12px 22px;font-size:11px;display:flex}.status-dot{background:var(--green);border-radius:50%;width:7px;height:7px;box-shadow:0 0 0 3px #1f6b4d24}.view-options{align-items:center;gap:14px;margin-left:auto;display:flex}.view-options label{white-space:nowrap;align-items:center;gap:4px;display:flex}.view-options button{border:1px solid var(--ink);background:var(--lime);cursor:pointer;padding:8px 11px;font-weight:700}.view-options .save-button{background:#fff}.pattern-legend{background:var(--card);border-top:1px solid var(--line);padding:18px 22px 22px}.legend-heading{justify-content:space-between;gap:12px;margin-bottom:12px;display:flex}.legend-heading strong{font-size:13px}.legend-heading span{color:var(--muted);font-size:10px}.legend-list{flex-wrap:wrap;gap:7px;display:flex}.legend-list button{border:1px solid var(--line);cursor:pointer;background:#fff;align-items:center;gap:5px;min-height:34px;padding:5px 8px 5px 6px;font-size:10px;display:flex}.legend-list button.active{border-color:var(--ink);box-shadow:2px 2px 0 var(--ink);background:#f0f6df}.legend-list i{border:1px solid #20272440;border-radius:3px;width:20px;height:20px}.legend-list span{color:var(--muted)}.legend-list b{border-left:1px solid var(--line);padding-left:5px}.search-box{border:1px solid var(--line);background:#fff;align-items:center;gap:8px;height:43px;padding:0 12px;display:flex}.search-box span{font-size:22px}.search-box input{background:0 0;border:0;outline:0;width:100%;min-width:0;font-size:12px}.selection-tools{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:8px;min-height:52px;display:flex}.switch-row{cursor:pointer;align-items:center;gap:7px;font-size:11px;display:flex}.switch-row input{opacity:0;position:absolute}.switch{background:#bbb;border-radius:12px;width:30px;height:17px;transition:all .2s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:13px;height:13px;transition:all .2s;position:absolute;top:2px;left:2px}.switch-row input:checked+.switch{background:var(--green)}.switch-row input:checked+.switch:after{translate:13px}.selection-tools button{color:var(--green);cursor:pointer;background:0 0;border:0;font-size:11px}.color-list{scrollbar-width:thin;min-height:220px;margin:8px -8px 0;padding:0 8px;overflow-y:auto}.color-item{cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-bottom-color:#ebe7dd;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:58px;padding:8px;display:grid}.color-item:hover{background:#f7f4ed}.color-item.active{border-color:var(--ink);box-shadow:2px 2px 0 var(--ink);background:#f0f6df}.swatch{border:1px solid #20272447;border-radius:50%;width:30px;height:30px;box-shadow:inset -2px -2px #00000014}.color-meta{flex-direction:column;gap:3px;min-width:0;display:flex}.color-meta strong{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.color-meta small{color:var(--muted);font:9px ui-monospace,monospace}.color-item>b{text-align:right;font:700 16px Georgia,serif}.color-item>b small{color:var(--muted);margin-left:2px;font:9px sans-serif}.history-section{max-width:1560px;margin:0 auto 90px;padding:0 clamp(20px,5vw,80px)}.history-heading{border-bottom:1px solid var(--ink);justify-content:space-between;align-items:flex-end;gap:24px;padding-bottom:22px;display:flex}.history-heading h2{margin:0;font:500 clamp(30px,4vw,50px) Georgia,Songti SC,serif}.history-heading p:not(.section-kicker){color:var(--muted);margin:8px 0 0;font-size:12px}.history-heading .search-box{width:min(330px,100%)}.history-grid{grid-template-columns:repeat(3,1fr);gap:14px;padding-top:18px;display:grid}.history-card{border:1px solid var(--line);background:var(--card);grid-template-columns:58px minmax(0,1fr);gap:12px;min-width:0;padding:16px;display:grid}.history-swatches{border:1px solid var(--ink);width:58px;height:58px;display:flex;overflow:hidden}.history-swatches i{min-width:3px}.history-card h3{text-overflow:ellipsis;white-space:nowrap;margin:3px 0 7px;font-size:14px;overflow:hidden}.history-card p{color:var(--muted);margin:0;font-size:10px}.history-actions{grid-column:1/-1;justify-content:flex-end;gap:7px;display:flex}.history-actions button{border:1px solid var(--ink);cursor:pointer;background:#fff;min-height:34px;padding:0 14px;font-size:11px}.history-actions button:first-child{background:var(--lime);font-weight:700}.history-empty{color:var(--muted);text-align:center;border:1px dashed var(--line);background:#fffdf880;margin-top:18px;padding:44px 20px;font-size:13px}.crop-dialog-backdrop{z-index:100;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#111815c2;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.crop-dialog{border:1px solid var(--ink);background:var(--card);flex-direction:column;width:min(1280px,96vw);max-height:94vh;display:flex;overflow:hidden;box-shadow:10px 10px #00000052}.crop-dialog-header{border-bottom:1px solid var(--line);flex:none;justify-content:space-between;align-items:flex-start;gap:24px;padding:18px 22px;display:flex}.crop-dialog-header .section-kicker{margin-bottom:5px}.crop-dialog-header h2{margin:0;font-size:22px}.crop-dialog-header p:not(.section-kicker){color:var(--muted);margin:6px 0 0;font-size:12px}.crop-dialog-header>button{border:1px solid var(--line);cursor:pointer;background:#fff;flex:none;width:38px;height:38px;font-size:25px;line-height:1}.crop-dialog-scroll{background-color:#e9e5db;background-image:radial-gradient(#c8c3b8 .7px,#0000 .7px);background-size:12px 12px;flex:auto;place-items:center;min-height:0;padding:18px;display:grid;overflow:auto}.crop-dialog-stage{cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none;width:max-content;max-width:100%;box-shadow:0 0 0 1px var(--ink);line-height:0;position:relative}.crop-dialog-stage canvas{pointer-events:none;max-width:100%;height:auto;display:block}.crop-selection-mask{z-index:1;pointer-events:none;background:#0a0f0d8c;position:absolute}.crop-selection-top{inset:0 0 auto}.crop-selection-left{left:0}.crop-selection-bottom{inset:auto 0 0}.crop-selection-box{z-index:2;pointer-events:none;border:2px solid #fff;outline:1px solid #000000bf;position:absolute;box-shadow:inset 0 0 0 1px #0000002e}.crop-selection-box:before,.crop-selection-box:after{content:"";background:#ffffff9e;position:absolute}.crop-selection-box:before{width:1px;box-shadow:calc(33.333% * 1) 0 0 #ffffff9e;top:0;bottom:0;left:33.333%}.crop-selection-box:after{height:1px;box-shadow:0 calc(33.333% * 1) 0 #ffffff9e;top:33.333%;left:0;right:0}.crop-dialog-actions{border-top:1px solid var(--line);flex:none;justify-content:flex-end;align-items:center;gap:10px;min-height:66px;padding:12px 20px;display:flex}.crop-dialog-actions span{color:var(--muted);margin-right:auto;font-size:11px}.crop-dialog-actions button{border:1px solid var(--ink);cursor:pointer;background:#fff;min-height:40px;padding:0 16px;font-size:12px}.crop-dialog-actions .confirm{background:var(--green);color:#fff;font-weight:700}.crop-dialog-actions .confirm:disabled{opacity:.42;cursor:not-allowed}@media (max-width:1160px){.workspace{grid-template-columns:260px minmax(500px,1fr)}.color-panel{border-left:0;border-top:1px solid var(--ink);grid-column:1/-1;max-height:none}.color-list{grid-template-columns:repeat(3,1fr);gap:0 12px;max-height:300px;display:grid}.history-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:760px){.topbar{height:60px;padding:0 18px}.top-note{display:none}.hero{align-items:flex-start;padding:38px 20px 44px}.hero h1{letter-spacing:-.06em;font-size:clamp(39px,12vw,58px)}.hero-copy{margin-top:20px}.hero-badge{display:none}.workspace{border-bottom:0;grid-template-columns:1fr;margin-bottom:0}.control-panel{border-right:0;border-bottom:1px solid var(--ink);padding:24px 20px}.upload-card{height:auto;min-height:160px}.pattern-panel{min-height:620px}.pattern-toolbar{flex-direction:column;align-items:flex-start;padding:20px}.zoom-control{width:100%}.zoom-control input{flex:1}.canvas-viewport{aspect-ratio:1;flex-basis:auto;width:100%;height:auto;min-height:0}.canvas-stage{padding:10px;display:block}.canvas-wrap{margin:auto}.pattern-footer{flex-wrap:wrap;align-items:flex-start;padding:14px 18px}.view-options{justify-content:space-between;width:100%;margin:5px 0 0}.view-options button{min-height:40px}.color-panel{grid-column:auto;padding:24px 20px 38px}.color-list{max-height:430px;display:block}.legend-heading,.history-heading{flex-direction:column;align-items:stretch}.legend-list{flex-wrap:nowrap;padding-bottom:7px;overflow-x:auto}.legend-list button{flex:none}.history-section{margin:52px auto}.history-heading .search-box{width:100%}.history-grid{grid-template-columns:1fr}.crop-dialog-backdrop{padding:0}.crop-dialog{width:100vw;height:100vh;max-height:100vh;box-shadow:none;border:0}.crop-dialog-header{padding:14px 16px}.crop-dialog-header h2{font-size:18px}.crop-dialog-scroll{padding:10px}.crop-dialog-actions{flex-wrap:wrap;padding:10px 12px}.crop-dialog-actions span{order:-1;width:100%}.crop-dialog-actions button{flex:1;padding:0 10px}input,select,button{font-size:16px}.search-box input,.color-item,.selection-tools button{font-size:12px}}@media (max-width:370px){.view-options{gap:6px}.view-options label{font-size:10px}.canvas-stage{padding:8px}}@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/out/_next/static/css/index.Dq42BzaZ.css b/out/_next/static/css/index.Dq42BzaZ.css deleted file mode 100644 index 60619c7..0000000 --- a/out/_next/static/css/index.Dq42BzaZ.css +++ /dev/null @@ -1,2 +0,0 @@ -/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}::backdrop{--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.block{display:block}.table{display:table}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}:root{--ink:#202724;--muted:#69716d;--paper:#f5f1e8;--card:#fffdf8;--line:#d9d5ca;--green:#1f6b4d;--green-dark:#164b39;--lime:#cbe568;--orange:#ee7b43}*{box-sizing:border-box}html{scroll-behavior:smooth}body{background:var(--paper);color:var(--ink);margin:0;font-family:Microsoft YaHei,PingFang SC,system-ui,sans-serif}button,input,select{font:inherit}button,label,input[type=range]{-webkit-tap-highlight-color:transparent}button{color:inherit}.topbar{border-bottom:1px solid var(--line);z-index:20;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#f5f1e8eb;justify-content:space-between;align-items:center;height:72px;padding:0 clamp(20px,5vw,80px);display:flex;position:sticky;top:0}.brand{color:var(--ink);letter-spacing:.04em;align-items:center;gap:11px;font-size:20px;font-weight:800;text-decoration:none;display:flex}.brand-mark{grid-template-columns:repeat(2,8px);gap:3px;display:grid;rotate:-8deg}.brand-mark i{background:var(--green);border-radius:50%;width:8px;height:8px;box-shadow:inset -1px -1px #00000026}.brand-mark i:nth-child(2){background:var(--orange)}.brand-mark i:nth-child(3){background:var(--lime)}.top-note{color:var(--muted);letter-spacing:.08em;font-size:13px}.hero{justify-content:space-between;align-items:flex-end;gap:48px;max-width:1560px;margin:0 auto;padding:clamp(42px,7vw,92px) clamp(20px,5vw,80px) clamp(38px,6vw,72px);display:flex}.eyebrow,.section-kicker{color:var(--green);letter-spacing:.2em;margin:0 0 14px;font-size:11px;font-weight:800}.hero h1{letter-spacing:-.055em;margin:0;font-family:Georgia,Songti SC,serif;font-size:clamp(40px,6.3vw,88px);font-weight:500;line-height:1.04}.hero h1 em{color:var(--green);font-style:normal}.hero-copy{max-width:720px;color:var(--muted);margin:28px 0 0;font-size:clamp(15px,1.5vw,18px);line-height:1.8}.hero-badge{border:1px solid var(--ink);background:var(--lime);width:150px;height:150px;box-shadow:6px 6px 0 var(--ink);border-radius:50%;flex-direction:column;flex:none;justify-content:center;align-items:center;display:flex;rotate:6deg}.hero-badge strong{font-family:Georgia,serif;font-size:26px}.hero-badge span{margin-top:5px;font-size:11px}.workspace{border-top:1px solid var(--ink);border-bottom:1px solid var(--ink);background:var(--card);grid-template-columns:minmax(240px,300px) minmax(500px,1fr) minmax(260px,330px);max-width:1760px;margin:0 auto 80px;display:grid}.control-panel,.color-panel{min-width:0;padding:28px}.control-panel{border-right:1px solid var(--line)}.color-panel{border-left:1px solid var(--line);flex-direction:column;max-height:790px;display:flex}.panel-heading{align-items:flex-start;gap:14px;margin-bottom:24px;display:flex}.panel-heading>span{border:1px solid var(--ink);border-radius:50%;flex:none;place-items:center;width:32px;height:32px;font:700 11px Georgia,serif;display:grid}.panel-heading h2,.pattern-toolbar h2{margin:0;font-size:18px}.panel-heading p{color:var(--muted);margin:5px 0 0;font-size:12px}.upload-card{background:#ebe7dd;border:1px dashed #a5a59e;width:100%;min-height:100px;max-height:260px;display:block;position:relative;overflow:hidden}.upload-card canvas{pointer-events:none;width:100%;height:100%;display:block}.upload-card .file-input{display:none}.crop-preview{cursor:grab;touch-action:none}.crop-preview:active{cursor:grabbing}.crop-frame{pointer-events:none;border:2px solid #ffffffd9;position:absolute;inset:0;box-shadow:inset 0 0 0 1px #141e1938}.upload-overlay{z-index:3;color:#fff;cursor:pointer;background:#164b39e6;border:0;padding:7px 10px;font-size:12px;position:absolute;bottom:10px;right:10px}.file-name{text-overflow:ellipsis;white-space:nowrap;color:var(--muted);margin:9px 0 24px;font-size:11px;overflow:hidden}.crop-zoom{margin-top:0}.reset-crop{border:1px solid var(--line);cursor:pointer;width:100%;color:var(--muted);background:#fff;margin:7px 0 20px;padding:7px;font-size:11px}.field-row{grid-template-columns:1fr auto 1fr;align-items:end;gap:8px;display:grid}.field-row label,.field{flex-direction:column;gap:8px;display:flex}.field-row label span,.field>span{color:var(--muted);font-size:12px}.field-row input,.field select{border:1px solid var(--line);background:#fff;border-radius:0;outline:none;width:100%;height:43px;padding:0 10px}.field-row input:focus,.field select:focus,.search-box:focus-within{border-color:var(--green);box-shadow:0 0 0 2px #1f6b4d1c}.times{color:var(--muted);padding-bottom:11px}.field{margin-top:22px}.field>span{justify-content:space-between;display:flex}.field b{color:var(--green)}input[type=range]{accent-color:var(--green)}.primary-button{border:1px solid var(--ink);background:var(--green);color:#fff;cursor:pointer;width:100%;min-height:48px;box-shadow:3px 3px 0 var(--ink);margin-top:24px;font-weight:700;transition:transform .15s,box-shadow .15s}.primary-button:hover{box-shadow:1px 1px 0 var(--ink);transform:translate(2px,2px)}.privacy-note,.palette-note{color:var(--muted);margin:16px 0 0;font-size:11px;line-height:1.6}.pattern-panel{background-color:#f1eee6;background-image:radial-gradient(#cbc6ba .7px,#0000 .7px);background-size:12px 12px;flex-direction:column;min-width:0;display:flex}.pattern-toolbar{background:var(--card);border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:24px;min-height:90px;padding:22px 28px;display:flex}.pattern-toolbar .section-kicker{margin-bottom:5px}.zoom-control{align-items:center;gap:7px;display:flex}.zoom-control button{border:1px solid var(--line);cursor:pointer;background:#fff;width:36px;height:36px;font-size:20px}.zoom-control input{width:95px}.zoom-control output{width:38px;color:var(--muted);text-align:right;font-size:11px}.canvas-viewport{aspect-ratio:1;contain:size layout;flex:none;align-self:stretch;width:100%;height:auto;min-height:0;position:relative;overflow:hidden}.canvas-stage{cursor:grab;touch-action:none;overscroll-behavior:contain;-webkit-user-select:none;user-select:none;scrollbar-gutter:stable;width:auto;height:auto;padding:12px;display:block;position:absolute;inset:0;overflow:scroll}.canvas-stage.is-dragging{cursor:grabbing}.canvas-wrap{border:1px solid var(--ink);background-color:#f7f5ef;background-image:linear-gradient(45deg,#dedbd3 25%,#0000 25%),linear-gradient(-45deg,#dedbd3 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#dedbd3 75%),linear-gradient(-45deg,#0000 75%,#dedbd3 75%);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px;width:max-content;margin:auto;line-height:0;position:relative}.canvas-wrap canvas{cursor:inherit;image-rendering:pixelated}.pixel-tooltip{z-index:5;color:#fff;pointer-events:none;background:#161e1bf0;border:1px solid #fff3;border-radius:3px;grid-template-columns:14px auto;align-items:center;gap:3px 8px;width:max-content;max-width:260px;padding:9px 11px;line-height:1.35;display:grid;position:absolute;box-shadow:4px 4px #0003}.tooltip-swatch{border:1px solid #fff9;border-radius:50%;grid-row:1/3;width:14px;height:14px}.pixel-tooltip strong{font-size:11px}.pixel-tooltip small{color:#dce4df;font-size:10px}.pattern-footer{background:var(--card);border-top:1px solid var(--line);min-height:62px;color:var(--muted);align-items:center;gap:9px;padding:12px 22px;font-size:11px;display:flex}.status-dot{background:var(--green);border-radius:50%;width:7px;height:7px;box-shadow:0 0 0 3px #1f6b4d24}.view-options{align-items:center;gap:14px;margin-left:auto;display:flex}.view-options label{white-space:nowrap;align-items:center;gap:4px;display:flex}.view-options button{border:1px solid var(--ink);background:var(--lime);cursor:pointer;padding:8px 11px;font-weight:700}.view-options .save-button{background:#fff}.pattern-legend{background:var(--card);border-top:1px solid var(--line);padding:18px 22px 22px}.legend-heading{justify-content:space-between;gap:12px;margin-bottom:12px;display:flex}.legend-heading strong{font-size:13px}.legend-heading span{color:var(--muted);font-size:10px}.legend-list{flex-wrap:wrap;gap:7px;display:flex}.legend-list button{border:1px solid var(--line);cursor:pointer;background:#fff;align-items:center;gap:5px;min-height:34px;padding:5px 8px 5px 6px;font-size:10px;display:flex}.legend-list button.active{border-color:var(--ink);box-shadow:2px 2px 0 var(--ink);background:#f0f6df}.legend-list i{border:1px solid #20272440;border-radius:3px;width:20px;height:20px}.legend-list span{color:var(--muted)}.legend-list b{border-left:1px solid var(--line);padding-left:5px}.search-box{border:1px solid var(--line);background:#fff;align-items:center;gap:8px;height:43px;padding:0 12px;display:flex}.search-box span{font-size:22px}.search-box input{background:0 0;border:0;outline:0;width:100%;min-width:0;font-size:12px}.selection-tools{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:8px;min-height:52px;display:flex}.switch-row{cursor:pointer;align-items:center;gap:7px;font-size:11px;display:flex}.switch-row input{opacity:0;position:absolute}.switch{background:#bbb;border-radius:12px;width:30px;height:17px;transition:all .2s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:13px;height:13px;transition:all .2s;position:absolute;top:2px;left:2px}.switch-row input:checked+.switch{background:var(--green)}.switch-row input:checked+.switch:after{translate:13px}.selection-tools button{color:var(--green);cursor:pointer;background:0 0;border:0;font-size:11px}.color-list{scrollbar-width:thin;min-height:220px;margin:8px -8px 0;padding:0 8px;overflow-y:auto}.color-item{cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-bottom-color:#ebe7dd;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:58px;padding:8px;display:grid}.color-item:hover{background:#f7f4ed}.color-item.active{border-color:var(--ink);box-shadow:2px 2px 0 var(--ink);background:#f0f6df}.swatch{border:1px solid #20272447;border-radius:50%;width:30px;height:30px;box-shadow:inset -2px -2px #00000014}.color-meta{flex-direction:column;gap:3px;min-width:0;display:flex}.color-meta strong{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.color-meta small{color:var(--muted);font:9px ui-monospace,monospace}.color-item>b{text-align:right;font:700 16px Georgia,serif}.color-item>b small{color:var(--muted);margin-left:2px;font:9px sans-serif}.history-section{max-width:1560px;margin:0 auto 90px;padding:0 clamp(20px,5vw,80px)}.history-heading{border-bottom:1px solid var(--ink);justify-content:space-between;align-items:flex-end;gap:24px;padding-bottom:22px;display:flex}.history-heading h2{margin:0;font:500 clamp(30px,4vw,50px) Georgia,Songti SC,serif}.history-heading p:not(.section-kicker){color:var(--muted);margin:8px 0 0;font-size:12px}.history-heading .search-box{width:min(330px,100%)}.history-grid{grid-template-columns:repeat(3,1fr);gap:14px;padding-top:18px;display:grid}.history-card{border:1px solid var(--line);background:var(--card);grid-template-columns:58px minmax(0,1fr);gap:12px;min-width:0;padding:16px;display:grid}.history-swatches{border:1px solid var(--ink);width:58px;height:58px;display:flex;overflow:hidden}.history-swatches i{min-width:3px}.history-card h3{text-overflow:ellipsis;white-space:nowrap;margin:3px 0 7px;font-size:14px;overflow:hidden}.history-card p{color:var(--muted);margin:0;font-size:10px}.history-actions{grid-column:1/-1;justify-content:flex-end;gap:7px;display:flex}.history-actions button{border:1px solid var(--ink);cursor:pointer;background:#fff;min-height:34px;padding:0 14px;font-size:11px}.history-actions button:first-child{background:var(--lime);font-weight:700}.history-empty{color:var(--muted);text-align:center;border:1px dashed var(--line);background:#fffdf880;margin-top:18px;padding:44px 20px;font-size:13px}@media (max-width:1160px){.workspace{grid-template-columns:260px minmax(500px,1fr)}.color-panel{border-left:0;border-top:1px solid var(--ink);grid-column:1/-1;max-height:none}.color-list{grid-template-columns:repeat(3,1fr);gap:0 12px;max-height:300px;display:grid}.history-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:760px){.topbar{height:60px;padding:0 18px}.top-note{display:none}.hero{align-items:flex-start;padding:38px 20px 44px}.hero h1{letter-spacing:-.06em;font-size:clamp(39px,12vw,58px)}.hero-copy{margin-top:20px}.hero-badge{display:none}.workspace{border-bottom:0;grid-template-columns:1fr;margin-bottom:0}.control-panel{border-right:0;border-bottom:1px solid var(--ink);padding:24px 20px}.upload-card{height:auto;min-height:160px}.pattern-panel{min-height:620px}.pattern-toolbar{flex-direction:column;align-items:flex-start;padding:20px}.zoom-control{width:100%}.zoom-control input{flex:1}.canvas-viewport{aspect-ratio:1;flex-basis:auto;width:100%;height:auto;min-height:0}.canvas-stage{padding:10px;display:block}.canvas-wrap{margin:auto}.pattern-footer{flex-wrap:wrap;align-items:flex-start;padding:14px 18px}.view-options{justify-content:space-between;width:100%;margin:5px 0 0}.view-options button{min-height:40px}.color-panel{grid-column:auto;padding:24px 20px 38px}.color-list{max-height:430px;display:block}.legend-heading,.history-heading{flex-direction:column;align-items:stretch}.legend-list{flex-wrap:nowrap;padding-bottom:7px;overflow-x:auto}.legend-list button{flex:none}.history-section{margin:52px auto}.history-heading .search-box{width:100%}.history-grid{grid-template-columns:1fr}input,select,button{font-size:16px}.search-box input,.color-item,.selection-tools button{font-size:12px}}@media (max-width:370px){.view-options{gap:6px}.view-options label{font-size:10px}.canvas-stage{padding:8px}}@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/out/index.html b/out/index.html index fa27907..990d9db 100644 --- a/out/index.html +++ b/out/index.html @@ -1,2 +1,2 @@ -豆格工坊|图片转拼豆图纸 -
豆格工坊图片转拼豆图纸 · 本地处理

PIXEL BEAD STUDIO

把喜欢的图片,
变成一格一格的快乐。

上传图片,选择图纸大小和颜色数量;点击任意像素格,就能单独查看该颜色需要摆放的区域。

100 × 100当前图纸格数

02 / 图纸预览

点击格子,筛选颜色

8px
本图所需颜色与用量按数量从多到少,共 0

LOCAL PATTERN ARCHIVE

历史图纸

历史保存在当前浏览器,最多保留 30 份。

还没有符合条件的历史图纸。转换完成后点击“保存历史”即可在这里查询。
\ No newline at end of file +豆格工坊|图片转拼豆图纸 +
豆格工坊图片转拼豆图纸 · 本地处理

PIXEL BEAD STUDIO

把喜欢的图片,
变成一格一格的快乐。

上传图片,选择图纸大小和颜色数量;点击任意像素格,就能单独查看该颜色需要摆放的区域。

100 × 100当前图纸格数

02 / 图纸预览

点击格子,筛选颜色

8px
本图所需颜色与用量按数量从多到少,共 0

LOCAL PATTERN ARCHIVE

历史图纸

历史保存在当前浏览器,最多保留 30 份。

还没有符合条件的历史图纸。转换完成后点击“保存历史”即可在这里查询。
\ No newline at end of file diff --git a/out/index.rsc b/out/index.rsc index ed0e6d9..cee1b63 100644 --- a/out/index.rsc +++ b/out/index.rsc @@ -6,8 +6,8 @@ 7:I["8c0f216c4604",[],"Slot",1] 8:I["9276801271d6",[],"AppRouterScrollTarget",1] 9:I["593f344dc510",[],"RedirectBoundary",1] -:HL["/_next/static/css/index.Dq42BzaZ.css","style" ] -0:{"__route":"route:/","__interceptionContext":null,"__layoutIds":["layout:/"],"__rootLayout":"/","__sourcePage":"/page","page:/":"$L1","layout:/":[[[["$","link","css:/_next/static/css/index.Dq42BzaZ.css",{"rel":"stylesheet","precedence":"vite-rsc/importer-resources","href":"/_next/static/css/index.Dq42BzaZ.css","data-rsc-css-href":"/_next/static/css/index.Dq42BzaZ.css"}],"$undefined"],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"children":["$","$L2",null,{}]}]}]],null],"route:/":[[["$","meta",null,{"charSet":"utf-8"}],[["$","title","0",{"children":"豆格工坊|图片转拼豆图纸"}],["$","meta","1",{"name":"description","content":"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"}]],[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]],["$","$L3",null,{"fallback":"$4","children":["$","$L5",null,{"fallback":"$4","children":["$","$L6",null,{"providerId":"layout:/","segmentMap":{"children":[]},"children":["$","$L7",null,{"id":"layout:/","parallelSlots":"$undefined","children":["$","$L8",null,{"children":["$","$L9",null,{"children":[["$","$L6",null,{"providerId":"page:/","segmentMap":{"children":["__PAGE__"]},"children":["$","$L7",null,{"id":"page:/"}]}],null]}]}]}]}]}]}],null,null],"__layoutFlags":{"layout:/":"s"},"__artifactCompatibility":{"schemaVersion":1,"graphVersion":"app-route-graph:1177fd80f83fa7b0","deploymentVersion":"91d6b0b4-aeca-4c4d-9c3c-27cc5139b142","appElementsSchemaVersion":1,"rscPayloadSchemaVersion":1,"rootBoundaryId":"/","renderEpoch":null},"__renderObservation":{"schemaVersion":1,"output":{"kind":"app-rsc","mountedSlotsFingerprint":null,"renderEpoch":null,"rootBoundaryId":"/","routeId":"route:/"},"completeness":"partial","boundaryOutcome":{"kind":"unknown"},"requestApis":[{"kind":"connection","status":"unknown"},{"kind":"cookies","status":"unknown"},{"kind":"draftMode","status":"unknown"},{"kind":"headers","status":"unknown"},{"kind":"params","status":"unknown"},{"kind":"searchParams","status":"unknown"}],"dynamicFetches":[],"cacheTags":["/","_N_T_/","_N_T_/index","_N_T_/layout","_N_T_/page"],"pathTags":["/"],"cacheability":"unknown","downgrade":{"target":"freshRender","reasons":[{"code":"CP_DOWNGRADE_CACHEABILITY_UNKNOWN","target":"freshRender"},{"code":"CP_DOWNGRADE_INCOMPLETE_OBSERVATION","completeness":"partial","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"connection","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"cookies","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"draftMode","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"headers","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"params","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"searchParams","target":"freshRender"}],"fallback":{"kind":"breakerFallback","code":"CP_PRIVATE_DYNAMIC_DOWNGRADE","mode":"renderFresh","scope":"affectedOutput","fields":{"reasonCodes":["CP_DOWNGRADE_CACHEABILITY_UNKNOWN","CP_DOWNGRADE_INCOMPLETE_OBSERVATION","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API"],"target":"freshRender"}},"isPublicCacheCandidate":false}}} +:HL["/_next/static/css/index.BD45GRB0.css","style" ] +0:{"__route":"route:/","__interceptionContext":null,"__layoutIds":["layout:/"],"__rootLayout":"/","__sourcePage":"/page","page:/":"$L1","layout:/":[[[["$","link","css:/_next/static/css/index.BD45GRB0.css",{"rel":"stylesheet","precedence":"vite-rsc/importer-resources","href":"/_next/static/css/index.BD45GRB0.css","data-rsc-css-href":"/_next/static/css/index.BD45GRB0.css"}],"$undefined"],["$","html",null,{"lang":"zh-CN","children":["$","body",null,{"children":["$","$L2",null,{}]}]}]],null],"route:/":[[["$","meta",null,{"charSet":"utf-8"}],[["$","title","0",{"children":"豆格工坊|图片转拼豆图纸"}],["$","meta","1",{"name":"description","content":"在浏览器中把图片转换为拼豆像素图纸,按色号、名称或像素格筛选颜色。"}]],[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]],["$","$L3",null,{"fallback":"$4","children":["$","$L5",null,{"fallback":"$4","children":["$","$L6",null,{"providerId":"layout:/","segmentMap":{"children":[]},"children":["$","$L7",null,{"id":"layout:/","parallelSlots":"$undefined","children":["$","$L8",null,{"children":["$","$L9",null,{"children":[["$","$L6",null,{"providerId":"page:/","segmentMap":{"children":["__PAGE__"]},"children":["$","$L7",null,{"id":"page:/"}]}],null]}]}]}]}]}]}],null,null],"__layoutFlags":{"layout:/":"s"},"__artifactCompatibility":{"schemaVersion":1,"graphVersion":"app-route-graph:1177fd80f83fa7b0","deploymentVersion":"976d8e63-a1e8-4c46-b57a-876eef7ec109","appElementsSchemaVersion":1,"rscPayloadSchemaVersion":1,"rootBoundaryId":"/","renderEpoch":null},"__renderObservation":{"schemaVersion":1,"output":{"kind":"app-rsc","mountedSlotsFingerprint":null,"renderEpoch":null,"rootBoundaryId":"/","routeId":"route:/"},"completeness":"partial","boundaryOutcome":{"kind":"unknown"},"requestApis":[{"kind":"connection","status":"unknown"},{"kind":"cookies","status":"unknown"},{"kind":"draftMode","status":"unknown"},{"kind":"headers","status":"unknown"},{"kind":"params","status":"unknown"},{"kind":"searchParams","status":"unknown"}],"dynamicFetches":[],"cacheTags":["/","_N_T_/","_N_T_/index","_N_T_/layout","_N_T_/page"],"pathTags":["/"],"cacheability":"unknown","downgrade":{"target":"freshRender","reasons":[{"code":"CP_DOWNGRADE_CACHEABILITY_UNKNOWN","target":"freshRender"},{"code":"CP_DOWNGRADE_INCOMPLETE_OBSERVATION","completeness":"partial","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"connection","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"cookies","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"draftMode","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"headers","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"params","target":"freshRender"},{"code":"CP_DOWNGRADE_UNKNOWN_REQUEST_API","requestApi":"searchParams","target":"freshRender"}],"fallback":{"kind":"breakerFallback","code":"CP_PRIVATE_DYNAMIC_DOWNGRADE","mode":"renderFresh","scope":"affectedOutput","fields":{"reasonCodes":["CP_DOWNGRADE_CACHEABILITY_UNKNOWN","CP_DOWNGRADE_INCOMPLETE_OBSERVATION","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API","CP_DOWNGRADE_UNKNOWN_REQUEST_API"],"target":"freshRender"}},"isPublicCacheCandidate":false}}} a:I["6efdf509a785",[],"default",1] 1:["$","$La",null,{"params":"$@b","searchParams":"$@c"}] b:{} diff --git a/out/vinext-client-entry-manifest.json b/out/vinext-client-entry-manifest.json index f4a0a3e..922a0ec 100644 --- a/out/vinext-client-entry-manifest.json +++ b/out/vinext-client-entry-manifest.json @@ -1,3 +1,3 @@ { - "appBrowserEntry": "_next/static/chunks/index-ByP43Bdw.js" + "appBrowserEntry": "_next/static/chunks/index-DAoL2pdt.js" }